add:装箱行架增加几寸轴字段

This commit is contained in:
zhangzq
2025-04-30 11:21:31 +08:00
parent 0fc6d133c0
commit 9cdd8b7d86
3 changed files with 24 additions and 10 deletions

View File

@@ -181,6 +181,7 @@ public class ZxqTask extends AbstractAcsTask {
}
//获取纸管长度
Integer maxNum = SlitterTaskUtil.getPaperLengthInt(productionPlanList.get(0));
String paperSize = SlitterTaskUtil.getPaperSize(productionPlanList.get(0));
//扩展参数
JSONObject param = new JSONObject();
@@ -209,18 +210,22 @@ public class ZxqTask extends AbstractAcsTask {
param.put("containerType", bstIvtBoxinfo.getVehicle_type());
//查询是否为最后一个子卷,相同木箱号且状态为生成
List<PdmBiSubpackagerelation> packagerelationList = subpackageRelationService.list(new LambdaQueryWrapper<PdmBiSubpackagerelation>().eq(PdmBiSubpackagerelation::getPackage_box_sn, schBaseTask.getVehicle_code2()).eq(PdmBiSubpackagerelation::getStatus, "0"));
if (packagerelationList.size() == 1 && packagerelationList.get(0).getContainer_name().equals(schBaseTask.getVehicle_code())) {
PdmBiSubpackagerelation oneSub = packagerelationList.get(0);
String containerName = oneSub.getContainer_name();
if (packagerelationList.size() == 1 && containerName.equals(schBaseTask.getVehicle_code())) {
//最后子卷
param.put("lastOne", "1");
} else {
param.put("lastOne", "0");
}
//木箱放入子卷数量
param.put("boxNo", pdmBiSubpackagerelation.getQuanlity_in_box());
//子卷号
param.put("barcode", schBaseTask.getVehicle_code());
//子卷长度
param.put("len", maxNum);
param.put("frpModel", paperSize);
jo.put("request_param", param.toString());
zxDjwTask.createTask(jo);
}

View File

@@ -22,6 +22,7 @@ import org.nl.b_lms.sch.point.service.IbstIvtPackageinfoivtService;
import org.nl.b_lms.sch.task.dao.SchBaseTask;
import org.nl.b_lms.sch.task.service.IschBaseTaskService;
import org.nl.b_lms.sch.tasks.first_floor_area.ZxDjwTask;
import org.nl.b_lms.sch.tasks.slitter.util.SlitterTaskUtil;
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxinfo;
import org.nl.b_lms.storage_manage.database.service.dao.mapper.BstIvtBoxinfoMapper;
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
@@ -110,8 +111,8 @@ public class AutoSendZxToDjw extends Prun{
//获取木箱信息,未包装的木箱
BstIvtBoxinfo bstIvtBoxinfo = bstIvtBoxinfoMapper.selectOne(new LambdaQueryWrapper<BstIvtBoxinfo>().eq(BstIvtBoxinfo::getBox_no, boxNo).ne(BstIvtBoxinfo::getIs_packing, "1"));
if (bstIvtBoxinfo == null) {
log.info("请检查木箱号:" + boxNo + "是否存在或者状态为已装箱!");
throw new BadRequestException("请检查木箱号:" + boxNo + "是否存在或者状态为已装箱!");
log.warn("请检查木箱号:" + boxNo + "是否存在或者状态为已装箱!");
return;
}
//检查木箱信息
checkBoxParams(boxNo, bstIvtBoxinfo);
@@ -121,8 +122,8 @@ public class AutoSendZxToDjw extends Prun{
.eq(PdmBiSubpackagerelation::getPackage_box_sn, boxNo)
.eq(PdmBiSubpackagerelation::getStatus, "0"));
if (ObjectUtils.isEmpty(relationList)) {
log.info("装箱位的木箱号" + boxNo + "对应的子卷包装关系为空,请检查子卷包装关系状态是否为0!");
throw new BadRequestException("装箱位的木箱号" + boxNo + "对应的子卷包装关系异常,请检查子卷包装关系状态是否为0!");
log.warn("装箱位的木箱号" + boxNo + "对应的子卷包装关系为空,请检查子卷包装关系状态是否为0!");
return;
}
//装箱区有子卷且没有正在进行的装箱任务
List<BstIvtPackageinfoivt> zxqPackageinfoivtList = packageinfoivtService.checkEndPointTask(PackageInfoIvtEnum.POINT_STATUS.code("装箱区"), PackageInfoIvtEnum.IVT_STATUS.code("合格品"), "", "", "");
@@ -166,6 +167,7 @@ public class AutoSendZxToDjw extends Prun{
} else {
param.put("lastOne", IOSEnum.IS_NOTANDYES.code(""));
}
String paperSize = SlitterTaskUtil.getPaperSize(productionPlanList.get(0));
//获取木箱高度等级
param.put("heightLevel", getHeightLevel(bstIvtBoxinfo));
//获取子卷长度
@@ -177,14 +179,10 @@ public class AutoSendZxToDjw extends Prun{
//木箱需放入子卷数量
param.put("boxNo", relationList.get(0).getQuanlity_in_box());
//子卷号
param.put("frpModel", paperSize);
param.put("barcode", containerName);
jo.put("request_param", param.toString());
zxDjwTask.createTask(jo);
// try {
// transferBoxPackageToMes(relationList, bstIvtBoxinfo);
// } catch (Exception ex) {
// log.error("子卷装箱异常,传输子卷包装关系至MES接口捕获异常信息" + ex);
// }
}
}
} else {

View File

@@ -359,6 +359,17 @@ public class SlitterTaskUtil {
String[] split = paperStr.replaceAll("\\|[\\u4e00-\\u9fa5]+$", "").split("\\|");
return split[split.length - 1];
}
public static String getPaperSize(PdmBiSlittingproductionplan plan) {
// String s = "玻璃纤维及其制品|FRP管|6英寸|15|1700";
String paperStr = "";
if (plan.getPaper_tube_or_FRP().equals(SlitterConstant.SLITTER_TYPE_PAPER)) {
paperStr = plan.getPaper_tube_model();
} else {
paperStr = plan.getFRP_model();
}
String[] split = paperStr.replaceAll("\\|[\\u4e00-\\u9fa5]+$", "").split("\\|");
return split[2].replaceAll("英寸","");
}
public static Integer getPaperLengthInt(PdmBiSlittingproductionplan plan) {
return Integer.valueOf(getPaperLength(plan));