Merge remote-tracking branch 'origin/master'

master
mengjiao 8 months ago
commit 97ab482d44

@ -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{

@ -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<String,SysUser> getWxIdMap(List<String> userCodes);
List<SysNoticeGroup> getNoticesGroup(SysNoticeGroup noticeQo);
QcCheckTaskIncome hasIncomeTask(QcCheckTaskIncomeDTO income);
}

@ -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<String> getTodayIncomeLists();
public String getWeightValue(String id);
QcCheckTaskIncome hasIncomeTask(QcCheckTaskIncomeDTO income);
}

@ -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<QcCheckUnqualifiedService> implements
return qcProCheckService.getWeightInfo(qcCheckTaskDetail);
}
@Override
public QcCheckTaskIncome hasIncomeTask(QcCheckTaskIncomeDTO income) {
return qcCheckTaskIncomeMapper.hasIncomeTask(income);
}
}

@ -512,6 +512,14 @@
#{userCode}
</foreach>
</select>
<select id="hasIncomeTask" resultType="com.op.quality.domain.QcCheckTaskIncome">
select material_code materialCode
from qc_check_task
where supplier_code= #{supplierCode}
and material_code= #{materialCode}
and quality = #{quality}
and income_time = #{incomeTime} and del_flag = '0'
</select>
<!--批量更新原始表-->
<update id="updateIncomeBatchList">

Loading…
Cancel
Save