rev:木箱木库测试
This commit is contained in:
@@ -7,7 +7,6 @@ import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.google.common.collect.Interner;
|
||||
import com.google.common.collect.Interners;
|
||||
@@ -17,23 +16,14 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.b_lms.sch.point.dao.BstIvtPackageinfoivt;
|
||||
import org.nl.b_lms.sch.point.dao.mapper.BstIvtPackageinfoivtMapper;
|
||||
import org.nl.b_lms.sch.point.dao.mapper.SchBasePointMapper;
|
||||
import org.nl.b_lms.sch.point.service.IbstIvtPackageinfoivtService;
|
||||
import org.nl.b_lms.sch.point.service.IschBasePointService;
|
||||
import org.nl.b_lms.sch.point.service.impl.BstIvtPackageinfoivtServiceImpl;
|
||||
import org.nl.b_lms.sch.point.service.impl.SchBasePointServiceImpl;
|
||||
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
||||
import org.nl.b_lms.sch.task.dao.mapper.SchBaseTaskMapper;
|
||||
import org.nl.b_lms.sch.task.service.IschBaseTaskService;
|
||||
import org.nl.b_lms.sch.task.service.impl.SchBaseTaskServiceImpl;
|
||||
import org.nl.b_lms.sch.tasks.TwoEmpExcepTask;
|
||||
import org.nl.b_lms.sch.tasks.TwoBoxExcepTask;
|
||||
import org.nl.b_lms.sch.tasks.packingArea.MzhcwTask;
|
||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.InBussManageService;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.InVehicleManageService;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.OutVehicleManageService;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.SendOutManageService;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.*;
|
||||
import org.nl.common.enums.PackageInfoIvtEnum;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.system.util.CodeUtil;
|
||||
@@ -112,6 +102,16 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
*/
|
||||
private final SendOutManageService sendOutManageService;
|
||||
|
||||
/**
|
||||
* 捆扎处理服务
|
||||
*/
|
||||
private final LashManageService lashManageService;
|
||||
|
||||
/**
|
||||
* 木箱入库处理服务
|
||||
*/
|
||||
private final InBoxManageService inBoxManageService;
|
||||
|
||||
@Resource
|
||||
private IschBaseTaskService taskService;
|
||||
@Resource
|
||||
@@ -1799,7 +1799,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
throw new BadRequestException("设备不能为空!");
|
||||
}
|
||||
|
||||
if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("空盘入库")) || type.equals(IOSEnum.ACSTOLMS_TYPE.code("异常处理位"))) {
|
||||
if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("空盘入库"))) {
|
||||
if (ObjectUtil.isEmpty(whereJson.getString("container_type"))) {
|
||||
throw new BadRequestException("载具类型不能为空!");
|
||||
}
|
||||
@@ -1837,17 +1837,27 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
|
||||
} else if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("异常处理位"))) {
|
||||
|
||||
// 4-异常处理
|
||||
JSONObject jsonTaskParam = new JSONObject();
|
||||
jsonTaskParam.put("task_type", "010504");
|
||||
jsonTaskParam.put("start_device_code", whereJson.getString("device_code"));
|
||||
jsonTaskParam.put("next_device_code", "");
|
||||
jsonTaskParam.put("vehicle_code", whereJson.getString("vehicle_code"));
|
||||
jsonTaskParam.put("vehicle_type", whereJson.getString("container_type"));
|
||||
// 4-空木箱异常处理
|
||||
if (ObjectUtil.isEmpty(whereJson.getString("material_barcode"))) {
|
||||
throw new BadRequestException("木箱号不能为空!");
|
||||
}
|
||||
|
||||
TwoEmpExcepTask taskBean = new TwoEmpExcepTask();
|
||||
JSONObject jsonTaskParam = new JSONObject();
|
||||
jsonTaskParam.put("task_type", "010710");
|
||||
jsonTaskParam.put("start_device_code", whereJson.getString("device_code"));
|
||||
jsonTaskParam.put("next_device_code", "B1_ERRO");
|
||||
jsonTaskParam.put("vehicle_code", whereJson.getString("material_barcode"));
|
||||
|
||||
TwoBoxExcepTask taskBean = new TwoBoxExcepTask();
|
||||
taskBean.createTask(jsonTaskParam);
|
||||
} else if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("木箱入库"))) {
|
||||
|
||||
// 5-木箱入库
|
||||
whereJson.put("box_no", whereJson.getString("material_barcode"));
|
||||
inBoxManageService.inBox(whereJson);
|
||||
}
|
||||
|
||||
|
||||
result.put("status", HttpStatus.OK.value());
|
||||
result.put("message", "下发成功!");
|
||||
log.info("applyTwo返回参数:---------------------------------------------" + result.toString());
|
||||
@@ -1921,8 +1931,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
// 1-贴标
|
||||
if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("贴标"))) {
|
||||
|
||||
} else if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("贴标"))) {
|
||||
// 2-捆扎
|
||||
JSONObject paramResult = lashManageService.applyTab(whereJson);
|
||||
result.put("data", paramResult);
|
||||
|
||||
} else if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("捆扎"))) {
|
||||
|
||||
}
|
||||
|
||||
result.put("status", HttpStatus.OK.value());
|
||||
|
||||
@@ -40,6 +40,9 @@ public class AcsUtil {
|
||||
if (jo.containsKey("class_type") && jo.getString("class_type").contains("0105")) {
|
||||
product_area = "LK";
|
||||
}
|
||||
if (jo.containsKey("class_type") && jo.getString("class_type").contains("0107")) {
|
||||
product_area = "LK";
|
||||
}
|
||||
if (StrUtil.isEmpty(product_area)) {
|
||||
throw new BadRequestException("区域不能为空!下发信息:" + jo.toString());
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
task.*,
|
||||
md.class_name task_type_name,
|
||||
dict.label task_status_name,
|
||||
case when task.task_type like '0105%' then 'LK' ELSE task.product_area end AS final_product_area
|
||||
case when task.task_type like '0105%' then 'LK' when task.task_type like '0107%' then 'LK' ELSE task.product_area end AS final_product_area
|
||||
FROM
|
||||
sch_base_task task
|
||||
LEFT JOIN md_pb_classstandard md ON task.task_type = md.class_code
|
||||
|
||||
Reference in New Issue
Block a user