diff --git a/op-api/op-api-system/src/main/java/com/op/system/api/domain/dto/BoardDTO.java b/op-api/op-api-system/src/main/java/com/op/system/api/domain/dto/BoardDTO.java index 4c4891d1..b8601f64 100644 --- a/op-api/op-api-system/src/main/java/com/op/system/api/domain/dto/BoardDTO.java +++ b/op-api/op-api-system/src/main/java/com/op/system/api/domain/dto/BoardDTO.java @@ -28,6 +28,7 @@ public class BoardDTO { private String productName; private String productCode; private String workorderCodeSap; + private String workorderCode; private String unit; private String taskSampleNum; private String taskNum; @@ -41,6 +42,14 @@ public class BoardDTO { private BigDecimal standarXl;//标准效率 private BigDecimal actXl;//实际效率 + public String getWorkorderCode() { + return workorderCode; + } + + public void setWorkorderCode(String workorderCode) { + this.workorderCode = workorderCode; + } + public BigDecimal getStandarMan() { return standarMan; } diff --git a/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorkController.java b/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorkController.java index eb501f4d..278cde94 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorkController.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/controller/MesReportWorkController.java @@ -71,7 +71,7 @@ public class MesReportWorkController extends BaseController { */ @RequiresPermissions("mes:reportWork:list") @GetMapping("/list") - @Log(title = "报工报表", businessType = BusinessType.EXPORT) + @Log(title = "报工记录", businessType = BusinessType.QUERY) public TableDataInfo list(MesReportWork mesReportWork) { startPage(); // //默认时间范围T 00:00:00~T+1 00:00:00 diff --git a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesBoradServiceImpl.java b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesBoradServiceImpl.java index 308e1054..2cd2f122 100644 --- a/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesBoradServiceImpl.java +++ b/op-modules/op-mes/src/main/java/com/op/mes/service/impl/MesBoradServiceImpl.java @@ -109,6 +109,7 @@ public class MesBoradServiceImpl implements IMesBoradService { //当前工单信息 BoardDTO workOrder = mesMapper.getWorkOrder(boardDTO); + boardDTO.setWorkorderCode(workOrder.getWorkorderCode()); MesLine meslineInfo = mesMapper.getMesLineInfo(boardDTO); if(meslineInfo != null){ workOrder.setStandarMan(meslineInfo.getStandarMan()); diff --git a/op-modules/op-mes/src/main/resources/mapper/mes/MesMapper.xml b/op-modules/op-mes/src/main/resources/mapper/mes/MesMapper.xml index 136eab91..ad7ccf38 100644 --- a/op-modules/op-mes/src/main/resources/mapper/mes/MesMapper.xml +++ b/op-modules/op-mes/src/main/resources/mapper/mes/MesMapper.xml @@ -332,6 +332,7 @@ pow.product_code productCode, pow.product_name productName, pow.workorder_code_sap workorderCodeSap, + pow.workorder_code workorderCode, pow.quantity_split totalNum, pow.unit from pro_order_workorder pow @@ -457,7 +458,9 @@ ROUND( mr2.quantity_feedback/mr.work_time,2) AS actXl from ( select top 1 use_man,work_time,machine_code,report_code,product_code - from mes_report_work where del_flag = '0' and machine_code = #{equCode} and parent_order !='0' order by create_time desc + from mes_report_work where del_flag = '0' and machine_code = #{equCode} + and workorder_code = #{workorderCode} + and parent_order !='0' order by create_time desc ) mr left join mes_report_work mr2 on mr2.report_code = mr.report_code and mr2.parent_order ='0' left join mes_line_product mlp on mlp.line_code = mr.machine_code and mr2.product_code = mlp.product_code diff --git a/op-modules/op-plan/src/main/java/com/op/plan/controller/ProOrderController.java b/op-modules/op-plan/src/main/java/com/op/plan/controller/ProOrderController.java index e3242b79..07f1497b 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/controller/ProOrderController.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/controller/ProOrderController.java @@ -329,4 +329,9 @@ public class ProOrderController extends BaseController { dynamicRoutingDataSource.removeDataSource(dataSourceProperty.getPoolName()); return R.ok(); } + + @GetMapping("/getCanProductLine") + public List getCanProductLine() { + return proOrderService.getCanProductLine(); + } } diff --git a/op-modules/op-plan/src/main/java/com/op/plan/controller/ProOrderWorkorderController.java b/op-modules/op-plan/src/main/java/com/op/plan/controller/ProOrderWorkorderController.java index d2cfc77a..a92b54b0 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/controller/ProOrderWorkorderController.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/controller/ProOrderWorkorderController.java @@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletResponse; import com.alibaba.fastjson2.JSONObject; import com.op.common.core.exception.ServiceException; +import com.op.plan.domain.ProLine; import com.op.plan.domain.ProOrder; import com.op.plan.domain.ProOrderWorkorderBatch; import com.op.plan.domain.dto.SplitOrderDTO; @@ -302,4 +303,9 @@ public class ProOrderWorkorderController extends BaseController { newBatch.setWorkorderCode(workorderCode); return toAjax(proOrderWorkorderService.deleteWorkOrderBatch(newBatch)); } + + @GetMapping("/getProdLineList") + public List getProdLineList() { + return proOrderWorkorderService.getProdLineList(); + } } diff --git a/op-modules/op-plan/src/main/java/com/op/plan/domain/ProLine.java b/op-modules/op-plan/src/main/java/com/op/plan/domain/ProLine.java index 08416a08..7fc9202e 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/domain/ProLine.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/domain/ProLine.java @@ -4,6 +4,24 @@ package com.op.plan.domain; public class ProLine { private String key; private String label; + private String lineCode; + private String lineName; + + public String getLineCode() { + return lineCode; + } + + public void setLineCode(String lineCode) { + this.lineCode = lineCode; + } + + public String getLineName() { + return lineName; + } + + public void setLineName(String lineName) { + this.lineName = lineName; + } @Override public String toString() { diff --git a/op-modules/op-plan/src/main/java/com/op/plan/domain/ProOrder.java b/op-modules/op-plan/src/main/java/com/op/plan/domain/ProOrder.java index 665cfc57..60860c6e 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/domain/ProOrder.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/domain/ProOrder.java @@ -63,6 +63,24 @@ public class ProOrder extends TreeEntity { private String bomBo; private String syncUser; private String productDate; + private String lineCode; + private String lineName; + + public String getLineCode() { + return lineCode; + } + + public void setLineCode(String lineCode) { + this.lineCode = lineCode; + } + + public String getLineName() { + return lineName; + } + + public void setLineName(String lineName) { + this.lineName = lineName; + } public String getProductDate() { return productDate; diff --git a/op-modules/op-plan/src/main/java/com/op/plan/mapper/ProOrderMapper.java b/op-modules/op-plan/src/main/java/com/op/plan/mapper/ProOrderMapper.java index aff63cb2..dcf31723 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/mapper/ProOrderMapper.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/mapper/ProOrderMapper.java @@ -236,4 +236,6 @@ public interface ProOrderMapper { void addSapLog(SysSapLog sysSapLog); int updateCloseOrderBatchById(@Param("orderIds")String[] orderIds); + + List getCanProductLine(); } diff --git a/op-modules/op-plan/src/main/java/com/op/plan/mapper/ProOrderWorkorderBatchMapper.java b/op-modules/op-plan/src/main/java/com/op/plan/mapper/ProOrderWorkorderBatchMapper.java index 7ba8bec1..a7d4e35e 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/mapper/ProOrderWorkorderBatchMapper.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/mapper/ProOrderWorkorderBatchMapper.java @@ -1,6 +1,7 @@ package com.op.plan.mapper; import com.op.plan.domain.Batch; +import com.op.plan.domain.ProLine; import com.op.plan.domain.ProOrderWorkorderBatch; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; @@ -86,4 +87,6 @@ public interface ProOrderWorkorderBatchMapper { int deleteWorkOrderBatch(@Param("batchCode") String batchCode,@Param("workOrderIds") String[] workOrderIds); List checkBatchCodeByWorkOrderIds(@Param("workorderIds")String[] workorderIds,@Param("newbatchs") List newbatchs); + + List getProdLineList(); } diff --git a/op-modules/op-plan/src/main/java/com/op/plan/service/IProOrderService.java b/op-modules/op-plan/src/main/java/com/op/plan/service/IProOrderService.java index 6b209060..c3914056 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/service/IProOrderService.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/service/IProOrderService.java @@ -145,4 +145,6 @@ public interface IProOrderService { int deleteOrder(String[] orderCodes); String checkRepeatBatchCodes(SplitOrderDTO splitOrderDTO); + + List getCanProductLine(); } diff --git a/op-modules/op-plan/src/main/java/com/op/plan/service/IProOrderWorkorderService.java b/op-modules/op-plan/src/main/java/com/op/plan/service/IProOrderWorkorderService.java index 9706cbd2..b0ffd663 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/service/IProOrderWorkorderService.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/service/IProOrderWorkorderService.java @@ -2,6 +2,7 @@ package com.op.plan.service; import com.op.common.core.web.domain.AjaxResult; +import com.op.plan.domain.ProLine; import com.op.plan.domain.ProOrderWorkorder; import com.op.plan.domain.ProOrderWorkorderBatch; import com.op.plan.domain.dto.SplitOrderDTO; @@ -147,4 +148,5 @@ public interface IProOrderWorkorderService { int updateWorkOrderBatch(ProOrderWorkorderBatch proOrderWorkorderBatch); int deleteWorkOrderBatch(ProOrderWorkorderBatch proOrderWorkorderBatch); + List getProdLineList(); } diff --git a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderServiceImpl.java b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderServiceImpl.java index d56438a4..0e1d617b 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderServiceImpl.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderServiceImpl.java @@ -1218,6 +1218,12 @@ public class ProOrderServiceImpl implements IProOrderService { return ""; } + @Override + @DS("#header.poolName") + public List getCanProductLine() { + return proOrderMapper.getCanProductLine(); + } + public static void main(String args[]){ String arrayStr = "[[\"GX01\",\"LG1\"],[\"GX01\",\"LG2\"],[\"GX02\",\"S1\"],[\"GX02\",\"S2\"],[\"GX03\",\"HF01\"],[\"GX04\",\"SPJ01\"]]"; JSONArray jsonArray = JSONArray.parseArray(arrayStr); diff --git a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java index ea5603e6..4db8261f 100644 --- a/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java +++ b/op-modules/op-plan/src/main/java/com/op/plan/service/impl/ProOrderWorkorderServiceImpl.java @@ -1250,6 +1250,11 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService { return proOrderWorkorderBatchMapper.deleteWorkOrderBatch(batchCode,workOrderIds); } + @Override + @DS("#header.poolName") + public List getProdLineList() { + return proOrderWorkorderBatchMapper.getProdLineList(); + } /** diff --git a/op-modules/op-plan/src/main/resources/mapper/plan/ProOrderMapper.xml b/op-modules/op-plan/src/main/resources/mapper/plan/ProOrderMapper.xml index 37b06efd..30927d5c 100644 --- a/op-modules/op-plan/src/main/resources/mapper/plan/ProOrderMapper.xml +++ b/op-modules/op-plan/src/main/resources/mapper/plan/ProOrderMapper.xml @@ -200,6 +200,13 @@ + insert into pro_order diff --git a/op-modules/op-plan/src/main/resources/mapper/plan/ProOrderWorkorderBatchMapper.xml b/op-modules/op-plan/src/main/resources/mapper/plan/ProOrderWorkorderBatchMapper.xml index 20116602..1348714f 100644 --- a/op-modules/op-plan/src/main/resources/mapper/plan/ProOrderWorkorderBatchMapper.xml +++ b/op-modules/op-plan/src/main/resources/mapper/plan/ProOrderWorkorderBatchMapper.xml @@ -81,6 +81,10 @@ #{batchcode} + insert into pro_order_workorder_batch