diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskWarehousingServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskWarehousingServiceImpl.java index e5d78b64..b1451272 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskWarehousingServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskWarehousingServiceImpl.java @@ -155,7 +155,6 @@ public class QcCheckTaskWarehousingServiceImpl implements IQcCheckTaskWarehousin Date nowDate= DateUtils.getNowDate(); String factoryCode = qcCheckTaskWarehousing.getFactoryCode(); - qcCheckTaskWarehousing.setCheckNo(bpDD+liushuiStr); /**取检测项**/ @@ -170,7 +169,12 @@ public class QcCheckTaskWarehousingServiceImpl implements IQcCheckTaskWarehousin QcMaterialGroupDetail group = qcMaterialGroupDetailMapper.getGroupByMaterial(qcCheckTaskWarehousing.getMaterialCode()); if(group == null){ group = new QcMaterialGroupDetail(); - group.setGroupId("3dc0655fea3449c59c76a01cc5b91565");//成品蚊香物料组 + QcProjectType initGroup = qcCheckTypeProjectMapper.getProductGroup(qcCheckTaskWarehousing.getMaterialCode()); + if(initGroup != null){//包材共性 + group.setGroupId(initGroup.getGroupId()); + }else {//成品蚊香物料组 + group.setGroupId("3dc0655fea3449c59c76a01cc5b91565"); + } } qctp.setGroupId(group.getGroupId());//共性 List itemsGG = qcCheckTypeProjectMapper.getTPByTypeGroup(qctp); diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTypeProjectMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTypeProjectMapper.xml index 5ce06a85..bf4eb1f8 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTypeProjectMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTypeProjectMapper.xml @@ -324,7 +324,7 @@ select top 1 qmg.id groupId from base_product bp - left join qc_material_group qmg on qmg.group_code = bp.mvgr5 + left join qc_material_group qmg on qmg.group_code = bp.mvgr5 where bp.product_code like concat('%',#{materialCode},'%') and bp.del_flag = '0' and qmg.del_flag = '0' order by qmg.create_time desc