diff --git a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskIncomeController.java b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskIncomeController.java index 9e318ff9..be1a4f80 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskIncomeController.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskIncomeController.java @@ -195,7 +195,6 @@ public class QcCheckTaskIncomeController extends BaseController { logger.info("来料信息查询请求:" + JSONObject.toJSONString(mapBom)); R incomeR = remoteSapService.inComingCheck(mapBom); if(incomeR.getCode()==500){ - logger.info("来料信息查询请求:" + JSONObject.toJSONString(incomeR)); return AjaxResult.error(JSONObject.toJSONString(incomeR)); } logger.info("来料信息查询结果:" + JSONObject.toJSONString(incomeR)); @@ -216,13 +215,21 @@ public class QcCheckTaskIncomeController extends BaseController { if(!CollectionUtils.isEmpty(newIncomes)){ logger.info("工厂来料检验任务生成参数:" + JSONObject.toJSONString(newIncomes)); for(QcCheckTaskIncomeDTO income:newIncomes){ + //供应商+物料编码+数量+来料时间 + QcCheckTaskIncome hasTask = qcCheckTaskIncomeService.hasIncomeTask(income); + if(hasTask != null){ + logger.info(poolName + "工厂的" + income.getAttr1()+"来料检验创建任务重复++++++++++"+ + JSONObject.toJSONString(income)); + continue; + } + AjaxResult ajaxResult = createIncomeTask(income); if(ajaxResult.isSuccess()){ successNum = successNum + 1; - logger.info(poolName + "工厂的" + income.getCheckNo()+"来料检验创建任务成功++++++++++"); + logger.info(poolName + "工厂的" + income.getAttr1()+"来料检验创建任务成功++++++++++"); }else if(ajaxResult.isError()){ failNum = failNum +1; - logger.info(poolName + "工厂的" + income.getCheckNo()+"来料检验创建任务失败++++++++++"); + logger.info(poolName + "工厂的" + income.getAttr1()+"来料检验创建任务失败++++++++++"); } } }else{ diff --git a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskIncomeMapper.java b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskIncomeMapper.java index 7d8b3553..94a3c556 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskIncomeMapper.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskIncomeMapper.java @@ -8,6 +8,7 @@ import com.op.quality.domain.*; import com.op.system.api.domain.SysDictData; import com.op.system.api.domain.SysNoticeGroup; import com.op.system.api.domain.SysUser; +import com.op.system.api.domain.quality.QcCheckTaskIncomeDTO; import com.op.system.api.domain.quality.QcUserMaterialDTO; import org.apache.ibatis.annotations.MapKey; import org.apache.ibatis.annotations.Mapper; @@ -126,4 +127,6 @@ public interface QcCheckTaskIncomeMapper { Map getWxIdMap(List userCodes); List getNoticesGroup(SysNoticeGroup noticeQo); + + QcCheckTaskIncome hasIncomeTask(QcCheckTaskIncomeDTO income); } 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 b0c97b03..0e49b7ee 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 @@ -5,6 +5,7 @@ import java.util.List; import com.op.quality.domain.*; import com.op.system.api.domain.SysUser; +import com.op.system.api.domain.quality.QcCheckTaskIncomeDTO; /** * 来料检验Service接口 @@ -102,4 +103,6 @@ public interface IQcCheckTaskIncomeService { List getTodayIncomeLists(); public String getWeightValue(String id); + + QcCheckTaskIncome hasIncomeTask(QcCheckTaskIncomeDTO income); } 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 ad2621a6..0a0c225e 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 @@ -21,6 +21,7 @@ import com.op.system.api.RemoteOpenService; import com.op.system.api.domain.SysNoticeGroup; import com.op.system.api.domain.SysUser; import com.op.system.api.domain.dto.WechartDTO; +import com.op.system.api.domain.quality.QcCheckTaskIncomeDTO; import com.op.system.api.domain.quality.QcUserMaterialDTO; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -924,5 +925,10 @@ public class QcCheckTaskIncomeServiceImpl implements return qcProCheckService.getWeightInfo(qcCheckTaskDetail); } + @Override + public QcCheckTaskIncome hasIncomeTask(QcCheckTaskIncomeDTO income) { + return qcCheckTaskIncomeMapper.hasIncomeTask(income); + } + } 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 b9636d23..9d795b8b 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 @@ -512,6 +512,14 @@ #{userCode} +