辅助排产部分

master
zhaoxiaolin 7 months ago
parent ef6c50041f
commit a4d46f6c84

@ -28,6 +28,7 @@ public class BoardDTO {
private String productName; private String productName;
private String productCode; private String productCode;
private String workorderCodeSap; private String workorderCodeSap;
private String workorderCode;
private String unit; private String unit;
private String taskSampleNum; private String taskSampleNum;
private String taskNum; private String taskNum;
@ -41,6 +42,14 @@ public class BoardDTO {
private BigDecimal standarXl;//标准效率 private BigDecimal standarXl;//标准效率
private BigDecimal actXl;//实际效率 private BigDecimal actXl;//实际效率
public String getWorkorderCode() {
return workorderCode;
}
public void setWorkorderCode(String workorderCode) {
this.workorderCode = workorderCode;
}
public BigDecimal getStandarMan() { public BigDecimal getStandarMan() {
return standarMan; return standarMan;
} }

@ -71,7 +71,7 @@ public class MesReportWorkController extends BaseController {
*/ */
@RequiresPermissions("mes:reportWork:list") @RequiresPermissions("mes:reportWork:list")
@GetMapping("/list") @GetMapping("/list")
@Log(title = "报工报表", businessType = BusinessType.EXPORT) @Log(title = "报工记录", businessType = BusinessType.QUERY)
public TableDataInfo list(MesReportWork mesReportWork) { public TableDataInfo list(MesReportWork mesReportWork) {
startPage(); startPage();
// //默认时间范围T 00:00:00~T+1 00:00:00 // //默认时间范围T 00:00:00~T+1 00:00:00

@ -109,6 +109,7 @@ public class MesBoradServiceImpl implements IMesBoradService {
//当前工单信息 //当前工单信息
BoardDTO workOrder = mesMapper.getWorkOrder(boardDTO); BoardDTO workOrder = mesMapper.getWorkOrder(boardDTO);
boardDTO.setWorkorderCode(workOrder.getWorkorderCode());
MesLine meslineInfo = mesMapper.getMesLineInfo(boardDTO); MesLine meslineInfo = mesMapper.getMesLineInfo(boardDTO);
if(meslineInfo != null){ if(meslineInfo != null){
workOrder.setStandarMan(meslineInfo.getStandarMan()); workOrder.setStandarMan(meslineInfo.getStandarMan());

@ -332,6 +332,7 @@
pow.product_code productCode, pow.product_code productCode,
pow.product_name productName, pow.product_name productName,
pow.workorder_code_sap workorderCodeSap, pow.workorder_code_sap workorderCodeSap,
pow.workorder_code workorderCode,
pow.quantity_split totalNum, pow.quantity_split totalNum,
pow.unit pow.unit
from pro_order_workorder pow from pro_order_workorder pow
@ -457,7 +458,9 @@
ROUND( mr2.quantity_feedback/mr.work_time,2) AS actXl ROUND( mr2.quantity_feedback/mr.work_time,2) AS actXl
from ( from (
select top 1 use_man,work_time,machine_code,report_code,product_code 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 ) mr
left join mes_report_work mr2 on mr2.report_code = mr.report_code and mr2.parent_order ='0' 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 left join mes_line_product mlp on mlp.line_code = mr.machine_code and mr2.product_code = mlp.product_code

@ -329,4 +329,9 @@ public class ProOrderController extends BaseController {
dynamicRoutingDataSource.removeDataSource(dataSourceProperty.getPoolName()); dynamicRoutingDataSource.removeDataSource(dataSourceProperty.getPoolName());
return R.ok(); return R.ok();
} }
@GetMapping("/getCanProductLine")
public List<ProOrder> getCanProductLine() {
return proOrderService.getCanProductLine();
}
} }

@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletResponse;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.op.common.core.exception.ServiceException; import com.op.common.core.exception.ServiceException;
import com.op.plan.domain.ProLine;
import com.op.plan.domain.ProOrder; import com.op.plan.domain.ProOrder;
import com.op.plan.domain.ProOrderWorkorderBatch; import com.op.plan.domain.ProOrderWorkorderBatch;
import com.op.plan.domain.dto.SplitOrderDTO; import com.op.plan.domain.dto.SplitOrderDTO;
@ -302,4 +303,9 @@ public class ProOrderWorkorderController extends BaseController {
newBatch.setWorkorderCode(workorderCode); newBatch.setWorkorderCode(workorderCode);
return toAjax(proOrderWorkorderService.deleteWorkOrderBatch(newBatch)); return toAjax(proOrderWorkorderService.deleteWorkOrderBatch(newBatch));
} }
@GetMapping("/getProdLineList")
public List<ProLine> getProdLineList() {
return proOrderWorkorderService.getProdLineList();
}
} }

@ -4,6 +4,24 @@ package com.op.plan.domain;
public class ProLine { public class ProLine {
private String key; private String key;
private String label; 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 @Override
public String toString() { public String toString() {

@ -63,6 +63,24 @@ public class ProOrder extends TreeEntity {
private String bomBo; private String bomBo;
private String syncUser; private String syncUser;
private String productDate; 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() { public String getProductDate() {
return productDate; return productDate;

@ -236,4 +236,6 @@ public interface ProOrderMapper {
void addSapLog(SysSapLog sysSapLog); void addSapLog(SysSapLog sysSapLog);
int updateCloseOrderBatchById(@Param("orderIds")String[] orderIds); int updateCloseOrderBatchById(@Param("orderIds")String[] orderIds);
List<ProOrder> getCanProductLine();
} }

@ -1,6 +1,7 @@
package com.op.plan.mapper; package com.op.plan.mapper;
import com.op.plan.domain.Batch; import com.op.plan.domain.Batch;
import com.op.plan.domain.ProLine;
import com.op.plan.domain.ProOrderWorkorderBatch; import com.op.plan.domain.ProOrderWorkorderBatch;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -86,4 +87,6 @@ public interface ProOrderWorkorderBatchMapper {
int deleteWorkOrderBatch(@Param("batchCode") String batchCode,@Param("workOrderIds") String[] workOrderIds); int deleteWorkOrderBatch(@Param("batchCode") String batchCode,@Param("workOrderIds") String[] workOrderIds);
List<String> checkBatchCodeByWorkOrderIds(@Param("workorderIds")String[] workorderIds,@Param("newbatchs") List<String> newbatchs); List<String> checkBatchCodeByWorkOrderIds(@Param("workorderIds")String[] workorderIds,@Param("newbatchs") List<String> newbatchs);
List<ProLine> getProdLineList();
} }

@ -145,4 +145,6 @@ public interface IProOrderService {
int deleteOrder(String[] orderCodes); int deleteOrder(String[] orderCodes);
String checkRepeatBatchCodes(SplitOrderDTO splitOrderDTO); String checkRepeatBatchCodes(SplitOrderDTO splitOrderDTO);
List<ProOrder> getCanProductLine();
} }

@ -2,6 +2,7 @@ package com.op.plan.service;
import com.op.common.core.web.domain.AjaxResult; 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.ProOrderWorkorder;
import com.op.plan.domain.ProOrderWorkorderBatch; import com.op.plan.domain.ProOrderWorkorderBatch;
import com.op.plan.domain.dto.SplitOrderDTO; import com.op.plan.domain.dto.SplitOrderDTO;
@ -147,4 +148,5 @@ public interface IProOrderWorkorderService {
int updateWorkOrderBatch(ProOrderWorkorderBatch proOrderWorkorderBatch); int updateWorkOrderBatch(ProOrderWorkorderBatch proOrderWorkorderBatch);
int deleteWorkOrderBatch(ProOrderWorkorderBatch proOrderWorkorderBatch); int deleteWorkOrderBatch(ProOrderWorkorderBatch proOrderWorkorderBatch);
List<ProLine> getProdLineList();
} }

@ -1218,6 +1218,12 @@ public class ProOrderServiceImpl implements IProOrderService {
return ""; return "";
} }
@Override
@DS("#header.poolName")
public List<ProOrder> getCanProductLine() {
return proOrderMapper.getCanProductLine();
}
public static void main(String args[]){ public static void main(String args[]){
String arrayStr = "[[\"GX01\",\"LG1\"],[\"GX01\",\"LG2\"],[\"GX02\",\"S1\"],[\"GX02\",\"S2\"],[\"GX03\",\"HF01\"],[\"GX04\",\"SPJ01\"]]"; String arrayStr = "[[\"GX01\",\"LG1\"],[\"GX01\",\"LG2\"],[\"GX02\",\"S1\"],[\"GX02\",\"S2\"],[\"GX03\",\"HF01\"],[\"GX04\",\"SPJ01\"]]";
JSONArray jsonArray = JSONArray.parseArray(arrayStr); JSONArray jsonArray = JSONArray.parseArray(arrayStr);

@ -1250,6 +1250,11 @@ public class ProOrderWorkorderServiceImpl implements IProOrderWorkorderService {
return proOrderWorkorderBatchMapper.deleteWorkOrderBatch(batchCode,workOrderIds); return proOrderWorkorderBatchMapper.deleteWorkOrderBatch(batchCode,workOrderIds);
} }
@Override
@DS("#header.poolName")
public List<ProLine> getProdLineList() {
return proOrderWorkorderBatchMapper.getProdLineList();
}
/** /**

@ -200,6 +200,13 @@
<select id="selectOrderIdByParentOrder" resultType="java.lang.String"> <select id="selectOrderIdByParentOrder" resultType="java.lang.String">
select id from pro_order where parent_order = ( select order_code from pro_order where id = #{id} ) and del_flag = '0' select id from pro_order where parent_order = ( select order_code from pro_order where id = #{id} ) and del_flag = '0'
</select> </select>
<select id="getCanProductLine" resultType="com.op.plan.domain.ProOrder">
select equ.equipment_code lineCode,
equ.equipment_name lineName
from base_equipment equ
where equ.equipment_type_code = 'equ_type_bzx'
and equ.del_flag = '0' and equ.equipment_status = '1'
</select>
<insert id="insertProOrder" parameterType="ProOrder"> <insert id="insertProOrder" parameterType="ProOrder">
insert into pro_order insert into pro_order

@ -81,6 +81,10 @@
#{batchcode} #{batchcode}
</foreach> </foreach>
</select> </select>
<select id="getProdLineList" resultType="com.op.plan.domain.ProLine">
select equipment_code lineCode,equipment_name lineName from base_equipment
where del_flag = '0' and equipment_type_code = 'equ_type_bzx'
</select>
<insert id="insertProOrderWorkorderBatch" parameterType="ProOrderWorkorderBatch"> <insert id="insertProOrderWorkorderBatch" parameterType="ProOrderWorkorderBatch">
insert into pro_order_workorder_batch insert into pro_order_workorder_batch

Loading…
Cancel
Save