diff --git a/op-api/op-api-system/src/main/java/com/op/system/api/RemoteSapService.java b/op-api/op-api-system/src/main/java/com/op/system/api/RemoteSapService.java index c5812c6c..845ed2c9 100644 --- a/op-api/op-api-system/src/main/java/com/op/system/api/RemoteSapService.java +++ b/op-api/op-api-system/src/main/java/com/op/system/api/RemoteSapService.java @@ -73,6 +73,7 @@ public interface RemoteSapService { public R sapBackflushMP(List sapBackflushMPQueryList); /**订单物料领料过账、原材料补料、订单物料退料过账接口(MB1A)**/ + @PostMapping("/sap/sapMaterialPosting") public R sapMaterialPosting(@RequestBody List sapMaterialPostingList); /**智慧工厂储位信息*/ diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesPrepareServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesPrepareServiceImpl.java index db84819b..859db888 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesPrepareServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesPrepareServiceImpl.java @@ -43,8 +43,8 @@ public class MesPrepareServiceImpl implements IMesPrepareService { protected Logger logger = LoggerFactory.getLogger(getClass()); @Autowired private MesPrepareMapper mesPrepareMapper; - @Autowired - private RemoteSapService remoteSapService; +// @Autowired +// private RemoteSapService remoteSapService; @Autowired private RemoteUserService remoteUserService; @Autowired diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareDetailMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareDetailMapper.xml index 20656537..7e434286 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareDetailMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareDetailMapper.xml @@ -73,6 +73,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" mpd.status, mpd.fund_quanlity fundQuanlity, mpd.factory_code factoryCode, + mpd.recoil, ow.product_date productDate from pro_order_workorder ow left join mes_prepare mp on ow.workorder_code = mp.workorder_code diff --git a/op-modules/op-quality/src/main/java/com/op/quality/controller/QuaController.java b/op-modules/op-quality/src/main/java/com/op/quality/controller/QuaController.java index 03afa953..18cf39ee 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/controller/QuaController.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/controller/QuaController.java @@ -214,11 +214,11 @@ public class QuaController extends BaseController { * 获取待检验信息列表 */ @PostMapping(value = "commitCheckResults") - public AjaxResult commitCheckResults(@RequestBody List qcCheckTaskDetails) { - if(CollectionUtils.isEmpty(qcCheckTaskDetails)){ + public AjaxResult commitCheckResults(@RequestBody QcCheckTaskIncome qcCheckTaskIncome) { + if(CollectionUtils.isEmpty(qcCheckTaskIncome.getQcCheckTaskDetails())){ return error("[List]不能为空"); } - return success(qcCheckTaskIncomeService.commitCheckResults(qcCheckTaskDetails)); + return success(qcCheckTaskIncomeService.commitCheckResults(qcCheckTaskIncome)); } /** * 检验单位 diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskIncome.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskIncome.java index ec66fb6d..02048905 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskIncome.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskIncome.java @@ -2,6 +2,8 @@ package com.op.quality.domain; import java.math.BigDecimal; import java.util.Date; +import java.util.List; + import com.fasterxml.jackson.annotation.JsonFormat; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; @@ -127,6 +129,52 @@ public class QcCheckTaskIncome extends BaseEntity { private String qualityStatus; private String batchCode; private String batchId; + private List qcCheckTaskDetails; + + private BigDecimal sampleQuality; + private BigDecimal aNoOkquality; + private BigDecimal bNoOkquality; + private BigDecimal cNoOkquality; + + public BigDecimal getSampleQuality() { + return sampleQuality; + } + + public void setSampleQuality(BigDecimal sampleQuality) { + this.sampleQuality = sampleQuality; + } + + public BigDecimal getaNoOkquality() { + return aNoOkquality; + } + + public void setaNoOkquality(BigDecimal aNoOkquality) { + this.aNoOkquality = aNoOkquality; + } + + public void setbNoOkquality(BigDecimal bNoOkquality) { + this.bNoOkquality = bNoOkquality; + } + + public void setcNoOkquality(BigDecimal cNoOkquality) { + this.cNoOkquality = cNoOkquality; + } + + public BigDecimal getbNoOkquality() { + return bNoOkquality; + } + + public BigDecimal getcNoOkquality() { + return cNoOkquality; + } + + public List getQcCheckTaskDetails() { + return qcCheckTaskDetails; + } + + public void setQcCheckTaskDetails(List qcCheckTaskDetails) { + this.qcCheckTaskDetails = qcCheckTaskDetails; + } public String getBatchCode() { return batchCode; diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskIncomeService.java b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskIncomeService.java index 4fa464c6..74c785aa 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskIncomeService.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskIncomeService.java @@ -76,7 +76,7 @@ public interface IQcCheckTaskIncomeService { int commitCheckResult(QcCheckTaskIncome qcCheckTaskIncome); - int commitCheckResults(List details); + int commitCheckResults(QcCheckTaskIncome qcCheckTaskIncome); List getDefectList(QcDefectType qcDefectType); diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java index 81dbcfd7..3bfb0bc0 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskIncomeServiceImpl.java @@ -1,5 +1,6 @@ package com.op.quality.service.impl; +import java.math.BigDecimal; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -8,6 +9,7 @@ import com.alibaba.fastjson2.JSONArray; import com.baomidou.dynamic.datasource.annotation.DS; import com.baomidou.dynamic.datasource.toolkit.DynamicDataSourceContextHolder; import com.op.common.core.utils.DateUtils; +import com.op.common.core.utils.StringUtils; import com.op.common.core.utils.uuid.IdUtils; import com.op.common.security.utils.SecurityUtils; import com.op.quality.domain.*; @@ -240,6 +242,20 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { String key = "#header.poolName"; String factoryCode = request.getHeader(key.substring(8)).replace("ds_",""); + BigDecimal noOkQquality = new BigDecimal("0"); + if(qcCheckTaskIncome.getaNoOkquality()!=null){ + noOkQquality.add(qcCheckTaskIncome.getaNoOkquality()); + } + if(qcCheckTaskIncome.getbNoOkquality()!=null){ + noOkQquality.add(qcCheckTaskIncome.getbNoOkquality()); + } + if(qcCheckTaskIncome.getcNoOkquality()!=null){ + noOkQquality.add(qcCheckTaskIncome.getcNoOkquality()); + } + if(qcCheckTaskIncome.getNoOkQuality()==null){ + qcCheckTaskIncome.setNoOkQuality(noOkQquality); + } + //遍历检测项目 List projects= qcCheckTaskDetailMapper.getProjectStatus(qcCheckTaskIncome.getRecordId()); String result = "N"; @@ -322,7 +338,8 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { } @Override - public int commitCheckResults(List details) { + public int commitCheckResults(QcCheckTaskIncome qcCheckTaskIncome) { + List details = qcCheckTaskIncome.getQcCheckTaskDetails(); DynamicDataSourceContextHolder.push(details.get(0).getFactoryCode()); Date nowTime = DateUtils.getNowDate(); String factoryCode = details.get(0).getFactoryCode(); @@ -347,6 +364,20 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { qcCheckTask.setUpdateTime(nowTime); qcCheckTask.setCheckTime(nowTime); qcCheckTask.setCheckResult(result);//检验结果Y合格 N不合格 + BigDecimal noOkQquality = new BigDecimal("0"); + if(qcCheckTaskIncome.getaNoOkquality()!=null){ + noOkQquality.add(qcCheckTaskIncome.getaNoOkquality()); + } + if(qcCheckTaskIncome.getbNoOkquality()!=null){ + noOkQquality.add(qcCheckTaskIncome.getbNoOkquality()); + } + if(qcCheckTaskIncome.getcNoOkquality()!=null){ + noOkQquality.add(qcCheckTaskIncome.getcNoOkquality()); + } + if(qcCheckTask.getNoOkQuality()==null){ + qcCheckTask.setNoOkQuality(noOkQquality); + } + qcCheckTask.setSampleQuality(qcCheckTaskIncome.getSampleQuality()); /**qc_check_task**/ n = qcCheckTaskIncomeMapper.updateQcCheckTask(qcCheckTask); logger.info("qc_check_task:"+n); diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml index 7e77b84b..8f0e79af 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskIncomeMapper.xml @@ -260,6 +260,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" factory_code = #{factoryCode}, del_flag = #{delFlag}, check_type = #{checkType}, + sample_quality = #{sampleQuality}, + noOk_quality = #{noOkQuality}, + where record_id = #{recordId} @@ -268,6 +271,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" set check_status = #{checkStatus}, check_time = #{checkTime}, + sample_quality = #{sampleQuality}, + noOk_quality = #{noOkQuality}, + aNoOkquality = #{aNoOkquality}, + bNoOkquality = #{bNoOkquality}, + cNoOkquality = #{cNoOkquality}, check_result = #{checkResult}, update_by = #{updateBy}, update_time = #{updateTime} diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskProduceMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskProduceMapper.xml index dca2af4f..3cafc674 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskProduceMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskProduceMapper.xml @@ -221,6 +221,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_time = #{updateTime}, factory_code = #{factoryCode}, del_flag = #{delFlag}, + sample_quality = #{sampleQuality}, where record_id = #{recordId} diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskWarehousingMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskWarehousingMapper.xml index 9f4ebe86..e7823d49 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskWarehousingMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskWarehousingMapper.xml @@ -194,6 +194,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_time = #{updateTime}, factory_code = #{factoryCode}, del_flag = #{delFlag}, + sample_quality = #{sampleQuality}, + noOk_quality = #{noOkQuality}, + aNoOkquality = #{aNoOkquality}, + bNoOkquality = #{bNoOkquality}, + cNoOkquality = #{cNoOkquality}, where record_id = #{recordId}