From 6e006cb835fce4720139de0cc2ec3be734295ed9 Mon Sep 17 00:00:00 2001 From: zhangherong <571457620@qq.com> Date: 星期六, 12 七月 2025 14:18:35 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamThirdMaintenanceOrderServiceImpl.java | 69 ++++++++++++++-------------------- 1 files changed, 28 insertions(+), 41 deletions(-) diff --git a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamThirdMaintenanceOrderServiceImpl.java b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamThirdMaintenanceOrderServiceImpl.java index fdff9fd..205dea0 100644 --- a/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamThirdMaintenanceOrderServiceImpl.java +++ b/lxzn-module-eam/src/main/java/org/jeecg/modules/eam/service/impl/EamThirdMaintenanceOrderServiceImpl.java @@ -9,13 +9,10 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.commons.lang3.StringUtils; import org.apache.shiro.SecurityUtils; import org.flowable.engine.TaskService; import org.flowable.task.api.Task; -import org.jeecg.common.api.vo.FileUploadResult; import org.jeecg.common.api.vo.Result; import org.jeecg.common.constant.CommonConstant; import org.jeecg.common.constant.DataBaseConstant; @@ -45,7 +42,6 @@ import org.jeecg.modules.system.service.IBaseFactoryService; import org.jeecg.modules.system.service.IBaseFactoryUserService; import org.jeecg.modules.system.service.ISysUserService; -import org.jeecg.modules.system.vo.UserSelector; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -85,8 +81,6 @@ private IEamReportRepairService eamReportRepairService; @Autowired private IEamEquipmentExtendService eamEquipmentExtendService; - @Autowired - private IEamPrecisionCheckDetailService precisionCheckDetailService; @Resource private IBaseFactoryUserService baseFactoryUserService; @@ -175,44 +169,37 @@ //澶勭悊鏄庣粏鏁版嵁 if (CollectionUtil.isNotEmpty(request.getTableDetailList())) { request.getTableDetailList().forEach(tableDetail -> { - tableDetail.setId(null); +// tableDetail.setId(null); tableDetail.setOrderId(order.getId()); }); thirdMaintenanceOrderDetailService.saveBatch(request.getTableDetailList()); } - //澶勭悊绮惧害鍙傛暟 - if (CollectionUtil.isNotEmpty(request.getPrecisionDetailList())) { - request.getPrecisionDetailList().forEach(tableDetail -> { - tableDetail.setId(null); - tableDetail.setOrderId(order.getId()); - }); - precisionCheckDetailService.saveBatch(request.getPrecisionDetailList()); - } + //鍒ゆ柇鏄惁瀛樺湪淇濆吇浜� 濡傛灉瀛樺湪鍒欏惎鍔ㄦ祦绋� - if (StringUtils.isNotBlank(order.getOperator())) { - //鍚姩娴佺▼ - flowCommonService.initActBusiness("宸ュ崟鍙�:" + order.getOrderNum() + ";璁惧缂栧彿: " + equipment.getEquipmentCode() + ";瀹夎浣嶇疆" + equipment.getInstallationPosition(), - order.getId(), "IEamThirdMaintenanceOrderService", "third_maintenance_process", null); - Map<String, Object> variables = new HashMap<>(); - variables.put("dataId", order.getId()); - if (StrUtil.isEmpty(order.getRemark())) { - variables.put("organization", "鏂板涓変繚宸ュ崟榛樿鍚姩娴佺▼"); - variables.put("comment", "鏂板涓変繚宸ュ崟榛樿鍚姩娴佺▼"); - } else { - variables.put("organization", order.getRemark()); - variables.put("comment", order.getRemark()); - } - variables.put("proofreading", true); - //骞惰浠诲姟浼氱 - variables.put("maintenance_execution", Collections.singletonList(request.getOperator())); -// variables.put("precision_check", Collections.singletonList(equipment.getEquipmentManager())); - Result result = flowDefinitionService.startProcessInstanceByKey("third_maintenance_process", variables); - if (result != null) { - //鏇存柊璁惧淇濆吇鐘舵�� - eamEquipmentExtendService.updateEquipmentMaintenanceStatus(order.getEquipmentId(), EquipmentMaintenanceStatus.UNDER_THIRD_MAINTENANCE.name()); - return result.isSuccess(); - } - } +// if (StringUtils.isNotBlank(order.getOperator())) { +// //鍚姩娴佺▼ +// flowCommonService.initActBusiness("宸ュ崟鍙�:" + order.getOrderNum() + ";璁惧缂栧彿: " + equipment.getEquipmentCode() + ";瀹夎浣嶇疆" + equipment.getInstallationPosition(), +// order.getId(), "IEamThirdMaintenanceOrderService", "third_maintenance_process", null); +// Map<String, Object> variables = new HashMap<>(); +// variables.put("dataId", order.getId()); +// if (StrUtil.isEmpty(order.getRemark())) { +// variables.put("organization", "鏂板涓変繚宸ュ崟榛樿鍚姩娴佺▼"); +// variables.put("comment", "鏂板涓変繚宸ュ崟榛樿鍚姩娴佺▼"); +// } else { +// variables.put("organization", order.getRemark()); +// variables.put("comment", order.getRemark()); +// } +// variables.put("proofreading", true); +// //骞惰浠诲姟浼氱 +// variables.put("maintenance_execution", Collections.singletonList(request.getOperator())); +//// variables.put("precision_check", Collections.singletonList(equipment.getEquipmentManager())); +// Result result = flowDefinitionService.startProcessInstanceByKey("third_maintenance_process", variables); +// if (result != null) { +// //鏇存柊璁惧淇濆吇鐘舵�� +// eamEquipmentExtendService.updateEquipmentMaintenanceStatus(order.getEquipmentId(), EquipmentMaintenanceStatus.UNDER_THIRD_MAINTENANCE.name()); +// return result.isSuccess(); +// } +// } return true; } @@ -318,8 +305,8 @@ flowCommonService.initActBusiness("宸ュ崟鍙�:" + entity.getOrderNum() + ";璁惧缂栧彿: " + equipment.getEquipmentCode() + ";瀹夎浣嶇疆" + equipment.getInstallationPosition(), entity.getId(), "IEamThirdMaintenanceOrderService", "third_maintenance_process", null); Map<String, Object> variables = new HashMap<>(); - boolean equipmentPrecisionFlag = precisionCheckDetailService.hasPrecisionCheckDetail(entity.getId()); - variables.put("equipmentPrecisionFlag", equipmentPrecisionFlag); +// boolean equipmentPrecisionFlag = precisionCheckDetailService.hasPrecisionCheckDetail(entity.getId()); +// variables.put("equipmentPrecisionFlag", equipmentPrecisionFlag); variables.put("dataId", entity.getId()); if (StrUtil.isEmpty(entity.getRemark())) { variables.put("organization", "鏂板涓変繚宸ュ崟榛樿鍚姩娴佺▼"); -- Gitblit v1.9.3