|
|
@ -4,6 +4,7 @@ package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.busi;
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesInputDefectRecordService;
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesInputDefectRecordService;
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant;
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant;
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesPartInspectionInputModel;
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesPartInspectionInputModel;
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesPartInspectionViewModel;
|
|
|
|
import cn.estsh.impp.framework.boot.auth.AuthUtil;
|
|
|
|
import cn.estsh.impp.framework.boot.auth.AuthUtil;
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
|
|
|
@ -25,16 +26,17 @@ public class MesInputDefectRecordController {
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private IMesInputDefectRecordService inputDefectRecordService;
|
|
|
|
private IMesInputDefectRecordService inputDefectRecordService;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/query-part-inspection")
|
|
|
|
@PostMapping("/query-part-inspection")
|
|
|
|
@ApiOperation(value = "查询页面信息")
|
|
|
|
@ApiOperation(value = "查询页面信息")
|
|
|
|
public ResultBean queryPartInspection(@RequestBody MesPartInspectionInputModel model) {
|
|
|
|
public ResultBean queryPartInspection(@RequestBody MesPartInspectionInputModel model) {
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
String organizeCode = !StringUtils.isEmpty(model.getOrganizeCode()) ? model.getOrganizeCode() : AuthUtil.getOrganize().getOrganizeCode();
|
|
|
|
|
|
|
|
MesPartInspectionViewModel result = inputDefectRecordService.queryPartInspection(model, organizeCode);
|
|
|
|
// return ResultBean.success("查询成功").setResultObject(inputDefectRecordService.queryPartInspection(model, "CK01"));
|
|
|
|
String msg = "查询成功";
|
|
|
|
return ResultBean.success("查询成功").setResultObject(inputDefectRecordService.queryPartInspection(model, AuthUtil.getOrganizeCode()));
|
|
|
|
if (!StringUtils.isEmpty(model.getFrontBack()) && model.getFrontBack().compareTo(10) == 0 && StringUtils.isEmpty(result.getPartTypePicture().getFrontPictureName())) msg = "A面图片未维护";
|
|
|
|
|
|
|
|
if (!StringUtils.isEmpty(model.getFrontBack()) && model.getFrontBack().compareTo(20) == 0 && StringUtils.isEmpty(result.getPartTypePicture().getBackPictureName())) msg = "B面图片未维护";
|
|
|
|
|
|
|
|
return ResultBean.success(msg).setResultObject(result);
|
|
|
|
} catch (ImppBusiException imppException) {
|
|
|
|
} catch (ImppBusiException imppException) {
|
|
|
|
return ResultBean.fail(imppException);
|
|
|
|
return ResultBean.fail(imppException);
|
|
|
|
} catch (Exception e) {
|
|
|
|
} catch (Exception e) {
|
|
|
|