|
@@ -0,0 +1,71 @@
|
|
|
+package com.zkqy.amichi.service.impl;
|
|
|
+
|
|
|
+import com.zkqy.amichi.domain.ProductionPlanningManagement;
|
|
|
+import com.zkqy.amichi.domain.StationInformation;
|
|
|
+import com.zkqy.amichi.mapper.*;
|
|
|
+import com.zkqy.amichi.service.IOrderforgoodsService;
|
|
|
+import com.zkqy.common.utils.DateUtils;
|
|
|
+import com.zkqy.execution.produce.dispersed.entity.BpmExecuteNodeLog;
|
|
|
+import com.zkqy.execution.produce.dispersed.entity.BpmExecuteProcess;
|
|
|
+import com.zkqy.execution.produce.dispersed.mapper.BpmExecuteNodeLogMapper;
|
|
|
+import com.zkqy.execution.produce.dispersed.mapper.BpmExecuteProcessMapper;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+@Service
|
|
|
+public class OrderforgoodsServiceImpl implements IOrderforgoodsService {
|
|
|
+ @Autowired
|
|
|
+ private ProductionPlanningManagementMapper productionPlanningManagementMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private BpmExecuteProcessMapper bpmExecuteProcessMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private BpmExecuteNodeLogMapper bpmExecuteNodeLogMapper;
|
|
|
+ /**
|
|
|
+ * 订单取消
|
|
|
+ *
|
|
|
+ * @param planNumber 订单编号
|
|
|
+ * @return 结果
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public String updateOrderforgoods(String planNumber)
|
|
|
+ {
|
|
|
+ ProductionPlanningManagement productionPlanningManagement=new ProductionPlanningManagement();
|
|
|
+ productionPlanningManagement.setOrderNumber(planNumber);
|
|
|
+ List<ProductionPlanningManagement> productionPlanningManagements = productionPlanningManagementMapper.selectProductionPlanningManagementList(productionPlanningManagement);
|
|
|
+ if(productionPlanningManagements.size()<=0){
|
|
|
+ return "未找到当前产品计划--信息不匹配";
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ ProductionPlanningManagement ppm=productionPlanningManagements.get(0);
|
|
|
+ BpmExecuteProcess process=new BpmExecuteProcess();
|
|
|
+ process.setTaskPlanKey(ppm.getId().toString());//计划id
|
|
|
+ List<BpmExecuteProcess> bpmExecuteProcesses = bpmExecuteProcessMapper.selectBpmExecuteProcessListfjqy(process);
|
|
|
+ if(productionPlanningManagements.size()>0){
|
|
|
+ BpmExecuteProcess bpmExecuteProcess=bpmExecuteProcesses.get(0);
|
|
|
+ BpmExecuteNodeLog bpmExecuteNodeLog=new BpmExecuteNodeLog();
|
|
|
+ bpmExecuteNodeLog.setTaskProcessKey(bpmExecuteProcess.getTaskKey());//流程编号
|
|
|
+ List<BpmExecuteNodeLog> bpmExecuteNodeLogs = bpmExecuteNodeLogMapper.selectBpmExecuteNodeLogListfjqy(bpmExecuteNodeLog);
|
|
|
+ if(bpmExecuteNodeLogs.size()>0){
|
|
|
+ BpmExecuteNodeLog bpmExecuteNodeLog1=bpmExecuteNodeLogs.get(0);
|
|
|
+ String taskNodeNumber=bpmExecuteNodeLog1.getTaskNodeNumber();
|
|
|
+ ppm.setQuantity(taskNodeNumber);
|
|
|
+ productionPlanningManagementMapper.updateProductionPlanningManagement(ppm);
|
|
|
+ return "操作成功";
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ return "未找到当前产品计划--信息不匹配";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ return "未找到当前产品计划--信息不匹配";
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+}
|