diff --git a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckUnqualifiedMapper.java b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckUnqualifiedMapper.java index f7dfde3c..6a1951e7 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckUnqualifiedMapper.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckUnqualifiedMapper.java @@ -82,4 +82,6 @@ public interface QcCheckUnqualifiedMapper { int updateWorkOrderBatchStatus(QcCheckTaskIncome qcCheckTaskIncome); List getProductWorkOrder(QcCheckTaskIncome qcCheckTaskIncome); + + void updatePutStatus(QcCheckTaskIncome qcCheckTaskIncome); } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskUserService.java b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskUserService.java index c588ab9f..fe6f5b37 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskUserService.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskUserService.java @@ -5,14 +5,14 @@ import com.op.quality.domain.QcCheckTaskUser; /** * 来料检验任务--检查人Service接口 - * + * * @author Open Platform * @date 2023-12-22 */ public interface IQcCheckTaskUserService { /** * 查询来料检验任务--检查人 - * + * * @param recordId 来料检验任务--检查人主键 * @return 来料检验任务--检查人 */ @@ -20,7 +20,7 @@ public interface IQcCheckTaskUserService { /** * 查询来料检验任务--检查人列表 - * + * * @param qcCheckTaskUser 来料检验任务--检查人 * @return 来料检验任务--检查人集合 */ @@ -28,7 +28,7 @@ public interface IQcCheckTaskUserService { /** * 新增来料检验任务--检查人 - * + * * @param qcCheckTaskUser 来料检验任务--检查人 * @return 结果 */ @@ -36,7 +36,7 @@ public interface IQcCheckTaskUserService { /** * 修改来料检验任务--检查人 - * + * * @param qcCheckTaskUser 来料检验任务--检查人 * @return 结果 */ @@ -44,7 +44,7 @@ public interface IQcCheckTaskUserService { /** * 批量删除来料检验任务--检查人 - * + * * @param recordIds 需要删除的来料检验任务--检查人主键集合 * @return 结果 */ @@ -54,7 +54,7 @@ public interface IQcCheckTaskUserService { /** * 删除来料检验任务--检查人信息 - * + * * @param recordId 来料检验任务--检查人主键 * @return 结果 */ @@ -68,4 +68,6 @@ public interface IQcCheckTaskUserService { * 根据任务编号查询检验人 */ public QcCheckTaskUser selectQcCheckTaskUserByBelongTo(String belongTo); + + public int insertQcCheckTaskUserPDA(List qcCheckTaskUserList); } 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 489f5488..cdaf2031 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 @@ -168,7 +168,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { qcCheckTaskUserList.add(qcCheckTaskUser); } //检验人插入 - qcCheckTaskUserService.insertQcCheckTaskUserList(qcCheckTaskUserList); + qcCheckTaskUserService.insertQcCheckTaskUserPDA(qcCheckTaskUserList); }else{//上位机触发 qcCheckTaskIncome.setCheckManName(""); qcCheckTaskIncome.setCheckManCode(""); @@ -608,7 +608,9 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { qcCheckTaskIncome.setStatus("2"); qcCheckUnqualifiedMapper.updateWorkOrderBatchStatus(qcCheckTaskIncome); }else if("product".equals(qcCheckTaskIncome.getTypeCode())){ - + /**wms_product_put-->check_status->1**/ + qcCheckTaskIncome.setStatus("2"); + qcCheckUnqualifiedMapper.updatePutStatus(qcCheckTaskIncome); } //不合格处理 diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskUserServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskUserServiceImpl.java index fa4aceeb..ab5007f8 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskUserServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskUserServiceImpl.java @@ -132,20 +132,23 @@ public class QcCheckTaskUserServiceImpl implements IQcCheckTaskUserService { @Override @DS("#header.poolName") public int insertQcCheckTaskUserList(List qcCheckTaskUserList) { + //获取当前所选工厂 + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + String key = "#header.poolName"; + String factoryCode = request.getHeader(key.substring(8)).replace("ds_",""); + return this.insertTaskUsers(qcCheckTaskUserList,factoryCode); + } + @Override + public int insertQcCheckTaskUserPDA(List qcCheckTaskUserList) { + DynamicDataSourceContextHolder.push("ds_"+qcCheckTaskUserList.get(0).getFactoryCode()); + String factoryCode= qcCheckTaskUserList.get(0).getFactoryCode(); + return this.insertTaskUsers(qcCheckTaskUserList,factoryCode); + } + + private int insertTaskUsers(List qcCheckTaskUserList,String factoryCode){ if (CollectionUtils.isEmpty(qcCheckTaskUserList)){ return 0; } - String factoryCode = ""; - if(StringUtils.isNotBlank(qcCheckTaskUserList.get(0).getFactoryCode())){ - DynamicDataSourceContextHolder.push("ds_"+qcCheckTaskUserList.get(0).getFactoryCode()); - factoryCode= qcCheckTaskUserList.get(0).getFactoryCode(); - }else{ - //获取当前所选工厂 - HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); - String key = "#header.poolName"; - factoryCode = request.getHeader(key.substring(8)).replace("ds_",""); - } - //遍历赋值 Date nowTime = DateUtils.getNowDate(); for (QcCheckTaskUser qcCheckTaskUser : qcCheckTaskUserList){ @@ -162,4 +165,6 @@ public class QcCheckTaskUserServiceImpl implements IQcCheckTaskUserService { public QcCheckTaskUser selectQcCheckTaskUserByBelongTo(String belongTo) { return qcCheckTaskUserMapper.selectQcCheckTaskUserByBelongTo(belongTo); } + + } diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckUnqualifiedMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckUnqualifiedMapper.xml index cba98ba8..87af0c7e 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckUnqualifiedMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckUnqualifiedMapper.xml @@ -118,17 +118,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order by product_date desc @@ -203,6 +206,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update pro_order_workorder_batch set qc_status = #{status} where batch_code = #{incomeBatchNo} + + update wms_product_put set check_status = #{status} where batch_number = #{incomeBatchNo} + delete from qc_check_unqualified where id = #{id}