|
|
|
@ -83,8 +83,9 @@ import java.util.stream.Collectors; |
|
|
|
* [检验任务] 控制器 |
|
|
|
* [检验任务] 控制器 |
|
|
|
* 工序级的检验任务 |
|
|
|
* 工序级的检验任务 |
|
|
|
* mes v1: rb_pr_work_check PrWorkCheck |
|
|
|
* mes v1: rb_pr_work_check PrWorkCheck |
|
|
|
* |
|
|
|
* <p> |
|
|
|
* ppsName:烧结包装防护 才有子件列表 |
|
|
|
* ppsName:烧结包装防护 才有子件列表 |
|
|
|
|
|
|
|
* |
|
|
|
* @author Tom Shuo |
|
|
|
* @author Tom Shuo |
|
|
|
* @since 2025-11-14 |
|
|
|
* @since 2025-11-14 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ -121,6 +122,7 @@ public class InspectionTaskController extends BladeController { |
|
|
|
private IWorkPlanItemService workPlanItemService; |
|
|
|
private IWorkPlanItemService workPlanItemService; |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private IPlatingService platingService; |
|
|
|
private IPlatingService platingService; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* [检验任务] 详情 |
|
|
|
* [检验任务] 详情 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ -130,9 +132,9 @@ public class InspectionTaskController extends BladeController { |
|
|
|
public R<InspectionTaskDetailVO> detail(InspectionTask inspectionTask) { |
|
|
|
public R<InspectionTaskDetailVO> detail(InspectionTask inspectionTask) { |
|
|
|
|
|
|
|
|
|
|
|
// InspectionTask detail = service.getOne(Condition.getQueryWrapper(inspectionTask));
|
|
|
|
// InspectionTask detail = service.getOne(Condition.getQueryWrapper(inspectionTask));
|
|
|
|
log.error("[检验任务]id="+inspectionTask.getId()); |
|
|
|
log.error("[检验任务]id=" + inspectionTask.getId()); |
|
|
|
InspectionTask detail = service.getById(inspectionTask.getId()); |
|
|
|
InspectionTask detail = service.getById(inspectionTask.getId()); |
|
|
|
log.error("检验任务数据000001: {}"+ detail); |
|
|
|
log.error("检验任务数据000001: {}" + detail); |
|
|
|
// JSONObject result = JSONObject.parseObject(detail.toString());
|
|
|
|
// JSONObject result = JSONObject.parseObject(detail.toString());
|
|
|
|
// log.error("检验任务数据: {}"+ result.toJSONString());
|
|
|
|
// log.error("检验任务数据: {}"+ result.toJSONString());
|
|
|
|
// InspectionTaskDetailVO detailDetailVO = InspectionTaskDetailWrapper.build().entityVO(detail);
|
|
|
|
// InspectionTaskDetailVO detailDetailVO = InspectionTaskDetailWrapper.build().entityVO(detail);
|
|
|
|
@ -145,13 +147,14 @@ public class InspectionTaskController extends BladeController { |
|
|
|
service.setDetailVOValue(detailDetailVO); |
|
|
|
service.setDetailVOValue(detailDetailVO); |
|
|
|
return R.data(detailDetailVO); |
|
|
|
return R.data(detailDetailVO); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/getPlateMsg") |
|
|
|
@PostMapping("/getPlateMsg") |
|
|
|
public R getPlateMsg(@RequestBody InspectionTaskListVO detailDetail){ |
|
|
|
public R getPlateMsg(@RequestBody InspectionTaskListVO detailDetail) { |
|
|
|
String prodIdent = detailDetail.getProdIdent(); |
|
|
|
String prodIdent = detailDetail.getProdIdent(); |
|
|
|
List<RemindMsg> msgplateList = new ArrayList<>(); |
|
|
|
List<RemindMsg> msgplateList = new ArrayList<>(); |
|
|
|
List<RemindMsg> msgplateAllList = new ArrayList<>(); |
|
|
|
List<RemindMsg> msgplateAllList = new ArrayList<>(); |
|
|
|
//镀层提醒
|
|
|
|
//镀层提醒
|
|
|
|
if(null != detailDetail.getPlateCode()){ |
|
|
|
if (null != detailDetail.getPlateCode()) { |
|
|
|
LambdaQueryWrapper<RemindMsg> qw = Wrappers.lambdaQuery(RemindMsg.class) |
|
|
|
LambdaQueryWrapper<RemindMsg> qw = Wrappers.lambdaQuery(RemindMsg.class) |
|
|
|
.eq(RemindMsg::getPlateing, detailDetail.getPlateCode()) |
|
|
|
.eq(RemindMsg::getPlateing, detailDetail.getPlateCode()) |
|
|
|
// .eq(RemindMsg::getQualityLevel, prodIdent)
|
|
|
|
// .eq(RemindMsg::getQualityLevel, prodIdent)
|
|
|
|
@ -175,7 +178,7 @@ public class InspectionTaskController extends BladeController { |
|
|
|
// msgplateAllList = msgplateList;
|
|
|
|
// msgplateAllList = msgplateList;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
}else{//如果零件里镀种代号为空
|
|
|
|
} else {//如果零件里镀种代号为空
|
|
|
|
LambdaQueryWrapper<Plating> qw = Wrappers.lambdaQuery(Plating.class) |
|
|
|
LambdaQueryWrapper<Plating> qw = Wrappers.lambdaQuery(Plating.class) |
|
|
|
.eq(Plating::getPlating, detailDetail.getPlatingInfo()) |
|
|
|
.eq(Plating::getPlating, detailDetail.getPlatingInfo()) |
|
|
|
.eq(Plating::getConfigNo, detailDetail.getConfigCode()) |
|
|
|
.eq(Plating::getConfigNo, detailDetail.getConfigCode()) |
|
|
|
@ -183,7 +186,7 @@ public class InspectionTaskController extends BladeController { |
|
|
|
.eq(Plating::getIsDeleted, CommonConstant.DELETE_FALSE) |
|
|
|
.eq(Plating::getIsDeleted, CommonConstant.DELETE_FALSE) |
|
|
|
.orderByDesc(Plating::getId); |
|
|
|
.orderByDesc(Plating::getId); |
|
|
|
List<Plating> platingList = platingService.list(qw); |
|
|
|
List<Plating> platingList = platingService.list(qw); |
|
|
|
if(null != platingList && platingList.size() > 0){ |
|
|
|
if (null != platingList && platingList.size() > 0) { |
|
|
|
Plating plating = platingList.get(0); |
|
|
|
Plating plating = platingList.get(0); |
|
|
|
LambdaQueryWrapper<RemindMsg> qw01 = Wrappers.lambdaQuery(RemindMsg.class) |
|
|
|
LambdaQueryWrapper<RemindMsg> qw01 = Wrappers.lambdaQuery(RemindMsg.class) |
|
|
|
.eq(RemindMsg::getPlateing, plating.getPlateCode()) |
|
|
|
.eq(RemindMsg::getPlateing, plating.getPlateCode()) |
|
|
|
@ -211,90 +214,90 @@ public class InspectionTaskController extends BladeController { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
RemindMsg msg = new RemindMsg(); |
|
|
|
RemindMsg msg = new RemindMsg(); |
|
|
|
if(null != msgplateAllList && msgplateAllList.size() > 0){ |
|
|
|
if (null != msgplateAllList && msgplateAllList.size() > 0) { |
|
|
|
msg = msgplateAllList.get(0); |
|
|
|
msg = msgplateAllList.get(0); |
|
|
|
if(null != detailDetail.getParam1()){ |
|
|
|
if (null != detailDetail.getParam1()) { |
|
|
|
BigDecimal param1Up = msg.getParam1Up(); |
|
|
|
BigDecimal param1Up = msg.getParam1Up(); |
|
|
|
BigDecimal param1Down = msg.getParam1Down(); |
|
|
|
BigDecimal param1Down = msg.getParam1Down(); |
|
|
|
if(null != param1Up && null != param1Down){ |
|
|
|
if (null != param1Up && null != param1Down) { |
|
|
|
if(detailDetail.getParam1().compareTo(param1Down) >=0 && detailDetail.getParam1().compareTo(param1Up) <=0){ |
|
|
|
if (detailDetail.getParam1().compareTo(param1Down) >= 0 && detailDetail.getParam1().compareTo(param1Up) <= 0) { |
|
|
|
msg.setCheckParam1("0"); |
|
|
|
msg.setCheckParam1("0"); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
msg.setCheckParam1("1"); |
|
|
|
msg.setCheckParam1("1"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if(null != param1Up && null == param1Down){ |
|
|
|
if (null != param1Up && null == param1Down) { |
|
|
|
if(detailDetail.getParam1().compareTo(param1Up) <=0){ |
|
|
|
if (detailDetail.getParam1().compareTo(param1Up) <= 0) { |
|
|
|
msg.setCheckParam1("0"); |
|
|
|
msg.setCheckParam1("0"); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
msg.setCheckParam1("1"); |
|
|
|
msg.setCheckParam1("1"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if(null == param1Up && null != param1Down){ |
|
|
|
if (null == param1Up && null != param1Down) { |
|
|
|
if(detailDetail.getParam1().compareTo(param1Down) >=0){ |
|
|
|
if (detailDetail.getParam1().compareTo(param1Down) >= 0) { |
|
|
|
msg.setCheckParam1("0"); |
|
|
|
msg.setCheckParam1("0"); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
msg.setCheckParam1("1"); |
|
|
|
msg.setCheckParam1("1"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(null != detailDetail.getParam2()){ |
|
|
|
if (null != detailDetail.getParam2()) { |
|
|
|
|
|
|
|
|
|
|
|
BigDecimal param2Up = msg.getParam2Up(); |
|
|
|
BigDecimal param2Up = msg.getParam2Up(); |
|
|
|
BigDecimal param2Down = msg.getParam2Down(); |
|
|
|
BigDecimal param2Down = msg.getParam2Down(); |
|
|
|
if(null != param2Up && null != param2Down){ |
|
|
|
if (null != param2Up && null != param2Down) { |
|
|
|
if(detailDetail.getParam2().compareTo(param2Down) >=0 && detailDetail.getParam2().compareTo(param2Up) <=0){ |
|
|
|
if (detailDetail.getParam2().compareTo(param2Down) >= 0 && detailDetail.getParam2().compareTo(param2Up) <= 0) { |
|
|
|
msg.setCheckParam2("0"); |
|
|
|
msg.setCheckParam2("0"); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
msg.setCheckParam2("1"); |
|
|
|
msg.setCheckParam2("1"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if(null != param2Up && null == param2Down){ |
|
|
|
if (null != param2Up && null == param2Down) { |
|
|
|
if(detailDetail.getParam2().compareTo(param2Up) <=0){ |
|
|
|
if (detailDetail.getParam2().compareTo(param2Up) <= 0) { |
|
|
|
msg.setCheckParam2("0"); |
|
|
|
msg.setCheckParam2("0"); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
msg.setCheckParam2("1"); |
|
|
|
msg.setCheckParam2("1"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if(null == param2Up && null != param2Down){ |
|
|
|
if (null == param2Up && null != param2Down) { |
|
|
|
if(detailDetail.getParam2().compareTo(param2Down) >=0){ |
|
|
|
if (detailDetail.getParam2().compareTo(param2Down) >= 0) { |
|
|
|
msg.setCheckParam2("0"); |
|
|
|
msg.setCheckParam2("0"); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
msg.setCheckParam2("1"); |
|
|
|
msg.setCheckParam2("1"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(null != detailDetail.getParam3()){ |
|
|
|
if (null != detailDetail.getParam3()) { |
|
|
|
|
|
|
|
|
|
|
|
BigDecimal param3Up = msg.getParam3Up(); |
|
|
|
BigDecimal param3Up = msg.getParam3Up(); |
|
|
|
BigDecimal param3Down = msg.getParam3Down(); |
|
|
|
BigDecimal param3Down = msg.getParam3Down(); |
|
|
|
if(null != param3Up && null != param3Down){ |
|
|
|
if (null != param3Up && null != param3Down) { |
|
|
|
if(detailDetail.getParam3().compareTo(param3Down) >=0 && detailDetail.getParam3().compareTo(param3Up) <=0){ |
|
|
|
if (detailDetail.getParam3().compareTo(param3Down) >= 0 && detailDetail.getParam3().compareTo(param3Up) <= 0) { |
|
|
|
msg.setCheckParam3("0"); |
|
|
|
msg.setCheckParam3("0"); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
msg.setCheckParam3("1"); |
|
|
|
msg.setCheckParam3("1"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if(null != param3Up && null == param3Down){ |
|
|
|
if (null != param3Up && null == param3Down) { |
|
|
|
if(detailDetail.getParam3().compareTo(param3Up) <=0){ |
|
|
|
if (detailDetail.getParam3().compareTo(param3Up) <= 0) { |
|
|
|
msg.setCheckParam3("0"); |
|
|
|
msg.setCheckParam3("0"); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
msg.setCheckParam3("1"); |
|
|
|
msg.setCheckParam3("1"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if(null == param3Up && null != param3Down){ |
|
|
|
if (null == param3Up && null != param3Down) { |
|
|
|
if(detailDetail.getParam3().compareTo(param3Down) >=0){ |
|
|
|
if (detailDetail.getParam3().compareTo(param3Down) >= 0) { |
|
|
|
msg.setCheckParam3("0"); |
|
|
|
msg.setCheckParam3("0"); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
msg.setCheckParam3("1"); |
|
|
|
msg.setCheckParam3("1"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
msg.setCheckParam1("1"); |
|
|
|
msg.setCheckParam1("1"); |
|
|
|
msg.setCheckParam2("1"); |
|
|
|
msg.setCheckParam2("1"); |
|
|
|
msg.setCheckParam3("1"); |
|
|
|
msg.setCheckParam3("1"); |
|
|
|
@ -304,7 +307,7 @@ public class InspectionTaskController extends BladeController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/getMaterialMsg") |
|
|
|
@PostMapping("/getMaterialMsg") |
|
|
|
public R getMaterialMsg(@RequestBody InspectionTaskListVO detailDetail){ |
|
|
|
public R getMaterialMsg(@RequestBody InspectionTaskListVO detailDetail) { |
|
|
|
LambdaQueryWrapper<RemindMsg> qw01 = Wrappers.lambdaQuery(RemindMsg.class) |
|
|
|
LambdaQueryWrapper<RemindMsg> qw01 = Wrappers.lambdaQuery(RemindMsg.class) |
|
|
|
.eq(RemindMsg::getFormula, detailDetail.getFormula()) |
|
|
|
.eq(RemindMsg::getFormula, detailDetail.getFormula()) |
|
|
|
.eq(RemindMsg::getIsDeleted, CommonConstant.DELETE_FALSE) |
|
|
|
.eq(RemindMsg::getIsDeleted, CommonConstant.DELETE_FALSE) |
|
|
|
@ -312,28 +315,26 @@ public class InspectionTaskController extends BladeController { |
|
|
|
.orderByDesc(RemindMsg::getId); |
|
|
|
.orderByDesc(RemindMsg::getId); |
|
|
|
List<RemindMsg> msgMaterialList = remindMsgService.list(qw01); |
|
|
|
List<RemindMsg> msgMaterialList = remindMsgService.list(qw01); |
|
|
|
RemindMsg msg = new RemindMsg(); |
|
|
|
RemindMsg msg = new RemindMsg(); |
|
|
|
if(null != msgMaterialList && msgMaterialList.size() > 0){ |
|
|
|
if (null != msgMaterialList && msgMaterialList.size() > 0) { |
|
|
|
msg = msgMaterialList.get(0); |
|
|
|
msg = msgMaterialList.get(0); |
|
|
|
String material = msg.getMaterial(); |
|
|
|
String material = msg.getMaterial(); |
|
|
|
if(null != detailDetail.getMaterial()){ |
|
|
|
if (null != detailDetail.getMaterial()) { |
|
|
|
for(String mat : material.split("、")){ |
|
|
|
for (String mat : material.split("、")) { |
|
|
|
if(detailDetail.getMaterial().contains(mat.trim())){ |
|
|
|
if (detailDetail.getMaterial().contains(mat.trim())) { |
|
|
|
msg.setCheckMaterial("0"); |
|
|
|
msg.setCheckMaterial("0"); |
|
|
|
break; |
|
|
|
break; |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
msg.setCheckMaterial("1"); |
|
|
|
msg.setCheckMaterial("1"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
msg.setCheckMaterial("1"); |
|
|
|
msg.setCheckMaterial("1"); |
|
|
|
} |
|
|
|
} |
|
|
|
return R.data(msg); |
|
|
|
return R.data(msg); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/getItems") |
|
|
|
@GetMapping("/getItems") |
|
|
|
@ApiOperationSupport(order = 1) |
|
|
|
@ApiOperationSupport(order = 1) |
|
|
|
@Operation(summary = "详情", description = "传入inspectionTask") |
|
|
|
@Operation(summary = "详情", description = "传入inspectionTask") |
|
|
|
@ -377,7 +378,7 @@ public class InspectionTaskController extends BladeController { |
|
|
|
qw.eq("WP_ID", wpId); |
|
|
|
qw.eq("WP_ID", wpId); |
|
|
|
List<InspectionTask> list = service.list(qw); |
|
|
|
List<InspectionTask> list = service.list(qw); |
|
|
|
InspectionTask inspectionTask = new InspectionTask(); |
|
|
|
InspectionTask inspectionTask = new InspectionTask(); |
|
|
|
if(null != list && list.size() > 0){ |
|
|
|
if (null != list && list.size() > 0) { |
|
|
|
inspectionTask = list.get(0); |
|
|
|
inspectionTask = list.get(0); |
|
|
|
} |
|
|
|
} |
|
|
|
InspectionTask detail = service.getOne(Condition.getQueryWrapper(inspectionTask)); |
|
|
|
InspectionTask detail = service.getOne(Condition.getQueryWrapper(inspectionTask)); |
|
|
|
@ -388,8 +389,6 @@ public class InspectionTaskController extends BladeController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* [检验任务] 分页 |
|
|
|
* [检验任务] 分页 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ -411,7 +410,7 @@ public class InspectionTaskController extends BladeController { |
|
|
|
if (RoleUtil.hasAllRole(roleConfig.getRbCheckerAlias(), roleConfig.getSjCheckerAlias())) { |
|
|
|
if (RoleUtil.hasAllRole(roleConfig.getRbCheckerAlias(), roleConfig.getSjCheckerAlias())) { |
|
|
|
search.setFromType(null); |
|
|
|
search.setFromType(null); |
|
|
|
} |
|
|
|
} |
|
|
|
if (BeanUtil.isEmpty(query) || (StrUtil.isEmpty(query.getAscs()) && StrUtil.isEmpty(query.getDescs()))){ |
|
|
|
if (BeanUtil.isEmpty(query) || (StrUtil.isEmpty(query.getAscs()) && StrUtil.isEmpty(query.getDescs()))) { |
|
|
|
query.setDescs("create_time"); |
|
|
|
query.setDescs("create_time"); |
|
|
|
} |
|
|
|
} |
|
|
|
IPage<InspectionTaskListVO> pagesVO = service.listSearch(Condition.getPage(query), search); |
|
|
|
IPage<InspectionTaskListVO> pagesVO = service.listSearch(Condition.getPage(query), search); |
|
|
|
@ -421,7 +420,7 @@ public class InspectionTaskController extends BladeController { |
|
|
|
@GetMapping("/queryWorkOrder") |
|
|
|
@GetMapping("/queryWorkOrder") |
|
|
|
@ApiOperationSupport(order = 2) |
|
|
|
@ApiOperationSupport(order = 2) |
|
|
|
@Operation(summary = "分页", description = "传入inspectionTask") |
|
|
|
@Operation(summary = "分页", description = "传入inspectionTask") |
|
|
|
public R<IPage<InspectionTaskListVO>> queryWorkOrder(InspectionTaskSearch search,Query query) { |
|
|
|
public R<IPage<InspectionTaskListVO>> queryWorkOrder(InspectionTaskSearch search, Query query) { |
|
|
|
log.info("search = {}", search); |
|
|
|
log.info("search = {}", search); |
|
|
|
log.info("query = {}", query); |
|
|
|
log.info("query = {}", query); |
|
|
|
log.info("getUserRole = {}", AuthUtil.getUserRole()); |
|
|
|
log.info("getUserRole = {}", AuthUtil.getUserRole()); |
|
|
|
@ -454,7 +453,7 @@ public class InspectionTaskController extends BladeController { |
|
|
|
Long woId = data.getLong("woId"); |
|
|
|
Long woId = data.getLong("woId"); |
|
|
|
List<Boolean> planList = data.getJSONArray("planList").toJavaList(Boolean.class); // 工序
|
|
|
|
List<Boolean> planList = data.getJSONArray("planList").toJavaList(Boolean.class); // 工序
|
|
|
|
List<Boolean> moduleList = data.getJSONArray("moduleList").toJavaList(Boolean.class); // 模块
|
|
|
|
List<Boolean> moduleList = data.getJSONArray("moduleList").toJavaList(Boolean.class); // 模块
|
|
|
|
JSONObject obj = service.newPagePrintEleFiles(woId, planList,moduleList); |
|
|
|
JSONObject obj = service.newPagePrintEleFiles(woId, planList, moduleList); |
|
|
|
return R.data(obj); |
|
|
|
return R.data(obj); |
|
|
|
// return ResultInfo.ok(prWorkOrderService.newPagePrintEleFiles(woId, planList,moduleList));
|
|
|
|
// return ResultInfo.ok(prWorkOrderService.newPagePrintEleFiles(woId, planList,moduleList));
|
|
|
|
} |
|
|
|
} |
|
|
|
@ -467,12 +466,12 @@ public class InspectionTaskController extends BladeController { |
|
|
|
|
|
|
|
|
|
|
|
List<Boolean> planList = new ArrayList<>(); |
|
|
|
List<Boolean> planList = new ArrayList<>(); |
|
|
|
List<Boolean> moduleList = new ArrayList<>(); |
|
|
|
List<Boolean> moduleList = new ArrayList<>(); |
|
|
|
if(data.getJSONArray("planList") != null){ |
|
|
|
if (data.getJSONArray("planList") != null) { |
|
|
|
planList= data.getJSONArray("planList").toJavaList(Boolean.class); // 工序
|
|
|
|
planList = data.getJSONArray("planList").toJavaList(Boolean.class); // 工序
|
|
|
|
moduleList= data.getJSONArray("moduleList").toJavaList(Boolean.class); // 模块
|
|
|
|
moduleList = data.getJSONArray("moduleList").toJavaList(Boolean.class); // 模块
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Object pagePrintSjEleFiles = service.pagePrintSjEleFiles(woId, yieldType,planList,moduleList); |
|
|
|
Object pagePrintSjEleFiles = service.pagePrintSjEleFiles(woId, yieldType, planList, moduleList); |
|
|
|
|
|
|
|
|
|
|
|
return R.data(pagePrintSjEleFiles); |
|
|
|
return R.data(pagePrintSjEleFiles); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -532,14 +531,14 @@ public class InspectionTaskController extends BladeController { |
|
|
|
|
|
|
|
|
|
|
|
for (MesRbFilePreserveSlotEntity dsRbFilePreserveSlot : preserveSlotList) { |
|
|
|
for (MesRbFilePreserveSlotEntity dsRbFilePreserveSlot : preserveSlotList) { |
|
|
|
List<MesRbFilePreserveDetailDTO> childrenListNew = new ArrayList<>(); |
|
|
|
List<MesRbFilePreserveDetailDTO> childrenListNew = new ArrayList<>(); |
|
|
|
if(null != dsRbFilePreserveSlot.getInsertIndex()){ |
|
|
|
if (null != dsRbFilePreserveSlot.getInsertIndex()) { |
|
|
|
if(Integer.parseInt(dsRbFilePreserveSlot.getInsertIndex()) > insertIndex){ |
|
|
|
if (Integer.parseInt(dsRbFilePreserveSlot.getInsertIndex()) > insertIndex) { |
|
|
|
insertIndex = Integer.parseInt(dsRbFilePreserveSlot.getInsertIndex()); |
|
|
|
insertIndex = Integer.parseInt(dsRbFilePreserveSlot.getInsertIndex()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
childrenList = service.getByRfpsIdMesNew(dsRbFilePreserveSlot.getId()); |
|
|
|
childrenList = service.getByRfpsIdMesNew(dsRbFilePreserveSlot.getId()); |
|
|
|
for(MesRbFilePreserveDetailEntity children : childrenList){ |
|
|
|
for (MesRbFilePreserveDetailEntity children : childrenList) { |
|
|
|
MesRbFilePreserveDetailDTO childrenDTO = new MesRbFilePreserveDetailDTO(); |
|
|
|
MesRbFilePreserveDetailDTO childrenDTO = new MesRbFilePreserveDetailDTO(); |
|
|
|
BeanUtils.copyProperties(children, childrenDTO); |
|
|
|
BeanUtils.copyProperties(children, childrenDTO); |
|
|
|
childrenListNew.add(childrenDTO); |
|
|
|
childrenListNew.add(childrenDTO); |
|
|
|
@ -547,11 +546,9 @@ public class InspectionTaskController extends BladeController { |
|
|
|
dsRbFilePreserveSlot.setChildrenList(childrenListNew); |
|
|
|
dsRbFilePreserveSlot.setChildrenList(childrenListNew); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
preserveSlotList.sort(Comparator.comparing( |
|
|
|
preserveSlotList.sort(Comparator.comparing(MesRbFilePreserveSlotEntity::getSlotIndex)); |
|
|
|
e -> Integer.parseInt(e.getSlotIndex()) |
|
|
|
obj.put("preserveSlotList", preserveSlotList); |
|
|
|
)); |
|
|
|
obj.put("insertIndex", insertIndex); |
|
|
|
obj.put("preserveSlotList",preserveSlotList); |
|
|
|
|
|
|
|
obj.put("insertIndex",insertIndex); |
|
|
|
|
|
|
|
return R.data(obj); |
|
|
|
return R.data(obj); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -570,30 +567,30 @@ public class InspectionTaskController extends BladeController { |
|
|
|
.collect(Collectors.toList()); |
|
|
|
.collect(Collectors.toList()); |
|
|
|
if (uniqueNames.size() != submitList.size()) { |
|
|
|
if (uniqueNames.size() != submitList.size()) { |
|
|
|
return R.fail("槽号名称不能重复"); |
|
|
|
return R.fail("槽号名称不能重复"); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
for(MesRbFilePreserveSlotEntity slot : submitList){ |
|
|
|
for (MesRbFilePreserveSlotEntity slot : submitList) { |
|
|
|
if(null != slot.getId()){ |
|
|
|
if (null != slot.getId()) { |
|
|
|
QueryWrapper<MesRbFilePreserveSlotEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
QueryWrapper<MesRbFilePreserveSlotEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
queryWrapper.eq("slot_name", slot.getSlotName()); |
|
|
|
queryWrapper.eq("slot_name", slot.getSlotName()); |
|
|
|
// queryWrapper.ne("id", slot.getId());
|
|
|
|
// queryWrapper.ne("id", slot.getId());
|
|
|
|
if(null != deleteIds && deleteIds.size() > 0){ |
|
|
|
if (null != deleteIds && deleteIds.size() > 0) { |
|
|
|
deleteIds.add(slot.getId()); |
|
|
|
deleteIds.add(slot.getId()); |
|
|
|
queryWrapper.notIn("id", deleteIds); |
|
|
|
queryWrapper.notIn("id", deleteIds); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
queryWrapper.ne("id", slot.getId()); |
|
|
|
queryWrapper.ne("id", slot.getId()); |
|
|
|
} |
|
|
|
} |
|
|
|
List<MesRbFilePreserveSlotEntity> list = mesRbFilePreserveSlotService.list(queryWrapper); |
|
|
|
List<MesRbFilePreserveSlotEntity> list = mesRbFilePreserveSlotService.list(queryWrapper); |
|
|
|
if(null != list && list.size() > 0){ |
|
|
|
if (null != list && list.size() > 0) { |
|
|
|
return R.fail("槽号名称不能重复"); |
|
|
|
return R.fail("槽号名称不能重复"); |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
QueryWrapper<MesRbFilePreserveSlotEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
QueryWrapper<MesRbFilePreserveSlotEntity> queryWrapper = new QueryWrapper<>(); |
|
|
|
queryWrapper.eq("slot_name", slot.getSlotName()); |
|
|
|
queryWrapper.eq("slot_name", slot.getSlotName()); |
|
|
|
if(null != deleteIds && deleteIds.size() > 0){ |
|
|
|
if (null != deleteIds && deleteIds.size() > 0) { |
|
|
|
queryWrapper.notIn("id", deleteIds); |
|
|
|
queryWrapper.notIn("id", deleteIds); |
|
|
|
} |
|
|
|
} |
|
|
|
List<MesRbFilePreserveSlotEntity> list = mesRbFilePreserveSlotService.list(queryWrapper); |
|
|
|
List<MesRbFilePreserveSlotEntity> list = mesRbFilePreserveSlotService.list(queryWrapper); |
|
|
|
if(null != list && list.size() > 0){ |
|
|
|
if (null != list && list.size() > 0) { |
|
|
|
return R.fail("槽号名称不能重复"); |
|
|
|
return R.fail("槽号名称不能重复"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -604,18 +601,16 @@ public class InspectionTaskController extends BladeController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BladeUser curUserInfo = AuthUtil.getUser(); |
|
|
|
BladeUser curUserInfo = AuthUtil.getUser(); |
|
|
|
// PfUserInfo curUserInfo = (PfUserInfo) ControllerUtils.getCurUserInfo(request);
|
|
|
|
// PfUserInfo curUserInfo = (PfUserInfo) ControllerUtils.getCurUserInfo(request);
|
|
|
|
// Long rfpId = data.getLong("rfpId");
|
|
|
|
// Long rfpId = data.getLong("rfpId");
|
|
|
|
Long rfpId = dto.getRfpId(); |
|
|
|
Long rfpId = dto.getRfpId(); |
|
|
|
|
|
|
|
|
|
|
|
service.saveOrEditMes(submitList, deleteIds, curUserInfo, rfpId); |
|
|
|
service.saveOrEditMes(submitList, deleteIds, curUserInfo, rfpId); |
|
|
|
return R.status(true); |
|
|
|
return R.status(true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* [检验任务] 自定义分页 |
|
|
|
* [检验任务] 自定义分页 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@ -726,7 +721,7 @@ public class InspectionTaskController extends BladeController { |
|
|
|
qw.eq("TASK_ID", id); |
|
|
|
qw.eq("TASK_ID", id); |
|
|
|
List<ReviewSheet> listSheet = rsSubService.list(qw); |
|
|
|
List<ReviewSheet> listSheet = rsSubService.list(qw); |
|
|
|
|
|
|
|
|
|
|
|
InspectionTask detail = service.getById( id); |
|
|
|
InspectionTask detail = service.getById(id); |
|
|
|
WorkPlan workPlan = workPlanService.getOne(new QueryWrapper<WorkPlan>().lambda().eq(WorkPlan::getId, detail.getWpId())); |
|
|
|
WorkPlan workPlan = workPlanService.getOne(new QueryWrapper<WorkPlan>().lambda().eq(WorkPlan::getId, detail.getWpId())); |
|
|
|
// 根据workPlan的frontWpId(上一到工序ID)一直往上循环查询到cruxProcess为1的关键工序
|
|
|
|
// 根据workPlan的frontWpId(上一到工序ID)一直往上循环查询到cruxProcess为1的关键工序
|
|
|
|
if (workPlan != null && workPlan.getFrontWpId() != null) { |
|
|
|
if (workPlan != null && workPlan.getFrontWpId() != null) { |
|
|
|
@ -734,7 +729,7 @@ public class InspectionTaskController extends BladeController { |
|
|
|
//(A→B→A)
|
|
|
|
//(A→B→A)
|
|
|
|
int maxIterations = 100; |
|
|
|
int maxIterations = 100; |
|
|
|
int iterations = 0; |
|
|
|
int iterations = 0; |
|
|
|
while (Objects.nonNull(currentFrontWpId) && iterations < maxIterations) { |
|
|
|
while (Objects.nonNull(currentFrontWpId) && iterations < maxIterations) { |
|
|
|
WorkPlan frontWorkPlan = workPlanService.getById(currentFrontWpId); |
|
|
|
WorkPlan frontWorkPlan = workPlanService.getById(currentFrontWpId); |
|
|
|
if (BeanUtil.isEmpty(frontWorkPlan)) { |
|
|
|
if (BeanUtil.isEmpty(frontWorkPlan)) { |
|
|
|
break; |
|
|
|
break; |
|
|
|
@ -749,13 +744,13 @@ public class InspectionTaskController extends BladeController { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
List<ProduceMonitorSlotListVO> list = new ArrayList<>(); |
|
|
|
List<ProduceMonitorSlotListVO> list = new ArrayList<>(); |
|
|
|
if(null != workPlan){ |
|
|
|
if (null != workPlan) { |
|
|
|
list = macToolUseService.listSlotInfo(workPlan); |
|
|
|
list = macToolUseService.listSlotInfo(workPlan); |
|
|
|
if(null != listSheet && listSheet.size() > 0){ |
|
|
|
if (null != listSheet && listSheet.size() > 0) { |
|
|
|
list.forEach(one -> { |
|
|
|
list.forEach(one -> { |
|
|
|
one.setIsShow("1"); |
|
|
|
one.setIsShow("1"); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
list.forEach(one -> { |
|
|
|
list.forEach(one -> { |
|
|
|
one.setIsShow("0"); |
|
|
|
one.setIsShow("0"); |
|
|
|
}); |
|
|
|
}); |
|
|
|
@ -825,8 +820,8 @@ public class InspectionTaskController extends BladeController { |
|
|
|
QueryWrapper<DsPartRelationEntity> relmasterqw = new QueryWrapper<>(); |
|
|
|
QueryWrapper<DsPartRelationEntity> relmasterqw = new QueryWrapper<>(); |
|
|
|
relmasterqw.eq("PART_ID", partId); |
|
|
|
relmasterqw.eq("PART_ID", partId); |
|
|
|
List<DsPartRelationEntity> relmasters = dsPartRelationService.list(relmasterqw); |
|
|
|
List<DsPartRelationEntity> relmasters = dsPartRelationService.list(relmasterqw); |
|
|
|
if(null != relmasters && relmasters.size()>0){ |
|
|
|
if (null != relmasters && relmasters.size() > 0) { |
|
|
|
for(DsPartRelationEntity rel : relmasters){ |
|
|
|
for (DsPartRelationEntity rel : relmasters) { |
|
|
|
DsPartEntity part = dsPartService.getById(rel.getChildPartId()); |
|
|
|
DsPartEntity part = dsPartService.getById(rel.getChildPartId()); |
|
|
|
list.add(part); |
|
|
|
list.add(part); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -841,8 +836,6 @@ public class InspectionTaskController extends BladeController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/toQaRecord") |
|
|
|
@GetMapping("/toQaRecord") |
|
|
|
@ApiOperationSupport(order = 101) |
|
|
|
@ApiOperationSupport(order = 101) |
|
|
|
@Operation(summary = "跳转-质量记录", description = "传入inspectionTask id") |
|
|
|
@Operation(summary = "跳转-质量记录", description = "传入inspectionTask id") |
|
|
|
|