Merge remote-tracking branch 'origin/master'

master
zpl 3 years ago
commit f968e6d902

@ -57,7 +57,6 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
@ -514,9 +513,11 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
AbnormalBillDispose abnormalBillDispose1 = abnormalBillDisposeMapper.selectById(abnormalBillDispose.getHandle()); AbnormalBillDispose abnormalBillDispose1 = abnormalBillDisposeMapper.selectById(abnormalBillDispose.getHandle());
abnormalPlanService.saveAbnormalPlan(abnormalBill2,abnormalBillDispose1,now); abnormalPlanService.saveAbnormalPlan(abnormalBill2,abnormalBillDispose1,now);
} }
//判断该异常解决方案是否是让步放行、配作,并且关联来源不是空,如果是,就调用孙豪的方法 //判断该异常解决方案是否是让步放行、配作、线下换料、试装,并且关联来源不是空,如果是,就调用孙豪的方法
if((Constants.CONCESSION.equals(abnormalBillDispose.getAbnormalMethod()) || if((Constants.CONCESSION.equals(abnormalBillDispose.getAbnormalMethod()) ||
Constants.MATCH.equals(abnormalBillDispose.getAbnormalMethod())) Constants.MATCH.equals(abnormalBillDispose.getAbnormalMethod()) ||
Constants.OFFLINE_REFUELING.equals(abnormalBillDispose.getAbnormalMethod()) ||
Constants.TEST_EQUIPMENT.equals(abnormalBillDispose.getAbnormalMethod()))
&& !StringUtil.isBlank(abnormalBill2.getObjectBo())){ && !StringUtil.isBlank(abnormalBill2.getObjectBo())){
try{ try{
this.creatInspectionTask(site,abnormalBill2.getObjectBo(),abnormalBill2.getSfc(),abnormalBill2.getStepId(),AnomalyConstant.AnomalyMethod.msg(abnormalBillDispose.getAbnormalMethod())); this.creatInspectionTask(site,abnormalBill2.getObjectBo(),abnormalBill2.getSfc(),abnormalBill2.getStepId(),AnomalyConstant.AnomalyMethod.msg(abnormalBillDispose.getAbnormalMethod()));
@ -1429,10 +1430,8 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
newInspectionTask.setCreatedDateTime(LocalDateTime.now()); newInspectionTask.setCreatedDateTime(LocalDateTime.now());
newInspectionTask.setModifiedDateTime(LocalDateTime.now()); newInspectionTask.setModifiedDateTime(LocalDateTime.now());
}else { }else {
String handle = "InspectionTaskBO:" + site + "," + UUID.randomUUID().toString(); String taskNo = "P_" + DateUtil.getTimeString();
Date date = new Date(System.currentTimeMillis()); String handle = "InspectionBO:" + site + "," + taskNo;
SimpleDateFormat dateFormat1 = new SimpleDateFormat("yyyyMMddHHmmssSSS");
String taskNo = "P_" + dateFormat1.format(date);
SfcDispatchDto sfcDispatchDto = new SfcDispatchDto(); SfcDispatchDto sfcDispatchDto = new SfcDispatchDto();
sfcDispatchDto.setSfc(sfc); sfcDispatchDto.setSfc(sfc);
sfcDispatchDto.setStepId(stepId); sfcDispatchDto.setStepId(stepId);

@ -14,6 +14,7 @@ import com.foreverwin.mesnac.common.service.InspectionItemDetailService;
import com.foreverwin.mesnac.common.service.InspectionItemService; import com.foreverwin.mesnac.common.service.InspectionItemService;
import com.foreverwin.mesnac.common.service.InspectionTaskDetailService; import com.foreverwin.mesnac.common.service.InspectionTaskDetailService;
import com.foreverwin.mesnac.common.service.InspectionTaskService; import com.foreverwin.mesnac.common.service.InspectionTaskService;
import com.foreverwin.mesnac.common.util.DateUtil;
import com.foreverwin.mesnac.common.util.StringUtil; import com.foreverwin.mesnac.common.util.StringUtil;
import com.foreverwin.mesnac.meapi.model.Sfc; import com.foreverwin.mesnac.meapi.model.Sfc;
import com.foreverwin.mesnac.meapi.service.SfcService; import com.foreverwin.mesnac.meapi.service.SfcService;
@ -24,7 +25,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
@ -178,43 +178,43 @@ public class InspectionTaskServiceImpl extends ServiceImpl<InspectionTaskMapper,
if (createTask!=null){ if (createTask!=null){
map.put("taskHandle",createTask.getHandle()); map.put("taskHandle",createTask.getHandle());
}else { }else {
String handle = "InspectionTaskBO:" + site + "," + UUID.randomUUID().toString(); String timeString = DateUtil.getTimeString();
Date date = new Date(System.currentTimeMillis());
SimpleDateFormat dateFormat1 = new SimpleDateFormat("yyyyMMddHHmmssSSS");
String taskNo = ""; String taskNo = "";
String itemNumber = (String) paramMap.get("ITEM_NUMBER"); String itemNumber = (String) paramMap.get("ITEM_NUMBER");
String description = ""; String description = "";
if (category.equals(Constants.INSPECTION_TYPE_Z)) { if (category.equals(Constants.INSPECTION_TYPE_Z)) {
if (StringUtil.isBlank(itemNumber) ) { if (StringUtil.isBlank(itemNumber) ) {
taskNo = "Z_" + dateFormat1.format(date); taskNo = "Z_" + timeString;
} else{ } else{
taskNo = "Z_" + itemNumber + "_" + dateFormat1.format(date); taskNo = "Z_" + itemNumber + "_" + timeString;
} }
description = "自检检验任务"; description = "自检检验任务";
} else if (category.equals(Constants.INSPECTION_TYPE_H)) { } else if (category.equals(Constants.INSPECTION_TYPE_H)) {
if (StringUtil.isBlank(itemNumber)) { if (StringUtil.isBlank(itemNumber)) {
taskNo = "H_" + dateFormat1.format(date); taskNo = "H_" + timeString;
} else { } else {
taskNo = "H_" + itemNumber + "_" + dateFormat1.format(date); taskNo = "H_" + itemNumber + "_" + timeString;
} }
description = "互检检验任务"; description = "互检检验任务";
} else if (category.equals(Constants.INSPECTION_TYPE_S)) { } else if (category.equals(Constants.INSPECTION_TYPE_S)) {
if (StringUtil.isBlank(itemNumber)) { if (StringUtil.isBlank(itemNumber)) {
taskNo = "S_" + dateFormat1.format(date); taskNo = "S_" + timeString;
} else { } else {
taskNo = "S_" + itemNumber + "_" + dateFormat1.format(date); taskNo = "S_" + itemNumber + "_" + timeString;
} }
description = "首件检验任务"; description = "首件检验任务";
} else if (category.equals(Constants.INSPECTION_TYPE_P)) { } else if (category.equals(Constants.INSPECTION_TYPE_P)) {
if (StringUtil.isBlank(itemNumber)) { if (StringUtil.isBlank(itemNumber)) {
taskNo = "P_" + dateFormat1.format(date); taskNo = "P_" + timeString;
} else { } else {
taskNo = "P_" + itemNumber + "_" + dateFormat1.format(date); taskNo = "P_" + itemNumber + "_" + timeString;
} }
description = "专检检验任务"; description = "专检检验任务";
} else { } else {
throw new BaseException("生成任务号失败,请传入检验类型!"); throw new BaseException("生成任务号失败,请传入检验类型!");
} }
String handle = "InspectionBO:" + site + "," + taskNo;
InspectionTask task = new InspectionTask(); InspectionTask task = new InspectionTask();
task.setHandle(handle); task.setHandle(handle);
task.setSite(site); task.setSite(site);
@ -273,15 +273,14 @@ public class InspectionTaskServiceImpl extends ServiceImpl<InspectionTaskMapper,
String stepId = (String) paramMap.get("STEP_ID"); String stepId = (String) paramMap.get("STEP_ID");
String itemNumber = (String) paramMap.get("ITEM_NUMBER"); String itemNumber = (String) paramMap.get("ITEM_NUMBER");
String handle = "InspectionTaskBO:" + site + "," + UUID.randomUUID().toString();
Date date = new Date(System.currentTimeMillis());
SimpleDateFormat dateFormat1 = new SimpleDateFormat("yyyyMMddHHmmssSSS");
String taskNo = ""; String taskNo = "";
String timeString = DateUtil.getTimeString();
if (StringUtil.isBlank(itemNumber)) { if (StringUtil.isBlank(itemNumber)) {
taskNo = "P_" + dateFormat1.format(date); taskNo = "P_" + timeString;
} else { } else {
taskNo = "P_" + itemNumber + "_" + dateFormat1.format(date); taskNo = "P_" + itemNumber + "_" + timeString;
} }
String handle = "InspectionBO:" + site + "," + UUID.randomUUID().toString();
InspectionTask task = new InspectionTask(); InspectionTask task = new InspectionTask();
task.setHandle(handle); task.setHandle(handle);
task.setSite(site); task.setSite(site);

@ -679,7 +679,7 @@
JOIN SFC_ROUTING SR ON SR.SFC_BO=S.HANDLE JOIN SFC_ROUTING SR ON SR.SFC_BO=S.HANDLE
JOIN SFC_ROUTER SR2 ON SR.HANDLE =SR2.SFC_ROUTING_BO AND SR2.IN_USE = 'true' JOIN SFC_ROUTER SR2 ON SR.HANDLE =SR2.SFC_ROUTING_BO AND SR2.IN_USE = 'true'
LEFT JOIN SFC_STEP SS ON SR2.HANDLE =SS.SFC_ROUTER_BO AND (SS.QTY_IN_QUEUE>0 or SS.QTY_IN_WORK>0) LEFT JOIN SFC_STEP SS ON SR2.HANDLE =SS.SFC_ROUTER_BO AND (SS.QTY_IN_QUEUE>0 or SS.QTY_IN_WORK>0)
WHERE S.SITE=#{ew.entity.site} AND ZSD.RESRCE=#{ew.entity.resrce} AND (ZSD.DISPATCH_STATUS='RELEASE' AND ZSD.DISPATCH_STATUS='START') WHERE S.SITE=#{ew.entity.site} AND ZSD.RESRCE=#{ew.entity.resrce} AND (ZSD.DISPATCH_STATUS='RELEASE' OR ZSD.DISPATCH_STATUS='START')
AND S.STATUS_BO IN ('StatusBO:'||#{ew.entity.site}||',401','StatusBO:'||#{ew.entity.site}||',402','StatusBO:'||#{ew.entity.site}||',403','StatusBO:'||#{ew.entity.site}||',404') AND S.STATUS_BO IN ('StatusBO:'||#{ew.entity.site}||',401','StatusBO:'||#{ew.entity.site}||',402','StatusBO:'||#{ew.entity.site}||',403','StatusBO:'||#{ew.entity.site}||',404')
AND zprt.STATUS='FINISH' AND ZPRT."RESULT"='OK' AND zprt.STATUS='FINISH' AND ZPRT."RESULT"='OK'
</select> </select>

@ -257,6 +257,7 @@ public class SplitSfcServiceImpl extends ServiceImpl<SplitSfcMapper, SplitSfc> i
throw new BaseException("处置工艺路线没有步骤"); throw new BaseException("处置工艺路线没有步骤");
} }
sfcDispatchCommonService.saveSplitSfcDispatch(site, CommonMethods.getUser(),"R", sfcData.getShopOrder(), sfc, operation, sfcDispatchBySfc.getStepId(),newSfc, maxRevisionRouter.getHandle(), sfcData.getStepSequence()); sfcDispatchCommonService.saveSplitSfcDispatch(site, CommonMethods.getUser(),"R", sfcData.getShopOrder(), sfc, operation, sfcDispatchBySfc.getStepId(),newSfc, maxRevisionRouter.getHandle(), sfcData.getStepSequence());
}
//创建专检任务 //创建专检任务
Map<String, Object> paramMap=new HashMap<>(); Map<String, Object> paramMap=new HashMap<>();
paramMap.put("CATEGORY", Constants.INSPECTION_TYPE_P); paramMap.put("CATEGORY", Constants.INSPECTION_TYPE_P);
@ -268,7 +269,6 @@ public class SplitSfcServiceImpl extends ServiceImpl<SplitSfcMapper, SplitSfc> i
paramMap.put("RESRCE",sfcDispatchBySfc.getResrce()); paramMap.put("RESRCE",sfcDispatchBySfc.getResrce());
paramMap.put("SFC_DISPATCH_DETAIL_BO",sfcDispatchBySfc.getHandle()); paramMap.put("SFC_DISPATCH_DETAIL_BO",sfcDispatchBySfc.getHandle());
inspectionTaskService.createNewTask(paramMap); inspectionTaskService.createNewTask(paramMap);
}
SplitSfc splitSfc=new SplitSfc(); SplitSfc splitSfc=new SplitSfc();
splitSfc.setHandle(HandleEnum.SPLIT_SFC.getHandle(site,newSfc)); splitSfc.setHandle(HandleEnum.SPLIT_SFC.getHandle(site,newSfc));
splitSfc.setSite(site); splitSfc.setSite(site);

Loading…
Cancel
Save