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 efe7536e..d536705c 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 @@ -49,15 +49,15 @@ public class QcCheckTaskProduceController extends BaseController { @GetMapping("/list") public TableDataInfo list(QcCheckTaskProduce qcCheckTaskProduce) { - //默认时间范围T 00:00:00~T+1 00:00:00 - if(StringUtils.isEmpty(qcCheckTaskProduce.getIncomeTimeStart())){ - qcCheckTaskProduce.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"; - qcCheckTaskProduce.setIncomeTimeEnd(dateEndStr);//end - } +// //默认时间范围T 00:00:00~T+1 00:00:00 +// if(StringUtils.isEmpty(qcCheckTaskProduce.getIncomeTimeStart())){ +// qcCheckTaskProduce.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"; +// qcCheckTaskProduce.setIncomeTimeEnd(dateEndStr);//end +// } // if(StringUtils.isEmpty(qcCheckTaskProduce.getCheckTimeStart())){ // qcCheckTaskProduce.setCheckTimeStart(qcCheckTaskProduce.getProduceDateStart());//start @@ -77,15 +77,15 @@ public class QcCheckTaskProduceController extends BaseController { @PostMapping("/export") public void export(HttpServletResponse response, QcCheckTaskProduce qcCheckTaskProduce) { - //默认时间范围T 00:00:00~T+1 00:00:00 - if(StringUtils.isEmpty(qcCheckTaskProduce.getIncomeTimeStart())){ - qcCheckTaskProduce.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"; - qcCheckTaskProduce.setIncomeTimeEnd(dateEndStr);//end - } +// //默认时间范围T 00:00:00~T+1 00:00:00 +// if(StringUtils.isEmpty(qcCheckTaskProduce.getIncomeTimeStart())){ +// qcCheckTaskProduce.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"; +// qcCheckTaskProduce.setIncomeTimeEnd(dateEndStr);//end +// } // if(StringUtils.isEmpty(qcCheckTaskProduce.getCheckTimeStart())){ // qcCheckTaskProduce.setCheckTimeStart(qcCheckTaskProduce.getProduceDateStart());//start diff --git a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcStaticTableController.java b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcStaticTableController.java index 8fb6c60d..a4ab7034 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/controller/QcStaticTableController.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/controller/QcStaticTableController.java @@ -80,7 +80,7 @@ public class QcStaticTableController extends BaseController { /** * 生产过程质量报表 */ - @RequiresPermissions("quality:gcTableProduce:list") + @RequiresPermissions("quality:qcTableProduce:list") @GetMapping("/getProduceChartData") public QcStaticTable getProduceChartData(QcStaticTable qcStaticTable) { QcStaticTable resultdto = new QcStaticTable(); 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 eef2a553..e51f28c6 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 @@ -140,6 +140,24 @@ public class QcCheckTaskIncome extends BaseEntity { private String fileList; private List files; private String remark; + private String belongTo; + private String oldBelongTo; + + public String getOldBelongTo() { + return oldBelongTo; + } + + public void setOldBelongTo(String oldBelongTo) { + this.oldBelongTo = oldBelongTo; + } + + public String getBelongTo() { + return belongTo; + } + + public void setBelongTo(String belongTo) { + this.belongTo = belongTo; + } @Override public String getRemark() { 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 6a1951e7..8e0e0b29 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 @@ -84,4 +84,9 @@ public interface QcCheckUnqualifiedMapper { List getProductWorkOrder(QcCheckTaskIncome qcCheckTaskIncome); void updatePutStatus(QcCheckTaskIncome qcCheckTaskIncome); + + int repeatCheckTask(QcCheckTaskIncome recheck); + int repeatCheckTaskDefect(QcCheckTaskIncome recheck); + int repeatCheckTaskDetail(QcCheckTaskIncome recheck); + int repeatCheckTaskUser(QcCheckTaskIncome recheck); } 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 6ee70097..c632782f 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 @@ -393,82 +393,7 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { return n ; } - /*来料检验不良OA流程 - * CQ 厂区、 OEMCM 厂名 、 LLLB 来料类别【0、1】、MATNR 物料编号、MAKTX 物料名称、suppliernum 供应商编码 - * supplier 供应商名称、CHARG 生产批号、comeQty 来料数量、testDate 检验日期 、 JYBH 检验编号、 - * BJY 仓储报检人(OEM产品提报人)、WLLY 物料来源、ZCF 转出方、 ZCOEMCM 转出OEM厂名、 - * memo 不合格情况描述 、PZGLBZG QC主管 - */ - private AjaxResult createLLOA(QcCheckTaskIncome qcCheckTaskIncome){ - - QcCheckTaskIncome detailInfo = qcCheckTaskIncomeMapper.getTaskInfo(qcCheckTaskIncome.getRecordId()); - - //发起来料检验OA流程 - Map paramMap = new HashMap<>(); - paramMap.put("user",qcCheckTaskIncome.getUpdateBy());//提交人工号 - paramMap.put("requestLevel",0);//流程紧急度 - paramMap.put("requestName","ZL0020-来料检验不合格审批流程(订单:"+qcCheckTaskIncome.getOrderNo()+")");//流程名称 - paramMap.put("workflowId",26235);//该流程对应的唯- workFlowld - - StringBuffer mainObject = new StringBuffer(); - mainObject.append("{"); - mainObject.append("\"CQ\":"+qcCheckTaskIncome.getFactoryCode());//厂区 - mainObject.append(",\"LLLB\":"+0);//来料类别【0、1】 - mainObject.append(",\"MATNR\":"+"\""+detailInfo.getMaterialCode()+"\"");//物料编码 - mainObject.append(",\"MAKTX\":"+"\""+detailInfo.getMaterialName()+"\"");//物料名称 - mainObject.append(",\"suppliernum\":"+"\""+detailInfo.getSupplierCode()+"\"");//供应商编码 - mainObject.append(",\"supplier\":"+"\""+detailInfo.getSupplierName()+"\"");//供应商名称 - mainObject.append(",\"CHARG\":"+"\""+detailInfo.getIncomeBatchNo()+"\"");//生产批号 - mainObject.append(",\"comeQty\":"+"\""+detailInfo.getQuality()+"\"");//来料数量 - mainObject.append(",\"memo\":"+"\""+detailInfo.getRemark()+"\"");//不合格情况描述 - mainObject.append("}"); - - paramMap.put("mainObject",mainObject.toString()); - logger.info("流程Id 26235:"+ JSONObject.toJSONString(paramMap)); - AjaxResult oaR = remoteOpenService.OAInspection(paramMap); - logger.info("流程Id 26235:"+ JSONObject.toJSONString(oaR)); - return oaR; - } - /*生产过程不良OA流程 - * ZL0020-成品检验控制流程:"workflowId": 26234 - * - * --------主表------- - * PGBCJ 申请部门/SSCJ 所属车间/ZRPSN报检人/GJZ关键字/SCLX生产类型/OEM OEM厂名/DH 单号/DW单位/MEMO01 不合格描述/ - * MEMO03 备注/SFXZG 是否需要QC主管审核/PGZG QC主管 - * PGZRJL 品管主任 - * ----------明细表--- - * 请求示例:{"colNames":"PROCODE,PRONAME,SCCODE......","details":[{"PROCODE":"","PRONAME":"",.....},{},{},.....]} - * PROCODE 产品编码、PRONAME 产品名称、SCCODE 批次号、SCTOTAL 数量、 - * BJDATE 报检日期、JYCODE 检验编号、JYDATE 检验日期、JYRESULT检验结果:0合格 2不合格、 - * PROCODEBAK 、BZ 备注、CPCYS 产品抽样数(PC)、JYBHGMS 不合格情况描述*/ - private AjaxResult createProduceOA(QcCheckTaskIncome qcCheckTaskIncome){ - - QcCheckTaskIncome detailInfo = qcCheckTaskIncomeMapper.getTaskInfo(qcCheckTaskIncome.getRecordId()); - - //发起来料检验OA流程 - Map paramMap = new HashMap<>(); - paramMap.put("user",qcCheckTaskIncome.getUpdateBy());//提交人工号qcCheckTaskIncome.getUpdateBy() - paramMap.put("requestLevel",0);//流程紧急度 - paramMap.put("requestName","ZL0010-成品检验控制流程(订单:"+qcCheckTaskIncome.getOrderNo()+")");//流程名称 - paramMap.put("workflowId",26234);//该流程对应的唯- workFlowld - - StringBuffer mainObject = new StringBuffer(); - mainObject.append("{"); - mainObject.append("\"SSCJ\":"+detailInfo.getSupplierName());//所属车间 - mainObject.append(",\"ZRPSN\":"+"\""+qcCheckTaskIncome.getUpdateBy()+"\"");//报检人 - mainObject.append(",\"OEM\":"+"\""+qcCheckTaskIncome.getFactoryCode()+"\"");//OEM厂名 - mainObject.append(",\"DH\":"+"\""+qcCheckTaskIncome.getWorkorderCodeSap()+"\"");//单号 - mainObject.append(",\"MEMO01\":"+"\""+detailInfo.getRemark()+"\"");//不合格情况描述 - mainObject.append("}"); - - - - paramMap.put("mainObject",mainObject.toString()); - logger.info("流程Id 26234:"+ JSONObject.toJSONString(paramMap)); - AjaxResult oaR = remoteOpenService.OAInspection(paramMap); - logger.info("流程Id 26234:"+ JSONObject.toJSONString(oaR)); - return oaR; - } + @Override @DS("#header.poolName") public List getDefectList(QcDefectType qcDefectType) { @@ -611,6 +536,28 @@ public class QcCheckTaskIncomeServiceImpl implements IQcCheckTaskIncomeService { /**pro_order_workorder_batch-->status->w5**/ qcCheckTaskIncome.setStatus("2"); qcCheckUnqualifiedMapper.updateWorkOrderBatchStatus(qcCheckTaskIncome); + if("checkTypeSC".equals(qcCheckTaskIncome.getCheckType())){ + + QcCheckTaskIncome recheck = new QcCheckTaskIncome(); + recheck.setOldBelongTo(belongId); + recheck.setBelongTo(recheck.getRecordId()); + recheck.setCreateBy(updateBy); + recheck.setCreateTime(nowTime); + //首件不合格触发复检 + recheck.setRecordId(IdUtils.fastSimpleUUID()); + n = qcCheckUnqualifiedMapper.repeatCheckTask(recheck); + logger.info("复检表qc_check_task:" + n); + recheck.setRecordId(IdUtils.fastSimpleUUID()); + n = qcCheckUnqualifiedMapper.repeatCheckTaskDefect(recheck); + logger.info("复检表qc_check_task_defect:" + n); + recheck.setRecordId(IdUtils.fastSimpleUUID()); + n = qcCheckUnqualifiedMapper.repeatCheckTaskDetail(recheck); + logger.info("复检表qc_check_task_detail:" + n); + recheck.setRecordId(IdUtils.fastSimpleUUID()); + n = qcCheckUnqualifiedMapper.repeatCheckTaskUser(recheck); + logger.info("复检表qc_check_task_user:" + n); + + } }else if("product".equals(qcCheckTaskIncome.getTypeCode())){ /**wms_product_put-->check_status->1**/ qcCheckTaskIncome.setStatus("2"); 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 8968e71f..b4811f46 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,5 +1,6 @@ package com.op.quality.service.impl; +import java.math.BigDecimal; import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -90,10 +91,10 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService QcCheckTaskProduce qcCheckTaskProduce = qcCheckTaskProduceMapper.selectQcCheckTaskProduceByRecordId(recordId); //获取拼接好的检验人员信息 QcCheckTaskUser qcCheckTaskUser = qcCheckTaskUserService.selectQcCheckTaskUserByBelongTo(recordId); - if (StringUtils.isNotBlank(qcCheckTaskUser.getManNames())) { + if (qcCheckTaskUser != null && StringUtils.isNotBlank(qcCheckTaskUser.getManNames())) { qcCheckTaskProduce.setCheckManName(qcCheckTaskUser.getManNames()); } - if (StringUtils.isNotBlank(qcCheckTaskUser.getManCodes())) { + if (qcCheckTaskUser != null && StringUtils.isNotBlank(qcCheckTaskUser.getManCodes())) { qcCheckTaskProduce.setCheckManCode(qcCheckTaskUser.getManCodes()); } //获取不良品检验信息 @@ -215,15 +216,16 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService } } /** 不良品数据插入 */ + BigDecimal noOkQuality = new BigDecimal(0); List defectList = qcCheckTaskProduce.getDefects(); - if (CollectionUtils.isEmpty(defectList)) { - return 0; - } else { + if (!CollectionUtils.isEmpty(defectList)) { for (QcCheckTaskDefect defect : defectList) { - defect.setBelongTo(beLongId); + defect.setBelongTo(beLongId); qcCheckTaskDefectService.insertQcCheckTaskDefect(defect); + noOkQuality = noOkQuality.add(defect.getNoOkQuality()==null?new BigDecimal("0"):defect.getNoOkQuality()); } } + qcCheckTaskProduce.setNoOkQuality(noOkQuality); /**qc_check_task**/ qcCheckTaskProduceMapper.insertQcCheckTaskProduce(qcCheckTaskProduce); @@ -267,17 +269,19 @@ public class QcCheckTaskProduceServiceImpl implements IQcCheckTaskProduceService } qcCheckTaskUserService.updateQcCheckTaskUser(qcCheckTaskUserList); /** 不良品数据修改 **/ + BigDecimal noOkQuality = new BigDecimal(0); List defectList = qcCheckTaskProduce.getDefects(); - if (CollectionUtils.isEmpty(defectList)) { - return 0; - } else { - String belongTo = qcCheckTaskProduce.getRecordId(); + String belongTo = qcCheckTaskProduce.getRecordId(); + //不是空执行下一步,空不做操作 + if (!CollectionUtils.isEmpty(defectList)) { qcCheckTaskDefectService.deleteQcCheckTaskDefectByBelongTo(belongTo); for (QcCheckTaskDefect defect : defectList) { defect.setBelongTo(belongTo); qcCheckTaskDefectService.insertQcCheckTaskDefect(defect); + noOkQuality = noOkQuality.add(defect.getNoOkQuality()==null?new BigDecimal("0"):defect.getNoOkQuality()); } } + qcCheckTaskProduce.setNoOkQuality(noOkQuality); return qcCheckTaskProduceMapper.updateQcCheckTaskProduce(qcCheckTaskProduce); } 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 1ddc6892..51daaa55 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 @@ -149,7 +149,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select powb.batch_id batchId, powb.batch_code batchCode from pro_order_workorder_batch powb - left join pro_order_workorder pow on powb.workorder_id = pow.workorder_id + left join pro_order_workorder pow on powb.workorder_id = pow.workorder_id where powb.del_flag = '0' and pow.del_flag = '0' and pow.workorder_code = #{workorderCode} 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 4ecd9d7c..01c7860d 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 @@ -141,7 +141,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select id,check_name checkName from qc_check_type - where type_code = #{typeCode} and del_flag='0' + where del_flag='0' + and type_code = #{typeCode} @@ -178,6 +178,67 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{requestid}, + + insert into qc_check_task( + record_id,check_no,income_batch_no,order_no, + material_code,material_name,quality,unit, + supplier_code,supplier_name,income_time, + check_status, + create_by,create_time,factory_code,del_flag, + check_type,noOk_quality,sample_quality,type_code,order_type + ) + select + #{recordId},check_no,income_batch_no ,order_no , + material_code,material_name,quality ,unit , + supplier_code,supplier_name,income_time, + '0', + #{createBy},#{createTime},factory_code,del_flag, + check_type,noOk_quality,sample_quality,type_code ,'reCheckCS' + from qc_check_task where record_id = #{oldBelongTo} and del_flag = '0' + + + insert qc_check_task_defect( + record_id, + defect_code,defect_subclass, + create_by,create_time, + factory_code,del_flag, + belong_to,noOk_quality) + select + REPLACE(NEWID(), '-',''), + defect_code,defect_subclass, + #{createBy},#{createTime}, + factory_code,del_flag, + #{belongTo},noOk_quality + from qc_check_task_defect where belong_to = #{oldBelongTo} and del_flag = '0' + + + insert into qc_check_task_detail( + record_id,belong_to,order_num,rule_name,property_code, + check_mode,check_tool,unit_code,check_standard,actual_value, + create_by,create_time,factory_code,del_flag, + project_id,project_no,type_project_id,defect_code + ) + select + REPLACE(NEWID(), '-',''),#{belongTo},order_num,rule_name,property_code, + check_mode,check_tool,unit_code,check_standard,actual_value, + #{createBy},#{createTime},factory_code,del_flag, + project_id,project_no,type_project_id,defect_code + from qc_check_task_detail where belong_to = #{oldBelongTo} and del_flag = '0' + + + insert into qc_check_task_user( + record_id,check_no, + check_man_code,check_man_name, + create_by,create_time, + factory_code,del_flag,belong_to + ) + select + REPLACE(NEWID(), '-',''),check_no, + check_man_code,check_man_name, + #{createBy},#{createTime}, + factory_code,del_flag,#{belongTo} + from qc_check_task_user where belong_to = #{oldBelongTo} and del_flag = '0' + update qc_check_unqualified diff --git a/op-modules/op-quality/src/main/resources/mapper/quality/QcProjectTypeMapper.xml b/op-modules/op-quality/src/main/resources/mapper/quality/QcProjectTypeMapper.xml index 95970101..79812c8f 100644 --- a/op-modules/op-quality/src/main/resources/mapper/quality/QcProjectTypeMapper.xml +++ b/op-modules/op-quality/src/main/resources/mapper/quality/QcProjectTypeMapper.xml @@ -3,7 +3,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - + insert into qc_project_type @@ -55,7 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" factory_code, del_flag, standard_no, - version = #{version} + version, #{id}, @@ -68,8 +68,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{updateTime}, #{factoryCode}, #{delFlag}, - #{standardNo} - #{version} + #{standardNo}, + #{version}, @@ -96,9 +96,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from qc_project_type where id in + delete from qc_project_type where id in #{id} - \ No newline at end of file + diff --git a/op-modules/op-wms/src/main/java/com/op/wms/domain/OdsProcureOutOrder.java b/op-modules/op-wms/src/main/java/com/op/wms/domain/OdsProcureOutOrder.java index 4be9bf6f..414a31a0 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/domain/OdsProcureOutOrder.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/domain/OdsProcureOutOrder.java @@ -167,8 +167,8 @@ public class OdsProcureOutOrder extends BaseEntity { 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 createDate; /** 最后更新人 */ @@ -191,6 +191,24 @@ public class OdsProcureOutOrder extends BaseEntity { /** 企业编码 */ @Excel(name = "企业编码") private String enterpriseCode; + private String sapMag; + private String sapXMag; + + public String getSapMag() { + return sapMag; + } + + public void setSapMag(String sapMag) { + this.sapMag = sapMag; + } + + public String getSapXMag() { + return sapXMag; + } + + public void setSapXMag(String sapXMag) { + this.sapXMag = sapXMag; + } public void setSiteCode(String siteCode) { this.siteCode = siteCode; diff --git a/op-modules/op-wms/src/main/java/com/op/wms/mapper/OdsProcureOutOrderMapper.java b/op-modules/op-wms/src/main/java/com/op/wms/mapper/OdsProcureOutOrderMapper.java index 9fc7a796..b19c56b3 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/mapper/OdsProcureOutOrderMapper.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/mapper/OdsProcureOutOrderMapper.java @@ -78,4 +78,8 @@ public interface OdsProcureOutOrderMapper { List selectOdsProcureOutOrderListByu1(@Param("list")List orderList); void updateOdsProcureOutOrderByids(@Param("order")OdsProcureOutOrder order,@Param("list") List sapMaterialPostingList); + + List selectOdsProcureOutOrderListZUKEN(OdsProcureOutOrder order); + + List selectOdsProcureOutOrderListZUKENX(OdsProcureOutOrder order); } diff --git a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOutOrderServiceImpl.java b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOutOrderServiceImpl.java index b4e2e0ff..9b5d2079 100644 --- a/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOutOrderServiceImpl.java +++ b/op-modules/op-wms/src/main/java/com/op/wms/service/impl/OdsProcureOutOrderServiceImpl.java @@ -96,8 +96,26 @@ public class OdsProcureOutOrderServiceImpl implements IOdsProcureOutOrderService @Override @DS("#header.poolName") public List selectOdsProcureOutOrderListZU(OdsProcureOutOrder odsProcureOutOrder) { + List orderList=odsProcureOutOrderMapper.selectOdsProcureOutOrderListZU(odsProcureOutOrder); + for (OdsProcureOutOrder order: + orderList) { + String sapMag=""; + String sapxMag=""; + List sapMags= odsProcureOutOrderMapper.selectOdsProcureOutOrderListZUKEN(order); + for (String mag: + sapMags) { + sapMag=sapMag+mag; + } + List sapxMags= odsProcureOutOrderMapper.selectOdsProcureOutOrderListZUKENX(order); + for (String magx: + sapxMags) { + sapxMag=sapxMag+magx; + } + order.setSapMag(sapMag); + order.setSapXMag(sapxMag); + } - return odsProcureOutOrderMapper.selectOdsProcureOutOrderListZU(odsProcureOutOrder); + return orderList; } @Override diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/OdsProcureOutOrderMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/OdsProcureOutOrderMapper.xml index 4ec516ff..794291ac 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/OdsProcureOutOrderMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/OdsProcureOutOrderMapper.xml @@ -58,6 +58,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and User_Defined1 = #{userDefined1} GROUP BY Produce_Code,User_Defined1 + +