|
|
|
|
@ -95,7 +95,7 @@ import static com.fasterxml.jackson.databind.type.LogicalType.DateTime; |
|
|
|
|
@EqualsAndHashCode(callSuper = true) |
|
|
|
|
@Slf4j |
|
|
|
|
public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMapper, InspectionTask> |
|
|
|
|
implements IInspectionTaskService , ApplicationContextAware { |
|
|
|
|
implements IInspectionTaskService, ApplicationContextAware { |
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
private IInspectionItemService itemService; |
|
|
|
|
@ -124,7 +124,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
private IRemindMsgService service; |
|
|
|
|
@Resource |
|
|
|
|
private WorkPlanMapper workPlanMapper; |
|
|
|
|
// @Resource
|
|
|
|
|
// @Resource
|
|
|
|
|
// private IWorkOrderService workOrderService;
|
|
|
|
|
@Resource |
|
|
|
|
private WorkOrderMapper workOrderMapper; |
|
|
|
|
@ -177,8 +177,8 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
// InspectionTaskListVO taskListVO = InspectionTaskListWrapper.build().entityVO(task);
|
|
|
|
|
|
|
|
|
|
InspectionTaskListVO detailDetail = this.detailById(task); |
|
|
|
|
DsPartEntity part =partService.selectDsPartByPatCodeAndVersion(detailDetail.getPartCode(),null); |
|
|
|
|
if(null != part){ |
|
|
|
|
DsPartEntity part = partService.selectDsPartByPatCodeAndVersion(detailDetail.getPartCode(), null); |
|
|
|
|
if (null != part) { |
|
|
|
|
detailDetail.setMaterial(part.getMaterial()); |
|
|
|
|
detailDetail.setHardness(part.getHardness()); |
|
|
|
|
detailDetail.setProcess(part.getCraftWay()); |
|
|
|
|
@ -189,11 +189,10 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vo.setOrderInfo(detailDetail); |
|
|
|
|
if(null == detailDetail.getCurrentProcessName()){ |
|
|
|
|
if (null == detailDetail.getCurrentProcessName()) { |
|
|
|
|
vo.setProcessName(""); |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
vo.setProcessName(detailDetail.getCurrentProcessName()); |
|
|
|
|
} |
|
|
|
|
// todo:
|
|
|
|
|
@ -210,9 +209,9 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
//查询零件号消息提醒
|
|
|
|
|
List<RemindMsg> msgList = new ArrayList<>(); |
|
|
|
|
List<RemindMsg> msgListNew = new ArrayList<>(); |
|
|
|
|
if(null != parts && parts.size() > 0){ |
|
|
|
|
if (null != parts && parts.size() > 0) { |
|
|
|
|
|
|
|
|
|
if(null != processId && 107L == processId){ |
|
|
|
|
if (null != processId && 107L == processId) { |
|
|
|
|
LambdaQueryWrapper<RemindMsg> qw = Wrappers.lambdaQuery(RemindMsg.class) |
|
|
|
|
.eq(RemindMsg::getPartCode, parts.get(0).getPartCode()) |
|
|
|
|
// .eq(RemindMsg::getQualityLevel, prodIdent)
|
|
|
|
|
@ -239,7 +238,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
// }
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(null != processId && 21L == processId){ |
|
|
|
|
if (null != processId && 21L == processId) { |
|
|
|
|
LambdaQueryWrapper<RemindMsg> qw = Wrappers.lambdaQuery(RemindMsg.class) |
|
|
|
|
.eq(RemindMsg::getPartCode, parts.get(0).getPartCode()) |
|
|
|
|
// .eq(RemindMsg::getQualityLevel, prodIdent)
|
|
|
|
|
@ -275,10 +274,10 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
//颜色提醒
|
|
|
|
|
List<DsPartEntity> list = partService.getPartSubList(detailDetail.getPartCode(), null); |
|
|
|
|
List<RemindMsg> colorMsges = new ArrayList<>(); |
|
|
|
|
if(null != list && list.size() > 0){ |
|
|
|
|
for(DsPartEntity partEntity : list){ |
|
|
|
|
if (null != list && list.size() > 0) { |
|
|
|
|
for (DsPartEntity partEntity : list) { |
|
|
|
|
List<RemindMsg> msges = new ArrayList<>(); |
|
|
|
|
LambdaQueryWrapper<RemindMsg> qw = Wrappers.lambdaQuery(RemindMsg.class) |
|
|
|
|
LambdaQueryWrapper<RemindMsg> qw = Wrappers.lambdaQuery(RemindMsg.class) |
|
|
|
|
.eq(RemindMsg::getSubPartCode, partEntity.getPartCode()) |
|
|
|
|
// .eq(RemindMsg::getQualityLevel, prodIdent)
|
|
|
|
|
.eq(RemindMsg::getRemindMsgType, 2L) |
|
|
|
|
@ -509,16 +508,16 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
|
|
|
|
|
WorkPlanItem wpItemDB = wpItemService.getById(wpItemVO.getId()); |
|
|
|
|
WorkPlan wpi = workPlanMapper.selectById(wpItemDB.getWpId()); |
|
|
|
|
if(null != wpi){ |
|
|
|
|
if (null != wpi) { |
|
|
|
|
WorkOrder order = workOrderMapper.selectById(wpi.getWoId()); |
|
|
|
|
if(null != order){ |
|
|
|
|
if (null != order) { |
|
|
|
|
YieldOrder yieldOrder = yieldOrderMapper.selectById(order.getYoId()); |
|
|
|
|
String[] arr = new String[]{"YH","CASTH","YB","YC","SAST","CISS","EK"}; |
|
|
|
|
String[] chrr = new String[]{"董以青","王跃伟","刘旭","张琼琼","张楠","朱辉","高博","宁亚美","党哲","左帅通","赵亚丽"}; |
|
|
|
|
String[] arr = new String[]{"YH", "CASTH", "YB", "YC", "SAST", "CISS", "EK"}; |
|
|
|
|
String[] chrr = new String[]{"董以青", "王跃伟", "刘旭", "张琼琼", "张楠", "朱辉", "高博", "宁亚美", "党哲", "左帅通", "赵亚丽"}; |
|
|
|
|
for (String s : arr) { |
|
|
|
|
if (s == yieldOrder.getProductIdent()){ |
|
|
|
|
if (s == yieldOrder.getProductIdent()) { |
|
|
|
|
for (String s1 : chrr) { |
|
|
|
|
if (s1 == AuthUtil.getNickName()){ |
|
|
|
|
if (s1 == AuthUtil.getNickName()) { |
|
|
|
|
// throw new BusinessException("当前用户无当前等级检验资质!");
|
|
|
|
|
return R.fail("当前用户无当前等级检验资质!"); |
|
|
|
|
} |
|
|
|
|
@ -545,7 +544,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(null != wpItemVO.getWpItemDetailList() && wpItemVO.getWpItemDetailList().size() > 0){ |
|
|
|
|
if (null != wpItemVO.getWpItemDetailList() && wpItemVO.getWpItemDetailList().size() > 0) { |
|
|
|
|
QueryWrapper<WorkPlanItemDetail> qw = new QueryWrapper<>(); |
|
|
|
|
qw.eq("WORK_PLAN_ITEM_ID", wpItemDB.getId()); |
|
|
|
|
wpItemDetailService.remove(qw); |
|
|
|
|
@ -568,7 +567,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(null != wpItemVO.getThicknessList() && wpItemVO.getThicknessList().size() > 0){ |
|
|
|
|
if (null != wpItemVO.getThicknessList() && wpItemVO.getThicknessList().size() > 0) { |
|
|
|
|
for (WorkPlanItemThicknessVO wpItemDetailVO : wpItemVO.getThicknessList()) { |
|
|
|
|
WorkPlanThicknessDetail wpItemDetail = new WorkPlanThicknessDetail(); |
|
|
|
|
BeanUtil.copyProperties(wpItemDetailVO, wpItemDetail); |
|
|
|
|
@ -590,7 +589,6 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public IPage<InspectionTaskListVO> listSearch(IPage<InspectionTaskListVO> page, InspectionTaskSearch search) { |
|
|
|
|
List<InspectionTaskListVO> listVO = baseMapper.listSearch(page, search); |
|
|
|
|
@ -651,8 +649,8 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
QueryWrapper<DsPartEntity> qwpart = new QueryWrapper<>(); |
|
|
|
|
qwpart.eq("PART_CODE", pjYieldOrder.getPartCode()); |
|
|
|
|
List<DsPartEntity> partList = partService.list(qwpart); |
|
|
|
|
DsPartEntity dsPart = new DsPartEntity(); |
|
|
|
|
if(partList != null && partList.size() > 0){ |
|
|
|
|
DsPartEntity dsPart = new DsPartEntity(); |
|
|
|
|
if (partList != null && partList.size() > 0) { |
|
|
|
|
dsPart = partList.get(0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -735,7 +733,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
QueryWrapper<AuditFile> qw = new QueryWrapper<>(); |
|
|
|
|
qw.eq("WC_ID", workPlan.getId()); |
|
|
|
|
List<AuditFile> auditFileList = auditFileService.list(qw); |
|
|
|
|
if(auditFileList != null && auditFileList.size() > 0){ |
|
|
|
|
if (auditFileList != null && auditFileList.size() > 0) { |
|
|
|
|
workPlan.setAuditFile(auditFileList.get(0)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -799,10 +797,10 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
// 操作者(工序接收人)
|
|
|
|
|
// 如果是场内班组
|
|
|
|
|
// zxh 20241217 电子档案场内工序操作者取值改为报工人
|
|
|
|
|
if (null != workPlan.getOcId() && workPlan.getOcId() >0 && workPlan.getReceiveMan() != null ) { |
|
|
|
|
if (null != workPlan.getOcId() && workPlan.getOcId() > 0 && workPlan.getReceiveMan() != null) { |
|
|
|
|
|
|
|
|
|
R<User> user = userClient.userInfoById(workPlan.getReceiveMan()); |
|
|
|
|
if(null != user && null != user.getData() && null != user.getData().getAccount()){ |
|
|
|
|
if (null != user && null != user.getData() && null != user.getData().getAccount()) { |
|
|
|
|
// workPlan.setCreateMan(workPlan.getReceiveMan().getUserName());
|
|
|
|
|
MakeRec prMakeRec = workPlanMapper.getByWpId(workPlan.getId()); |
|
|
|
|
if (prMakeRec != null) { |
|
|
|
|
@ -814,7 +812,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
} |
|
|
|
|
} else if (workPlan.getOcId() != null) { // 外协
|
|
|
|
|
Oem oem = oemMapper.selectById(workPlan.getOcId()); |
|
|
|
|
if(oem != null){ |
|
|
|
|
if (oem != null) { |
|
|
|
|
workPlan.setCreateMan(oem.getCode()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@ -844,7 +842,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
List<MesQcProduceRunEntity> prList; |
|
|
|
|
List<MesRbFilePreserveSlotEntity> dsRbFilePreserveSlotList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
QueryWrapper<CenterTeam> qwteam= new QueryWrapper<>(); |
|
|
|
|
QueryWrapper<CenterTeam> qwteam = new QueryWrapper<>(); |
|
|
|
|
qwteam.eq("TS_ID", workPlan.getMakeTeam()); |
|
|
|
|
List<CenterTeam> teamList = centerTeamService.list(qwteam); |
|
|
|
|
CenterTeam bsCenterTeam = null; |
|
|
|
|
@ -852,7 +850,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
bsCenterTeam = teamList.get(0); |
|
|
|
|
} |
|
|
|
|
// CenterTeam bsCenterTeam = bsCenterTeamService.getByTsId(workPlan.getMakeTeam().getTsId());
|
|
|
|
|
if (bsCenterTeam != null && bsCenterTeam.getWcId()!= null) { |
|
|
|
|
if (bsCenterTeam != null && bsCenterTeam.getWcId() != null) { |
|
|
|
|
MacToolUse prMacToolUse; |
|
|
|
|
List<MesRbFilePreserveSlotEntity> preserveSlotList; |
|
|
|
|
MesQcProduceRunEntity boxInfo = new MesQcProduceRunEntity(); |
|
|
|
|
@ -885,7 +883,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
// 烘箱信息(从设备,工装使用记录获取)
|
|
|
|
|
// boxInfo = workPlanMapper.getBoxInfoByWpIdMtnCode(workPlan.getId());
|
|
|
|
|
List<MesQcProduceRunEntity> runs = workPlanMapper.getBoxInfoByWpIdMtnCodeList(workPlan.getId()); |
|
|
|
|
if(runs != null && runs.size() > 0){ |
|
|
|
|
if (runs != null && runs.size() > 0) { |
|
|
|
|
boxInfo = runs.get(0); |
|
|
|
|
} |
|
|
|
|
if (StringUtils.isNotBlank(boxInfo.getInDate())) { |
|
|
|
|
@ -927,9 +925,9 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
List<ProReTemplate> dsRbFilePreserveList = null; |
|
|
|
|
if (workPlan.getPpsId() != null){ |
|
|
|
|
if (workPlan.getPpsId() != null) { |
|
|
|
|
BsProcessSetEntity process = processSetService.getById(workPlan.getPpsId()); |
|
|
|
|
if("喷砂".equals(process.getName()) || "涂色标".equals(process.getName())) { |
|
|
|
|
if ("喷砂".equals(process.getName()) || "涂色标".equals(process.getName())) { |
|
|
|
|
dsRbFilePreserveList = workPlanMapper.getDataByWcIdAndPpsId(null, |
|
|
|
|
workPlan.getPpsId(), Boolean.TRUE); |
|
|
|
|
} else { |
|
|
|
|
@ -944,7 +942,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
preserveSlotList = workPlanMapper.getByRfpId(dsRbFilePreserveList.get(0).getId()); |
|
|
|
|
qcProduceRunsList = workPlanMapper.listPrByWpIdIndex(workPlan.getId(), 2, Boolean.TRUE); |
|
|
|
|
List<MesQcProduceRunEntity> runs = workPlanMapper.getBoxInfoByWpIdMtnCodeList(workPlan.getId()); |
|
|
|
|
if(runs != null && runs.size() > 0){ |
|
|
|
|
if (runs != null && runs.size() > 0) { |
|
|
|
|
boxInfo = runs.get(0); |
|
|
|
|
} |
|
|
|
|
// 烘箱信息(从设备,工装使用记录获取)
|
|
|
|
|
@ -978,7 +976,6 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//222222222222222222222222222222222222222222222
|
|
|
|
|
|
|
|
|
|
// 根据电子档案维护组装数据(线下)
|
|
|
|
|
@ -1010,7 +1007,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
// boxInfo = prMacToolUseService.getBoxInfoByWpIdMtnCode(workPlan.getId());
|
|
|
|
|
|
|
|
|
|
List<MesQcProduceRunEntity> runs = workPlanMapper.getBoxInfoByWpIdMtnCodeList(workPlan.getId()); |
|
|
|
|
if(runs != null && runs.size() > 0){ |
|
|
|
|
if (runs != null && runs.size() > 0) { |
|
|
|
|
boxInfo = runs.get(0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -1536,10 +1533,9 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
|
|
|
|
|
task.setCheckUserId(AuthUtil.getUserId()); |
|
|
|
|
task.setCheckDate(LocalDateTime.now()); |
|
|
|
|
this.computeOrderQty(wp, wo, sumCheckQ, sumTestQty, sumLossQty, 0); |
|
|
|
|
// this.qualified(wp, wc, wo);
|
|
|
|
|
this.computeOrderQty(wp, task, wo, sumCheckQ, sumTestQty, sumLossQty, 0); |
|
|
|
|
IWorkOrderService workOrderService = context.getBean(IWorkOrderService.class); |
|
|
|
|
workOrderService.qualified(wp,wo,AuthUtil.getUserName()); |
|
|
|
|
workOrderService.qualified(wp, task, wo, AuthUtil.getUserName()); |
|
|
|
|
} else if (countNA == itemList.size()) { // 全部item NA
|
|
|
|
|
checkResult = InspectionTaskConst.CHECK_RESULT_NA; |
|
|
|
|
} else if (countNO >= 0 && countNO <= itemList.size()) { // 不合格
|
|
|
|
|
@ -1572,8 +1568,14 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
public void setApplicationContext(ApplicationContext context) { |
|
|
|
|
this.context = context; |
|
|
|
|
} |
|
|
|
|
public void computeOrderQty(WorkPlan wp, WorkOrder wo, int checkQ, int testQty, int lossQty, int scrapQty) { |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void computeOrderQty(WorkPlan wp, InspectionTask wc, WorkOrder wo, int checkQ, int testQty, int lossQty, int scrapQty) { |
|
|
|
|
if (wc != null) { |
|
|
|
|
wc.setScrapQty(wc.getScrapQty() + scrapQty); |
|
|
|
|
wc.setCheckQty(wc.getCheckQty() + checkQ); |
|
|
|
|
wc.setLossQty(wc.getLossQty() + lossQty); |
|
|
|
|
} |
|
|
|
|
if (wo != null) { |
|
|
|
|
wo.setMakeQty(wo.getMakeQty() - (testQty + lossQty + scrapQty)); |
|
|
|
|
wo.setTestQty(wo.getTestQty() + testQty); |
|
|
|
|
@ -1601,14 +1603,14 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
private JSONObject glassCake(Long woId) { |
|
|
|
|
JSONObject obj = new JSONObject(); |
|
|
|
|
// 子件订单信息
|
|
|
|
|
WorkOrder prWorkOrder =workOrderMapper.selectById(woId); |
|
|
|
|
WorkOrder prWorkOrder = workOrderMapper.selectById(woId); |
|
|
|
|
YieldOrder yieldOrder = yieldOrderMapper.selectById(prWorkOrder.getYoId()); |
|
|
|
|
// DsPartEntity dsPart = dsPartService.getByPartCode(prWorkOrder.getPjYieldOrder().getPartCode());
|
|
|
|
|
QueryWrapper<DsPartEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
queryWrapper.eq("part_code", yieldOrder.getPartCode()); |
|
|
|
|
List<DsPartEntity> dsPartList = partService.list(queryWrapper); |
|
|
|
|
DsPartEntity dsPart = new DsPartEntity(); |
|
|
|
|
if(null != dsPartList && dsPartList.size() > 0){ |
|
|
|
|
if (null != dsPartList && dsPartList.size() > 0) { |
|
|
|
|
dsPart = dsPartList.get(0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -1641,10 +1643,10 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
printChildCheck.setTestName(prWorkPlanItem.getItemName()); |
|
|
|
|
printChildCheck.setTrialStandard(prWorkPlanItem.getStandardName()); |
|
|
|
|
printChildCheck.setCheckResult(prWorkPlanItem.getCheckResult() == -1 ? "未检验" : prWorkPlanItem.getCheckResult() == 1 ? "合格" : |
|
|
|
|
prWorkPlanItem.getCheckResult() == 2 ? "不合格" : prWorkPlanItem.getCheckResult() == 3 ? "NA" : ""); |
|
|
|
|
prWorkPlanItem.getCheckResult() == 2 ? "不合格" : prWorkPlanItem.getCheckResult() == 3 ? "NA" : ""); |
|
|
|
|
if (prWorkPlanItem.getCheckUserId() != null) { |
|
|
|
|
R<User> user = userClient.userInfoById(prWorkPlanItem.getCheckUserId()); |
|
|
|
|
if(null != user && null != user.getData()){ |
|
|
|
|
if (null != user && null != user.getData()) { |
|
|
|
|
printChildCheck.setCheckName(user.getData().getRealName()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@ -1699,7 +1701,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
private JSONObject glassSealing(Long woId, List<Boolean> planList, List<Boolean> moduleList) { |
|
|
|
|
JSONObject obj = new JSONObject(); |
|
|
|
|
// 订单信息
|
|
|
|
|
WorkOrder prWorkOrder =workOrderMapper.selectById(woId); |
|
|
|
|
WorkOrder prWorkOrder = workOrderMapper.selectById(woId); |
|
|
|
|
|
|
|
|
|
List<WorkOrder> subPrWorkOrderList = this.checkOrderSj(prWorkOrder); |
|
|
|
|
YieldOrder yieldOrder = yieldOrderMapper.selectById(prWorkOrder.getYoId()); |
|
|
|
|
@ -1708,7 +1710,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
queryWrapper.eq("part_code", yieldOrder.getPartCode()); |
|
|
|
|
List<DsPartEntity> dsPartList = partService.list(queryWrapper); |
|
|
|
|
DsPartEntity dsPart = new DsPartEntity(); |
|
|
|
|
if(null != dsPartList && dsPartList.size() > 0){ |
|
|
|
|
if (null != dsPartList && dsPartList.size() > 0) { |
|
|
|
|
dsPart = dsPartList.get(0); |
|
|
|
|
} |
|
|
|
|
obj.put("prWorkOrder", prWorkOrder); |
|
|
|
|
@ -1761,6 +1763,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
} |
|
|
|
|
return obj; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public List<PrintChildCheck> getCheckListDetail(List<PrintChildCheck> checkList, List<WorkPlanItem> piLst, Boolean eleOrPrint) { |
|
|
|
|
|
|
|
|
|
if (piLst != null && piLst.size() > 0) { |
|
|
|
|
@ -1789,16 +1792,16 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
// 230310新增试验数量
|
|
|
|
|
cc.setTestQty(pi.getTestQty() != null && pi.getTestQty() > 0 ? pi.getTestQty().toString() : ""); |
|
|
|
|
// 检验结果
|
|
|
|
|
if(0==pi.getCheckResult()){ |
|
|
|
|
if (0 == pi.getCheckResult()) { |
|
|
|
|
cc.setCheckResult("未检验"); |
|
|
|
|
} |
|
|
|
|
if(1==pi.getCheckResult()){ |
|
|
|
|
if (1 == pi.getCheckResult()) { |
|
|
|
|
cc.setCheckResult("合格"); |
|
|
|
|
} |
|
|
|
|
if(2==pi.getCheckResult()){ |
|
|
|
|
if (2 == pi.getCheckResult()) { |
|
|
|
|
cc.setCheckResult("不合格"); |
|
|
|
|
} |
|
|
|
|
if(-1==pi.getCheckResult()){ |
|
|
|
|
if (-1 == pi.getCheckResult()) { |
|
|
|
|
cc.setCheckResult("NA"); |
|
|
|
|
} |
|
|
|
|
// cc.setCheckResult(!"未检验".equals(pi.getCheckResult()) ? pi.getCheckResult() : null);
|
|
|
|
|
@ -1806,14 +1809,13 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
if (pi.getCheckUserId() != null) { |
|
|
|
|
R<User> user = userClient.userInfoById(pi.getCheckUserId()); |
|
|
|
|
String userName = user.getData().getAccount(); |
|
|
|
|
if(null != user && user.getData() != null){ |
|
|
|
|
if (null != user && user.getData() != null) { |
|
|
|
|
cc.setCheckName(user.getData().getRealName()); |
|
|
|
|
} |
|
|
|
|
//zxh 20250212 从nerp获取检验员印章
|
|
|
|
|
String checkManByNewErp = workPlanMapper.getCheckManByNewErpMes(userName); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (eleOrPrint) { |
|
|
|
|
cc.setImgUrl(checkManByNewErp); |
|
|
|
|
} else { |
|
|
|
|
@ -1823,7 +1825,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(null != pi.getCheckDate()){ |
|
|
|
|
if (null != pi.getCheckDate()) { |
|
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); |
|
|
|
|
String formattedDateTime = pi.getCheckDate().format(formatter); |
|
|
|
|
cc.setCheckDate(formattedDateTime); |
|
|
|
|
@ -1889,7 +1891,6 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public Object pagePrintSjEleFiles(Long woId, Integer yieldType, List<Boolean> planList, List<Boolean> moduleList) { |
|
|
|
|
|
|
|
|
|
@ -1971,8 +1972,9 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
List<MesRbFilePreserveDetailEntity> list = workPlanMapper.getByRfpsIdMesNew(id); |
|
|
|
|
return list; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public void saveOrEditMes(List<MesRbFilePreserveSlotEntity> submitList, List<Long> deleteIds, BladeUser curUserInfo,Long rfpId){ |
|
|
|
|
public void saveOrEditMes(List<MesRbFilePreserveSlotEntity> submitList, List<Long> deleteIds, BladeUser curUserInfo, Long rfpId) { |
|
|
|
|
Map<String, Long> slotNameCountMap = submitList.stream() |
|
|
|
|
// 按slotName分组,key=slotName,value=该名称的元素数量
|
|
|
|
|
.collect(Collectors.groupingBy(MesRbFilePreserveSlotEntity::getSlotName, Collectors.counting())); |
|
|
|
|
@ -1989,7 +1991,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
dsRbFilePreserveSlot.setKeepMan(curUserInfo.getNickName()); |
|
|
|
|
dsRbFilePreserveSlot.setDsRbFilePreserve(dsRbFilePreserve); |
|
|
|
|
dsRbFilePreserveSlot.setRfpId(rfpId); |
|
|
|
|
if(StringUtils.isBlank(dsRbFilePreserveSlot.getSlotName())){ |
|
|
|
|
if (StringUtils.isBlank(dsRbFilePreserveSlot.getSlotName())) { |
|
|
|
|
throw new RuntimeException("请将槽号/工位填写完成"); |
|
|
|
|
} |
|
|
|
|
if (dsRbFilePreserveSlot.getId() != null) { |
|
|
|
|
@ -2048,7 +2050,7 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
QueryWrapper<AuditFile> qw = new QueryWrapper<>(); |
|
|
|
|
qw.eq("WC_ID", prWorkPlan.getId()); |
|
|
|
|
List<AuditFile> auditFileList = auditFileService.list(qw); |
|
|
|
|
if(auditFileList != null && auditFileList.size() > 0){ |
|
|
|
|
if (auditFileList != null && auditFileList.size() > 0) { |
|
|
|
|
prWorkPlan.setAuditFile(auditFileList.get(0)); |
|
|
|
|
} |
|
|
|
|
// 同槽信息
|
|
|
|
|
@ -2082,10 +2084,10 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
printChildCheck.setTrialStandard(prWorkPlanItem.getStandardName()); |
|
|
|
|
|
|
|
|
|
printChildCheck.setCheckResult(prWorkPlanItem.getCheckResult() == -1 ? "未检验" : prWorkPlanItem.getCheckResult() == 1 ? "合格" : |
|
|
|
|
prWorkPlanItem.getCheckResult() == 2 ? "不合格" : prWorkPlanItem.getCheckResult() == 3 ? "NA" : ""); |
|
|
|
|
prWorkPlanItem.getCheckResult() == 2 ? "不合格" : prWorkPlanItem.getCheckResult() == 3 ? "NA" : ""); |
|
|
|
|
if (prWorkPlanItem.getCheckUserId() != null) { |
|
|
|
|
R<User> user = userClient.userInfoById(prWorkPlanItem.getCheckUserId()); |
|
|
|
|
if(null != user && null != user.getData()){ |
|
|
|
|
if (null != user && null != user.getData()) { |
|
|
|
|
printChildCheck.setCheckName(user.getData().getRealName()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
@ -2110,10 +2112,10 @@ public class InspectionTaskServiceImpl extends BaseServiceImpl<InspectionTaskMap |
|
|
|
|
rs.setStatus(ReviewSheetConst.STATUS.S_INIT); |
|
|
|
|
rs.setStatus(ReviewSheetConst.STATUS.S_NEW); |
|
|
|
|
rs.setReviewStatus(ReviewSheetConst.ERP_REVIEW_S.REVIEW_STATUS_INIT); |
|
|
|
|
WorkPlan plan = workPlanMapper.selectById(task.getWpId()); |
|
|
|
|
WorkPlan plan = workPlanMapper.selectById(task.getWpId()); |
|
|
|
|
|
|
|
|
|
// WorkPlan plan = workPlanService.getById(task.getWpId());
|
|
|
|
|
if(plan != null){ |
|
|
|
|
if (plan != null) { |
|
|
|
|
rs.setPpsId(plan.getPpsId()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|