From e0f827f71f5bb9d1ed9f6414221e90eeb34632a7 Mon Sep 17 00:00:00 2001 From: cuilei <ray_tsu1@163.com> Date: 星期四, 04 九月 2025 11:07:01 +0800 Subject: [PATCH] 排产工单模块设备点检涉及接口 --- src/main/java/org/jeecg/modules/eam/vo/MaintenanceStandardDetailVo.java | 46 +++++++++ db/双林新火炬MES数据库设计.pdma.json | 22 ++++ src/main/java/org/jeecg/modules/eam/controller/EamMaintenanceStandardController.java | 35 +++++++ src/main/java/org/jeecg/modules/mes/entity/MesProductionWorkOrder.java | 10 +- src/main/java/org/jeecg/modules/eam/entity/EamInspectionOrder.java | 5 + src/main/java/org/jeecg/modules/mes/controller/MesProductionWorkOrderController.java | 6 + src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java | 32 ++++++ src/main/java/org/jeecg/modules/eam/request/EamInspectionOrderRequest.java | 4 src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java | 45 +++++--- src/main/java/org/jeecg/modules/eam/vo/MaintenanceStandardVo.java | 92 ++++++++++++++++++ 10 files changed, 271 insertions(+), 26 deletions(-) diff --git "a/db/\345\217\214\346\236\227\346\226\260\347\201\253\347\202\254MES\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241.pdma.json" "b/db/\345\217\214\346\236\227\346\226\260\347\201\253\347\202\254MES\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241.pdma.json" index 8f9057a..5d0ef62 100644 --- "a/db/\345\217\214\346\236\227\346\226\260\347\201\253\347\202\254MES\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241.pdma.json" +++ "b/db/\345\217\214\346\236\227\346\226\260\347\201\253\347\202\254MES\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241.pdma.json" @@ -2,9 +2,9 @@ "name": "鍙屾灄鏂扮伀鐐琈ES鏁版嵁搴撹璁�", "describe": "鎻忚堪鍙岃柂鏂扮伀鐐琈ES鏁版嵁搴撹璁¤鎯�", "avatar": "", - "version": "4.9.2", + "version": "4.9.4", "createdTime": "2025-3-10 16:38:19", - "updatedTime": "2025-8-27 18:34:50", + "updatedTime": "2025-9-4 11:02:24", "dbConns": [], "profile": { "default": { @@ -4815,6 +4815,24 @@ "id": "C6EFA873-D974-4F7E-9CB8-FBFC44A38B4F" }, { + "defKey": "work_order_id", + "defName": "鎺掍骇宸ュ崟ID", + "comment": "", + "type": "", + "len": "", + "scale": "", + "primaryKey": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "", + "hideInGraph": false, + "refDict": "", + "baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64", + "extProps": {}, + "domain": "16120F75-6AA7-4483-868D-F07F511BB081", + "id": "48521BC4-F13A-49F0-B8EF-383CA631C9CB" + }, + { "defKey": "inspection_date", "defName": "鐐规鏃ユ湡", "comment": "", diff --git a/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java b/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java index 4583f8f..732defb 100644 --- a/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java +++ b/src/main/java/org/jeecg/modules/eam/controller/EamEquipmentController.java @@ -12,15 +12,21 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.jeecg.common.api.vo.Result; +import org.jeecg.common.aspect.annotation.AutoLog; import org.jeecg.common.constant.CommonConstant; import org.jeecg.common.system.base.controller.JeecgController; import org.jeecg.common.util.TranslateDictTextUtils; +import org.jeecg.modules.eam.constant.AssetStatusEnum; +import org.jeecg.modules.eam.constant.MaintenanceCategoryEnum; +import org.jeecg.modules.eam.constant.MaintenanceStandardStatusEnum; import org.jeecg.modules.eam.entity.EamEquipment; import org.jeecg.modules.eam.entity.EamEquipmentExtend; import org.jeecg.modules.eam.request.EamEquipmentQuery; import org.jeecg.modules.eam.service.IEamEquipmentExtendService; import org.jeecg.modules.eam.service.IEamEquipmentService; import org.jeecg.modules.eam.vo.EquipmentSearchResult; +import org.jeecg.modules.mes.entity.MesProductionWorkOrder; +import org.jeecg.modules.mes.service.IMesProductionWorkOrderService; import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.entity.ImportParams; import org.springframework.beans.factory.annotation.Autowired; @@ -33,8 +39,10 @@ import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Arrays; +import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * @Description: 璁惧鍙拌处 @@ -60,6 +68,8 @@ private ObjectMapper objectMapper; @Autowired private TranslateDictTextUtils translateDictTextUtils; + @Autowired + private IMesProductionWorkOrderService mesProductionWorkOrderService; /** * 鍒嗛〉鍒楄〃鏌ヨ @@ -335,4 +345,26 @@ return Result.ok(resultList); } + @AutoLog(value = "鏌ヨ鎺掍骇宸ュ崟鎵�灞炰骇绾夸笅闇�瑕佺偣妫�鐨勮澶囧垪琛�") + @ApiOperation(value = "鏌ヨ鎺掍骇宸ュ崟鎵�灞炰骇绾夸笅闇�瑕佺偣妫�鐨勮澶囧垪琛�", notes = "鏌ヨ鎺掍骇宸ュ崟鎵�灞炰骇绾夸笅闇�瑕佺偣妫�鐨勮澶囧垪琛�") + @GetMapping(value = "/listProductionLineInspectionEquipment") + public Result<?> listProductionLineInspectionEquipment(@RequestParam("orderId") String orderId) { + MesProductionWorkOrder workOrder = mesProductionWorkOrderService.getById(orderId); + if (workOrder == null) { + return Result.error("宸ュ崟涓嶅瓨鍦紒"); + } + List<Map<String, Object>> equipmentMapList = eamEquipmentService.list(new LambdaQueryWrapper<EamEquipment>() + .eq(EamEquipment::getOrgId, workOrder.getFactoryId()) + .eq(EamEquipment::getDelFlag, CommonConstant.DEL_FLAG_0) + .apply("NOT EXISTS (SELECT 1 FROM eam_inspection_order t WHERE t.equipment_id = eam_equipment.id AND t.work_order_id = {0})", orderId) + .apply("EXISTS (SELECT 1 FROM eam_maintenance_standard t WHERE t.equipment_id = eam_equipment.id AND t.del_flag = {0} " + + "AND t.standard_status = {1} AND t.maintenance_category = {2})", + CommonConstant.DEL_FLAG_0, MaintenanceStandardStatusEnum.NORMAL.name(), MaintenanceCategoryEnum.POINT_INSPECTION.name())) + .stream().map(e -> (Map<String, Object>) new HashMap<String, Object>() {{ + put("value", e.getId()); + put("label", e.getEquipmentCode() + "[" + e.getEquipmentName() + "]"); + put("text", e.getEquipmentCode() + "[" + e.getEquipmentName() + "]"); + }}).collect(Collectors.toList()); + return Result.ok(equipmentMapList); + } } diff --git a/src/main/java/org/jeecg/modules/eam/controller/EamMaintenanceStandardController.java b/src/main/java/org/jeecg/modules/eam/controller/EamMaintenanceStandardController.java index 1546bcd..5f8d97e 100644 --- a/src/main/java/org/jeecg/modules/eam/controller/EamMaintenanceStandardController.java +++ b/src/main/java/org/jeecg/modules/eam/controller/EamMaintenanceStandardController.java @@ -1,6 +1,7 @@ package org.jeecg.modules.eam.controller; import cn.hutool.core.collection.CollectionUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import io.swagger.annotations.Api; @@ -24,10 +25,15 @@ import org.jeecg.modules.eam.entity.EamMaintenanceStandardDetail; import org.jeecg.modules.eam.request.EamMaintenanceStandardRequest; import org.jeecg.modules.eam.service.IEamEquipmentService; +import org.jeecg.modules.eam.service.IEamMaintenanceOrderDetailService; +import org.jeecg.modules.eam.service.IEamMaintenanceStandardDetailService; import org.jeecg.modules.eam.service.IEamMaintenanceStandardService; +import org.jeecg.modules.eam.vo.MaintenanceStandardDetailVo; +import org.jeecg.modules.eam.vo.MaintenanceStandardVo; import org.jeecg.modules.system.service.ISysBusinessCodeRuleService; import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.entity.ImportParams; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -60,6 +66,8 @@ private ISysBusinessCodeRuleService businessCodeRuleService; @Autowired private IEamEquipmentService eamEquipmentService; + @Autowired + private IEamMaintenanceStandardDetailService eamMaintenanceStandardDetailService; /** * 鍒嗛〉鍒楄〃鏌ヨ @@ -242,6 +250,33 @@ return Result.OK(eamMaintenanceStandard); } + @AutoLog(value = "淇濆吇鏍囧噯-閫氳繃璁惧id鏌ヨ淇濆吇鏍囧噯鍙婃槑缁嗛」") + @ApiOperation(value = "淇濆吇鏍囧噯-閫氳繃璁惧id鏌ヨ淇濆吇鏍囧噯鍙婃槑缁嗛」", notes = "淇濆吇鏍囧噯-閫氳繃璁惧id鏌ヨ淇濆吇鏍囧噯鍙婃槑缁嗛」") + @GetMapping(value = "/queryByEquipmentId") + public Result<MaintenanceStandardVo> queryByEquipmentId(@RequestParam("equipmentId") String equipmentId) { + EamMaintenanceStandard maintenanceStandard = eamMaintenanceStandardService.list(new LambdaQueryWrapper<EamMaintenanceStandard>() + .eq(EamMaintenanceStandard::getEquipmentId, equipmentId) + .eq(EamMaintenanceStandard::getDelFlag, CommonConstant.DEL_FLAG_0) + .eq(EamMaintenanceStandard::getStandardStatus, MaintenanceStandardStatusEnum.NORMAL.name()) + .eq(EamMaintenanceStandard::getMaintenanceCategory, MaintenanceCategoryEnum.POINT_INSPECTION.name())) + .stream().findFirst().orElse(null); + if (maintenanceStandard == null) { + return Result.error("鏈壘鍒拌璁惧涓嬬殑淇濆吇鏍囧噯锛�"); + } + MaintenanceStandardVo maintenanceStandardVo = new MaintenanceStandardVo(); + BeanUtils.copyProperties(maintenanceStandard, maintenanceStandardVo); + List<EamMaintenanceStandardDetail> maintenanceStandardDetails = eamMaintenanceStandardDetailService + .selectByStandardId(maintenanceStandard.getId()); + List<MaintenanceStandardDetailVo> maintenanceStandardDetailVos = CollectionUtil.newArrayList(); + maintenanceStandardDetails.forEach(item -> { + MaintenanceStandardDetailVo maintenanceStandardDetailVo = new MaintenanceStandardDetailVo(); + BeanUtils.copyProperties(item, maintenanceStandardDetailVo); + maintenanceStandardDetailVos.add(maintenanceStandardDetailVo); + }); + maintenanceStandardVo.setMaintenanceStandardDetailList(maintenanceStandardDetailVos); + return Result.OK(maintenanceStandardVo); + } + /** * 瀵煎嚭excel * diff --git a/src/main/java/org/jeecg/modules/eam/entity/EamInspectionOrder.java b/src/main/java/org/jeecg/modules/eam/entity/EamInspectionOrder.java index 863aa72..69e75fa 100644 --- a/src/main/java/org/jeecg/modules/eam/entity/EamInspectionOrder.java +++ b/src/main/java/org/jeecg/modules/eam/entity/EamInspectionOrder.java @@ -67,6 +67,11 @@ @ApiModelProperty(value = "淇濆吇鏍囧噯ID") @Dict(dictTable = "eam_maintenance_standard", dicCode = "id", dicText = "standard_name") private String standardId; + /**鎺掍骇宸ュ崟ID*/ + @Excel(name = "鎺掍骇宸ュ崟ID", width = 15) + @ApiModelProperty(value = "鎺掍骇宸ュ崟ID") + @Dict(dictTable = "mes_production_work_order", dicCode = "id", dicText = "work_order_code") + private String workOrderId; /**鐐规鏃ユ湡*/ @Excel(name = "鐐规鏃ユ湡锛堣鍒掞級", width = 15, format = "yyyy-MM-dd") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") diff --git a/src/main/java/org/jeecg/modules/eam/request/EamInspectionOrderRequest.java b/src/main/java/org/jeecg/modules/eam/request/EamInspectionOrderRequest.java index dfacb46..6459f26 100644 --- a/src/main/java/org/jeecg/modules/eam/request/EamInspectionOrderRequest.java +++ b/src/main/java/org/jeecg/modules/eam/request/EamInspectionOrderRequest.java @@ -57,6 +57,10 @@ @ApiModelProperty(value = "淇濆吇鏍囧噯ID") @Dict(dictTable = "eam_maintenance_standard", dicCode = "standard_code", dicText = "id") private String standardId; + /**鎺掍骇宸ュ崟ID*/ + @ApiModelProperty(value = "鎺掍骇宸ュ崟ID") + @Dict(dictTable = "mes_production_work_order", dicCode = "id", dicText = "work_order_code") + private String workOrderId; /**鐐规鏃ユ湡*/ @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") @DateTimeFormat(pattern="yyyy-MM-dd") diff --git a/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java b/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java index 696baeb..90f6066 100644 --- a/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java +++ b/src/main/java/org/jeecg/modules/eam/service/impl/EamInspectionOrderServiceImpl.java @@ -148,12 +148,19 @@ public boolean addInspectionOrder(EamInspectionOrderRequest eamInspectionOrderRequest) { EamInspectionOrder eamInspectionOrder = new EamInspectionOrder(); BeanUtils.copyProperties(eamInspectionOrderRequest, eamInspectionOrder); - //淇敼鐘舵�� - if (StrUtil.isNotBlank(eamInspectionOrderRequest.getOperator())) { - eamInspectionOrder.setInspectionStatus(InspectionStatus.UNDER_INSPECTION.name()); - } else { - eamInspectionOrder.setInspectionStatus(InspectionStatus.WAIT_INSPECTION.name()); + eamInspectionOrder.setInspectionDate(new Date()); + eamInspectionOrder.setOperateTime(new Date()); + LoginUser user = getCurrentUser(); + if (user == null || StrUtil.isBlank(user.getId())) { + throw new JeecgBootException("璐﹀彿涓嶅瓨鍦�"); } + eamInspectionOrder.setOperator(user.getUsername()); + ////淇敼鐘舵�� + //if (StrUtil.isNotBlank(eamInspectionOrderRequest.getOperator())) { + // eamInspectionOrder.setInspectionStatus(InspectionStatus.UNDER_INSPECTION.name()); + //} else { + // eamInspectionOrder.setInspectionStatus(InspectionStatus.WAIT_INSPECTION.name()); + //} save(eamInspectionOrder); //澶勭悊鏄庣粏鏁版嵁 if (CollectionUtil.isNotEmpty(eamInspectionOrderRequest.getTableDetailList())) { @@ -163,20 +170,20 @@ }); eamInspectionOrderDetailService.saveBatch(eamInspectionOrderRequest.getTableDetailList()); } - //澶勭悊闄勪欢 - if (CollectionUtil.isNotEmpty(eamInspectionOrderRequest.getFileList())) { - FileUploadResult fileUploadResult = eamInspectionOrderRequest.getFileList().get(0); - ObjectMapper mapper = new ObjectMapper(); - try { - String referenceFile = mapper.writeValueAsString(fileUploadResult); - eamInspectionOrder.setImageFiles(referenceFile); - } catch (JsonProcessingException e) { - log.error("JSON杞崲澶辫触锛�" + e.getMessage(), e); - } - } - if (StrUtil.isNotBlank(eamInspectionOrderRequest.getOperator())) { - triggerProcess(eamInspectionOrder); - } + ////澶勭悊闄勪欢 + //if (CollectionUtil.isNotEmpty(eamInspectionOrderRequest.getFileList())) { + // FileUploadResult fileUploadResult = eamInspectionOrderRequest.getFileList().get(0); + // ObjectMapper mapper = new ObjectMapper(); + // try { + // String referenceFile = mapper.writeValueAsString(fileUploadResult); + // eamInspectionOrder.setImageFiles(referenceFile); + // } catch (JsonProcessingException e) { + // log.error("JSON杞崲澶辫触锛�" + e.getMessage(), e); + // } + //} + //if (StrUtil.isNotBlank(eamInspectionOrderRequest.getOperator())) { + // triggerProcess(eamInspectionOrder); + //} return true; } diff --git a/src/main/java/org/jeecg/modules/eam/vo/MaintenanceStandardDetailVo.java b/src/main/java/org/jeecg/modules/eam/vo/MaintenanceStandardDetailVo.java new file mode 100644 index 0000000..6625ed5 --- /dev/null +++ b/src/main/java/org/jeecg/modules/eam/vo/MaintenanceStandardDetailVo.java @@ -0,0 +1,46 @@ +package org.jeecg.modules.eam.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; +import java.io.Serializable; + +/** + * @Description: 淇濆吇鏍囧噯鏄庣粏 + * @Author: jeecg-boot + * @Date: 2025-03-26 + * @Version: V1.0 + */ +@Data +@Accessors(chain = true) +public class MaintenanceStandardDetailVo implements Serializable { + + /**涓婚敭*/ + @ApiModelProperty(value = "涓婚敭") + private String id; + /**淇濆吇鏍囧噯ID*/ + @ApiModelProperty(value = "淇濆吇鏍囧噯ID") + private String standardId; + /**淇濆吇椤瑰簭鍙�*/ + @ApiModelProperty(value = "淇濆吇椤瑰簭鍙�") + private Integer itemCode; + /**閮ㄤ綅*/ + @ApiModelProperty(value = "閮ㄤ綅") + private String itemPart; + /**淇濆吇椤�*/ + @ApiModelProperty(value = "淇濆吇椤�") + private String itemName; + /**瀛愪繚鍏婚」*/ + @ApiModelProperty(value = "瀛愪繚鍏婚」") + private String subItemName; + /**妫�鏌ユ爣鍑嗘垨瑕佹眰*/ + @ApiModelProperty(value = "妫�鏌ユ爣鍑嗘垨瑕佹眰") + private String itemDemand; + /**淇濆吇瑕佹眰2*/ + @ApiModelProperty(value = "淇濆吇瑕佹眰2") + private String itemDemandAlias; + /**妫�鏌ユ柟娉�*/ + @ApiModelProperty(value = "妫�鏌ユ柟娉�") + private String checkMethod; + +} diff --git a/src/main/java/org/jeecg/modules/eam/vo/MaintenanceStandardVo.java b/src/main/java/org/jeecg/modules/eam/vo/MaintenanceStandardVo.java new file mode 100644 index 0000000..addd8a4 --- /dev/null +++ b/src/main/java/org/jeecg/modules/eam/vo/MaintenanceStandardVo.java @@ -0,0 +1,92 @@ +package org.jeecg.modules.eam.vo; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; +import org.jeecg.common.aspect.annotation.Dict; +import org.springframework.format.annotation.DateTimeFormat; +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +/** + * @Description: 淇濆吇鏍囧噯 + * @Author: jeecg-boot + * @Date: 2025-03-26 + * @Version: V1.0 + */ +@Data +@Accessors(chain = true) +public class MaintenanceStandardVo implements Serializable { + + /** + * 涓婚敭 + */ + @TableId(type = IdType.ASSIGN_ID) + @ApiModelProperty(value = "涓婚敭") + private String id; + /** + * 鏍囧噯缂栫爜 + */ + @ApiModelProperty(value = "鏍囧噯缂栫爜") + private String standardCode; + /** + * 鏍囧噯鍚嶇О + */ + @ApiModelProperty(value = "鏍囧噯鍚嶇О") + private String standardName; + /** + * 淇濆吇鍛ㄦ湡;鍗曚綅:澶� + */ + @ApiModelProperty(value = "淇濆吇鍛ㄦ湡;鍗曚綅:澶�") + private Integer maintenancePeriod; + /** + * 鍒濆鏃ユ湡 浠庡摢涓�澶╁紑濮嬭绠椾笅娆′繚鍏绘棩鏈� + */ + @ApiModelProperty(value = "鍒濆鏃ユ湡") + @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private Date initialDate; + /** + * 淇濆吇鍒嗙被 + */ + @ApiModelProperty(value = "淇濆吇鍒嗙被") + @Dict(dicCode = "maintenance_category") + private String maintenanceCategory; + /** + * 璁惧缂栧彿 + */ + @ApiModelProperty(value = "璁惧缂栧彿") + @Dict(dicCode = "eam_equipment, equipment_code, id") + private String equipmentId; + /** + * 鏍囧噯鐘舵�� + */ + @ApiModelProperty(value = "鏍囧噯鐘舵��") + @Dict(dicCode = "maintenance_standard_status") + private String standardStatus; + /** + * 鏍囧噯鐗堟湰 + */ + @ApiModelProperty(value = "鏍囧噯鐗堟湰") + private Integer standardVersion; + /** + * 鏂囦欢缂栧彿 + */ + @ApiModelProperty(value = "鏂囦欢缂栧彿") + private String fileCode; + /** + * 鍙傝�冩枃浠� + */ + @ApiModelProperty(value = "鍙傝�冩枃浠�") + private String referenceFile; + + /** + * 淇濆吇鏍囧噯鏄庣粏 + */ + @ApiModelProperty(value = "淇濆吇鏍囧噯鏄庣粏") + private List<MaintenanceStandardDetailVo> maintenanceStandardDetailList; +} diff --git a/src/main/java/org/jeecg/modules/mes/controller/MesProductionWorkOrderController.java b/src/main/java/org/jeecg/modules/mes/controller/MesProductionWorkOrderController.java index d86777d..9c1c227 100644 --- a/src/main/java/org/jeecg/modules/mes/controller/MesProductionWorkOrderController.java +++ b/src/main/java/org/jeecg/modules/mes/controller/MesProductionWorkOrderController.java @@ -27,6 +27,7 @@ import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.math.BigDecimal; import java.util.*; import java.util.stream.Collectors; @@ -93,6 +94,11 @@ mesProductionWorkOrderList.forEach(item -> { if (Objects.isNull(item.getId())) { item.setWorkOrderStatus(ProductionWorkOrderStatus.NEW.name()); + item.setCompletenessCheckFlag(CommonConstant.DEFAULT_0); + item.setEquipmentInspectionFlag(CommonConstant.DEFAULT_0); + item.setProcessInspectionFlag(CommonConstant.DEFAULT_0); + item.setActualQuantity(BigDecimal.ZERO); + item.setFinishedPallets(0); } }); mesProductionWorkOrderService.saveOrUpdateBatch(mesProductionWorkOrderList); diff --git a/src/main/java/org/jeecg/modules/mes/entity/MesProductionWorkOrder.java b/src/main/java/org/jeecg/modules/mes/entity/MesProductionWorkOrder.java index 48ca5e5..9806cd4 100644 --- a/src/main/java/org/jeecg/modules/mes/entity/MesProductionWorkOrder.java +++ b/src/main/java/org/jeecg/modules/mes/entity/MesProductionWorkOrder.java @@ -101,25 +101,25 @@ @Excel(name = "鏄惁閫氳繃榻愬鎬ф鏌�", width = 15, dicCode = "yn") @Dict(dicCode = "yn") @ApiModelProperty(value = "鏄惁閫氳繃榻愬鎬ф鏌�") - private String completenessCheckFlag = CommonConstant.DEFAULT_0; + private String completenessCheckFlag; /**鏄惁閫氳繃璁惧鐐规*/ @Excel(name = "鏄惁閫氳繃璁惧鐐规", width = 15, dicCode = "yn") @Dict(dicCode = "yn") @ApiModelProperty(value = "鏄惁閫氳繃璁惧鐐规") - private String equipmentInspectionFlag = CommonConstant.DEFAULT_0; + private String equipmentInspectionFlag; /**鏄惁閫氳繃宸ヨ壓鐐规*/ @Excel(name = "鏄惁閫氳繃宸ヨ壓鐐规", width = 15, dicCode = "yn") @Dict(dicCode = "yn") @ApiModelProperty(value = "鏄惁閫氳繃宸ヨ壓鐐规") - private String processInspectionFlag = CommonConstant.DEFAULT_0; + private String processInspectionFlag; /**瀹為檯鎶ュ伐鏁伴噺*/ @Excel(name = "瀹為檯鎶ュ伐鏁伴噺", width = 15) @ApiModelProperty(value = "瀹為檯鎶ュ伐鏁伴噺") - private BigDecimal actualQuantity = BigDecimal.ZERO; + private BigDecimal actualQuantity; /**宸茬敓浜ф墭鏁帮紙褰撳墠鐝宸茬敓浜х殑鎵樻暟閲忥紝姣忔鎶ュ伐鏃舵洿鏂帮級*/ @Excel(name = "宸茬敓浜ф墭鏁�", width = 15) @ApiModelProperty(value = "宸茬敓浜ф墭鏁�") - private Integer finishedPallets = 0; + private Integer finishedPallets; /**鍙戝竷浜�*/ @Excel(name = "鍙戝竷浜�", width = 15) @ApiModelProperty(value = "鍙戝竷浜�") -- Gitblit v1.9.3