Merge remote-tracking branch 'origin/master_merge' into master_merge
This commit is contained in:
@@ -207,7 +207,7 @@ public class InbillServiceImpl {
|
||||
WQLObject.getWQLObject("ST_IVT_IOStorInv").update(mst_jo);
|
||||
|
||||
//回传MES
|
||||
if (StrUtil.equals(mst_jo.getString("bill_type"), "0001")) {
|
||||
if (StrUtil.equals(mst_jo.getString("bill_type"), "0001") || StrUtil.equals(mst_jo.getString("bill_type"), "0007")) {
|
||||
InAndOutRetrunServiceImpl bean = SpringContextHolder.getBean(InAndOutRetrunServiceImpl.class);
|
||||
|
||||
JSONObject param = new JSONObject();
|
||||
|
||||
@@ -173,7 +173,8 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
String lgort = stor_jo.getString("ext_id");
|
||||
String is_productstore = stor_jo.getString("is_productstore");
|
||||
//生产入库
|
||||
if (StrUtil.equals(bill_type, "0001")) {
|
||||
if (StrUtil.equals(bill_type, "0001") || StrUtil.equals(bill_type, "0007")) {
|
||||
|
||||
//1.回传MES
|
||||
|
||||
//查询该入库单下的所有箱子回传
|
||||
@@ -1014,7 +1015,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
String lgort = stor_jo.getString("ext_id");
|
||||
String is_productstore = stor_jo.getString("is_productstore");
|
||||
//生产入库
|
||||
if (StrUtil.equals(bill_type, "0001")) {
|
||||
if (StrUtil.equals(bill_type, "0001") || StrUtil.equals(bill_type, "0007")) {
|
||||
//1.回传MES
|
||||
|
||||
//查询该入库单下的所有箱子回传
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
package org.nl.wms.util;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.dao.PdmBiSlittingproductionplan;
|
||||
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||
|
||||
public class TaskUtil {
|
||||
|
||||
/**
|
||||
@@ -12,4 +18,38 @@ public class TaskUtil {
|
||||
return "normal";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务类参数校验
|
||||
*/
|
||||
public static boolean checkParams(SchBaseTask schBaseTask, String taskType) {
|
||||
if (schBaseTask == null) {
|
||||
throw new BadRequestException("任务类型为:" + taskType + "完成接口任务号为空!");
|
||||
}
|
||||
if (schBaseTask.getTask_status().equals(TaskStatusEnum.FINISHED.getCode())) {
|
||||
return true;
|
||||
}
|
||||
if (StringUtils.isBlank(schBaseTask.getVehicle_code())) {
|
||||
throw new BadRequestException("任务类型为:" + taskType + "子卷号不能为空!");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据分切计划获取子卷长度
|
||||
*/
|
||||
public static int getMaxNum(PdmBiSlittingproductionplan productionPlan, String paperDescription) {
|
||||
String containerLength = productionPlan != null ? productionPlan.getPaper_tube_or_FRP().equals("1") ? productionPlan.getPaper_tube_description() : productionPlan.getFRP_description() : paperDescription;
|
||||
int maxNum = 0;
|
||||
for (String part : containerLength.split("\\|")) {
|
||||
String numStr = part.replaceAll("\\D+", "");
|
||||
if (!numStr.isEmpty()) {
|
||||
int num = Integer.parseInt(numStr);
|
||||
if (num > maxNum) {
|
||||
maxNum = num;
|
||||
}
|
||||
}
|
||||
}
|
||||
return maxNum;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user