fix:进去的空载具需要校验托盘码
This commit is contained in:
@@ -12,9 +12,12 @@ import org.nl.b_lms.sch.task.service.IschBaseTaskService;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||
import org.nl.wms.basedata.st.service.impl.UserAreaServiceImpl;
|
||||
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||
import org.nl.wms.pda.mps.service.ShippingService;
|
||||
import org.nl.wms.sch.AcsUtil;
|
||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||
import org.nl.wms.sch.tasks.CutConveyorTask;
|
||||
import org.nl.wms.sch.tasks.PaperTrussTask;
|
||||
@@ -127,6 +130,20 @@ public class ShippingServiceImpl implements ShippingService {
|
||||
throw new BadRequestException("最多选择两个分切计划进行操作!");
|
||||
}
|
||||
|
||||
String request_area = whereJson.getString("point_code").substring(0, 2);
|
||||
//调用ACS扫码器获取载具码
|
||||
String sm_area = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("sm_area").getValue();
|
||||
if (sm_area.contains(request_area)) {
|
||||
JSONObject sm_json = new JSONObject();
|
||||
sm_json.put("device_code", whereJson.getString("point_code"));
|
||||
sm_json.put("product_area", request_area);
|
||||
JSONObject jsonObject = AcsUtil.notifyAcsObject("api/wms/getBarcode", sm_json);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(jsonObject) && !jsonObject.getString("device_code").equals(vehicle_code)) {
|
||||
throw new BadRequestException("扫码器返回的托盘码【" + jsonObject.getString("device_code") + "】与手持扫码不一致!");
|
||||
}
|
||||
}
|
||||
|
||||
String split_group = "";
|
||||
String resource_name = "";
|
||||
String order_type = "";
|
||||
@@ -369,6 +386,12 @@ public class ShippingServiceImpl implements ShippingService {
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String a = "A1_FQSS_IN";
|
||||
String substring = a.substring(0, 2);
|
||||
System.out.printf(substring);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public JSONObject returnVehicle(JSONObject whereJson) {
|
||||
@@ -380,6 +403,21 @@ public class ShippingServiceImpl implements ShippingService {
|
||||
if (StrUtil.isEmpty(vehicle_code)) {
|
||||
throw new BadRequestException("载具码不能为空!");
|
||||
}
|
||||
|
||||
String request_area = point_code.substring(0, 2);
|
||||
//调用ACS扫码器获取载具码
|
||||
String sm_area = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("sm_area").getValue();
|
||||
if (sm_area.contains(request_area)) {
|
||||
JSONObject sm_json = new JSONObject();
|
||||
sm_json.put("device_code", whereJson.getString("point_code"));
|
||||
sm_json.put("product_area", request_area);
|
||||
JSONObject jsonObject = AcsUtil.notifyAcsObject("api/wms/getBarcode", sm_json);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(jsonObject) && !jsonObject.getString("device_code").equals(vehicle_code)) {
|
||||
throw new BadRequestException("扫码器返回的托盘码【" + jsonObject.getString("device_code") + "】与手持扫码不一致!");
|
||||
}
|
||||
}
|
||||
|
||||
JSONObject vehicle_task = WQLObject.getWQLObject("sch_base_task").query("vehicle_code2 = '" + vehicle_code + "' AND is_delete = '0' AND task_status < '07'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(vehicle_task)) {
|
||||
if (vehicle_task.getString("point_code2").contains("OUT")) {
|
||||
|
||||
Reference in New Issue
Block a user