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 java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.*;
@ -514,10 +513,12 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
AbnormalBillDispose abnormalBillDispose1 = abnormalBillDisposeMapper.selectById(abnormalBillDispose.getHandle());
abnormalPlanService.saveAbnormalPlan(abnormalBill2,abnormalBillDispose1,now);
}
//判断该异常解决方案是否是让步放行、配作,并且关联来源不是空,如果是,就调用孙豪的方法
//判断该异常解决方案是否是让步放行、配作、线下换料、试装,并且关联来源不是空,如果是,就调用孙豪的方法
if((Constants.CONCESSION.equals(abnormalBillDispose.getAbnormalMethod()) ||
Constants.MATCH.equals(abnormalBillDispose.getAbnormalMethod()))
&& !StringUtil.isBlank(abnormalBill2.getObjectBo())){
Constants.MATCH.equals(abnormalBillDispose.getAbnormalMethod()) ||
Constants.OFFLINE_REFUELING.equals(abnormalBillDispose.getAbnormalMethod()) ||
Constants.TEST_EQUIPMENT.equals(abnormalBillDispose.getAbnormalMethod()))
&& !StringUtil.isBlank(abnormalBill2.getObjectBo())){
try{
this.creatInspectionTask(site,abnormalBill2.getObjectBo(),abnormalBill2.getSfc(),abnormalBill2.getStepId(),AnomalyConstant.AnomalyMethod.msg(abnormalBillDispose.getAbnormalMethod()));
}catch (Exception e){
@ -1429,10 +1430,8 @@ public class AbnormalBillServiceImpl extends ServiceImpl<AbnormalBillMapper, Abn
newInspectionTask.setCreatedDateTime(LocalDateTime.now());
newInspectionTask.setModifiedDateTime(LocalDateTime.now());
}else {
String handle = "InspectionTaskBO:" + site + "," + UUID.randomUUID().toString();
Date date = new Date(System.currentTimeMillis());
SimpleDateFormat dateFormat1 = new SimpleDateFormat("yyyyMMddHHmmssSSS");
String taskNo = "P_" + dateFormat1.format(date);
String taskNo = "P_" + DateUtil.getTimeString();
String handle = "InspectionBO:" + site + "," + taskNo;
SfcDispatchDto sfcDispatchDto = new SfcDispatchDto();
sfcDispatchDto.setSfc(sfc);
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.InspectionTaskDetailService;
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.meapi.model.Sfc;
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.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.*;
@ -178,43 +178,43 @@ public class InspectionTaskServiceImpl extends ServiceImpl<InspectionTaskMapper,
if (createTask!=null){
map.put("taskHandle",createTask.getHandle());
}else {
String handle = "InspectionTaskBO:" + site + "," + UUID.randomUUID().toString();
Date date = new Date(System.currentTimeMillis());
SimpleDateFormat dateFormat1 = new SimpleDateFormat("yyyyMMddHHmmssSSS");
String timeString = DateUtil.getTimeString();
String taskNo = "";
String itemNumber = (String) paramMap.get("ITEM_NUMBER");
String description = "";
if (category.equals(Constants.INSPECTION_TYPE_Z)) {
if (StringUtil.isBlank(itemNumber) ) {
taskNo = "Z_" + dateFormat1.format(date);
taskNo = "Z_" + timeString;
} else{
taskNo = "Z_" + itemNumber + "_" + dateFormat1.format(date);
taskNo = "Z_" + itemNumber + "_" + timeString;
}
description = "自检检验任务";
} else if (category.equals(Constants.INSPECTION_TYPE_H)) {
if (StringUtil.isBlank(itemNumber)) {
taskNo = "H_" + dateFormat1.format(date);
taskNo = "H_" + timeString;
} else {
taskNo = "H_" + itemNumber + "_" + dateFormat1.format(date);
taskNo = "H_" + itemNumber + "_" + timeString;
}
description = "互检检验任务";
} else if (category.equals(Constants.INSPECTION_TYPE_S)) {
if (StringUtil.isBlank(itemNumber)) {
taskNo = "S_" + dateFormat1.format(date);
taskNo = "S_" + timeString;
} else {
taskNo = "S_" + itemNumber + "_" + dateFormat1.format(date);
taskNo = "S_" + itemNumber + "_" + timeString;
}
description = "首件检验任务";
} else if (category.equals(Constants.INSPECTION_TYPE_P)) {
if (StringUtil.isBlank(itemNumber)) {
taskNo = "P_" + dateFormat1.format(date);
taskNo = "P_" + timeString;
} else {
taskNo = "P_" + itemNumber + "_" + dateFormat1.format(date);
taskNo = "P_" + itemNumber + "_" + timeString;
}
description = "专检检验任务";
} else {
throw new BaseException("生成任务号失败,请传入检验类型!");
}
String handle = "InspectionBO:" + site + "," + taskNo;
InspectionTask task = new InspectionTask();
task.setHandle(handle);
task.setSite(site);
@ -273,15 +273,14 @@ public class InspectionTaskServiceImpl extends ServiceImpl<InspectionTaskMapper,
String stepId = (String) paramMap.get("STEP_ID");
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 timeString = DateUtil.getTimeString();
if (StringUtil.isBlank(itemNumber)) {
taskNo = "P_" + dateFormat1.format(date);
taskNo = "P_" + timeString;
} else {
taskNo = "P_" + itemNumber + "_" + dateFormat1.format(date);
taskNo = "P_" + itemNumber + "_" + timeString;
}
String handle = "InspectionBO:" + site + "," + UUID.randomUUID().toString();
InspectionTask task = new InspectionTask();
task.setHandle(handle);
task.setSite(site);

@ -679,7 +679,7 @@
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'
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 zprt.STATUS='FINISH' AND ZPRT."RESULT"='OK'
</select>

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

Loading…
Cancel
Save