diff --git a/op-api/op-api-system/src/main/java/com/op/system/api/RemoteSapService.java b/op-api/op-api-system/src/main/java/com/op/system/api/RemoteSapService.java index dfd7d205..9a2dec95 100644 --- a/op-api/op-api-system/src/main/java/com/op/system/api/RemoteSapService.java +++ b/op-api/op-api-system/src/main/java/com/op/system/api/RemoteSapService.java @@ -125,4 +125,9 @@ public interface RemoteSapService { @PostMapping("/sap/removeDatasource") public R removeDatasource(@RequestBody DataSourcePropertyDTO dataSourceProperty); -} + /** + *来料暂收接口 + */ + @PostMapping("/sap/temporarilyCollected") + public R temporarilyCollected(@RequestBody(required = false) List mapList) ; + } diff --git a/op-api/op-api-system/src/main/java/com/op/system/api/factory/RemoteSapFallbackFactory.java b/op-api/op-api-system/src/main/java/com/op/system/api/factory/RemoteSapFallbackFactory.java index eebdb006..c7bc2477 100644 --- a/op-api/op-api-system/src/main/java/com/op/system/api/factory/RemoteSapFallbackFactory.java +++ b/op-api/op-api-system/src/main/java/com/op/system/api/factory/RemoteSapFallbackFactory.java @@ -138,6 +138,11 @@ public class RemoteSapFallbackFactory implements FallbackFactory mapList) { + return R.fail("来料暂收过账失败" + throwable.getMessage()); + } + }; } } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesReportWorkConsume.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesReportWorkConsume.java index a75a09c4..3861064c 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesReportWorkConsume.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesReportWorkConsume.java @@ -93,6 +93,7 @@ public class MesReportWorkConsume extends BaseEntity { @Excel(name = "报工编码") private String reportCode; + private BigDecimal quantityFeedback; //虚拟字段 private String id; private String parentOrder; @@ -117,6 +118,14 @@ public class MesReportWorkConsume extends BaseEntity { private String erfmg; private String erfme; + public BigDecimal getQuantityFeedback() { + return quantityFeedback; + } + + public void setQuantityFeedback(BigDecimal quantityFeedback) { + this.quantityFeedback = quantityFeedback; + } + public String getErfmg() { return erfmg; } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesUnitpriceReport.java b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesUnitpriceReport.java index e0da23f5..abd13633 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/domain/MesUnitpriceReport.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/domain/MesUnitpriceReport.java @@ -138,8 +138,10 @@ public class MesUnitpriceReport extends BaseEntity { // @Excel(name = "平均工资") // private String avgResult; - @Excel(name = "工时工资") + @Excel(name = "时薪") private String realWages; + @Excel(name = "备注", readConverterExp = "1=请假") + private String remark; /** * 子工序编码 @@ -152,7 +154,6 @@ public class MesUnitpriceReport extends BaseEntity { * $column.columnComment */ - public BigDecimal getKk() { return kk; } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesReportWorkConsumeMapper.java b/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesReportWorkConsumeMapper.java index a45a914b..d6f69ff5 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesReportWorkConsumeMapper.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/mapper/MesReportWorkConsumeMapper.java @@ -1,5 +1,6 @@ package com.op.mes.mapper; +import java.math.BigDecimal; import java.util.List; import com.op.mes.domain.MesReportWorkConsume; @@ -85,4 +86,6 @@ public interface MesReportWorkConsumeMapper { List getSumConsumeList(MesReportWorkConsume consumeqo); int getSumConsumeListNum(MesReportWorkConsume consumeqo); + + BigDecimal getActAllProduct(MesReportWorkConsume mesReportWorkConsume); } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkConsumeServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkConsumeServiceImpl.java index 8d49d1a7..44a56bb0 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkConsumeServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesReportWorkConsumeServiceImpl.java @@ -358,6 +358,12 @@ public class MesReportWorkConsumeServiceImpl implements IMesReportWorkConsumeSer pTabs.setTitle("第"+i+"层工单物料损耗"); mesReportWorkConsume.setParentOrder("0"); List liblist0 = mesReportWorkConsumeMapper.getConsumeList(mesReportWorkConsume); + + if(!CollectionUtils.isEmpty(liblist0)){ + BigDecimal actPro = mesReportWorkConsumeMapper.getActAllProduct(mesReportWorkConsume); + liblist0.get(0).setQuantityFeedback(actPro); + } + pTabs.setLibList(liblist0); tabs.add(pTabs); diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareDetailMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareDetailMapper.xml index ae78454a..9fe5b0b8 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareDetailMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesPrepareDetailMapper.xml @@ -82,7 +82,7 @@ from pro_order_workorder ow left join mes_prepare mp on ow.workorder_code = mp.workorder_code left join mes_prepare_detail mpd on mp.prepare_id = mpd.prepare_id - where ow.belong_work_order = #{workorderCode} + where ow.belong_work_order = #{workorderCode} and ow.del_flag = '0' and mpd.recoil = #{recoil} and mp.del_flag = '0' and mpd.del_flag = '0' order by mpd.recoil diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkConsumeMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkConsumeMapper.xml index 2c9f01f2..f5b9d049 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkConsumeMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkConsumeMapper.xml @@ -202,6 +202,9 @@ and mrw.machine_code = #{machineCode} )t + insert into mes_report_work_consume diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml index 68509b2b..d132b6be 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesReportWorkMapper.xml @@ -702,6 +702,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and CONVERT(varchar(10), #{productDateEnd}, 23) >= CONVERT(varchar(10),pow.product_date, 23) + and pow.product_code like concat('%', #{productCode}, '%') order by be.equipment_code 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 f38bbbfb..3423a0e7 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 @@ -977,7 +977,7 @@ public class QcCheckTaskIncomeServiceImpl implements private void setOaFunc(QcCheckUnqualified unqualified,QcCheckTaskIncome qcCheckTaskIncome){ //不合格描述 unqualified.setRemark(qcCheckTaskIncome.getRemark()); - if("produce".equals(qcCheckTaskIncome.getTypeCode())){ + if("produce".equals(qcCheckTaskIncome.getTypeCode())||"product".equals(qcCheckTaskIncome.getTypeCode())){ unqualified.setTypeCode(qcCheckTaskIncome.getTypeCode()); unqualified.setSfgyswt(qcCheckTaskIncome.getSfgyswt()); unqualified.setUser(qcCheckTaskIncome.getPgzg());//qcCheckTaskIncome.getUpdateBy(); diff --git a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckUnqualifiedServiceImpl.java b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckUnqualifiedServiceImpl.java index 12c314bb..7c4b3148 100644 --- a/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckUnqualifiedServiceImpl.java +++ b/op-modules/op-quality/src/main/java/com/op/quality/service/impl/QcCheckUnqualifiedServiceImpl.java @@ -100,13 +100,14 @@ public class QcCheckUnqualifiedServiceImpl implements IQcCheckUnqualifiedService if("material".equals(taskIfo.getTypeCode())) { //ZL0010-来料检验不合格控制流程 oaR = this.createLLOA(taskIfo); - }else if("produce".equals(taskIfo.getTypeCode())){ + }else if("produce".equals(taskIfo.getTypeCode())||"product".equals(taskIfo.getTypeCode())){ //ZL0030-品质异常流程 oaR = this.createProduceOA(taskIfo); - }else if("product".equals(taskIfo.getTypeCode())) { - //ZL0020-成品检验控制流程 - oaR = this.createProductOA(taskIfo); } +// else if("product".equals(taskIfo.getTypeCode())) { +// //ZL0020-成品检验控制流程 +// oaR = this.createProductOA(taskIfo); +// } if(oaR!=null ){ if((oaR.get("code").toString()).equals("200")){ /**qc_check_unqualified**/ @@ -358,8 +359,10 @@ public class QcCheckUnqualifiedServiceImpl implements IQcCheckUnqualifiedService mainObject.append(",\"PZYCMS\":"+"\""+detailInfo.getRemark()+"\"");//品质异常描述 mainObject.append(",\"Notes\":"+"\"\"");//测试备注 mainObject.append(",\"SFXYZG\":"+"\""+task.getSfxyzg()+"\"");//*是否需要主管审核 1否 0是 - mainObject.append(",\"PGZG\":"+"\""+task.getPgzg()+"\"");//QC主管:SFXYZG字段为"是",则此项选择QC主管信息 - mainObject.append(",\"PGZR\":"+"\""+task.getPgzr()+"\"");//质量主管 660:朱继新 + if("0".equals(task.getSfxyzg())){ + mainObject.append(",\"PGZG\":"+"\""+task.getPgzg()+"\"");//QC主管:SFXYZG字段为"是",则此项选择QC主管信息 + mainObject.append(",\"PGZR\":"+"\""+task.getPgzr()+"\"");//质量主管 660:朱继新 + } mainObject.append(",\"SFGYSWT\":"+"\""+task.getSfgyswt()+"\"");//*是否供应商问题 1非供应商问题 0是供应商问题 mainObject.append("}"); 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 57a272af..e95c6832 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 @@ -319,7 +319,7 @@ from base_product bp 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 bp.del_flag = '0' and qmg.del_flag = '0' order by qmg.create_time desc select storage_id, wh_code, region_code, wa_code, storage_type, wl_code, material_code, material_desc, amount, storage_amount, occupy_amount, lpn, product_batch, receive_date, product_date, user_defined1, user_defined2, user_defined3, user_defined4, user_defined5, user_defined6, user_defined7, user_defined8, user_defined9, user_defined10, create_by, gmt_create, last_modified_by, gmt_modified, active_flag, factory_code, sap_factory_code, wl_name from wms_ods_mate_storage_news - where wh_code=#{whCode} and wl_code=#{wlCode} and material_code=#{materialCode} + where wh_code=#{whCode} and wl_code=#{wlCode} and wa_code=#{waCode} and material_code=#{materialCode} + SELECT + mes_report_work.report_code work_order, + pro_order_workorder.workorder_code_sap product_order, + mes_report_work.product_code, + mes_report_work.product_name, + mes_report_work.unit unit_of_measure, + mes_report_work.batch batch_number, + mes_report_work.quantity plan_quantity, + ( mes_report_work.quantity- put.put_quantity ) attr3 + FROM + pro_order_workorder + LEFT JOIN mes_report_work ON pro_order_workorder.workorder_code = mes_report_work.workorder_code + LEFT JOIN ( + SELECT SUM + ( wms_product_put.put_quantity ) AS put_quantity, + wms_product_put.work_order AS work_order, + wms_product_put.product_code AS product_code + FROM + wms_product_put + GROUP BY + wms_product_put.work_order, + wms_product_put.product_code + ) put ON put.work_order= mes_report_work.report_code + AND put.product_code= pro_order_workorder.workorder_code_sap + WHERE + pro_order_workorder.workorder_code_sap=#{attribute1} + AND mes_report_work.batch=#{attribute2} + AND mes_report_work.parent_order = '0' + diff --git a/op-modules/op-wms/src/main/resources/mapper/wms/WmsRawOrderInSnMapper.xml b/op-modules/op-wms/src/main/resources/mapper/wms/WmsRawOrderInSnMapper.xml index 4c63f514..b63ddacc 100644 --- a/op-modules/op-wms/src/main/resources/mapper/wms/WmsRawOrderInSnMapper.xml +++ b/op-modules/op-wms/src/main/resources/mapper/wms/WmsRawOrderInSnMapper.xml @@ -200,37 +200,51 @@ set user_defined1 = '2' where raw_order_in_sn_id=#{rawOrderInSnId} + AND user_defined1 = '1' + AND active_flag = '1' + insert into wms_logotype_table( id, logotype, sn, - activeFlag + active_flag ) values (