lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java
@@ -185,6 +185,8 @@ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize, HttpServletRequest req) { QueryWrapper<Equipment> queryWrapper = QueryGenerator.initQueryWrapper(equipment, req.getParameterMap()); queryWrapper.eq("status","1"); queryWrapper.eq("del_flag",0); Page<Equipment> page = new Page<Equipment>(pageNo, pageSize); IPage<Equipment> pageList = equipmentService.page(page, queryWrapper); return Result.OK(pageList); @@ -356,7 +358,7 @@ //@RequiresPermissions("org.jeecg.modules.demo:mom_eam_equipment:exportXls") @RequestMapping(value = "/exportXls") public ModelAndView exportXls(HttpServletRequest request, Equipment equipment) { return super.exportXls(request, equipment, Equipment.class, "mom_eam_equipment"); return super.exportXls(request, equipment, Equipment.class, "设备台账导出"); } // /** @@ -535,34 +537,92 @@ for(int i = 0;i<list.size();i++){ EquipmentImportVo equipmentImportVo = list.get(i); EquipmentCategory equipmentCategory = equipmentCategoryService.getOne(new QueryWrapper<EquipmentCategory>().eq("name",equipmentImportVo.getEquipmentCategoryName()),false); if( StringUtils.isBlank(equipmentImportVo.getNum()) || StringUtils.isBlank(equipmentImportVo.getName()) || StringUtils.isBlank(equipmentImportVo.getUseId()) || StringUtils.isBlank(equipmentImportVo.getEquipmentUda1()) || StringUtils.isBlank(equipmentImportVo.getManageId()) || StringUtils.isBlank(equipmentImportVo.getTeamId()) || StringUtils.isBlank(equipmentImportVo.getEquipmentImportanceId()) || StringUtils.isBlank(equipmentImportVo.getEquipmentCategoryName()) || StringUtils.isBlank(equipmentImportVo.getEquipmentStatus()) || StringUtils.isBlank(equipmentImportVo.getEquipmentUda3()) || StringUtils.isBlank(equipmentImportVo.getEquipmentUda5()) || StringUtils.isBlank(equipmentImportVo.getEquipmentUda2()) || StringUtils.isBlank(equipmentImportVo.getLeaveFactoryDate()) || StringUtils.isBlank(equipmentImportVo.getProjectApprovalNo()) || StringUtils.isBlank(equipmentImportVo.getFundSource()) || StringUtils.isBlank(equipmentImportVo.getAcceptanceCheckDate()) || StringUtils.isBlank(equipmentImportVo.getLeaveFactoryDate()) || StringUtils.isBlank(equipmentImportVo.getFactoryNo()) || StringUtils.isBlank(equipmentImportVo.getConstructorId()) || StringUtils.isBlank(equipmentImportVo.getSourceCountry()) || StringUtils.isBlank(equipmentImportVo.getModel()) || StringUtils.isBlank(equipmentImportVo.getSpecification()) || StringUtils.isBlank(equipmentImportVo.getGpo()) ){ exceptionInfo = exceptionInfo+"第"+(i+2)+"行导入失败,原因:数据有未填项,请填写必填项后再导入;"; if(StringUtils.isBlank(equipmentImportVo.getNum())){ exceptionInfo = exceptionInfo+"第"+(i+2)+"行导入失败,原因:统一编码缺失,请填写必填项后再导入;"; exceptionNum++; }else if(ObjectUtils.isNull(equipmentCategory)) } else if(StringUtils.isBlank(equipmentImportVo.getName())){ exceptionInfo = exceptionInfo+"第"+(i+2)+"行导入失败,原因:设备名称缺失,请填写必填项后再导入;"; exceptionNum++; } else if(StringUtils.isBlank(equipmentImportVo.getUseId())){ exceptionInfo = exceptionInfo+"第"+(i+2)+"行导入失败,原因:使用部门缺失,请填写必填项后再导入;"; exceptionNum++; } // else if(StringUtils.isBlank(equipmentImportVo.getEquipmentUda1())){ // exceptionInfo = exceptionInfo+"第"+(i+2)+"行导入失败,原因:工区缺失,请填写必填项后再导入;"; // exceptionNum++; // } else if(StringUtils.isBlank(equipmentImportVo.getManageId())){ exceptionInfo = exceptionInfo+"第"+(i+2)+"行导入失败,原因:维护部门缺失,请填写必填项后再导入;"; exceptionNum++; } else if(StringUtils.isBlank(equipmentImportVo.getTeamId())){ exceptionInfo = exceptionInfo+"第"+(i+2)+"行导入失败,原因:维修班组缺失,请填写必填项后再导入;"; exceptionNum++; } else if(StringUtils.isBlank(equipmentImportVo.getEquipmentImportanceId())){ exceptionInfo = exceptionInfo+"第"+(i+2)+"行导入失败,原因:ABC标识缺失,请填写必填项后再导入;"; exceptionNum++; } else if(StringUtils.isBlank(equipmentImportVo.getEquipmentCategoryName())){ exceptionInfo = exceptionInfo+"第"+(i+2)+"行导入失败,原因:设备分类缺失,请填写必填项后再导入;"; exceptionNum++; } else if(StringUtils.isBlank(equipmentImportVo.getEquipmentStatus())){ exceptionInfo = exceptionInfo+"第"+(i+2)+"行导入失败,原因:设备状态缺失,请填写必填项后再导入;"; exceptionNum++; } //非必填项 // else if(StringUtils.isBlank(equipmentImportVo.getEquipmentUda5())){ // exceptionInfo = exceptionInfo+"第"+(i+2)+"行导入失败,原因:功能位置缺失,请填写必填项后再导入;"; // exceptionNum++; // } // else if(StringUtils.isBlank(equipmentImportVo.getLocation())){ // exceptionInfo = exceptionInfo+"第"+(i+2)+"行导入失败,原因:安装位置缺失,请填写必填项后再导入;"; // exceptionNum++; // } // else if(StringUtils.isBlank(equipmentImportVo.getLeaveFactoryDate())){ // exceptionInfo = exceptionInfo+"第"+(i+2)+"行导入失败,原因:出厂日期缺失,请填写必填项后再导入;"; // exceptionNum++; // } // else if(StringUtils.isBlank(equipmentImportVo.getProjectApprovalNo())){ // exceptionInfo = exceptionInfo+"第"+(i+2)+"行导入失败,原因:立项卡号缺失,请填写必填项后再导入;"; // exceptionNum++; // } // else if(StringUtils.isBlank(equipmentImportVo.getFundSource())){ // exceptionInfo = exceptionInfo+"第"+(i+2)+"行导入失败,原因:资金来源缺失,请填写必填项后再导入;"; // exceptionNum++; // } // else if(StringUtils.isBlank(equipmentImportVo.getAcceptanceCheckDate())){ // exceptionInfo = exceptionInfo+"第"+(i+2)+"行导入失败,原因:验收日期缺失,请填写必填项后再导入;"; // exceptionNum++; // } // else if(StringUtils.isBlank(equipmentImportVo.getLeaveFactoryDate())){ // exceptionInfo = exceptionInfo+"第"+(i+2)+"行导入失败,原因:出厂日期缺失,请填写必填项后再导入;"; // exceptionNum++; // } // else if(StringUtils.isBlank(equipmentImportVo.getFactoryNo())){ // exceptionInfo = exceptionInfo+"第"+(i+2)+"行导入失败,原因:出厂编号缺失,请填写必填项后再导入;"; // exceptionNum++; // } // else if( StringUtils.isBlank(equipmentImportVo.getConstructorId())){ // exceptionInfo = exceptionInfo+"第"+(i+2)+"行导入失败,原因:资产制造商缺失,请填写必填项后再导入;"; // exceptionNum++; // } else if(StringUtils.isBlank(equipmentImportVo.getModel())){ exceptionInfo = exceptionInfo+"第"+(i+2)+"行导入失败,原因:设备型号缺失,请填写必填项后再导入;"; exceptionNum++; } else if(StringUtils.isBlank(equipmentImportVo.getSpecification())){ exceptionInfo = exceptionInfo+"第"+(i+2)+"行导入失败,原因:设备规格缺失,请填写必填项后再导入;"; exceptionNum++; } // else if(StringUtils.isBlank(equipmentImportVo.getGpo())){ // exceptionInfo = exceptionInfo+"第"+(i+2)+"行导入失败,原因:设备功率缺失,请填写必填项后再导入;"; // exceptionNum++; // } else if(ObjectUtils.isNull(equipmentCategory)) { exceptionInfo = exceptionInfo+"第"+(i+2)+"行导入失败,原因:该设备所属类别不存在,请先维护设备类别;"; exceptionNum++; @@ -592,12 +652,12 @@ .setEquipmentUda3(equipmentImportVo.getEquipmentUda3()) .setEquipmentUda4(equipmentImportVo.getEquipmentUda4()) .setEquipmentUda5(equipmentImportVo.getEquipmentUda5()) .setLocation(equipmentImportVo.getEquipmentUda2()) .setLocation(equipmentImportVo.getLocation()) .setLastVerificationDate(equipmentImportVo.getLeaveFactoryDate()) .setProjectApprovalNo(equipmentImportVo.getProjectApprovalNo()) .setFundSource(equipmentImportVo.getFundSource()) .setAcceptanceCheckDate(equipmentImportVo.getAcceptanceCheckDate()) .setFactoryNumber(equipmentImportVo.getFactoryNo()) .setFactoryNumber(equipmentImportVo.getFactoryNumber()) .setConstructorId(equipmentImportVo.getConstructorId()) .setSourceCountry(equipmentImportVo.getSourceCountry()) .setModel(equipmentImportVo.getModel()) lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EquipmentPrecisionParametersController.java
@@ -93,7 +93,7 @@ } return Result.OK(pageList); } /** * 添加 * @@ -116,7 +116,7 @@ } return Result.OK("添加成功!"); } /** * 编辑 * @@ -131,7 +131,7 @@ equipmentPrecisionParametersService.updateById(equipmentPrecisionParameters); return Result.OK("编辑成功!"); } /** * 通过id删除 * @@ -146,7 +146,7 @@ equipmentPrecisionParametersService.removeById(id); return Result.OK("删除成功!"); } /** * 批量删除 * @@ -161,7 +161,7 @@ this.equipmentPrecisionParametersService.removeByIds(Arrays.asList(ids.split(","))); return Result.OK("批量删除成功!"); } /** * 通过id查询 * @@ -204,4 +204,10 @@ return super.importExcel(request, response, EquipmentPrecisionParameters.class); } @PutMapping("/submitBatch") public Result<?> submitBatch(@RequestBody List<EquipmentPrecisionParameters> equipmentPrecisionParameters){ equipmentPrecisionParametersService.saveOrUpdateBatch(equipmentPrecisionParameters); return Result.OK("提交成功"); } } lxzn-module-eam/src/main/java/org/jeecg/modules/eam/controller/EquipmentProcessParametersController.java
@@ -15,6 +15,7 @@ import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.util.oConvertUtils; import org.jeecg.modules.eam.entity.EquipmentPrecisionParameters; import org.jeecg.modules.eam.entity.EquipmentProcessParameters; import org.jeecg.modules.eam.entity.ProcessParameters; import org.jeecg.modules.eam.service.IEquipmentProcessParametersService; @@ -201,5 +202,10 @@ public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { return super.importExcel(request, response, EquipmentProcessParameters.class); } @PutMapping("/submitBatch") public Result<?> submitBatch(@RequestBody List<EquipmentProcessParameters> equipmentProcessParameters){ equipmentProcessParametersService.saveOrUpdateBatch(equipmentProcessParameters); return Result.OK("提交成功"); } } lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/Equipment.java
@@ -32,172 +32,154 @@ @Accessors(chain = true) @EqualsAndHashCode(callSuper = false) @ApiModel(value="mom_eam_equipment对象", description="mom_eam_equipment") public class Equipment extends JeecgEntity implements Serializable { public class Equipment implements Serializable { private static final long serialVersionUID = 1L; private String id; /**设备编码*/ @Excel(name = "设备编码", width = 15) @Excel(name = "统一编码", width = 15,orderNum = "0") @ApiModelProperty(value = "设备编码") private String num; /**设备名称*/ @Excel(name = "设备名称", width = 15) @Excel(name = "设备名称", width = 15,orderNum = "1") @ApiModelProperty(value = "设备名称") private String name; /**设备型号*/ @Excel(name = "设备型号", width = 15) @Excel(name = "设备型号", width = 15,orderNum = "30") @ApiModelProperty(value = "设备型号") private String model; /**设备规格*/ @Excel(name = "设备规格", width = 15) @Excel(name = "设备规格", width = 15,orderNum = "31") @ApiModelProperty(value = "设备规格") private String specification; /**设备状态*/ @Excel(name = "设备状态", width = 15) @Excel(name = "设备状态", width = 15,orderNum = "17") @ApiModelProperty(value = "设备状态") @Dict(dicCode = "equipment_status") private String equipmentStatus; /**技术状态*/ @Excel(name = "技术状态", width = 15) @ApiModelProperty(value = "技术状态") @Dict(dicCode = "technology_status") private String technologyStatus; /**资产编号*/ @Excel(name = "资产编号", width = 15) @ApiModelProperty(value = "资产编号") private String assetNumber; /**所属分类*/ @Excel(name = "所属分类", width = 15) @Excel(name = "所属分类", width = 15,orderNum = "7",dictTable = "mom_eam_equipment_category",dicCode = "id",dicText = "name") @ApiModelProperty(value = "所属分类") @Dict(dictTable = "mom_eam_equipment_category",dicCode = "id",dicText = "name") private String equipmentCategoryId; /**特种设备*/ @Excel(name = "特种设备(是、否)", width = 15) @Excel(name = "关键设备标识",orderNum = "8",width = 15,dicCode = "specific_equipment") @ApiModelProperty(value = "特种设备(是、否)") @Dict(dicCode = "specific_equipment") private String specificEquipment; /**设备图片*/ @Excel(name = "设备图片", width = 15) @ApiModelProperty(value = "设备图片") private String equipmentPhoto; /**制造商*/ @Excel(name = "制造商", width = 15) @Excel(name = "资产制造商", width = 15,orderNum = "28") @ApiModelProperty(value = "制造商") @Dict(dicCode = "id",dictTable="mom_base_constructor",dicText="name") private String constructorId; /**供应商*/ @Excel(name = "供应商", width = 15) @ApiModelProperty(value = "供应商") @Dict(dicCode = "id",dictTable="mom_base_supplier",dicText="name") private String supplierId; /**出厂编号*/ @Excel(name = "出厂编号", width = 15) @Excel(name = "出厂编号", width = 15,orderNum = "27") @ApiModelProperty(value = "出厂编号") private String factoryNumber; /**出厂日期*/ @Excel(name = "出厂日期", width = 15) @Excel(name = "出厂日期", width = 15,orderNum = "22") @ApiModelProperty(value = "出厂日期") private String leaveFactoryDate; /**验收日期*/ @Excel(name = "验收日期", width = 15) @Excel(name = "验收日期", width = 15,orderNum = "25") @ApiModelProperty(value = "验收日期") private String acceptanceCheckDate; /**所有组织*/ @Excel(name = "所有组织", width = 15) @ApiModelProperty(value = "所有组织") @Dict(dicCode = "id",dictTable="sys_depart",dicText="depart_name") private String affiliationId; /**管理组织*/ @Excel(name = "管理组织", width = 15) @Excel(name = "维护部门", width = 15,orderNum = "4",dicCode = "id",dictTable="sys_depart",dicText="depart_name") @ApiModelProperty(value = "管理组织") @Dict(dicCode = "id",dictTable="sys_depart",dicText="depart_name") private String manageId; /**管理人*/ @Excel(name = "管理人", width = 15) @ApiModelProperty(value = "管理人") @Dict(dicCode = "id",dictTable="sys_user",dicText="realname") private String manager; /**使用部门*/ @Excel(name = "使用部门", width = 15) @Excel(name = "使用部门", width = 15,orderNum = "2",dicCode = "id",dictTable="sys_depart",dicText="depart_name") @ApiModelProperty(value = "使用部门") @Dict(dicCode = "id",dictTable="sys_depart",dicText="depart_name") private String useId; /**责任人*/ @Excel(name = "责任人", width = 15) @ApiModelProperty(value = "责任人") @Dict(dicCode = "id",dictTable="sys_user",dicText="realname") private String functionary; /**位置*/ @Excel(name = "位置", width = 15) @Excel(name = "安装位置", width = 15,orderNum = "21") @ApiModelProperty(value = "位置") private String location; /**重要度*/ @Excel(name = "重要度", width = 15) @Excel(name = "ABC标识", width = 15,orderNum = "6") @ApiModelProperty(value = "重要度") @Dict(dicCode = "id",dictTable="mom_eam_equipment_importance",dicText="name") private String equipmentImportanceId; /**工艺参数管理(1:是,0:否)*/ @Excel(name = "工艺参数管理(1:是,0:否)", width = 15) @ApiModelProperty(value = "工艺参数管理(1:是,0:否)") private String processParameters; /**精度参数管理(1:是,0:否)*/ @Excel(name = "精度参数管理(1:是,0:否)", width = 15) @ApiModelProperty(value = "精度参数管理(1:是,0:否)") private String precisionParameters; /**检定管理(1:是,0:否)*/ @Excel(name = "检定管理(1:是,0:否)", width = 15) @ApiModelProperty(value = "检定管理(1:是,0:否)") private String verification; /**检定周期*/ @Excel(name = "检定日期", width = 15) @ApiModelProperty(value = "检定日期") private String verificationPeriod; /**上次鉴定日期*/ @Excel(name = "上次鉴定日期", width = 15) @ApiModelProperty(value = "上次检定日期") private String lastVerificationDate; /**下次鉴定日期*/ @Excel(name = "下次鉴定日期", width = 15) @ApiModelProperty(value = "下次检定日期") private String nextVerificationDate; /**状态*/ @Excel(name = "状态", width = 15) @ApiModelProperty(value = "状态") private String status = CommonConstant.STATUS_1; /**备注*/ @Excel(name = "备注", width = 15) @ApiModelProperty(value = "备注") private String remark; /**备用字段1*/ @Excel(name = "备用字段1", width = 15) @ApiModelProperty(value = "备用字段1") @Excel(name = "工区", width = 15,orderNum = "3") @ApiModelProperty(value = "工区") private String equipmentUda1; /**备用字段2*/ @Excel(name = "备用字段2", width = 15) @ApiModelProperty(value = "备用字段2") private String equipmentUda2; /**备用字段3*/ @Excel(name = "备用字段3", width = 15) @Excel(name = "重量", width = 15,orderNum = "18") @ApiModelProperty(value = "备用字段3") private String equipmentUda3; /**备用字段4*/ @Excel(name = "备用字段4", width = 15) @Excel(name = "重量计量单位", width = 15,orderNum = "19") @ApiModelProperty(value = "备用字段4") private String equipmentUda4; /**备用字段5*/ @Excel(name = "备用字段5", width = 15) @Excel(name = "功能位置", width = 15,orderNum = "20") @ApiModelProperty(value = "备用字段5") private String equipmentUda5; /**租户id*/ @Excel(name = "租户id", width = 15) @ApiModelProperty(value = "租户id") private String tenantId; /**删除状态(0-正常,1-已删除)*/ @Excel(name = "删除状态(0-正常,1-已删除)", width = 15) @ApiModelProperty(value = "删除状态(0-正常,1-已删除)") private Integer delFlag = CommonConstant.DEL_FLAG_0; /**责任班组*/ @Excel(name = "责任班组", width = 15) @Excel(name = "维修班组", width = 15,orderNum = "5",dicCode = "id",dictTable="mom_base_team",dicText="name") @ApiModelProperty(value = "责任班组") @Dict(dicCode = "id",dictTable="mom_base_team",dicText="name") private String teamId; @@ -210,9 +192,11 @@ private String sourceId; @ApiModelProperty(value = "工艺参数模板Id") @Dict(dicCode = "id",dictTable = "mom_eam_process_parameters_template",dicText = "name") private String processParametersTemplateId; @ApiModelProperty(value = "设备精度模板Id") @Dict(dicCode = "id",dictTable = "mom_eam_precision_parameters_template",dicText = "name") private String precisionParametersTemplateId; @TableField(exist = false) @@ -241,34 +225,46 @@ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date sealDate; @ApiModelProperty(value = "资金来源") @Excel(name = "资金来源", width = 15,orderNum = "24") private String fundSource; @ApiModelProperty(value = "出厂编号") private String factoryNo; @ApiModelProperty(value = "制造商") private String mfr; @ApiModelProperty(value = "资产来源国家") @Excel(name = "资产来源国家", width = 15,orderNum = "29") private String sourceCountry; @ApiModelProperty(value = "总功率") @Excel(name = "总功率", width = 15,orderNum = "32") private String gpo; @ApiModelProperty(value = "关键设备标识") private String keyEquipmentIdentification; @Excel(name = "安全配置", width = 15,orderNum = "9") @ApiModelProperty(value = "安全配置") private String securityConfiguration; @ApiModelProperty(value = "冷却系统") @Excel(name = "冷却系统", width = 15,orderNum = "10") private String coolingSystem; @Excel(name = "灭火器", width = 15,orderNum = "11") @ApiModelProperty(value = "灭火器") private String fireExtinguisher; @Excel(name = "灭火器有效期", width = 15,orderNum = "12") @ApiModelProperty(value = "灭火器有效期") private String fireExtinguisherValidityPeriod; @Excel(name = "操作系统", width = 15,orderNum = "13") @ApiModelProperty(value = "操作系统") private String operatingSystem; @Excel(name = "系统", width = 15,orderNum = "14") @ApiModelProperty(value = "系统") private String system; @ApiModelProperty(value = "端口") @Excel(name = "设备端口", width = 15,orderNum = "15") private String port; @ApiModelProperty(value = "坐标数量") @Excel(name = "坐标数量", width = 15,orderNum = "16") private BigDecimal coordinateNum; @ApiModelProperty(value = "立项卡号") @Excel(name = "立项卡号", width = 15,orderNum = "23") private String projectApprovalNo; private String standardA; private String standardB; @@ -276,4 +272,24 @@ private String standardD; private String standardE; private String standardF; /**创建人*/ @ApiModelProperty(value = "创建人") @Excel(name = "创建人", width = 15,orderNum = "33") private java.lang.String createBy; /**创建时间*/ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @Excel(name = "创建时间", width = 15,orderNum = "34",format = "yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd") @ApiModelProperty(value = "创建时间") private java.util.Date createTime; /**更新人*/ @ApiModelProperty(value = "更新人") @Excel(name = "更新人", width = 15,orderNum = "35") private java.lang.String updateBy; /**更新时间*/ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @Excel(name = "更新时间", width = 15,orderNum = "36",format = "yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd") @ApiModelProperty(value = "更新时间") private java.util.Date updateTime; } lxzn-module-eam/src/main/java/org/jeecg/modules/eam/entity/EquipmentImportVo.java
@@ -69,16 +69,16 @@ @Excel(name = "重量") private String equipmentUda3; @Excel(name = "重量计量单位",dicCode = "id",dicText = "name",dictTable = "mom_base_unit") @Excel(name = "重量计量单位") private String equipmentUda4; @Excel(name = "功能位置") private String equipmentUda5; @Excel(name = "安装位置") private String equipmentUda2; private String location; @Excel(name = "出厂日期",importFormat = "yyyyMMdd") @Excel(name = "出厂日期") private String leaveFactoryDate; @Excel(name = "立项卡号") @@ -87,11 +87,11 @@ @Excel(name = "资金来源") private String fundSource; @Excel(name = "验收日期",importFormat = "yyyyMMdd") @Excel(name = "验收日期") private String acceptanceCheckDate; @Excel(name = "出厂编号") private String factoryNo; private String factoryNumber; @Excel(name = "资产制造商",dicCode = "id",dictTable="mom_base_constructor",dicText="name") private String constructorId;