|
@@ -9,6 +9,7 @@ import com.rongwei.bscommon.sys.service.*;
|
|
|
import com.rongwei.bsentity.domain.*;
|
|
|
import com.rongwei.bsentity.vo.CancelOperationProcessEquVo;
|
|
|
import com.rongwei.bsentity.vo.CancelProcessOperationVo;
|
|
|
+import com.rongwei.bsentity.vo.CheckReportReq;
|
|
|
import com.rongwei.bsentity.vo.CommonUpdateProductionStatusReq;
|
|
|
import com.rongwei.commonservice.service.RedisService;
|
|
|
import com.rongwei.rwadmincommon.system.domain.SysDictDo;
|
|
@@ -91,6 +92,10 @@ public class ReportCheckServiceImpl implements ReportCheckService {
|
|
|
private ApsProductDetailService apsProductDetailService;
|
|
|
@Autowired
|
|
|
private ApsProductionMergeOrderService apsProductionMergeOrderService;
|
|
|
+ @Autowired
|
|
|
+ private ApsReportCheckoutService apsReportCheckoutService;
|
|
|
+ @Autowired
|
|
|
+ private ApsReportBlankCompentService apsReportBlankCompentService;
|
|
|
|
|
|
/**
|
|
|
* 保存检验结果后更新相关信息
|
|
@@ -240,6 +245,7 @@ public class ReportCheckServiceImpl implements ReportCheckService {
|
|
|
// 更新当前工序作业和作业明细的已检验卷数
|
|
|
|
|
|
// 当前工序名为小圈成退 检验卷数为 报工记录的BATCHNUMBER 数量
|
|
|
+ log.info("明细检验卷数赋值开始,检验卷数为:{}",currentProcessOperationEqu.getCancelroll());
|
|
|
if (SMALL_CIRCLE_PROCESSING_PROCESS_NAME.contains(currentProcessOperationMainDo.getProcess())) {
|
|
|
String batchnumber = reportRecordsDo.getBatchnumber();
|
|
|
if (StringUtils.isBlank(batchnumber)) {
|
|
@@ -254,6 +260,7 @@ public class ReportCheckServiceImpl implements ReportCheckService {
|
|
|
currentProcessOperationMainDo.setCheckoutroll(currentProcessOperationMainDo.getCheckoutroll() + 1);
|
|
|
currentProcessOperationEqu.setCheckoutroll(currentProcessOperationEqu.getCheckoutroll() + 1);
|
|
|
}
|
|
|
+ log.info("明细检验卷数赋值结束,检验卷数为:{}",currentProcessOperationEqu.getCancelroll());
|
|
|
// 项目经理确认取消:报工检验去掉完工状态赋值
|
|
|
// if (StringUtils.isBlank(currentProcessOperationEqu.getBachmaterialprocess())) {
|
|
|
// currentProcessOperationEqu.setWorkstatus(JOBSTATUS_TO_BE_END);
|
|
@@ -693,7 +700,7 @@ public class ReportCheckServiceImpl implements ReportCheckService {
|
|
|
.filter(info -> apsProcessOperationProcessEquDo.getProcessid().equals(info.getId()))
|
|
|
.findFirst()
|
|
|
.orElse(null);
|
|
|
- apsProcessOperationService.getById(apsProcessOperationProcessEquDo.getProcessid());
|
|
|
+// apsProcessOperationService.getById(apsProcessOperationProcessEquDo.getProcessid());
|
|
|
if (apsProcessOperationDo == null) {
|
|
|
log.error("无法根据id:{}获取工序作业信息", apsProcessOperationProcessEquDo.getProcessid());
|
|
|
throw new CustomException("无法获取工序作业信息");
|
|
@@ -1394,4 +1401,37 @@ public class ReportCheckServiceImpl implements ReportCheckService {
|
|
|
.collect(Collectors.joining("-"));
|
|
|
return parts[0] + '-' + joinedString;
|
|
|
}
|
|
|
+
|
|
|
+ @Transactional
|
|
|
+ public R checkReport(CheckReportReq req) {
|
|
|
+ ApsReportRecordsDo apsReportRecordsDo = req.getApsReportRecordsDo();
|
|
|
+ List<ApsReportCheckoutDo> apsReportCheckoutDoList = req.getApsReportCheckoutDoList();
|
|
|
+ List<ApsReportBlankCompentDo> apsReportBlankCompentDoList = req.getApsReportBlankCompentDoList();
|
|
|
+ if (apsReportRecordsDo == null){
|
|
|
+ return R.error("报工记录不能为空");
|
|
|
+ }
|
|
|
+ String reportId = apsReportRecordsDo.getId();
|
|
|
+ if (StringUtils.isBlank(reportId)) {
|
|
|
+ return R.error("报工记录ID不能为空");
|
|
|
+ }
|
|
|
+ //============检验===========
|
|
|
+ R r = this.preSaveCheck(reportId);
|
|
|
+ if (!"200".equals(r.getCode())){
|
|
|
+ return r;
|
|
|
+ }
|
|
|
+ //============保存===========
|
|
|
+ apsReportRecordsService.updateById(apsReportRecordsDo);
|
|
|
+ if (!apsReportCheckoutDoList.isEmpty()){
|
|
|
+ apsReportCheckoutService.updateBatchById(apsReportCheckoutDoList);
|
|
|
+ }
|
|
|
+ if (!apsReportBlankCompentDoList.isEmpty()){
|
|
|
+ apsReportBlankCompentService.updateBatchById(apsReportBlankCompentDoList);
|
|
|
+ }
|
|
|
+ //============检验之后===========
|
|
|
+ R r2 = this.updateRelevantInformation(reportId);
|
|
|
+ if (!"200".equals(r2.getCode())){
|
|
|
+ return r2;
|
|
|
+ }
|
|
|
+ return R.ok();
|
|
|
+ }
|
|
|
}
|