From e25f22363246f3a9d98983574b686c4f612ad077 Mon Sep 17 00:00:00 2001 From: shaoyong Date: Wed, 25 Oct 2023 15:54:01 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BA=BA=E5=91=98=E7=89=A9=E6=96=99?= =?UTF-8?q?=E7=BB=91=E5=AE=9A=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../serviceImpl/QcUserMaterialServiceImpl.java | 1 - .../mapper/quality/QcCheckTypeProjectMapper.xml | 13 ++++++------- .../mapper/quality/QcUserMaterialMapper.xml | 7 +++++-- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcUserMaterialServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcUserMaterialServiceImpl.java index ca9eeb4d..e369e4d7 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcUserMaterialServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/serviceImpl/QcUserMaterialServiceImpl.java @@ -30,7 +30,6 @@ public class QcUserMaterialServiceImpl implements IQcUserMaterialService { private QcUserMaterialMapper qcUserMaterialMapper; @Override - @DS("#header.poolName") public List selectUserList(QcUserMaterial qcUserMaterial) { return qcUserMaterialMapper.selectUserList( qcUserMaterial); } 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 848abac1..179bcca7 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 @@ -56,16 +56,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND ctp.del_flag = '0' and ctp.project_id = #{projectId} and ctp.type_id = #{typeId} - and ctp.standard_value = #{standardValue} + and ctp.standard_value = #{standardValue} and ctp.upper_diff = #{upperDiff} and ctp.down_diff = #{downDiff} and ctp.sample = #{sample} - and status = #{status} - and attr1 = #{attr1} - and factory_code = #{factoryCode} - and group_id = #{groupId} - and material_code = #{materialCode} - and sample_num = #{sampleNum} + and ctp.status = #{status} + and ctp.group_id = #{groupId} + and ctp.material_code = #{materialCode} + and ctp.sample_num = #{sampleNum} + and cp.rule_name like concat('%', #{ruleName}, '%') diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcUserMaterialMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcUserMaterialMapper.xml index 1fe10d2f..8c02c064 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcUserMaterialMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcUserMaterialMapper.xml @@ -41,8 +41,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" FROM sys_user t LEFT JOIN lanju_op_xiaolan_ds.dbo.qc_user_material um ON um.user_code = t.user_name - LEFT JOIN base_product bp ON bp.product_code = um.material_code - GROUP BY t.user_id,t.user_name,t.nick_name,t.phonenumber,t.email,t.status,t.create_time + LEFT JOIN lanju_op_xiaolan_ds.dbo.base_product bp ON bp.product_code = um.material_code + WHERE t.del_flag = '0' + and t.nick_name like concat('%', #{userName}, '%') + and t.phonenumber like concat('%', #{phonenumber}, '%') + GROUP BY t.user_id,t.user_name,t.nick_name,t.phonenumber,t.email,t.status,t.create_time From 94010d914601ce7830076eb0fe13367f978a724b Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Thu, 26 Oct 2023 09:08:18 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E8=BF=87=E7=A8=8B?= =?UTF-8?q?=E6=A3=80=E9=AA=8Cv3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/api/domain/sap/SapWorkCenter.java | 10 +++ .../op-file/src/main/resources/bootstrap.yml | 5 +- .../QcCheckTaskIncomeController.java | 8 +- .../QcCheckTaskProduceController.java | 20 +++-- .../op/quality/domain/QcCheckTaskProduce.java | 14 ++- .../mapper/QcCheckTaskProduceMapper.java | 23 +++-- .../service/IQcCheckTaskProduceService.java | 3 + .../impl/QcCheckTaskIncomeServiceImpl.java | 1 + .../impl/QcCheckTaskProduceServiceImpl.java | 86 ++++++++++++++++++- .../quality/QcCheckTaskIncomeMapper.xml | 1 + .../quality/QcCheckTaskProduceMapper.xml | 25 +++++- .../impl/SapWorkCenterServiceImpl.java | 1 + .../resources/mapper/sap/SapBomMapper.xml | 8 +- .../com/op/system/domain/BaseApkFile.java | 10 +++ .../service/impl/BaseApkFileServiceImpl.java | 20 +++++ .../mapper/system/BaseApkFileMapper.xml | 2 +- 16 files changed, 211 insertions(+), 26 deletions(-) diff --git a/op-api/op-api-system/src/main/java/com/op/system/api/domain/sap/SapWorkCenter.java b/op-api/op-api-system/src/main/java/com/op/system/api/domain/sap/SapWorkCenter.java index ad7843f1..98dfbfb9 100644 --- a/op-api/op-api-system/src/main/java/com/op/system/api/domain/sap/SapWorkCenter.java +++ b/op-api/op-api-system/src/main/java/com/op/system/api/domain/sap/SapWorkCenter.java @@ -11,9 +11,19 @@ public class SapWorkCenter { private String arbpl;//工作中心 private String ktext;//工作中心描述 private String parentId; + private String fType; + @JsonFormat(pattern = "yyyy-MM-dd") private Date aedat_grnd;//更新日期 + public String getfType() { + return fType; + } + + public void setfType(String fType) { + this.fType = fType; + } + public String getWeeks() { return weeks; } diff --git a/op-modules/op-file/src/main/resources/bootstrap.yml b/op-modules/op-file/src/main/resources/bootstrap.yml index 3cc00fca..4761653f 100644 --- a/op-modules/op-file/src/main/resources/bootstrap.yml +++ b/op-modules/op-file/src/main/resources/bootstrap.yml @@ -1,7 +1,6 @@ # Tomcat server: port: 9300 - # Spring spring: application: @@ -29,3 +28,7 @@ spring: # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} + servlet: + multipart: + max-file-size: 50MB + max-request-size: 50MB 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 91c07a4e..b9325b92 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 @@ -61,10 +61,10 @@ public class QcCheckTaskIncomeController extends BaseController { qcCheckTaskIncome.setIncomeTimeEnd(dateEndStr);//end } - if(StringUtils.isEmpty(qcCheckTaskIncome.getCheckTimeStart())){ - qcCheckTaskIncome.setCheckTimeStart(qcCheckTaskIncome.getIncomeTimeStart());//start - qcCheckTaskIncome.setCheckTimeEnd(qcCheckTaskIncome.getIncomeTimeStart());//end - } +// if(StringUtils.isEmpty(qcCheckTaskIncome.getCheckTimeStart())){ +// qcCheckTaskIncome.setCheckTimeStart(qcCheckTaskIncome.getIncomeTimeStart());//start +// qcCheckTaskIncome.setCheckTimeEnd(qcCheckTaskIncome.getIncomeTimeStart());//end +// } startPage(); List list = qcCheckTaskIncomeService.selectQcCheckTaskIncomeList(qcCheckTaskIncome); diff --git a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskProduceController.java b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskProduceController.java index 3296d3eb..06855435 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskProduceController.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskProduceController.java @@ -6,6 +6,7 @@ import java.util.List; import javax.servlet.http.HttpServletResponse; import com.op.common.core.utils.DateUtils; +import com.op.quality.domain.QcCheckType; import com.op.quality.domain.QcSupplier; import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -56,10 +57,10 @@ public class QcCheckTaskProduceController extends BaseController { qcCheckTaskProduce.setProduceDateEnd(dateEndStr);//end } - if(StringUtils.isEmpty(qcCheckTaskProduce.getCheckTimeStart())){ - qcCheckTaskProduce.setCheckTimeStart(qcCheckTaskProduce.getProduceDateStart());//start - qcCheckTaskProduce.setCheckTimeEnd(qcCheckTaskProduce.getProduceDateEnd());//end - } +// if(StringUtils.isEmpty(qcCheckTaskProduce.getCheckTimeStart())){ +// qcCheckTaskProduce.setCheckTimeStart(qcCheckTaskProduce.getProduceDateStart());//start +// qcCheckTaskProduce.setCheckTimeEnd(qcCheckTaskProduce.getProduceDateEnd());//end +// } startPage(); List list = qcCheckTaskProduceService.selectQcCheckTaskProduceList(qcCheckTaskProduce); @@ -110,7 +111,11 @@ public class QcCheckTaskProduceController extends BaseController { @Log(title = "生产过程检验任务", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody QcCheckTaskProduce qcCheckTaskProduce) { - return toAjax(qcCheckTaskProduceService.insertQcCheckTaskProduce(qcCheckTaskProduce)); + int r = qcCheckTaskProduceService.insertQcCheckTaskProduce(qcCheckTaskProduce); + if(r>0){ + return toAjax(r); + } + return error("添加失败:请检查物料的关联检测项"); } /** @@ -142,4 +147,9 @@ public class QcCheckTaskProduceController extends BaseController { List list = qcCheckTaskProduceService.getQcListWorkCenter(qcCheckTaskProduce); return getDataTable(list); } + @GetMapping("/getCheckTypes") + public List getCheckTypes(QcCheckType qcCheckType) { + return qcCheckTaskProduceService.getCheckTypes(qcCheckType); + } + } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskProduce.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskProduce.java index 5777afb4..65bcbaca 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskProduce.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskProduce.java @@ -57,8 +57,8 @@ public class QcCheckTaskProduce extends BaseEntity { private String carName; /** 生产时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "生产时间", width = 30, dateFormat = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "生产时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") private Date produceDate; /** 检测地点 */ @@ -118,6 +118,16 @@ public class QcCheckTaskProduce extends BaseEntity { private String checkTimeStart; private String checkTimeEnd; + private String checkType; + + public String getCheckType() { + return checkType; + } + + public void setCheckType(String checkType) { + this.checkType = checkType; + } + public String getProduceDateStart() { return produceDateStart; } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskProduceMapper.java b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskProduceMapper.java index b28e517c..249cee68 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskProduceMapper.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskProduceMapper.java @@ -3,17 +3,20 @@ package com.op.quality.mapper; import java.util.List; import com.op.quality.domain.QcCheckTaskProduce; +import com.op.quality.domain.QcCheckType; +import org.apache.ibatis.annotations.Mapper; /** * 生产过程检验任务Mapper接口 - * + * * @author Open Platform * @date 2023-10-19 */ +@Mapper public interface QcCheckTaskProduceMapper { /** * 查询生产过程检验任务 - * + * * @param recordId 生产过程检验任务主键 * @return 生产过程检验任务 */ @@ -21,7 +24,7 @@ public interface QcCheckTaskProduceMapper { /** * 查询生产过程检验任务列表 - * + * * @param qcCheckTaskProduce 生产过程检验任务 * @return 生产过程检验任务集合 */ @@ -29,7 +32,7 @@ public interface QcCheckTaskProduceMapper { /** * 新增生产过程检验任务 - * + * * @param qcCheckTaskProduce 生产过程检验任务 * @return 结果 */ @@ -37,7 +40,7 @@ public interface QcCheckTaskProduceMapper { /** * 修改生产过程检验任务 - * + * * @param qcCheckTaskProduce 生产过程检验任务 * @return 结果 */ @@ -45,7 +48,7 @@ public interface QcCheckTaskProduceMapper { /** * 删除生产过程检验任务 - * + * * @param recordId 生产过程检验任务主键 * @return 结果 */ @@ -53,9 +56,15 @@ public interface QcCheckTaskProduceMapper { /** * 批量删除生产过程检验任务 - * + * * @param recordIds 需要删除的数据主键集合 * @return 结果 */ public int deleteQcCheckTaskProduceByRecordIds(String[] recordIds); + + public List getQcListWorkCenter(QcCheckTaskProduce qcCheckTaskProduce); + + int getTodayMaxNum(QcCheckTaskProduce qcCheckTaskProduce); + + List getCheckTypes(QcCheckType qcCheckType); } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskProduceService.java b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskProduceService.java index 97ecdbca..b877c94a 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskProduceService.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskProduceService.java @@ -2,6 +2,7 @@ package com.op.quality.service; import java.util.List; import com.op.quality.domain.QcCheckTaskProduce; +import com.op.quality.domain.QcCheckType; /** * 生产过程检验任务Service接口 @@ -59,4 +60,6 @@ public interface IQcCheckTaskProduceService { public int deleteQcCheckTaskProduceByRecordId(String recordId); List getQcListWorkCenter(QcCheckTaskProduce qcCheckTaskProduce); + + List getCheckTypes(QcCheckType qcCheckType); } 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 9ed1ca73..616e5d07 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 @@ -65,6 +65,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { @Override @DS("#header.poolName") public List selectQcCheckTaskIncomeList(QcCheckTaskIncome qcCheckTaskIncome) { + qcCheckTaskIncome.setDelFlag("0"); return qcCheckTaskIncomeMapper.selectQcCheckTaskIncomeList(qcCheckTaskIncome); } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java index 4cf7a889..f5585fcc 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java @@ -1,14 +1,25 @@ package com.op.quality.service.impl; +import java.util.Date; import java.util.List; import com.baomidou.dynamic.datasource.annotation.DS; import com.op.common.core.utils.DateUtils; +import com.op.common.core.utils.uuid.IdUtils; +import com.op.common.security.utils.SecurityUtils; +import com.op.quality.domain.*; +import com.op.quality.mapper.QcCheckTaskDetailMapper; +import com.op.quality.mapper.QcCheckTypeProjectMapper; +import com.op.quality.mapper.QcMaterialGroupDetailMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.op.quality.mapper.QcCheckTaskProduceMapper; -import com.op.quality.domain.QcCheckTaskProduce; import com.op.quality.service.IQcCheckTaskProduceService; +import org.springframework.util.CollectionUtils; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.servlet.http.HttpServletRequest; /** * 生产过程检验任务Service业务层处理 @@ -21,6 +32,15 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService @Autowired private QcCheckTaskProduceMapper qcCheckTaskProduceMapper; + @Autowired + private QcCheckTypeProjectMapper qcCheckTypeProjectMapper; + + @Autowired + private QcMaterialGroupDetailMapper qcMaterialGroupDetailMapper; + + @Autowired + private QcCheckTaskDetailMapper qcCheckTaskDetailMapper; + /** * 查询生产过程检验任务 * @@ -42,6 +62,7 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService @Override @DS("#header.poolName") public List selectQcCheckTaskProduceList(QcCheckTaskProduce qcCheckTaskProduce) { + qcCheckTaskProduce.setDelFlag("0"); return qcCheckTaskProduceMapper.selectQcCheckTaskProduceList(qcCheckTaskProduce); } @@ -55,7 +76,58 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService @DS("#header.poolName") public int insertQcCheckTaskProduce(QcCheckTaskProduce qcCheckTaskProduce) { qcCheckTaskProduce.setCreateTime(DateUtils.getNowDate()); - return qcCheckTaskProduceMapper.insertQcCheckTaskProduce(qcCheckTaskProduce); + + + String bpDD = DateUtils.parseDateToStr(DateUtils.YYYYMMDD, DateUtils.getNowDate()); + int liushuiNum = qcCheckTaskProduceMapper.getTodayMaxNum(qcCheckTaskProduce); + String liushuiStr = String.format("%04d", liushuiNum); + + String createBy = SecurityUtils.getUsername(); + Date nowDate= DateUtils.getNowDate(); + //获取当前所选工厂 + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + String key = "#header.poolName"; + String factoryCode = request.getHeader(key.substring(8)).replace("ds_",""); + + qcCheckTaskProduce.setCheckNo(bpDD+liushuiStr); + + /**qc_check_task_income**/ + String beLongId = IdUtils.fastSimpleUUID(); + qcCheckTaskProduce.setRecordId(beLongId); + qcCheckTaskProduce.setFactoryCode(factoryCode); + qcCheckTaskProduce.setCreateTime(nowDate); + qcCheckTaskProduceMapper.insertQcCheckTaskProduce(qcCheckTaskProduce); + + /**取检测项**/ + QcCheckTypeProject qctp= new QcCheckTypeProject(); + qctp.setTypeId(qcCheckTaskProduce.getCheckType());//来料检验 + qctp.setMaterialCode(qcCheckTaskProduce.getMaterialCode());//特性 + /**qc_check_type_project**/ + List items = qcCheckTypeProjectMapper.getTPByTypeMaterial(qctp); + if(CollectionUtils.isEmpty(items)){ + /**qc_material_group_detail**/ + QcMaterialGroupDetail group = qcMaterialGroupDetailMapper.getGroupByMaterial(qcCheckTaskProduce.getMaterialCode()); + if(group == null){ + return 0;//没有找到检测项目 + } + qctp.setGroupId(group.getGroupId());//共性 + items = qcCheckTypeProjectMapper.getTPByTypeGroup(qctp); + } + + /**qc_check_task_detail**/ + if(CollectionUtils.isEmpty(items)){ + return 0;//没有找到检测项目 + } + + for(QcCheckTaskDetail item:items){ + item.setRecordId(IdUtils.fastSimpleUUID()); + item.setBelongTo(beLongId); + item.setCreateTime(nowDate); + item.setCreateBy(createBy); + item.setFactoryCode(factoryCode); + item.setStatus("Y"); + } + return qcCheckTaskDetailMapper.addBatch(items); } /** @@ -96,8 +168,16 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService } @Override + @DS("#header.poolName") public List getQcListWorkCenter(QcCheckTaskProduce qcCheckTaskProduce) { - return null; + return qcCheckTaskProduceMapper.getQcListWorkCenter(qcCheckTaskProduce); + } + + @Override + @DS("#header.poolName") + public List getCheckTypes(QcCheckType qcCheckType) { + qcCheckType.setTypeCode("produce"); + return qcCheckTaskProduceMapper.getCheckTypes(qcCheckType); } 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 d4309ebf..5dc6e13d 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 @@ -59,6 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and check_time = #{checkTime} and check_result = #{checkResult} and status = #{status} + and del_flag = #{delFlag} and attr1 = #{attr1} and attr2 = #{attr2} and attr3 = #{attr3} 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 877db21b..aca191ae 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 @@ -36,7 +36,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select record_id, check_no, batch_no, order_no, material_code, material_name, quality, unit, car_code, car_name, produce_date, check_loc, check_status, check_man_code, check_man_name, check_time, check_result, status, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, factory_code, del_flag from qc_check_task_produce + select record_id, check_no, batch_no, order_no, material_code, material_name, + quality, unit, car_code, car_name, produce_date, check_loc, check_status, + check_man_code, check_man_name, check_time, check_result, status, attr1, + attr2, attr3, attr4, create_by, create_time, update_by, update_time, + factory_code, del_flag from qc_check_task_produce + + + + insert into qc_check_task_produce diff --git a/op-modules/op-sap/src/main/java/com/op/sap/service/impl/SapWorkCenterServiceImpl.java b/op-modules/op-sap/src/main/java/com/op/sap/service/impl/SapWorkCenterServiceImpl.java index 6e90bd06..69784f2a 100644 --- a/op-modules/op-sap/src/main/java/com/op/sap/service/impl/SapWorkCenterServiceImpl.java +++ b/op-modules/op-sap/src/main/java/com/op/sap/service/impl/SapWorkCenterServiceImpl.java @@ -287,6 +287,7 @@ public class SapWorkCenterServiceImpl implements SapWorkCenterService { String parentId = sapBomMapper.getParentId(adds.get(0).getWeeks()); adds.stream().forEach(e->{ e.setParentId(parentId); + e.setfType("c"); }); int n = sapBomMapper.addFactoryBatchs(adds); System.out.println("工作中心新增成功条数:"+ n); diff --git a/op-modules/op-sap/src/main/resources/mapper/sap/SapBomMapper.xml b/op-modules/op-sap/src/main/resources/mapper/sap/SapBomMapper.xml index f2e1a85c..b7f9c979 100644 --- a/op-modules/op-sap/src/main/resources/mapper/sap/SapBomMapper.xml +++ b/op-modules/op-sap/src/main/resources/mapper/sap/SapBomMapper.xml @@ -243,13 +243,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" (parent_id,factory_name,factory_code, create_by, create_time, - update_time) + update_time, + f_type + ) VALUES (#{item.parentId},#{item.ktext},#{item.arbpl}, 'job', #{item.aedat_grnd}, - #{item.aedat_grnd}) + #{item.aedat_grnd}, + #{item.fType} + ) diff --git a/op-modules/op-system/src/main/java/com/op/system/domain/BaseApkFile.java b/op-modules/op-system/src/main/java/com/op/system/domain/BaseApkFile.java index e5ba184f..b96ce35c 100644 --- a/op-modules/op-system/src/main/java/com/op/system/domain/BaseApkFile.java +++ b/op-modules/op-system/src/main/java/com/op/system/domain/BaseApkFile.java @@ -45,6 +45,16 @@ public class BaseApkFile extends BaseEntity { @Excel(name = "备用4") private String attr4; + private String fileList; + + public String getFileList() { + return fileList; + } + + public void setFileList(String fileList) { + this.fileList = fileList; + } + public void setId(String id) { this.id = id; } diff --git a/op-modules/op-system/src/main/java/com/op/system/service/impl/BaseApkFileServiceImpl.java b/op-modules/op-system/src/main/java/com/op/system/service/impl/BaseApkFileServiceImpl.java index c8a04a94..984650b8 100644 --- a/op-modules/op-system/src/main/java/com/op/system/service/impl/BaseApkFileServiceImpl.java +++ b/op-modules/op-system/src/main/java/com/op/system/service/impl/BaseApkFileServiceImpl.java @@ -1,8 +1,14 @@ package com.op.system.service.impl; +import java.util.ArrayList; +import java.util.Date; import java.util.List; + +import com.op.common.core.domain.BaseFileData; 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 org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.op.system.mapper.BaseApkFileMapper; @@ -52,6 +58,14 @@ public class BaseApkFileServiceImpl implements IBaseApkFileService { public int insertBaseApkFile(BaseApkFile baseApkFile) { baseApkFile.setId(IdUtils.fastSimpleUUID()); baseApkFile.setCreateTime(DateUtils.getNowDate()); + + //上传附件 + if (StringUtils.isNotEmpty(baseApkFile.getFileList())) { + String id = baseApkFile.getFileList().split(",")[0]; + baseApkFile.setFileName(id.split("&fileName=")[1]); + baseApkFile.setFileAddress(id); + } + return baseApkFileMapper.insertBaseApkFile(baseApkFile); } @@ -64,6 +78,12 @@ public class BaseApkFileServiceImpl implements IBaseApkFileService { @Override public int updateBaseApkFile(BaseApkFile baseApkFile) { baseApkFile.setUpdateTime(DateUtils.getNowDate()); + //上传附件 + if (StringUtils.isNotEmpty(baseApkFile.getFileList())) { + String id = baseApkFile.getFileList().split(",")[0]; + baseApkFile.setFileName(id.split("&fileName=")[1]); + baseApkFile.setFileAddress(id); + } return baseApkFileMapper.updateBaseApkFile(baseApkFile); } diff --git a/op-modules/op-system/src/main/resources/mapper/system/BaseApkFileMapper.xml b/op-modules/op-system/src/main/resources/mapper/system/BaseApkFileMapper.xml index 92612e6f..e535d49d 100644 --- a/op-modules/op-system/src/main/resources/mapper/system/BaseApkFileMapper.xml +++ b/op-modules/op-system/src/main/resources/mapper/system/BaseApkFileMapper.xml @@ -48,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select top 1 id, file_name, file_address, version, attr1, attr2, attr3, attr4, create_by, create_time, update_by, update_time, remark from base_apk_file - order by create_by create_by desc + order by create_by desc From 7c6d5a1b4fedd83128bac68d96d0c16718959081 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Thu, 26 Oct 2023 10:52:22 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E8=BF=87=E7=A8=8B?= =?UTF-8?q?=E6=A3=80=E9=AA=8Cv4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/op/quality/domain/QcCheckTaskIncome.java | 4 ++-- .../java/com/op/quality/domain/QcCheckTaskProduce.java | 4 ++-- .../service/impl/QcCheckTaskProduceServiceImpl.java | 2 +- .../resources/mapper/quality/QcCheckTypeProjectMapper.xml | 7 +++++-- 4 files changed, 10 insertions(+), 7 deletions(-) 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 fec78b45..bacc0f27 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 @@ -78,8 +78,8 @@ public class QcCheckTaskIncome extends BaseEntity { private String checkManName; /** 检验时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "检验时间", width = 30, dateFormat = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "检验时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") private Date checkTime; /** 检验结果Y合格 */ diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskProduce.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskProduce.java index 65bcbaca..82ab5ca7 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskProduce.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskProduce.java @@ -78,8 +78,8 @@ public class QcCheckTaskProduce extends BaseEntity { private String checkManName; /** 检验时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "检验时间", width = 30, dateFormat = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "检验时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") private Date checkTime; /** 检验结果Y合格 */ diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java index f5585fcc..ad2752be 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java @@ -100,7 +100,7 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService /**取检测项**/ QcCheckTypeProject qctp= new QcCheckTypeProject(); - qctp.setTypeId(qcCheckTaskProduce.getCheckType());//来料检验 + qctp.setTypeId(qcCheckTaskProduce.getCheckType());//生产过程检验 qctp.setMaterialCode(qcCheckTaskProduce.getMaterialCode());//特性 /**qc_check_type_project**/ List items = qcCheckTypeProjectMapper.getTPByTypeMaterial(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 179bcca7..7010907f 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 @@ -111,6 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" left join qc_check_project qcp on qcp.id = qctp.project_id where qctp.del_flag = '0' and qctp.status = '0' and qctp.material_code = #{materialCode} + and qctp.type_id = #{typeId} order by qctp.sort @@ -154,7 +156,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" del_flag, group_id, material_code, - sample_num + sample_num, project_no @@ -175,6 +177,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{delFlag}, #{groupId}, #{materialCode}, + #{sampleNum}, #{projectNo} @@ -198,7 +201,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" del_flag = #{delFlag}, group_id = #{groupId}, material_code = #{materialCode}, - sample_num = #{sampleNum} + sample_num = #{sampleNum}, project_no = #{projectNo} where id = #{id} From ac16a5d785a4b7bf075fe3b0f67585125b418354 Mon Sep 17 00:00:00 2001 From: zhaoxiaolin Date: Fri, 27 Oct 2023 11:06:57 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=85=A5=E5=BA=93=E8=BF=87=E7=A8=8B?= =?UTF-8?q?=E6=A3=80=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../QcCheckTaskIncomeController.java | 8 +- .../QcCheckTaskProduceController.java | 22 +++-- .../QcCheckTaskWarehousingController.java | 40 ++++++++- .../op/quality/domain/QcCheckTaskDetail.java | 9 ++ .../op/quality/domain/QcCheckTaskIncome.java | 18 ++++ .../domain/QcCheckTaskWarehousing.java | 73 ++++++++++++++-- .../mapper/QcCheckTaskWarehousingMapper.java | 21 +++-- .../service/IQcCheckTaskProduceService.java | 2 + .../IQcCheckTaskWarehousingService.java | 16 ++-- .../impl/QcCheckTaskIncomeServiceImpl.java | 48 ++++++++--- .../impl/QcCheckTaskProduceServiceImpl.java | 13 ++- .../QcCheckTaskWarehousingServiceImpl.java | 85 ++++++++++++++++++- .../quality/QcCheckTaskDetailMapper.xml | 8 +- .../quality/QcCheckTaskIncomeMapper.xml | 6 +- .../quality/QcCheckTaskProduceMapper.xml | 6 +- .../quality/QcCheckTaskWarehousingMapper.xml | 34 +++++--- .../quality/QcCheckTypeProjectMapper.xml | 14 +-- 17 files changed, 349 insertions(+), 74 deletions(-) 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 b9325b92..f6e87520 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 @@ -89,10 +89,10 @@ public class QcCheckTaskIncomeController extends BaseController { qcCheckTaskIncome.setIncomeTimeEnd(dateEndStr);//end } - if(StringUtils.isEmpty(qcCheckTaskIncome.getCheckTimeStart())){ - qcCheckTaskIncome.setCheckTimeStart(qcCheckTaskIncome.getIncomeTimeStart());//start - qcCheckTaskIncome.setCheckTimeEnd(qcCheckTaskIncome.getIncomeTimeStart());//end - } +// if(StringUtils.isEmpty(qcCheckTaskIncome.getCheckTimeStart())){ +// qcCheckTaskIncome.setCheckTimeStart(qcCheckTaskIncome.getIncomeTimeStart());//start +// qcCheckTaskIncome.setCheckTimeEnd(qcCheckTaskIncome.getIncomeTimeStart());//end +// } List list = qcCheckTaskIncomeService.selectQcCheckTaskIncomeList(qcCheckTaskIncome); ExcelUtil util = new ExcelUtil(QcCheckTaskIncome.class); diff --git a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskProduceController.java b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskProduceController.java index 06855435..59c72920 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskProduceController.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskProduceController.java @@ -6,6 +6,7 @@ import java.util.List; import javax.servlet.http.HttpServletResponse; import com.op.common.core.utils.DateUtils; +import com.op.common.security.utils.SecurityUtils; import com.op.quality.domain.QcCheckType; import com.op.quality.domain.QcSupplier; import org.apache.commons.lang.StringUtils; @@ -85,10 +86,10 @@ public class QcCheckTaskProduceController extends BaseController { qcCheckTaskProduce.setProduceDateEnd(dateEndStr);//end } - if(StringUtils.isEmpty(qcCheckTaskProduce.getCheckTimeStart())){ - qcCheckTaskProduce.setCheckTimeStart(qcCheckTaskProduce.getProduceDateStart());//start - qcCheckTaskProduce.setCheckTimeEnd(qcCheckTaskProduce.getProduceDateEnd());//end - } +// if(StringUtils.isEmpty(qcCheckTaskProduce.getCheckTimeStart())){ +// qcCheckTaskProduce.setCheckTimeStart(qcCheckTaskProduce.getProduceDateStart());//start +// qcCheckTaskProduce.setCheckTimeEnd(qcCheckTaskProduce.getProduceDateEnd());//end +// } List list = qcCheckTaskProduceService.selectQcCheckTaskProduceList(qcCheckTaskProduce); ExcelUtil util = new ExcelUtil(QcCheckTaskProduce.class); @@ -139,7 +140,7 @@ public class QcCheckTaskProduceController extends BaseController { } /** - * 查询供应商列表 + * 查询工作中心(车间)列表 */ @GetMapping("/getQcListWorkCenter") public TableDataInfo getQcListWorkCenter(QcCheckTaskProduce qcCheckTaskProduce) { @@ -147,9 +148,16 @@ public class QcCheckTaskProduceController extends BaseController { List list = qcCheckTaskProduceService.getQcListWorkCenter(qcCheckTaskProduce); return getDataTable(list); } - @GetMapping("/getCheckTypes") - public List getCheckTypes(QcCheckType qcCheckType) { + @PutMapping("/getCheckTypes") + public List getCheckTypes(@RequestBody QcCheckType qcCheckType) { return qcCheckTaskProduceService.getCheckTypes(qcCheckType); } + /** + * 状态修改 + */ + @PutMapping("/changeProduceStatus") + public AjaxResult changeProduceStatus(@RequestBody QcCheckTaskProduce qcCheckTaskProduce) { + return toAjax(qcCheckTaskProduceService.changeProduceStatus(qcCheckTaskProduce)); + } } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskWarehousingController.java b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskWarehousingController.java index 5c9a27bf..b32bb710 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskWarehousingController.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcCheckTaskWarehousingController.java @@ -1,7 +1,13 @@ package com.op.quality.controller; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; import java.util.List; import javax.servlet.http.HttpServletResponse; + +import com.op.common.core.utils.DateUtils; +import com.op.quality.domain.QcCheckTaskProduce; +import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; @@ -40,6 +46,15 @@ public class QcCheckTaskWarehousingController extends BaseController { @GetMapping("/list") public TableDataInfo list(QcCheckTaskWarehousing qcCheckTaskWarehousing) { startPage(); + //默认时间范围T 00:00:00~T+1 00:00:00 + if(StringUtils.isEmpty(qcCheckTaskWarehousing.getIncomeTimeStart())){ + qcCheckTaskWarehousing.setIncomeTimeStart(DateUtils.getDate()+" 00:00:00");//start + LocalDate date = LocalDate.now(); + LocalDate dateEnd = date.plusDays(1); + DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + String dateEndStr = dtf.format(dateEnd)+" 00:00:00"; + qcCheckTaskWarehousing.setIncomeTimeEnd(dateEndStr);//end + } List list = qcCheckTaskWarehousingService.selectQcCheckTaskWarehousingList(qcCheckTaskWarehousing); return getDataTable(list); } @@ -51,6 +66,15 @@ public class QcCheckTaskWarehousingController extends BaseController { @Log(title = "成品入库检验任务", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, QcCheckTaskWarehousing qcCheckTaskWarehousing) { + //默认时间范围T 00:00:00~T+1 00:00:00 + if(StringUtils.isEmpty(qcCheckTaskWarehousing.getIncomeTimeStart())){ + qcCheckTaskWarehousing.setIncomeTimeStart(DateUtils.getDate()+" 00:00:00");//start + LocalDate date = LocalDate.now(); + LocalDate dateEnd = date.plusDays(1); + DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd"); + String dateEndStr = dtf.format(dateEnd)+" 00:00:00"; + qcCheckTaskWarehousing.setIncomeTimeEnd(dateEndStr);//end + } List list = qcCheckTaskWarehousingService.selectQcCheckTaskWarehousingList(qcCheckTaskWarehousing); ExcelUtil util = new ExcelUtil(QcCheckTaskWarehousing.class); util.exportExcel(response, list, "成品入库检验任务数据"); @@ -72,7 +96,11 @@ public class QcCheckTaskWarehousingController extends BaseController { @Log(title = "成品入库检验任务", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody QcCheckTaskWarehousing qcCheckTaskWarehousing) { - return toAjax(qcCheckTaskWarehousingService.insertQcCheckTaskWarehousing(qcCheckTaskWarehousing)); + int r = qcCheckTaskWarehousingService.insertQcCheckTaskWarehousing(qcCheckTaskWarehousing); + if(r>0){ + return toAjax(r); + } + return error("添加失败:请检查物料的关联检测项"); } /** @@ -94,4 +122,14 @@ public class QcCheckTaskWarehousingController extends BaseController { public AjaxResult remove(@PathVariable String[] recordIds) { return toAjax(qcCheckTaskWarehousingService.deleteQcCheckTaskWarehousingByRecordIds(recordIds)); } + + /** + * 查询工作中心(车间)列表 + */ + @GetMapping("/getQcListLoc") + public TableDataInfo getQcListLoc(QcCheckTaskWarehousing qcCheckTaskWarehousing) { + startPage(); + List list = qcCheckTaskWarehousingService.getQcListLoc(qcCheckTaskWarehousing); + return getDataTable(list); + } } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskDetail.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskDetail.java index 4cd7fd0c..0eccb020 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskDetail.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskDetail.java @@ -93,6 +93,15 @@ public class QcCheckTaskDetail extends BaseEntity { private BigDecimal sample; private Integer sampleNum; private List actualValues; + private String typeProjectId; + + public String getTypeProjectId() { + return typeProjectId; + } + + public void setTypeProjectId(String typeProjectId) { + this.typeProjectId = typeProjectId; + } public List getActualValues() { return actualValues; 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 bacc0f27..5ff7a6ff 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 @@ -117,6 +117,24 @@ public class QcCheckTaskIncome extends BaseEntity { private String incomeTimeEnd; private String checkTimeStart; private String checkTimeEnd; + private String typeCode; + private String checkType; + + public String getCheckType() { + return checkType; + } + + public void setCheckType(String checkType) { + this.checkType = checkType; + } + + public String getTypeCode() { + return typeCode; + } + + public void setTypeCode(String typeCode) { + this.typeCode = typeCode; + } public String getIncomeTimeStart() { return incomeTimeStart; diff --git a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskWarehousing.java b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskWarehousing.java index 0d2206c5..0f1b6142 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskWarehousing.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/domain/QcCheckTaskWarehousing.java @@ -10,7 +10,7 @@ import com.op.common.core.web.domain.BaseEntity; /** * 成品入库检验任务对象 qc_check_task_warehousing - * + * * @author Open Platform * @date 2023-10-19 */ @@ -48,17 +48,17 @@ public class QcCheckTaskWarehousing extends BaseEntity { @Excel(name = "单位") private String unit; - /** 供应商编码 */ - @Excel(name = "供应商编码") + /** 仓库编码 */ + @Excel(name = "仓库编码") private String supplierCode; - /** 供应商名称 */ - @Excel(name = "供应商名称") + /** 仓库名称 */ + @Excel(name = "仓库名称") private String supplierName; /** 来料时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "来料时间", width = 30, dateFormat = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "来料时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") private Date incomeTime; /** 检测地点 */ @@ -78,8 +78,8 @@ public class QcCheckTaskWarehousing extends BaseEntity { private String checkManName; /** 检验时间 */ - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "检验时间", width = 30, dateFormat = "yyyy-MM-dd") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "检验时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") private Date checkTime; /** 检验结果Y合格 */ @@ -113,6 +113,61 @@ public class QcCheckTaskWarehousing extends BaseEntity { /** 删除标识1删除0正常 */ private String delFlag; + private String incomeTimeStart; + private String incomeTimeEnd; + private String checkTimeStart; + private String checkTimeEnd; + private String typeCode; + private String checkType; + + public String getCheckType() { + return checkType; + } + + public void setCheckType(String checkType) { + this.checkType = checkType; + } + + public String getIncomeTimeStart() { + return incomeTimeStart; + } + + public void setIncomeTimeStart(String incomeTimeStart) { + this.incomeTimeStart = incomeTimeStart; + } + + public String getIncomeTimeEnd() { + return incomeTimeEnd; + } + + public void setIncomeTimeEnd(String incomeTimeEnd) { + this.incomeTimeEnd = incomeTimeEnd; + } + + public String getCheckTimeStart() { + return checkTimeStart; + } + + public void setCheckTimeStart(String checkTimeStart) { + this.checkTimeStart = checkTimeStart; + } + + public String getCheckTimeEnd() { + return checkTimeEnd; + } + + public void setCheckTimeEnd(String checkTimeEnd) { + this.checkTimeEnd = checkTimeEnd; + } + + public String getTypeCode() { + return typeCode; + } + + public void setTypeCode(String typeCode) { + this.typeCode = typeCode; + } + public void setRecordId(String recordId) { this.recordId = recordId; } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskWarehousingMapper.java b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskWarehousingMapper.java index 18ff4020..a94ed289 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskWarehousingMapper.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/mapper/QcCheckTaskWarehousingMapper.java @@ -3,17 +3,20 @@ package com.op.quality.mapper; import java.util.List; import com.op.quality.domain.QcCheckTaskWarehousing; +import org.apache.ibatis.annotations.MapKey; +import org.apache.ibatis.annotations.Mapper; /** * 成品入库检验任务Mapper接口 - * + * * @author Open Platform * @date 2023-10-19 */ +@Mapper public interface QcCheckTaskWarehousingMapper { /** * 查询成品入库检验任务 - * + * * @param recordId 成品入库检验任务主键 * @return 成品入库检验任务 */ @@ -21,7 +24,7 @@ public interface QcCheckTaskWarehousingMapper { /** * 查询成品入库检验任务列表 - * + * * @param qcCheckTaskWarehousing 成品入库检验任务 * @return 成品入库检验任务集合 */ @@ -29,7 +32,7 @@ public interface QcCheckTaskWarehousingMapper { /** * 新增成品入库检验任务 - * + * * @param qcCheckTaskWarehousing 成品入库检验任务 * @return 结果 */ @@ -37,7 +40,7 @@ public interface QcCheckTaskWarehousingMapper { /** * 修改成品入库检验任务 - * + * * @param qcCheckTaskWarehousing 成品入库检验任务 * @return 结果 */ @@ -45,7 +48,7 @@ public interface QcCheckTaskWarehousingMapper { /** * 删除成品入库检验任务 - * + * * @param recordId 成品入库检验任务主键 * @return 结果 */ @@ -53,9 +56,13 @@ public interface QcCheckTaskWarehousingMapper { /** * 批量删除成品入库检验任务 - * + * * @param recordIds 需要删除的数据主键集合 * @return 结果 */ public int deleteQcCheckTaskWarehousingByRecordIds(String[] recordIds); + + int getTodayMaxNum(QcCheckTaskWarehousing qcCheckTaskWarehousing); + + List getQcListLoc(QcCheckTaskWarehousing qcCheckTaskWarehousing); } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskProduceService.java b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskProduceService.java index b877c94a..69a813e0 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskProduceService.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskProduceService.java @@ -62,4 +62,6 @@ public interface IQcCheckTaskProduceService { List getQcListWorkCenter(QcCheckTaskProduce qcCheckTaskProduce); List getCheckTypes(QcCheckType qcCheckType); + + int changeProduceStatus(QcCheckTaskProduce qcCheckTaskProduce); } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskWarehousingService.java b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskWarehousingService.java index 47cdb3ea..d972ff19 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskWarehousingService.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/IQcCheckTaskWarehousingService.java @@ -5,14 +5,14 @@ import com.op.quality.domain.QcCheckTaskWarehousing; /** * 成品入库检验任务Service接口 - * + * * @author Open Platform * @date 2023-10-19 */ public interface IQcCheckTaskWarehousingService { /** * 查询成品入库检验任务 - * + * * @param recordId 成品入库检验任务主键 * @return 成品入库检验任务 */ @@ -20,7 +20,7 @@ public interface IQcCheckTaskWarehousingService { /** * 查询成品入库检验任务列表 - * + * * @param qcCheckTaskWarehousing 成品入库检验任务 * @return 成品入库检验任务集合 */ @@ -28,7 +28,7 @@ public interface IQcCheckTaskWarehousingService { /** * 新增成品入库检验任务 - * + * * @param qcCheckTaskWarehousing 成品入库检验任务 * @return 结果 */ @@ -36,7 +36,7 @@ public interface IQcCheckTaskWarehousingService { /** * 修改成品入库检验任务 - * + * * @param qcCheckTaskWarehousing 成品入库检验任务 * @return 结果 */ @@ -44,7 +44,7 @@ public interface IQcCheckTaskWarehousingService { /** * 批量删除成品入库检验任务 - * + * * @param recordIds 需要删除的成品入库检验任务主键集合 * @return 结果 */ @@ -52,9 +52,11 @@ public interface IQcCheckTaskWarehousingService { /** * 删除成品入库检验任务信息 - * + * * @param recordId 成品入库检验任务主键 * @return 结果 */ public int deleteQcCheckTaskWarehousingByRecordId(String recordId); + + List getQcListLoc(QcCheckTaskWarehousing qcCheckTaskWarehousing); } 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 616e5d07..c3b3639d 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 @@ -10,13 +10,11 @@ import com.op.common.core.utils.DateUtils; import com.op.common.core.utils.uuid.IdUtils; import com.op.common.security.utils.SecurityUtils; import com.op.quality.domain.*; -import com.op.quality.mapper.QcCheckTaskDetailMapper; -import com.op.quality.mapper.QcCheckTypeProjectMapper; -import com.op.quality.mapper.QcMaterialGroupDetailMapper; +import com.op.quality.mapper.*; +import com.op.quality.service.IQcCheckTaskProduceService; import com.op.system.api.domain.SysUser; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import com.op.quality.mapper.QcCheckTaskIncomeMapper; import com.op.quality.service.IQcCheckTaskIncomeService; import org.springframework.util.CollectionUtils; import org.springframework.web.context.request.RequestContextHolder; @@ -44,6 +42,12 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { @Autowired private QcCheckTaskDetailMapper qcCheckTaskDetailMapper; + @Autowired + private QcCheckTaskProduceMapper qcCheckTaskProduceMapper; + + @Autowired + private QcCheckTaskWarehousingMapper qcCheckTaskWarehousingMapper; + /** * 查询来料检验 * @@ -101,7 +105,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { /**取检测项**/ QcCheckTypeProject qctp= new QcCheckTypeProject(); - qctp.setTypeId("checkTypeLL");//来料检验 + qctp.setTypeId(qcCheckTaskIncome.getCheckType());//生产过程检验 qctp.setMaterialCode(qcCheckTaskIncome.getMaterialCode());//特性 /**qc_check_type_project**/ List items = qcCheckTypeProjectMapper.getTPByTypeMaterial(qctp); @@ -126,7 +130,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { item.setCreateTime(nowDate); item.setCreateBy(createBy); item.setFactoryCode(factoryCode); - item.setStatus("Y"); + item.setStatus("N"); } return qcCheckTaskDetailMapper.addBatch(items); } @@ -217,13 +221,37 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { public int commitCheckResult(QcCheckTaskIncome qcCheckTaskIncome) { //遍历检测项目 List projects= qcCheckTaskDetailMapper.getProjectStatus(qcCheckTaskIncome.getRecordId()); + String result = "N"; if(CollectionUtils.isEmpty(projects)){ - qcCheckTaskIncome.setCheckResult("Y");//合格 + result = "Y";//合格 }else{ - qcCheckTaskIncome.setCheckResult("N");//不合格 + result = "N";//合格 } - qcCheckTaskIncome.setCheckTime(DateUtils.getNowDate()); - return qcCheckTaskIncomeMapper.updateQcCheckTaskIncome(qcCheckTaskIncome); + + int n = 0; + String recordId = qcCheckTaskIncome.getRecordId(); + if("material".equals(qcCheckTaskIncome.getTypeCode())){ + qcCheckTaskIncome.setCheckStatus("2"); + qcCheckTaskIncome.setCheckResult(result); + qcCheckTaskIncome.setCheckTime(DateUtils.getNowDate()); + n = qcCheckTaskIncomeMapper.updateQcCheckTaskIncome(qcCheckTaskIncome); + }else if("produce".equals(qcCheckTaskIncome.getTypeCode())){ + QcCheckTaskProduce qcCheckTaskProduce = new QcCheckTaskProduce(); + qcCheckTaskProduce.setCheckStatus("2"); + qcCheckTaskProduce.setRecordId(recordId); + qcCheckTaskProduce.setCheckResult(result); + qcCheckTaskProduce.setCheckTime(DateUtils.getNowDate()); + n = qcCheckTaskProduceMapper.updateQcCheckTaskProduce(qcCheckTaskProduce); + }else if("product".equals(qcCheckTaskIncome.getTypeCode())){ + QcCheckTaskWarehousing warehousing = new QcCheckTaskWarehousing(); + warehousing.setCheckStatus("2"); + warehousing.setRecordId(recordId); + warehousing.setCheckResult(result); + warehousing.setCheckTime(DateUtils.getNowDate()); + n = qcCheckTaskWarehousingMapper.updateQcCheckTaskWarehousing(warehousing); + } + + return n ; } } diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java index ad2752be..daf08c01 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckTaskProduceServiceImpl.java @@ -6,6 +6,7 @@ import java.util.List; import com.baomidou.dynamic.datasource.annotation.DS; import com.op.common.core.utils.DateUtils; import com.op.common.core.utils.uuid.IdUtils; +import com.op.common.core.web.domain.AjaxResult; import com.op.common.security.utils.SecurityUtils; import com.op.quality.domain.*; import com.op.quality.mapper.QcCheckTaskDetailMapper; @@ -16,6 +17,8 @@ import org.springframework.stereotype.Service; import com.op.quality.mapper.QcCheckTaskProduceMapper; import com.op.quality.service.IQcCheckTaskProduceService; import org.springframework.util.CollectionUtils; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; @@ -91,7 +94,7 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService qcCheckTaskProduce.setCheckNo(bpDD+liushuiStr); - /**qc_check_task_income**/ + /**qc_check_task_produce**/ String beLongId = IdUtils.fastSimpleUUID(); qcCheckTaskProduce.setRecordId(beLongId); qcCheckTaskProduce.setFactoryCode(factoryCode); @@ -176,9 +179,15 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService @Override @DS("#header.poolName") public List getCheckTypes(QcCheckType qcCheckType) { - qcCheckType.setTypeCode("produce"); return qcCheckTaskProduceMapper.getCheckTypes(qcCheckType); } + @Override + @DS("#header.poolName") + public int changeProduceStatus(QcCheckTaskProduce qcCheckTaskProduce) { + qcCheckTaskProduce.setUpdateBy(SecurityUtils.getUsername()); + qcCheckTaskProduce.setUpdateTime(DateUtils.getNowDate()); + return qcCheckTaskProduceMapper.updateQcCheckTaskProduce(qcCheckTaskProduce); + } } 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 31eedbcd..3521a809 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 @@ -1,14 +1,28 @@ package com.op.quality.service.impl; +import java.util.Date; import java.util.List; import com.baomidou.dynamic.datasource.annotation.DS; import com.op.common.core.utils.DateUtils; +import com.op.common.core.utils.uuid.IdUtils; +import com.op.common.security.utils.SecurityUtils; +import com.op.quality.domain.QcCheckTaskDetail; +import com.op.quality.domain.QcCheckTypeProject; +import com.op.quality.domain.QcMaterialGroupDetail; +import com.op.quality.mapper.QcCheckTaskDetailMapper; +import com.op.quality.mapper.QcCheckTypeProjectMapper; +import com.op.quality.mapper.QcMaterialGroupDetailMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.op.quality.mapper.QcCheckTaskWarehousingMapper; import com.op.quality.domain.QcCheckTaskWarehousing; import com.op.quality.service.IQcCheckTaskWarehousingService; +import org.springframework.util.CollectionUtils; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.servlet.http.HttpServletRequest; /** * 成品入库检验任务Service业务层处理 @@ -21,6 +35,15 @@ public class QcCheckTaskWarehousingServiceImpl implements IQcCheckTaskWarehousin @Autowired private QcCheckTaskWarehousingMapper qcCheckTaskWarehousingMapper; + @Autowired + private QcCheckTypeProjectMapper qcCheckTypeProjectMapper; + + @Autowired + private QcMaterialGroupDetailMapper qcMaterialGroupDetailMapper; + + @Autowired + private QcCheckTaskDetailMapper qcCheckTaskDetailMapper; + /** * 查询成品入库检验任务 * @@ -42,6 +65,7 @@ public class QcCheckTaskWarehousingServiceImpl implements IQcCheckTaskWarehousin @Override @DS("#header.poolName") public List selectQcCheckTaskWarehousingList(QcCheckTaskWarehousing qcCheckTaskWarehousing) { + qcCheckTaskWarehousing.setDelFlag("0"); return qcCheckTaskWarehousingMapper.selectQcCheckTaskWarehousingList(qcCheckTaskWarehousing); } @@ -54,8 +78,57 @@ public class QcCheckTaskWarehousingServiceImpl implements IQcCheckTaskWarehousin @Override @DS("#header.poolName") public int insertQcCheckTaskWarehousing(QcCheckTaskWarehousing qcCheckTaskWarehousing) { - qcCheckTaskWarehousing.setCreateTime(DateUtils.getNowDate()); - return qcCheckTaskWarehousingMapper.insertQcCheckTaskWarehousing(qcCheckTaskWarehousing); + + String bpDD = DateUtils.parseDateToStr(DateUtils.YYYYMMDD, DateUtils.getNowDate()); + int liushuiNum = qcCheckTaskWarehousingMapper.getTodayMaxNum(qcCheckTaskWarehousing); + String liushuiStr = String.format("%04d", liushuiNum); + + String createBy = SecurityUtils.getUsername(); + Date nowDate= DateUtils.getNowDate(); + //获取当前所选工厂 + HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); + String key = "#header.poolName"; + String factoryCode = request.getHeader(key.substring(8)).replace("ds_",""); + + qcCheckTaskWarehousing.setCheckNo(bpDD+liushuiStr); + + /**qc_check_task_warehousing**/ + String beLongId = IdUtils.fastSimpleUUID(); + qcCheckTaskWarehousing.setRecordId(beLongId); + qcCheckTaskWarehousing.setFactoryCode(factoryCode); + qcCheckTaskWarehousing.setCreateTime(nowDate); + qcCheckTaskWarehousingMapper.insertQcCheckTaskWarehousing(qcCheckTaskWarehousing); + + /**取检测项**/ + QcCheckTypeProject qctp= new QcCheckTypeProject(); + qctp.setTypeId(qcCheckTaskWarehousing.getCheckType());//生产过程检验 + qctp.setMaterialCode(qcCheckTaskWarehousing.getMaterialCode());//特性 + /**qc_check_type_project**/ + List items = qcCheckTypeProjectMapper.getTPByTypeMaterial(qctp); + if(CollectionUtils.isEmpty(items)){ + /**qc_material_group_detail**/ + QcMaterialGroupDetail group = qcMaterialGroupDetailMapper.getGroupByMaterial(qcCheckTaskWarehousing.getMaterialCode()); + if(group == null){ + return 0;//没有找到检测项目 + } + qctp.setGroupId(group.getGroupId());//共性 + items = qcCheckTypeProjectMapper.getTPByTypeGroup(qctp); + } + + /**qc_check_task_detail**/ + if(CollectionUtils.isEmpty(items)){ + return 0;//没有找到检测项目 + } + + for(QcCheckTaskDetail item:items){ + item.setRecordId(IdUtils.fastSimpleUUID()); + item.setBelongTo(beLongId); + item.setCreateTime(nowDate); + item.setCreateBy(createBy); + item.setFactoryCode(factoryCode); + item.setStatus("Y"); + } + return qcCheckTaskDetailMapper.addBatch(items); } /** @@ -94,4 +167,12 @@ public class QcCheckTaskWarehousingServiceImpl implements IQcCheckTaskWarehousin public int deleteQcCheckTaskWarehousingByRecordId(String recordId) { return qcCheckTaskWarehousingMapper.deleteQcCheckTaskWarehousingByRecordId(recordId); } + + @Override + @DS("#header.poolName") + public List getQcListLoc(QcCheckTaskWarehousing qcCheckTaskWarehousing) { + return qcCheckTaskWarehousingMapper.getQcListLoc(qcCheckTaskWarehousing); + } + + } diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskDetailMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskDetailMapper.xml index 926fec64..6888d4f5 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskDetailMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcCheckTaskDetailMapper.xml @@ -127,7 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" check_tool,unit_code, check_standard,actual_value, status,create_by,create_time, - factory_code,del_flag + factory_code,del_flag,type_project_id ) values ( @@ -135,9 +135,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{item.projectId},#{item.projectNo},#{item.ruleName},#{item.sort}, #{item.propertyCode},#{item.checkMode}, #{item.checkTool},#{item.unitCode}, - #{item.checkStandard},#{item.actualValue}, - '0',#{item.createBy},#{item.createTime}, - #{item.factoryCode},'0' + #{item.standardValue},#{item.actualValue}, + #{item.status},,#{item.createBy},#{item.createTime}, + #{item.factoryCode},'0',#{item.typeProjectId} ) 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 5dc6e13d..4215a82a 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 @@ -122,8 +122,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" td.create_by createBy, td.create_time createTime, td.update_by updateBy, - td.update_time updateTime + td.update_time updateTime, + qctp.upper_diff upperDiff, + qctp.down_diff downDiff, + qctp.sample from qc_check_task_detail td + left join qc_check_type_project qctp on td.type_project_id = qctp.id where td.belong_to = #{belongTo} 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 aca191ae..58a50f9a 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 @@ -46,9 +46,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - and check_no = #{checkNo} - and batch_no = #{batchNo} - and order_no = #{orderNo} - and material_code = #{materialCode} - and material_name like concat('%', #{materialName}, '%') + + and check_no like concat('%', #{checkNo}, '%') + and batch_no like concat('%', #{batchNo}, '%') + and order_no like concat('%', #{orderNo}, '%') + and material_code = #{materialCode} + and material_name like concat('%', #{materialName}, '%') and quality = #{quality} and unit = #{unit} and supplier_code = #{supplierCode} @@ -64,14 +64,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and attr3 = #{attr3} and attr4 = #{attr4} and factory_code = #{factoryCode} + and del_flag = #{delFlag} - + - + + + insert into qc_check_task_warehousing @@ -175,9 +187,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from qc_check_task_warehousing where record_id in + delete from qc_check_task_warehousing where record_id in #{recordId} - \ No newline at end of file + 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 7010907f..83514fe7 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 @@ -94,7 +94,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" WHERE ctp.del_flag ='0' AND ctp.id = #{id} +