添加无形资产清单
This commit is contained in:
parent
a0c89a836f
commit
365d2159ec
|
@ -0,0 +1,255 @@
|
|||
package rms;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class Intangible {
|
||||
/**领用单位号*/
|
||||
@ExcelProperty("collecting_unit_number")//Excel中的列名
|
||||
private java.lang.String collectingUnitNumber;
|
||||
/**仪器编号*/
|
||||
@ExcelProperty("intangible_number")//Excel中的列名
|
||||
private java.lang.String intangibleNumber;
|
||||
/**仪器名称*/
|
||||
@ExcelProperty("intangible_name")//Excel中的列名
|
||||
private java.lang.String intangibleName;
|
||||
/**分类号*/
|
||||
@ExcelProperty("category_id")//Excel中的列名
|
||||
private java.lang.String categoryId;
|
||||
/**单价*/
|
||||
@ExcelProperty("unit_price")//Excel中的列名
|
||||
private String unitPrice;
|
||||
/**购置日期*/
|
||||
@ExcelProperty("purchase_date")//Excel中的列名
|
||||
private java.util.Date purchasedate;
|
||||
/**专利申请号*/
|
||||
@ExcelProperty("patent_application_number")//Excel中的列名
|
||||
private java.lang.String patentApplicationNumber;
|
||||
/**发明人*/
|
||||
@ExcelProperty("inventor")//Excel中的列名
|
||||
private java.lang.String inventor;
|
||||
/**发明名称*/
|
||||
@ExcelProperty("invention_name")//Excel中的列名
|
||||
private java.lang.String inventionName;
|
||||
/**注册日期*/
|
||||
@ExcelProperty("registration_date")//Excel中的列名
|
||||
private java.util.Date registrationDate;
|
||||
/**注册机关*/
|
||||
@ExcelProperty("registration_authority")//Excel中的列名
|
||||
private java.lang.String registrationAuthority;
|
||||
/**授权公告日*/
|
||||
@ExcelProperty("authorization_announcement")//Excel中的列名
|
||||
private java.util.Date authorizationAnnouncement;
|
||||
/**批准文号*/
|
||||
@ExcelProperty("approval_number")//Excel中的列名
|
||||
private java.lang.String approvalNumber;
|
||||
|
||||
/**领用人*/
|
||||
@ExcelProperty("recipient")//Excel中的列名
|
||||
private java.lang.String recipient;
|
||||
/**入库时间*/
|
||||
@ExcelProperty("entry_date")//Excel中的列名
|
||||
private java.util.Date entryDate;
|
||||
/**单据号*/
|
||||
@ExcelProperty("document_number")//Excel中的列名
|
||||
private java.lang.String documentNumber;
|
||||
//存放地名
|
||||
@ExcelProperty("location_id")//Excel中的列名
|
||||
private String locationName;
|
||||
/**备注*/
|
||||
@ExcelProperty("note")//Excel中的列名
|
||||
private String note;
|
||||
/**审核状态*/
|
||||
@ExcelProperty("approval_status")//Excel中的列名
|
||||
private java.lang.String approvalStatus;
|
||||
/**初审状态*/
|
||||
@ExcelProperty("initial_audit")//Excel中的列名
|
||||
private java.lang.String initialAudit;
|
||||
|
||||
public Intangible() {
|
||||
}
|
||||
|
||||
public Intangible(String collectingUnitNumber, String intangibleNumber, String intangibleName, String categoryId, String unitPrice, Date purchasedate, String patentApplicationNumber, String inventor, String inventionName, Date registrationDate, String registrationAuthority, Date authorizationAnnouncement, String approvalNumber, String recipient, Date entryDate, String documentNumber, String locationName, String note, String approvalStatus, String initialAudit) {
|
||||
this.collectingUnitNumber = collectingUnitNumber;
|
||||
this.intangibleNumber = intangibleNumber;
|
||||
this.intangibleName = intangibleName;
|
||||
this.categoryId = categoryId;
|
||||
this.unitPrice = unitPrice;
|
||||
this.purchasedate = purchasedate;
|
||||
this.patentApplicationNumber = patentApplicationNumber;
|
||||
this.inventor = inventor;
|
||||
this.inventionName = inventionName;
|
||||
this.registrationDate = registrationDate;
|
||||
this.registrationAuthority = registrationAuthority;
|
||||
this.authorizationAnnouncement = authorizationAnnouncement;
|
||||
this.approvalNumber = approvalNumber;
|
||||
this.recipient = recipient;
|
||||
this.entryDate = entryDate;
|
||||
this.documentNumber = documentNumber;
|
||||
this.locationName = locationName;
|
||||
this.note = note;
|
||||
this.approvalStatus = approvalStatus;
|
||||
this.initialAudit = initialAudit;
|
||||
}
|
||||
|
||||
public String getCollectingUnitNumber() {
|
||||
return collectingUnitNumber;
|
||||
}
|
||||
|
||||
public void setCollectingUnitNumber(String collectingUnitNumber) {
|
||||
this.collectingUnitNumber = collectingUnitNumber;
|
||||
}
|
||||
|
||||
public String getIntangibleNumber() {
|
||||
return intangibleNumber;
|
||||
}
|
||||
|
||||
public void setIntangibleNumber(String intangibleNumber) {
|
||||
this.intangibleNumber = intangibleNumber;
|
||||
}
|
||||
|
||||
public String getIntangibleName() {
|
||||
return intangibleName;
|
||||
}
|
||||
|
||||
public void setIntangibleName(String intangibleName) {
|
||||
this.intangibleName = intangibleName;
|
||||
}
|
||||
|
||||
public String getCategoryId() {
|
||||
return categoryId;
|
||||
}
|
||||
|
||||
public void setCategoryId(String categoryId) {
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public String getUnitPrice() {
|
||||
return unitPrice;
|
||||
}
|
||||
|
||||
public void setUnitPrice(String unitPrice) {
|
||||
this.unitPrice = unitPrice;
|
||||
}
|
||||
|
||||
public Date getPurchasedate() {
|
||||
return purchasedate;
|
||||
}
|
||||
|
||||
public void setPurchasedate(Date purchasedate) {
|
||||
this.purchasedate = purchasedate;
|
||||
}
|
||||
|
||||
public String getPatentApplicationNumber() {
|
||||
return patentApplicationNumber;
|
||||
}
|
||||
|
||||
public void setPatentApplicationNumber(String patentApplicationNumber) {
|
||||
this.patentApplicationNumber = patentApplicationNumber;
|
||||
}
|
||||
|
||||
public String getInventor() {
|
||||
return inventor;
|
||||
}
|
||||
|
||||
public void setInventor(String inventor) {
|
||||
this.inventor = inventor;
|
||||
}
|
||||
|
||||
public String getInventionName() {
|
||||
return inventionName;
|
||||
}
|
||||
|
||||
public void setInventionName(String inventionName) {
|
||||
this.inventionName = inventionName;
|
||||
}
|
||||
|
||||
public Date getRegistrationDate() {
|
||||
return registrationDate;
|
||||
}
|
||||
|
||||
public void setRegistrationDate(Date registrationDate) {
|
||||
this.registrationDate = registrationDate;
|
||||
}
|
||||
|
||||
public String getRegistrationAuthority() {
|
||||
return registrationAuthority;
|
||||
}
|
||||
|
||||
public void setRegistrationAuthority(String registrationAuthority) {
|
||||
this.registrationAuthority = registrationAuthority;
|
||||
}
|
||||
|
||||
public Date getAuthorizationAnnouncement() {
|
||||
return authorizationAnnouncement;
|
||||
}
|
||||
|
||||
public void setAuthorizationAnnouncement(Date authorizationAnnouncement) {
|
||||
this.authorizationAnnouncement = authorizationAnnouncement;
|
||||
}
|
||||
|
||||
public String getApprovalNumber() {
|
||||
return approvalNumber;
|
||||
}
|
||||
|
||||
public void setApprovalNumber(String approvalNumber) {
|
||||
this.approvalNumber = approvalNumber;
|
||||
}
|
||||
|
||||
public String getRecipient() {
|
||||
return recipient;
|
||||
}
|
||||
|
||||
public void setRecipient(String recipient) {
|
||||
this.recipient = recipient;
|
||||
}
|
||||
|
||||
public Date getEntryDate() {
|
||||
return entryDate;
|
||||
}
|
||||
|
||||
public void setEntryDate(Date entryDate) {
|
||||
this.entryDate = entryDate;
|
||||
}
|
||||
|
||||
public String getDocumentNumber() {
|
||||
return documentNumber;
|
||||
}
|
||||
|
||||
public void setDocumentNumber(String documentNumber) {
|
||||
this.documentNumber = documentNumber;
|
||||
}
|
||||
|
||||
public String getLocationName() {
|
||||
return locationName;
|
||||
}
|
||||
|
||||
public void setLocationName(String locationName) {
|
||||
this.locationName = locationName;
|
||||
}
|
||||
|
||||
public String getNote() {
|
||||
return note;
|
||||
}
|
||||
|
||||
public void setNote(String note) {
|
||||
this.note = note;
|
||||
}
|
||||
|
||||
public String getApprovalStatus() {
|
||||
return approvalStatus;
|
||||
}
|
||||
|
||||
public void setApprovalStatus(String approvalStatus) {
|
||||
this.approvalStatus = approvalStatus;
|
||||
}
|
||||
|
||||
public String getInitialAudit() {
|
||||
return initialAudit;
|
||||
}
|
||||
|
||||
public void setInitialAudit(String initialAudit) {
|
||||
this.initialAudit = initialAudit;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
package rms.controller;
|
||||
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.excel.context.AnalysisContext;
|
||||
import com.alibaba.excel.event.AnalysisEventListener;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import rms.Intangible;
|
||||
import rms.entity.RmsIntangible;
|
||||
import rms.service.IRmsIntangibleService;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
//添加表格数据到数据库中
|
||||
@Api(tags="无形资产")
|
||||
@RestController
|
||||
@RequestMapping("/rms/rmsIntangible")
|
||||
class AddDataController {
|
||||
@Autowired
|
||||
private IRmsIntangibleService rmsIntangibleService;
|
||||
@GetMapping("/addData")
|
||||
public Result<String> addData() {
|
||||
/**'
|
||||
* 1. 读取表格
|
||||
*/
|
||||
ArrayList<Intangible> intangibleArrayList = new ArrayList<>();
|
||||
//定义excell文件路径
|
||||
String fileName = "C:/Users/Xubx/Favorites/OneDrive/桌面/rms_target_intangible.xls";
|
||||
//使用EasyExcel读取excel文件
|
||||
EasyExcel.read(fileName, Intangible.class, new AnalysisEventListener<Intangible>() {
|
||||
@Override
|
||||
public void invoke(Intangible intangible, AnalysisContext analysisContext) {
|
||||
//将读取到的数据存储到list集合里
|
||||
intangibleArrayList.add(intangible);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doAfterAllAnalysed(AnalysisContext analysisContext) {
|
||||
//读取完后的操作
|
||||
}
|
||||
}).sheet().doRead();
|
||||
System.out.println(intangibleArrayList.size());
|
||||
System.out.println(intangibleArrayList);
|
||||
/**
|
||||
* 将表格list用set为实体类
|
||||
*/
|
||||
ArrayList<RmsIntangible> rmsInstrumentArrayList = new ArrayList<>();
|
||||
|
||||
for (Intangible intangible : intangibleArrayList) {
|
||||
RmsIntangible rmsInstrument = new RmsIntangible();
|
||||
rmsInstrument.setCollectingUnitNumber(intangible.getCollectingUnitNumber());
|
||||
rmsInstrument.setIntangibleNumber(intangible.getIntangibleNumber());
|
||||
rmsInstrument.setIntangibleName(intangible.getIntangibleName());
|
||||
rmsInstrument.setCategoryId(intangible.getCategoryId());
|
||||
rmsInstrument.setUnitPrice(intangible.getUnitPrice());
|
||||
rmsInstrument.setPurchaseDate(intangible.getPurchasedate());
|
||||
rmsInstrument.setPatentApplicationNumber(intangible.getPatentApplicationNumber());
|
||||
rmsInstrument.setInventor(intangible.getInventor());
|
||||
rmsInstrument.setInventionName(intangible.getInventionName());
|
||||
rmsInstrument.setRegistrationDate(intangible.getRegistrationDate());
|
||||
rmsInstrument.setRegistrationAuthority(intangible.getRegistrationAuthority());
|
||||
rmsInstrument.setAuthorizationAnnouncement(intangible.getAuthorizationAnnouncement());
|
||||
rmsInstrument.setApprovalNumber(intangible.getApprovalNumber());
|
||||
rmsInstrument.setRecipient(intangible.getRecipient());
|
||||
rmsInstrument.setEntryDate(intangible.getEntryDate());
|
||||
rmsInstrument.setDocumentNumber(intangible.getDocumentNumber());
|
||||
rmsInstrument.setLocationId(intangible.getLocationName());
|
||||
rmsInstrument.setNote(intangible.getNote());
|
||||
rmsInstrument.setApprovalStatus(intangible.getApprovalStatus());
|
||||
rmsInstrument.setInitialAudit(intangible.getInitialAudit());
|
||||
rmsInstrumentArrayList.add(rmsInstrument);
|
||||
}
|
||||
/**
|
||||
* 遍历list save
|
||||
*/
|
||||
for (RmsIntangible rmsIntangible : rmsInstrumentArrayList) {
|
||||
rmsIntangibleService.save(rmsIntangible);
|
||||
}
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
}
|
|
@ -24,6 +24,7 @@ public class RmsDepartController {
|
|||
}
|
||||
@GetMapping("getChart")
|
||||
public List<Integer> getChart(){
|
||||
System.out.println("locationCount"+rmsChartService.getLocationCount());
|
||||
return rmsChartService.getLocationCount();
|
||||
}
|
||||
@GetMapping("getInstrumentCount")
|
||||
|
|
|
@ -67,8 +67,7 @@ public class RmsFurnitureController extends JeecgController<RmsFurniture, IRmsFu
|
|||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
IPage<RmsFurnitureModel> result = rmsFurnitureService.queryAllFurniture(rmsFurnitureModel, pageNo, pageSize, req);
|
||||
|
||||
IPage<RmsFurnitureModel> result = rmsFurnitureService.queryAllRmsFurniture(rmsFurnitureModel, pageNo, pageSize, req);
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,158 @@
|
|||
package rms.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import rms.entity.RmsIntangible;
|
||||
import rms.model.RmsFurnitureModel;
|
||||
import rms.model.RmsInstrumentModel;
|
||||
import rms.model.RmsIntangibleModel;
|
||||
import rms.service.IRmsIntangibleService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 无形资产
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-11-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="无形资产")
|
||||
@RestController
|
||||
@RequestMapping("/rms/rmsIntangible")
|
||||
@Slf4j
|
||||
public class RmsIntangibleController extends JeecgController<RmsIntangible, IRmsIntangibleService> {
|
||||
@Autowired
|
||||
private IRmsIntangibleService rmsIntangibleService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param rmsIntangible
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "无形资产-分页列表查询")
|
||||
@ApiOperation(value="无形资产-分页列表查询", notes="无形资产-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<RmsIntangibleModel>> queryPageList(RmsIntangibleModel rmsIntangibleModel,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
IPage<RmsIntangibleModel> result = rmsIntangibleService.queryAllRmsIntangible(rmsIntangibleModel, pageNo, pageSize, req);
|
||||
return Result.OK(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param rmsIntangible
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "无形资产-添加")
|
||||
@ApiOperation(value="无形资产-添加", notes="无形资产-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody RmsIntangible rmsIntangible) {
|
||||
rmsIntangibleService.save(rmsIntangible);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param rmsIntangible
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "无形资产-编辑")
|
||||
@ApiOperation(value="无形资产-编辑", notes="无形资产-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody RmsIntangible rmsIntangible) {
|
||||
rmsIntangibleService.updateById(rmsIntangible);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "无形资产-通过id删除")
|
||||
@ApiOperation(value="无形资产-通过id删除", notes="无形资产-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
rmsIntangibleService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "无形资产-批量删除")
|
||||
@ApiOperation(value="无形资产-批量删除", notes="无形资产-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.rmsIntangibleService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "无形资产-通过id查询")
|
||||
@ApiOperation(value="无形资产-通过id查询", notes="无形资产-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<RmsIntangible> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
RmsIntangible rmsIntangible = rmsIntangibleService.getById(id);
|
||||
if(rmsIntangible==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(rmsIntangible);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param rmsIntangible
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, RmsIntangible rmsIntangible) {
|
||||
return super.exportXls(request, rmsIntangible, RmsIntangible.class, "无形资产");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, RmsIntangible.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,154 @@
|
|||
package rms.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 无形资产
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-11-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("rms_intangible")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="rms_intangible对象", description="无形资产")
|
||||
public class RmsIntangible implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**主键*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "主键")
|
||||
private java.lang.String id;
|
||||
/**创建人*/
|
||||
@ApiModelProperty(value = "创建人")
|
||||
private java.lang.String createBy;
|
||||
/**创建日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "创建日期")
|
||||
private java.util.Date createTime;
|
||||
/**更新人*/
|
||||
@ApiModelProperty(value = "更新人")
|
||||
private java.lang.String updateBy;
|
||||
/**更新日期*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "更新日期")
|
||||
private java.util.Date updateTime;
|
||||
/**所属部门*/
|
||||
@ApiModelProperty(value = "所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
/**领用单位号*/
|
||||
@Excel(name = "领用单位号", width = 15)
|
||||
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
|
||||
@ApiModelProperty(value = "领用单位号")
|
||||
private java.lang.String collectingUnitNumber;
|
||||
/**资产编号*/
|
||||
@Excel(name = "资产编号", width = 15)
|
||||
@ApiModelProperty(value = "资产编号")
|
||||
private java.lang.String intangibleNumber;
|
||||
/**资产名称*/
|
||||
@Excel(name = "资产名称", width = 15)
|
||||
@ApiModelProperty(value = "资产名称")
|
||||
private java.lang.String intangibleName;
|
||||
/**分类号*/
|
||||
@Excel(name = "分类号", width = 15)
|
||||
@ApiModelProperty(value = "分类号")
|
||||
private java.lang.String categoryId;
|
||||
/**单价*/
|
||||
@Excel(name = "单价", width = 15)
|
||||
@ApiModelProperty(value = "单价")
|
||||
private java.lang.String unitPrice;
|
||||
/**购置日期*/
|
||||
@Excel(name = "购置日期", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "购置日期")
|
||||
private java.util.Date purchaseDate;
|
||||
/**专利申请号*/
|
||||
@Excel(name = "专利申请号", width = 15)
|
||||
@ApiModelProperty(value = "专利申请号")
|
||||
private java.lang.String patentApplicationNumber;
|
||||
/**发明人*/
|
||||
@Excel(name = "发明人", width = 15)
|
||||
@ApiModelProperty(value = "发明人")
|
||||
private java.lang.String inventor;
|
||||
/**发明名称*/
|
||||
@Excel(name = "发明名称", width = 15)
|
||||
@ApiModelProperty(value = "发明名称")
|
||||
private java.lang.String inventionName;
|
||||
/**注册日期*/
|
||||
@Excel(name = "注册日期", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "注册日期")
|
||||
private java.util.Date registrationDate;
|
||||
/**注册机关*/
|
||||
@Excel(name = "注册机关", width = 15)
|
||||
@ApiModelProperty(value = "注册机关")
|
||||
private java.lang.String registrationAuthority;
|
||||
/**授权公告日*/
|
||||
@Excel(name = "授权公告日", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "授权公告日")
|
||||
private java.util.Date authorizationAnnouncement;
|
||||
/**批准文号*/
|
||||
@Excel(name = "批准文号", width = 15)
|
||||
@ApiModelProperty(value = "批准文号")
|
||||
private java.lang.String approvalNumber;
|
||||
/**领用人*/
|
||||
@Excel(name = "领用单位号", width = 15, dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
|
||||
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
|
||||
@ApiModelProperty(value = "领用人")
|
||||
private java.lang.String recipient;
|
||||
/**入库时间*/
|
||||
@Excel(name = "入库时间", width = 15, format = "yyyy-MM-dd")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "入库时间")
|
||||
private java.util.Date entryDate;
|
||||
/**单据号*/
|
||||
@Excel(name = "单据号", width = 15)
|
||||
@ApiModelProperty(value = "单据号")
|
||||
private java.lang.String documentNumber;
|
||||
/**存放地id*/
|
||||
@Excel(name = "存放地id", width = 15)
|
||||
@ApiModelProperty(value = "存放地id")
|
||||
private java.lang.String locationId;
|
||||
/**备注*/
|
||||
@Excel(name = "备注", width = 15)
|
||||
@ApiModelProperty(value = "备注")
|
||||
private java.lang.String note;
|
||||
/**审核状态*/
|
||||
@Excel(name = "审核状态", width = 15, dicCode = "approval_status")
|
||||
@Dict(dicCode = "approval_status")
|
||||
@ApiModelProperty(value = "审核状态")
|
||||
private java.lang.String approvalStatus;
|
||||
/**初审状态*/
|
||||
@Excel(name = "初审状态", width = 15, dicCode = "initial_audit")
|
||||
@Dict(dicCode = "initial_audit")
|
||||
@ApiModelProperty(value = "初审状态")
|
||||
private java.lang.String initialAudit;
|
||||
/**ID*/
|
||||
@Excel(name = "ID", width = 15)
|
||||
@ApiModelProperty(value = "ID")
|
||||
private java.lang.String intangibleId;
|
||||
}
|
|
@ -3,8 +3,8 @@ package rms.mapper;
|
|||
import java.util.List;
|
||||
|
||||
public interface RmsChartMapper {
|
||||
int getInstrumentCount(String locationName);
|
||||
int getFurnitureCount(String locationName);
|
||||
String getInstrumentCount(String locationName);
|
||||
String getFurnitureCount(String locationName);
|
||||
int getInstrumentAmount();
|
||||
int getFurnitureAmount();
|
||||
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
package rms.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import rms.entity.RmsIntangible;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import rms.model.RmsFurnitureModel;
|
||||
import rms.model.RmsIntangibleModel;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description: 无形资产
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-11-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface RmsIntangibleMapper extends BaseMapper<RmsIntangible> {
|
||||
List<RmsIntangibleModel> queryAllRmsIntangible(Page<RmsIntangibleModel> page, List<String> locationId, List<String> recipient);
|
||||
|
||||
|
||||
}
|
|
@ -2,13 +2,13 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="rms.mapper.RmsChartMapper">
|
||||
|
||||
<select id="getInstrumentCount" resultType="java.lang.Integer">
|
||||
<select id="getInstrumentCount" resultType="java.lang.String">
|
||||
SELECT count(*)
|
||||
FROM rms_instrument
|
||||
JOIN rms_location ON rms_instrument.location_id = rms_location.id
|
||||
WHERE location_name LIKE CONCAT(#{depart_name}, '%')
|
||||
</select>
|
||||
<select id="getFurnitureCount" resultType="java.lang.Integer">
|
||||
<select id="getFurnitureCount" resultType="java.lang.String">
|
||||
SELECT FLOOR(SUM(number)) AS total_sum
|
||||
FROM rms_furniture
|
||||
JOIN rms_location ON rms_furniture.location_id = rms_location.id
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="rms.mapper.RmsIntangibleMapper">
|
||||
<select id="queryAllRmsIntangible" resultType="rms.model.RmsIntangibleModel">
|
||||
SELECT *
|
||||
FROM rms_intangible
|
||||
JOIN rms_location ON rms_intangible.location_id = rms_location.id
|
||||
<where>
|
||||
<if test="locationId != null and locationId != ''">
|
||||
AND rms_intangible.location_id IN
|
||||
<foreach item="locationItem" collection="locationId" open="(" separator="," close=")">
|
||||
#{locationItem}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="recipient != null and recipient != ''">
|
||||
AND rms_intangible.recipient IN
|
||||
<foreach item="recipientItem" collection="recipient" open="(" separator="," close=")">
|
||||
#{recipientItem}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
|
@ -0,0 +1,63 @@
|
|||
package rms.model;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
/**
|
||||
* 关联地址模型
|
||||
* 无形资产
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode()
|
||||
public class RmsIntangibleModel {
|
||||
/**主键*/
|
||||
private java.lang.String id;
|
||||
/**领用单位号*/
|
||||
@Dict(dictTable = "sys_depart", dicText = "depart_name", dicCode = "id")
|
||||
private java.lang.String collectingUnitNumber;
|
||||
/**资产编号*/
|
||||
private java.lang.String intangibleNumber;
|
||||
/**资产名称*/
|
||||
private java.lang.String intangibleName;
|
||||
/**分类号*/
|
||||
private java.lang.String categoryId;
|
||||
/**单价*/
|
||||
private java.lang.String unitPrice;
|
||||
/**购置日期*/
|
||||
private java.util.Date purchaseDate;
|
||||
/**专利申请号*/
|
||||
private java.lang.String patentApplicationNumber;
|
||||
/**发明人*/
|
||||
private java.lang.String inventor;
|
||||
/**发明名称*/
|
||||
private java.lang.String inventionName;
|
||||
/**注册日期*/
|
||||
private java.util.Date registrationDate;
|
||||
/**注册机关*/
|
||||
private java.lang.String registrationAuthority;
|
||||
/**授权公告日*/
|
||||
private java.util.Date authorizationAnnouncement;
|
||||
/**批准文号*/
|
||||
private java.lang.String approvalNumber;
|
||||
/**领用人*/
|
||||
@Dict(dictTable = "sys_user", dicText = "realname", dicCode = "username")
|
||||
private java.lang.String recipient;
|
||||
/**入库时间*/
|
||||
private java.util.Date entryDate;
|
||||
/**单据号*/
|
||||
private java.lang.String documentNumber;
|
||||
//存放地名
|
||||
private java.lang.String locationName;
|
||||
/**备注*/
|
||||
private java.lang.String note;
|
||||
/**审核状态*/
|
||||
@Dict(dicCode = "approval_status")
|
||||
private java.lang.String approvalStatus;
|
||||
/**初审状态*/
|
||||
@Dict(dicCode = "Initial_audit")
|
||||
private java.lang.String initialAudit;
|
||||
/**ID*/
|
||||
private java.lang.String intangibleId;
|
||||
|
||||
|
||||
}
|
|
@ -17,6 +17,6 @@ import java.util.ArrayList;
|
|||
* @Version: V1.0
|
||||
*/
|
||||
public interface IRmsFurnitureService extends IService<RmsFurniture> {
|
||||
Page<RmsFurnitureModel> queryAllFurniture(RmsFurnitureModel rmsFurnitureModel, Integer pageNo, Integer pageSize, HttpServletRequest req);
|
||||
Page<RmsFurnitureModel> queryAllRmsFurniture(RmsFurnitureModel rmsFurnitureModel, Integer pageNo, Integer pageSize, HttpServletRequest req);
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
package rms.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import rms.entity.RmsIntangible;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import rms.model.RmsInstrumentModel;
|
||||
import rms.model.RmsIntangibleModel;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @Description: 无形资产
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-11-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IRmsIntangibleService extends IService<RmsIntangible> {
|
||||
Page<RmsIntangibleModel> queryAllRmsIntangible(RmsIntangibleModel rmsIntangibleModel, Integer pageNo, Integer pageSize, HttpServletRequest req) ;
|
||||
|
||||
|
||||
}
|
|
@ -16,7 +16,7 @@ public class RmsChartServiceImpl implements IRmsChartService {
|
|||
String[] LocationNameList = {"理工一号楼","行知楼", "体育楼", "崇师楼","新实验楼","社科楼"};
|
||||
List<Integer> LocationCount = new ArrayList<>();
|
||||
for(String locationName :LocationNameList){
|
||||
LocationCount.add(rmsChartMapper.getInstrumentCount(locationName) + rmsChartMapper.getFurnitureCount(locationName));
|
||||
LocationCount.add(Integer.parseInt(rmsChartMapper.getInstrumentCount(locationName)) + Integer.parseInt(rmsChartMapper.getFurnitureCount(locationName)));
|
||||
}
|
||||
|
||||
return LocationCount;
|
||||
|
@ -27,7 +27,7 @@ public class RmsChartServiceImpl implements IRmsChartService {
|
|||
String[] LocationNameList = {"理工一号楼","行知楼", "体育楼", "崇师楼","新实验楼","社科楼"};
|
||||
int sum = 0;
|
||||
for(String locationName :LocationNameList){
|
||||
sum+= rmsChartMapper.getInstrumentCount(locationName);
|
||||
sum+= Integer.parseInt(rmsChartMapper.getInstrumentCount(locationName));
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ public class RmsChartServiceImpl implements IRmsChartService {
|
|||
String[] LocationNameList = {"理工一号楼","行知楼"};
|
||||
int sum = 0;
|
||||
for(String locationName :LocationNameList){
|
||||
sum+= rmsChartMapper.getFurnitureCount(locationName);
|
||||
sum+= Integer.parseInt(rmsChartMapper.getFurnitureCount(locationName));
|
||||
System.out.println(locationName+"地址的数量"+sum);
|
||||
}
|
||||
return sum;
|
||||
|
|
|
@ -32,7 +32,7 @@ import java.util.stream.Collectors;
|
|||
@Service
|
||||
public class RmsFurnitureServiceImpl extends ServiceImpl<RmsFurnitureMapper, RmsFurniture> implements IRmsFurnitureService {
|
||||
@Override
|
||||
public Page<RmsFurnitureModel> queryAllFurniture(RmsFurnitureModel rmsFurnitureModel, Integer pageNo, Integer pageSize, HttpServletRequest req) {
|
||||
public Page<RmsFurnitureModel> queryAllRmsFurniture(RmsFurnitureModel rmsFurnitureModel, Integer pageNo, Integer pageSize, HttpServletRequest req) {
|
||||
Map<String, String[]> parameterMap = req.getParameterMap();
|
||||
String recipient = Arrays.toString(parameterMap.get("recipient"));
|
||||
String location = Arrays.toString(parameterMap.get("locationId"));
|
||||
|
|
|
@ -0,0 +1,57 @@
|
|||
package rms.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import rms.entity.RmsIntangible;
|
||||
import rms.mapper.RmsIntangibleMapper;
|
||||
import rms.model.RmsInstrumentModel;
|
||||
import rms.model.RmsIntangibleModel;
|
||||
import rms.service.IRmsIntangibleService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 无形资产
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2023-11-25
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class RmsIntangibleServiceImpl extends ServiceImpl<RmsIntangibleMapper, RmsIntangible> implements IRmsIntangibleService {
|
||||
|
||||
@Override
|
||||
public Page<RmsIntangibleModel> queryAllRmsIntangible(RmsIntangibleModel rmsIntangibleModel, Integer pageNo, Integer pageSize, HttpServletRequest req) {
|
||||
Map<String, String[]> parameterMap = req.getParameterMap();
|
||||
String recipient = Arrays.toString(parameterMap.get("recipient"));
|
||||
String location = Arrays.toString(parameterMap.get("locationId"));
|
||||
List<String> locationList = null;
|
||||
List<String> recipientList = null;
|
||||
if(!location.equals("null")) {
|
||||
// 去掉方括号
|
||||
location = location.substring(1, location.length() - 1);
|
||||
// 分割字符串并转换为 List<String>
|
||||
locationList = Arrays.stream(location.split(",\\s*"))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
if(!recipient.equals("null")) {
|
||||
// 去掉方括号
|
||||
recipient = recipient.substring(1, recipient.length() - 1);
|
||||
// 分割字符串并转换为 List<String>
|
||||
recipientList = Arrays.stream(recipient.split(",\\s*"))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
Page<RmsIntangibleModel> RmsIntangibleModelPage = new Page<>(pageNo, pageSize);
|
||||
|
||||
List<RmsIntangibleModel> RmsIntangiblelList = getBaseMapper().queryAllRmsIntangible(RmsIntangibleModelPage,locationList,recipientList);
|
||||
|
||||
RmsIntangibleModelPage.setRecords(RmsIntangiblelList);
|
||||
|
||||
return RmsIntangibleModelPage;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue