fix:防止重复下卷导致的气胀轴编码变化

This commit is contained in:
zhouz
2026-05-28 09:31:43 +08:00
parent 4e8bea3577
commit e609e86eaa
5 changed files with 226 additions and 63 deletions

View File

@@ -2,6 +2,7 @@ package org.nl.b_lms.bst.ivt.stockingivt.service.impl;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import org.nl.b_lms.sch.tasks.slitter.util.MdmDescriptionParseUtils;
import org.nl.common.utils.IdUtil; import org.nl.common.utils.IdUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
@@ -158,8 +159,12 @@ public class BstIvtStockingivtServiceImpl extends ServiceImpl<BstIvtStockingivtM
// for (String cleanedLine : cleanedLines) { // for (String cleanedLine : cleanedLines) {
// System.out.println(cleanedLine); // System.out.println(cleanedLine);
// } // }
String material_name = "玻璃纤维及其制品|FRP管|6英寸|15-20|1100|阶梯"; // String material_name = "玻璃纤维及其制品|FRP管|6英寸|15-20|1100|阶梯";
String[] tubeArray = material_name.replaceAll("\\|[\\u4e00-\\u9fa5]+$", "").split("\\|"); // String[] tubeArray = material_name.replaceAll("\\|[\\u4e00-\\u9fa5]+$", "").split("\\|");
String material_name = "平包树脂管\\3.12''\\1380mm*15mm\\";
String[] tubeArray = MdmDescriptionParseUtils.extractPaperTubeSpecs(material_name);
System.out.println(tubeArray[0]);
System.out.println(tubeArray); System.out.println(tubeArray);
} }
@@ -207,10 +212,12 @@ public class BstIvtStockingivtServiceImpl extends ServiceImpl<BstIvtStockingivtM
//获取当前纸管的高度 //获取当前纸管的高度
// 解析描述数组 // 解析描述数组
String[] tubeArray = material_name.replaceAll("\\|[\\u4e00-\\u9fa5]+$", "").split("\\|");
int currLength = Integer.parseInt(tubeArray[tubeArray.length - 1]);
// String[] tubeArray = material_name.replaceAll("\\|[\\u4e00-\\u9fa5]+$", "").split("\\|");
// int currLength = Integer.parseInt(tubeArray[tubeArray.length - 1]);
// todo 88549333 2026年5月19日19:55:53 这个地方获取纸管高度会不会有FRP 管相关操作 需要进一步确认,因为两个类型的物料描述差异导致获取高度的方法不一致
String[] tubeArray = MdmDescriptionParseUtils.extractPaperTubeSpecs(material_name);
int currLength = Integer.parseInt(tubeArray[0]);
//校验高度差要大于50MM否则不允许进行绑定 //校验高度差要大于50MM否则不允许进行绑定
int num = Integer.parseInt(row_num); int num = Integer.parseInt(row_num);
if (num == 1) { if (num == 1) {
@@ -221,8 +228,11 @@ public class BstIvtStockingivtServiceImpl extends ServiceImpl<BstIvtStockingivtM
if (ObjectUtil.isNotEmpty(nextPaper)) { if (ObjectUtil.isNotEmpty(nextPaper)) {
//获取第二排的纸管高度和纸管类型 //获取第二排的纸管高度和纸管类型
String nextMaterialName = nextPaper.getMaterial_name(); String nextMaterialName = nextPaper.getMaterial_name();
String[] nextArray = nextMaterialName.replaceAll("\\|[\\u4e00-\\u9fa5]+$", "").split("\\|"); // String[] nextArray = nextMaterialName.replaceAll("\\|[\\u4e00-\\u9fa5]+$", "").split("\\|");
int nextLength = Integer.parseInt(nextArray[nextArray.length - 1]); // int nextLength = Integer.parseInt(nextArray[nextArray.length - 1]);
// todo 88549333 2026年5月19日19:55:53 这个地方获取纸管高度会不会有FRP 管相关操作 需要进一步确认,因为两个类型的物料描述差异导致获取高度的方法不一致
String[] nextArray = MdmDescriptionParseUtils.extractPaperTubeSpecs(nextMaterialName);
int nextLength = Integer.parseInt(nextArray[0]);
if (Math.abs(nextLength - currLength) <= 50 && !material_code.equals(nextPaper.getMaterial_code())) { if (Math.abs(nextLength - currLength) <= 50 && !material_code.equals(nextPaper.getMaterial_code())) {
throw new BadRequestException("相邻排的纸管高度差要大于等于50MM"); throw new BadRequestException("相邻排的纸管高度差要大于等于50MM");
} }
@@ -235,8 +245,11 @@ public class BstIvtStockingivtServiceImpl extends ServiceImpl<BstIvtStockingivtM
if (ObjectUtil.isNotEmpty(nextPaper)) { if (ObjectUtil.isNotEmpty(nextPaper)) {
//获取后一排的纸管高度和纸管类型 //获取后一排的纸管高度和纸管类型
String nextMaterialName = nextPaper.getMaterial_name(); String nextMaterialName = nextPaper.getMaterial_name();
String[] nextArray = nextMaterialName.replaceAll("\\|[\\u4e00-\\u9fa5]+$", "").split("\\|"); // String[] nextArray = nextMaterialName.replaceAll("\\|[\\u4e00-\\u9fa5]+$", "").split("\\|");
int nextLength = Integer.parseInt(nextArray[nextArray.length - 1]); // int nextLength = Integer.parseInt(nextArray[nextArray.length - 1]);
// todo 88549333 2026年5月19日19:55:53 这个地方获取纸管高度会不会有FRP 管相关操作 需要进一步确认,因为两个类型的物料描述差异导致获取高度的方法不一致
String[] nextArray = MdmDescriptionParseUtils.extractPaperTubeSpecs(nextMaterialName);
int nextLength = Integer.parseInt(nextArray[0]);
if (Math.abs(nextLength - currLength) <= 50 && !material_code.equals(nextPaper.getMaterial_code())) { if (Math.abs(nextLength - currLength) <= 50 && !material_code.equals(nextPaper.getMaterial_code())) {
throw new BadRequestException("相邻排的纸管高度差要大于等于50MM"); throw new BadRequestException("相邻排的纸管高度差要大于等于50MM");
} }
@@ -249,8 +262,11 @@ public class BstIvtStockingivtServiceImpl extends ServiceImpl<BstIvtStockingivtM
if (ObjectUtil.isNotEmpty(prePaper)) { if (ObjectUtil.isNotEmpty(prePaper)) {
//获取后一排的纸管高度和纸管类型 //获取后一排的纸管高度和纸管类型
String preMaterialName = prePaper.getMaterial_name(); String preMaterialName = prePaper.getMaterial_name();
String[] preArray = preMaterialName.replaceAll("\\|[\\u4e00-\\u9fa5]+$", "").split("\\|"); // String[] preArray = preMaterialName.replaceAll("\\|[\\u4e00-\\u9fa5]+$", "").split("\\|");
int preLength = Integer.parseInt(preArray[preArray.length - 1]); // int preLength = Integer.parseInt(preArray[preArray.length - 1]);
// todo 88549333 2026年5月19日19:55:53 这个地方获取纸管高度会不会有FRP 管相关操作 需要进一步确认,因为两个类型的物料描述差异导致获取高度的方法不一致
String[] preArray = MdmDescriptionParseUtils.extractPaperTubeSpecs(preMaterialName);
int preLength = Integer.parseInt(preArray[0]);
if (Math.abs(preLength - currLength) <= 50 && !material_code.equals(prePaper.getMaterial_code())) { if (Math.abs(preLength - currLength) <= 50 && !material_code.equals(prePaper.getMaterial_code())) {
throw new BadRequestException("相邻排的纸管高度差要大于等于50MM"); throw new BadRequestException("相邻排的纸管高度差要大于等于50MM");
} }

View File

@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.nl.modules.logging.annotation.ApiLog;
import org.nl.modules.logging.annotation.Log; import org.nl.modules.logging.annotation.Log;
import org.nl.wms.ext.mes.service.MesToLmsService; import org.nl.wms.ext.mes.service.MesToLmsService;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
@@ -23,177 +24,302 @@ public class MesToLmsController {
private final MesToLmsService mesToLmsService; private final MesToLmsService mesToLmsService;
@PostMapping("/momRollFoilStart") @PostMapping("/momRollFoilStart")
@Log("母卷批次创建信息发送智能物流MES生箔工序Move In") // @Log("母卷批次创建信息发送智能物流MES生箔工序Move In")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/momRollFoilStart",
bizDesc = "母卷批次创建信息发送智能物流MES生箔工序Move In",
systemFlag = "mes"
)
public ResponseEntity<Object> momRollFoilStart(@RequestBody JSONObject jo) { public ResponseEntity<Object> momRollFoilStart(@RequestBody JSONObject jo) {
return new ResponseEntity<>(mesToLmsService.momRollFoilStart(jo), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.momRollFoilStart(jo), HttpStatus.OK);
} }
@PostMapping("momRollFoilWeighing") @PostMapping("momRollFoilWeighing")
@Log("MES获取AGV称重信息") // @Log("MES获取AGV称重信息")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/momRollFoilWeighing",
bizDesc = "MES获取AGV称重信息",
systemFlag = "mes"
)
public ResponseEntity<Object> momRollFoilWeighing(@RequestBody JSONObject jo) { public ResponseEntity<Object> momRollFoilWeighing(@RequestBody JSONObject jo) {
return new ResponseEntity<>(mesToLmsService.momRollFoilWeighing(jo), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.momRollFoilWeighing(jo), HttpStatus.OK);
} }
@PostMapping("/momRollFoilComplete") @PostMapping("/momRollFoilComplete")
@Log("MES执行下卷动作告诉LMS") // @Log("MES执行下卷动作告诉LMS")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/momRollFoilComplete",
bizDesc = "MES执行下卷动作告诉LMS",
systemFlag = "mes"
)
public ResponseEntity<Object> momRollFoilComplete(@RequestBody JSONObject jo) { public ResponseEntity<Object> momRollFoilComplete(@RequestBody JSONObject jo) {
return new ResponseEntity<>(mesToLmsService.momRollFoilComplete(jo), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.momRollFoilComplete(jo), HttpStatus.OK);
} }
@PostMapping("/momRollBakeNextSpecTransfer") @PostMapping("/momRollBakeNextSpecTransfer")
@Log("MES下达烘箱温度和时间配方给智能物流(MES 包装防护工序Move Out)") // @Log("MES下达烘箱温度和时间配方给智能物流(MES 包装防护工序Move Out)")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/momRollBakeNextSpecTransfer",
bizDesc = "MES下达烘箱温度和时间配方给智能物流(MES 包装防护工序Move Out)",
systemFlag = "mes"
)
public ResponseEntity<Object> momRollBakeNextSpecTransfer(@RequestBody JSONObject jo) { public ResponseEntity<Object> momRollBakeNextSpecTransfer(@RequestBody JSONObject jo) {
return new ResponseEntity<>(mesToLmsService.momRollBakeNextSpecTransfer(jo), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.momRollBakeNextSpecTransfer(jo), HttpStatus.OK);
} }
@PostMapping("/cutPlanTransfer") @PostMapping("/cutPlanTransfer")
@Log("分切包装段:分切计划(单表,包含母卷/改制子卷-包装箱号、空包装箱物料、纸筒/FRP管MES下发智能物流") // @Log("分切包装段:分切计划(单表,包含母卷/改制子卷-包装箱号、空包装箱物料、纸筒/FRP管MES下发智能物流")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/cutPlanTransfer",
bizDesc = "分切包装段:分切计划(单表,包含母卷/改制子卷-包装箱号、空包装箱物料、纸筒/FRP管MES下发智能物流",
systemFlag = "mes"
)
public ResponseEntity<Object> cutPlanTransfer(@RequestBody JSONArray ja) { public ResponseEntity<Object> cutPlanTransfer(@RequestBody JSONArray ja) {
return new ResponseEntity<>(mesToLmsService.cutPlanTransfer(ja), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.cutPlanTransfer(ja), HttpStatus.OK);
} }
@PostMapping("/callNextAssAndMomRoll") @PostMapping("/callNextAssAndMomRoll")
@Log("分切即将完成,呼叫配送下一个母卷/改制子卷MES传智能物流") // @Log("分切即将完成,呼叫配送下一个母卷/改制子卷MES传智能物流")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/callNextAssAndMomRoll",
bizDesc = "分切即将完成,呼叫配送下一个母卷/改制子卷MES传智能物流",
systemFlag = "mes"
)
public ResponseEntity<Object> callNextAssAndMomRoll(@RequestBody JSONObject jo) { public ResponseEntity<Object> callNextAssAndMomRoll(@RequestBody JSONObject jo) {
return new ResponseEntity<>(mesToLmsService.callNextAssAndMomRoll(jo), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.callNextAssAndMomRoll(jo), HttpStatus.OK);
} }
@PostMapping("/childRollCutStartComp") @PostMapping("/childRollCutStartComp")
@Log("当母卷开始分切时MES系统会将对应的子卷进站信息发送给只能物流系统一方面物流系统可以预估下个母卷的送达时间也可以闭环期分切计划指令") // @Log("当母卷开始分切时MES系统会将对应的子卷进站信息发送给只能物流系统一方面物流系统可以预估下个母卷的送达时间也可以闭环期分切计划指令")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/childRollCutStartComp",
bizDesc = "当母卷开始分切时MES系统会将对应的子卷进站信息发送给只能物流系统一方面物流系统可以预估下个母卷的送达时间也可以闭环期分切计划指令",
systemFlag = "mes"
)
public ResponseEntity<Object> childRollCutStartComp(@RequestBody JSONArray ja) { public ResponseEntity<Object> childRollCutStartComp(@RequestBody JSONArray ja) {
return new ResponseEntity<>(mesToLmsService.childRollCutStartComp(ja), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.childRollCutStartComp(ja), HttpStatus.OK);
} }
@PostMapping("/childRollPackComplete") @PostMapping("/childRollPackComplete")
@Log("包装完成传智能物流包装箱与子卷关系及子卷属性值LMS执行入库") // @Log("包装完成传智能物流包装箱与子卷关系及子卷属性值LMS执行入库")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/childRollPackComplete",
bizDesc = "包装完成传智能物流包装箱与子卷关系及子卷属性值LMS执行入库",
systemFlag = "mes"
)
public ResponseEntity<Object> childRollPackComplete(@RequestBody JSONObject jo) { public ResponseEntity<Object> childRollPackComplete(@RequestBody JSONObject jo) {
return new ResponseEntity<>(mesToLmsService.childRollPackComplete(jo), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.childRollPackComplete(jo), HttpStatus.OK);
} }
@PostMapping("/inventoryTransferInfoSync") @PostMapping("/inventoryTransferInfoSync")
@Log("转单指令在MES平台查看后更新信息发送LMS是否拆包、更新后的入库日期、是否更换外包装箱标签,LMS重打子卷标签、包装箱外标签") // @Log("转单指令在MES平台查看后更新信息发送LMS是否拆包、更新后的入库日期、是否更换外包装箱标签,LMS重打子卷标签、包装箱外标签")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/inventoryTransferInfoSync",
bizDesc = "转单指令在MES平台查看后更新信息发送LMS是否拆包、更新后的入库日期、是否更换外包装箱标签,LMS重打子卷标签、包装箱外标签",
systemFlag = "mes"
)
public ResponseEntity<Object> inventoryTransferInfoSync(@RequestBody JSONObject jo) { public ResponseEntity<Object> inventoryTransferInfoSync(@RequestBody JSONObject jo) {
return new ResponseEntity<>(mesToLmsService.inventoryTransferInfoSync(jo), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.inventoryTransferInfoSync(jo), HttpStatus.OK);
} }
@PostMapping("/childRollInfoUpdate") @PostMapping("/childRollInfoUpdate")
@Log("子卷信息更新:计划外需求有可能入库完成后ERP才回传计划外需求SalesOrder") // @Log("子卷信息更新:计划外需求有可能入库完成后ERP才回传计划外需求SalesOrder")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/childRollInfoUpdate",
bizDesc = "子卷信息更新:计划外需求有可能入库完成后ERP才回传计划外需求SalesOrder",
systemFlag = "mes"
)
public ResponseEntity<Object> childRollInfoUpdate(@RequestBody JSONObject jo) { public ResponseEntity<Object> childRollInfoUpdate(@RequestBody JSONObject jo) {
return new ResponseEntity<>(mesToLmsService.childRollInfoUpdate(jo), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.childRollInfoUpdate(jo), HttpStatus.OK);
} }
@PostMapping("/cutPlanTransferCancel") @PostMapping("/cutPlanTransferCancel")
@Log("分切计划取消") // @Log("分切计划取消")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/cutPlanTransferCancel",
bizDesc = "分切计划取消",
systemFlag = "mes"
)
public ResponseEntity<Object> cutPlanTransferCancel(@RequestBody JSONObject jo) { public ResponseEntity<Object> cutPlanTransferCancel(@RequestBody JSONObject jo) {
return new ResponseEntity<>(mesToLmsService.cutPlanTransferCancel(jo), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.cutPlanTransferCancel(jo), HttpStatus.OK);
} }
@PostMapping("/sendAuditResult") @PostMapping("/sendAuditResult")
@Log("子卷审批结果") // @Log("子卷报废审批结果回传")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/sendAuditResult",
bizDesc = "子卷报废审批结果回传",
systemFlag = "mes"
)
public ResponseEntity<Object> sendAuditResult(@RequestBody JSONObject jo) { public ResponseEntity<Object> sendAuditResult(@RequestBody JSONObject jo) {
return new ResponseEntity<>(mesToLmsService.sendAuditResult(jo), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.sendAuditResult(jo), HttpStatus.OK);
} }
@PostMapping("/sendProcessInfo") @PostMapping("/sendProcessInfo")
@Log("表处母卷上料、下料接口") // @Log("表处母卷上料、下料接口")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/sendProcessInfo",
bizDesc = "表处母卷上料、下料接口",
systemFlag = "mes"
)
public ResponseEntity<Object> sendProcessInfo(@RequestBody JSONObject jo) { public ResponseEntity<Object> sendProcessInfo(@RequestBody JSONObject jo) {
return new ResponseEntity<>(mesToLmsService.sendProcessInfo(jo), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.sendProcessInfo(jo), HttpStatus.OK);
} }
@PostMapping("/momRollTRStartMock") @PostMapping("/momRollTRStartMock")
@Log("表处工单推送") // @Log("表处工单推送")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/momRollTRStartMock",
bizDesc = "表处工单推送",
systemFlag = "mes"
)
public ResponseEntity<Object> processFoilStart(@RequestBody JSONObject jo) { public ResponseEntity<Object> processFoilStart(@RequestBody JSONObject jo) {
return new ResponseEntity<>(mesToLmsService.processFoilStart(jo), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.processFoilStart(jo), HttpStatus.OK);
} }
@PostMapping("/sendTargetHouse") @PostMapping("/sendTargetHouse")
@Log("MES传递给LMS入线边库或者入成品库") // @Log("MES传递给LMS入线边库或者入成品库")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/sendTargetHouse",
bizDesc = "MES传递给LMS入线边库或者入成品库",
systemFlag = "mes"
)
public ResponseEntity<Object> sendTargetHouse(@RequestBody JSONObject jo) { public ResponseEntity<Object> sendTargetHouse(@RequestBody JSONObject jo) {
return new ResponseEntity<>(mesToLmsService.sendTargetHouse(jo), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.sendTargetHouse(jo), HttpStatus.OK);
} }
@PostMapping("/momSendSplitMfgOrderBOM") @PostMapping("/momSendSplitMfgOrderBOM")
@Log("MES传递LMS订单BOM") // @Log("MES传递LMS订单BOM")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/momSendSplitMfgOrderBOM",
bizDesc = "MES传递LMS订单BOM",
systemFlag = "mes"
)
public ResponseEntity<Object> momSendSplitMfgOrderBOM(@RequestBody JSONObject jo) { public ResponseEntity<Object> momSendSplitMfgOrderBOM(@RequestBody JSONObject jo) {
return new ResponseEntity<>(mesToLmsService.momSendSplitMfgOrderBOM(jo), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.momSendSplitMfgOrderBOM(jo), HttpStatus.OK);
} }
@PostMapping("/getRollInfo") @PostMapping("/getRollInfo")
@Log("MES传递LMS获取子卷重量信息") // @Log("MES传递LMS获取子卷重量信息")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/getRollInfo",
bizDesc = "MES传递LMS获取子卷重量信息",
systemFlag = "mes"
)
public ResponseEntity<Object> getRollInfo(@RequestBody JSONObject jo) { public ResponseEntity<Object> getRollInfo(@RequestBody JSONObject jo) {
return new ResponseEntity<>(mesToLmsService.getRollInfo(jo), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.getRollInfo(jo), HttpStatus.OK);
} }
@PostMapping("/sendLevelInfo") @PostMapping("/sendLevelInfo")
@Log("MES传递LMS定级数据") // @Log("MES传递LMS定级数据")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/sendLevelInfo",
bizDesc = "MES传递LMS定级数据",
systemFlag = "mes"
)
public ResponseEntity<Object> sendLevelInfo(@RequestBody JSONObject jo) { public ResponseEntity<Object> sendLevelInfo(@RequestBody JSONObject jo) {
return new ResponseEntity<>(mesToLmsService.sendLevelInfo(jo), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.sendLevelInfo(jo), HttpStatus.OK);
} }
@PostMapping("/containerNeedDown") @PostMapping("/containerNeedDown")
@Log("子卷拼接完成是否下轴") // @Log("子卷拼接完成是否下轴")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/containerNeedDown",
bizDesc = "子卷拼接完成是否下轴",
systemFlag = "mes"
)
public ResponseEntity<Object> containerNeedDown(@RequestBody JSONObject jo) { public ResponseEntity<Object> containerNeedDown(@RequestBody JSONObject jo) {
return new ResponseEntity<>(mesToLmsService.containerNeedDown(jo), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.containerNeedDown(jo), HttpStatus.OK);
} }
@PostMapping("/sendSubInfo") @PostMapping("/sendSubInfo")
@Log("子卷下料信息MES传递给LMS") // @Log("子卷下料信息MES传递给LMS")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/sendSubInfo",
bizDesc = "子卷下料信息MES传递给LMS",
systemFlag = "mes"
)
public ResponseEntity<Object> sendSubInfo(@RequestBody JSONObject jo) { public ResponseEntity<Object> sendSubInfo(@RequestBody JSONObject jo) {
return new ResponseEntity<>(mesToLmsService.sendSubInfo(jo), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.sendSubInfo(jo), HttpStatus.OK);
} }
@PostMapping("/changeSect") @PostMapping("/changeSect")
@Log("MES传递给LMS入线边库或者入成品库、撤销入线边库、人工改变入线边还是包装") // @Log("MES传递给LMS入线边库或者入成品库、撤销入线边库、人工改变入线边还是包装")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/changeSect",
bizDesc = "MES传递给LMS入线边库或者入成品库、撤销入线边库、人工改变入线边还是包装",
systemFlag = "mes"
)
public ResponseEntity<Object> changeSect(@RequestBody JSONObject jo) { public ResponseEntity<Object> changeSect(@RequestBody JSONObject jo) {
return new ResponseEntity<>(mesToLmsService.sendTargetHouse(jo), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.sendTargetHouse(jo), HttpStatus.OK);
} }
@PostMapping("/getWasteFoilWeight") @PostMapping("/getWasteFoilWeight")
@Log("分切子卷获取LMSAGV废箔称重重量") // @Log("分切子卷获取LMSAGV废箔称重重量")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/getWasteFoilWeight",
bizDesc = "分切子卷获取LMSAGV废箔称重重量",
systemFlag = "mes"
)
public ResponseEntity<Object> getWasteFoilWeight(@RequestBody JSONObject jo) { public ResponseEntity<Object> getWasteFoilWeight(@RequestBody JSONObject jo) {
return new ResponseEntity<>(mesToLmsService.getWasteFoilWeight(jo), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.getWasteFoilWeight(jo), HttpStatus.OK);
} }
@PostMapping("/WasteFoilSuccess") @PostMapping("/WasteFoilSuccess")
@Log("分切子卷获取LMSAGV废箔称重重量") // @Log("分切子卷获取LMSAGV废箔称重重量")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/WasteFoilSuccess",
bizDesc = "分切子卷获取LMSAGV废箔称重重量",
systemFlag = "mes"
)
public ResponseEntity<Object> WasteFoilSuccess(@RequestBody JSONObject jo) { public ResponseEntity<Object> WasteFoilSuccess(@RequestBody JSONObject jo) {
return new ResponseEntity<>(mesToLmsService.WasteFoilSuccess(jo), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.WasteFoilSuccess(jo), HttpStatus.OK);
} }
@PostMapping("/boxIsPass") @PostMapping("/boxIsPass")
@Log("飞书通知LMS木箱是否通过") // @Log("飞书通知LMS木箱是否通过")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/boxIsPass",
bizDesc = "飞书通知LMS木箱是否通过",
systemFlag = "mes"
)
public ResponseEntity<Object> boxIsPass(@RequestBody JSONObject jo) { public ResponseEntity<Object> boxIsPass(@RequestBody JSONObject jo) {
return new ResponseEntity<>(mesToLmsService.boxIsPass(jo), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.boxIsPass(jo), HttpStatus.OK);
} }
@PostMapping("/changeBomInfo") @PostMapping("/changeBomInfo")
@Log("MES更新LMS分切工单、订单BOM信息") // @Log("MES更新LMS分切工单、订单BOM信息")
@SaIgnore @SaIgnore
@ApiLog(
bizCode = "/mes/changeBomInfo",
bizDesc = "MES更新LMS分切工单、订单BOM信息",
systemFlag = "mes"
)
public ResponseEntity<Object> changeBomInfo(@RequestBody JSONObject jo) { public ResponseEntity<Object> changeBomInfo(@RequestBody JSONObject jo) {
return new ResponseEntity<>(mesToLmsService.changeBomInfo(jo), HttpStatus.OK); return new ResponseEntity<>(mesToLmsService.changeBomInfo(jo), HttpStatus.OK);
} }

View File

@@ -2,6 +2,7 @@ package org.nl.wms.ext.mes.service.impl;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import org.checkerframework.checker.units.qual.A; import org.checkerframework.checker.units.qual.A;
import org.nl.b_lms.sch.tasks.slitter.util.MdmDescriptionParseUtils;
import org.nl.common.utils.IdUtil; import org.nl.common.utils.IdUtil;
import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
@@ -645,11 +646,9 @@ public class MesToLmsServiceImpl implements MesToLmsService {
} else { } else {
qzz_generation = "4"; qzz_generation = "4";
} }
// 解析描述数组
String[] tubeArray = param.getString("PaperTubeDescription").split("\\|");
//定义尺寸与长度 //定义尺寸与长度
qzz_size = Character.toString(tubeArray[2].charAt(0)); // todo 88549333 修改 采用公共处理方法获取纸管的规格 2026年05月19日 18:05
qzz_size = MdmDescriptionParseUtils.extractPaperTubeSize(param.getString("PaperTubeDescription"));
} else { } else {
if (ObjectUtil.isEmpty(param.getString("FRPMaterial"))) { if (ObjectUtil.isEmpty(param.getString("FRPMaterial"))) {
throw new BadRequestException("FRP管物料编码不能为空"); throw new BadRequestException("FRP管物料编码不能为空");
@@ -667,11 +666,9 @@ public class MesToLmsServiceImpl implements MesToLmsService {
} else { } else {
qzz_generation = "4"; qzz_generation = "4";
} }
// 解析描述数组
String[] tubeArray = param.getString("FRPDescription").split("\\|");
// 定义尺寸与长度 // 定义尺寸与长度
qzz_size = Character.toString(tubeArray[2].charAt(0)); // todo 88549333 修改 采用公共处理方法获取FRP管的规格 2026年05月19日 18:25
qzz_size = MdmDescriptionParseUtils.extractFRPTubeSizeTrans(param.getString("FRPDescription"));
} }
JSONObject json = new JSONObject(); JSONObject json = new JSONObject();

View File

@@ -4,6 +4,7 @@ import cn.dev33.satoken.annotation.SaIgnore;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.nl.modules.logging.annotation.ApiLog;
import org.nl.modules.logging.annotation.Log; import org.nl.modules.logging.annotation.Log;
import org.nl.wms.ext.sap.service.SapToLmsService; import org.nl.wms.ext.sap.service.SapToLmsService;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
@@ -23,48 +24,66 @@ public class SapToLmsController {
@SaIgnore @SaIgnore
@PostMapping("/getMaterialInfo") @PostMapping("/getMaterialInfo")
@Log("SAP给LMS推送物料信息") @ApiLog(
bizCode = "/sap/getMaterialInfo",
bizDesc = "SAP给LMS推送物料信息",
systemFlag = "sap"
)
public ResponseEntity<Object> getMaterialInfo(@RequestBody JSONObject jo) { public ResponseEntity<Object> getMaterialInfo(@RequestBody JSONObject jo) {
return new ResponseEntity<>(sapToLmsService.getMaterialInfo(jo), HttpStatus.OK); return new ResponseEntity<>(sapToLmsService.getMaterialInfo(jo), HttpStatus.OK);
} }
@SaIgnore @SaIgnore
@PostMapping("/getDeliveryInfo") @PostMapping("/getDeliveryInfo")
@Log("SAP给LMS推送交货单信息") @ApiLog(
bizCode = "/sap/getDeliveryInfo",
bizDesc = "SAP给LMS推送交货单信息",
systemFlag = "sap"
)
public ResponseEntity<Object> getDeliveryInfo(@RequestBody JSONObject jo) { public ResponseEntity<Object> getDeliveryInfo(@RequestBody JSONObject jo) {
return new ResponseEntity<>(sapToLmsService.getDeliveryInfo(jo), HttpStatus.OK); return new ResponseEntity<>(sapToLmsService.getDeliveryInfo(jo), HttpStatus.OK);
} }
@SaIgnore @SaIgnore
@PostMapping("/getReturnDeliveryInfo") @PostMapping("/getReturnDeliveryInfo")
@Log("SAP给LMS推送退货交货单信息") @ApiLog(
bizCode = "/sap/getReturnDeliveryInfo",
bizDesc = "SAP给LMS推送退货交货单信息",
systemFlag = "sap"
)
public ResponseEntity<Object> getReturnDeliveryInfo(@RequestBody JSONObject jo) { public ResponseEntity<Object> getReturnDeliveryInfo(@RequestBody JSONObject jo) {
return new ResponseEntity<>(sapToLmsService.getReturnDeliveryInfo(jo), HttpStatus.OK); return new ResponseEntity<>(sapToLmsService.getReturnDeliveryInfo(jo), HttpStatus.OK);
} }
@SaIgnore @SaIgnore
@PostMapping("/getCannibalize") @PostMapping("/getCannibalize")
@Log("SAP给LMS推送调拨出库单") @ApiLog(
bizCode = "/sap/getCannibalize",
bizDesc = "SAP给LMS推送调拨出库单",
systemFlag = "sap"
)
public ResponseEntity<Object> getCannibalize(@RequestBody JSONObject jo) { public ResponseEntity<Object> getCannibalize(@RequestBody JSONObject jo) {
return new ResponseEntity<>(sapToLmsService.getCannibalize(jo), HttpStatus.OK); return new ResponseEntity<>(sapToLmsService.getCannibalize(jo), HttpStatus.OK);
} }
@SaIgnore @SaIgnore
@PostMapping("/getReCutInfo") @PostMapping("/getReCutInfo")
@Log("SAP给LMS推送改切出库单") @ApiLog(
bizCode = "/sap/getReCutInfo",
bizDesc = "SAP给LMS推送改切出库单",
systemFlag = "sap"
)
public ResponseEntity<Object> getReCutInfo(@RequestBody JSONObject jo) { public ResponseEntity<Object> getReCutInfo(@RequestBody JSONObject jo) {
return new ResponseEntity<>(sapToLmsService.getReCutInfo(jo), HttpStatus.OK); return new ResponseEntity<>(sapToLmsService.getReCutInfo(jo), HttpStatus.OK);
} }
@SaIgnore @SaIgnore
@PostMapping("/getUnPlanInfo") @PostMapping("/getUnPlanInfo")
@Log("SAP给LMS推送计划外子卷转单信息") @ApiLog(
bizCode = "/sap/getUnPlanInfo",
bizDesc = "SAP给LMS推送计划外子卷转单信息",
systemFlag = "sap"
)
public ResponseEntity<Object> getUnPlanInfo(@RequestBody JSONObject jo) { public ResponseEntity<Object> getUnPlanInfo(@RequestBody JSONObject jo) {
return new ResponseEntity<>(sapToLmsService.getUnPlanInfo(jo), HttpStatus.OK); return new ResponseEntity<>(sapToLmsService.getUnPlanInfo(jo), HttpStatus.OK);
} }

View File

@@ -1,6 +1,7 @@
package org.nl.wms.pda.mps.service.impl; package org.nl.wms.pda.mps.service.impl;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import org.nl.b_lms.sch.tasks.slitter.util.MdmDescriptionParseUtils;
import org.nl.common.utils.IdUtil; import org.nl.common.utils.IdUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
@@ -337,9 +338,11 @@ public class PaperTubeServiceImpl implements PaperTubeService {
// 区分位置创建 // 区分位置创建
if (ObjectUtil.isNotEmpty(upLeftSizeK) && j == 0) { if (ObjectUtil.isNotEmpty(upLeftSizeK) && j == 0) {
// 上左 // 上左
plan.setPaper_tube_or_FRP(upLeftSizeV.startsWith("48") ? "1" : "2"); //设置是纸管还是frp管
String[] split = upLeftSizeK.split("\\|"); //plan.setPaper_tube_or_FRP(upLeftSizeV.startsWith("48") ? "1" : "2");
plan.setQzz_size(String.valueOf(split[2].charAt(0))); //String[] split = upLeftSizeK.split("\\|");
// todo 88549333 判断是那种类型纸管还是FRP管 ,然后取到 3 或者6 2026年5月20日15:37:09
plan.setQzz_size(MdmDescriptionParseUtils.extractCommonTubeSize(upLeftSizeK));
if ("1".equals(plan.getPaper_tube_or_FRP())) { if ("1".equals(plan.getPaper_tube_or_FRP())) {
plan.setPaper_tube_material(upLeftSizeV); plan.setPaper_tube_material(upLeftSizeV);
plan.setPaper_tube_model(upLeftSizeK); plan.setPaper_tube_model(upLeftSizeK);
@@ -354,9 +357,11 @@ public class PaperTubeServiceImpl implements PaperTubeService {
} }
if ( ObjectUtil.isNotEmpty(upRightSizeK) && j == 1) { if ( ObjectUtil.isNotEmpty(upRightSizeK) && j == 1) {
// 上右 // 上右
plan.setPaper_tube_or_FRP(upRightSizeV.startsWith("48") ? "1" : "2"); // plan.setPaper_tube_or_FRP(upRightSizeV.startsWith("48") ? "1" : "2");
String[] split = upRightSizeK.split("\\|"); // String[] split = upRightSizeK.split("\\|");
plan.setQzz_size(String.valueOf(split[2].charAt(0))); // plan.setQzz_size(String.valueOf(split[2].charAt(0)));
// todo 88549333 判断是那种类型纸管还是FRP管 ,然后取到 3 或者6 2026年5月20日15:37:09
plan.setQzz_size(MdmDescriptionParseUtils.extractCommonTubeSize(upRightSizeK));
if ("1".equals(plan.getPaper_tube_or_FRP())) { if ("1".equals(plan.getPaper_tube_or_FRP())) {
plan.setPaper_tube_material(upRightSizeV); plan.setPaper_tube_material(upRightSizeV);
plan.setPaper_tube_model(upRightSizeK); plan.setPaper_tube_model(upRightSizeK);