|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.busi;
|
|
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.api.base.IMesReworkTaskService;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.api.busi.IMesProductionRecordService;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.pojo.constant.MesCommonConstant;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesReworkTaskModel;
|
|
|
|
|
import cn.estsh.i3plus.ext.mes.pcn.pojo.model.MesReworkTaskRequestModel;
|
|
|
|
@ -33,6 +34,9 @@ public class MesReworkTaskController {
|
|
|
|
|
@Autowired
|
|
|
|
|
private IMesReworkTaskService mesReworkTaskService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private IMesProductionRecordService mesProductionRecordService;
|
|
|
|
|
|
|
|
|
|
@GetMapping("/query-pager")
|
|
|
|
|
@ApiOperation(value = "查询所有返工单")
|
|
|
|
|
public ResultBean queryReworkTaskByPager(MesReworkTask reworkTask, Pager pager) {
|
|
|
|
@ -192,4 +196,19 @@ public class MesReworkTaskController {
|
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@GetMapping("/queryProductionRecord")
|
|
|
|
|
@ApiOperation(value = "查询加工记录")
|
|
|
|
|
public ResultBean queryProductionRecord(MesReworkTaskRequestModel requestModel) {
|
|
|
|
|
// 数据校验
|
|
|
|
|
ValidatorBean.checkNotNull(requestModel.getSn(), "条码不能为空");
|
|
|
|
|
ValidatorBean.checkNotNull(requestModel.getOrganizeCode(), "工厂代码不能为空");
|
|
|
|
|
try {
|
|
|
|
|
return ResultBean.success("查询成功").setResultObject(mesProductionRecordService.findProductionRecordList(requestModel.getOrganizeCode(),requestModel.getSn()));
|
|
|
|
|
} catch (ImppBusiException imppException) {
|
|
|
|
|
return ResultBean.fail(imppException);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|