fix:发货任务优化
This commit is contained in:
@@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||
import org.nl.common.enums.PackageInfoIvtEnum;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.WQL;
|
||||
@@ -57,6 +58,8 @@ public class TwoSendOutTask extends AbstractAcsTask {
|
||||
.vehicle_code(json.getString("vehicle_code"))
|
||||
.priority(json.getString("priority"))
|
||||
.class_type(json.getString("task_type"))
|
||||
.agv_system_type("3")
|
||||
.agv_action_type(PackageInfoIvtEnum.AGV_ACTION_TYPE.code("放货二次分配"))
|
||||
.dtl_type(String.valueOf(dtl_type))
|
||||
.route_plan_code(getRoutePlanCode(json.getString("point_code1")))
|
||||
.remark(json.getString("remark"))
|
||||
|
||||
@@ -260,7 +260,7 @@ public class LashManageServiceImpl implements LashManageService {
|
||||
|
||||
result.put("printQty", "1");
|
||||
//第一次捆扎次数
|
||||
result.put("bundleTimes", "2");
|
||||
result.put("bundleTimes", "3");
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -702,11 +702,24 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject momAutoTransterMoveIn(JSONObject param){ return null;} /*{
|
||||
public JSONObject momAutoTransterMoveIn(JSONObject param) {
|
||||
String from_area = param.getString("from_area");
|
||||
String to_area = param.getString("to_area");
|
||||
String container_name = param.getString("container_name");
|
||||
|
||||
if (StrUtil.isEmpty(from_area)){
|
||||
throw new BadRequestException("起始区域不能为空!");
|
||||
}
|
||||
|
||||
if (StrUtil.isEmpty(to_area)){
|
||||
throw new BadRequestException("目的区域不能为空!");
|
||||
}
|
||||
|
||||
if (StrUtil.isEmpty(container_name)){
|
||||
throw new BadRequestException("子卷号不能为空!");
|
||||
}
|
||||
|
||||
JSONObject result = new JSONObject();
|
||||
|
||||
log.info("momAutoTransterMoveIn接口输入参数为:-------------------" + param.toString());
|
||||
|
||||
@@ -718,13 +731,16 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
||||
String Password = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_PASSWORD").getValue();
|
||||
param.put("UserName", UserName);
|
||||
param.put("Password", Password);
|
||||
param.put("SourceLocation", from_area);
|
||||
param.put("ContainerName", container_name);
|
||||
param.put("DestLocation", to_area);
|
||||
|
||||
try {
|
||||
String resultMsg = HttpRequest.post(url)
|
||||
.body(String.valueOf(param))
|
||||
.execute().body();
|
||||
result = JSONObject.parseObject(resultMsg);
|
||||
log.info("LMSPackakge接口输出参数为:-------------------" + result.toString());
|
||||
log.info("momAutoTransterMoveIn接口输出参数为:-------------------" + result.toString());
|
||||
|
||||
|
||||
String RTYPE = result.getString("RTYPE");
|
||||
@@ -737,15 +753,106 @@ public class LmsToMesServiceImpl implements LmsToMesService {
|
||||
throw new BadRequestException("MES提示错误:" + e.getMessage());
|
||||
}
|
||||
return result;
|
||||
}*/
|
||||
|
||||
@Override
|
||||
public JSONObject momGetPackingInfo(JSONObject jo) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject momBoxPackageSubmit(JSONObject jo) {
|
||||
return null;
|
||||
public JSONObject momGetPackingInfo(JSONObject param) {
|
||||
String box_no = param.getString("box_no");
|
||||
|
||||
if (StrUtil.isEmpty(box_no)) {
|
||||
throw new BadRequestException("木箱号不能为空!");
|
||||
}
|
||||
|
||||
JSONObject result = new JSONObject();
|
||||
|
||||
log.info("momGetPackingInfo接口输入参数为:-------------------" + param.toString());
|
||||
|
||||
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_URL").getValue();
|
||||
String api = "CamstarApi/momGetPackingInfo";
|
||||
url = url + api;
|
||||
|
||||
String UserName = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_USERNAME").getValue();
|
||||
String Password = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_PASSWORD").getValue();
|
||||
param.put("UserName", UserName);
|
||||
param.put("Password", Password);
|
||||
param.put("ContainerName", box_no);
|
||||
|
||||
try {
|
||||
String resultMsg = HttpRequest.post(url)
|
||||
.body(String.valueOf(param))
|
||||
.execute().body();
|
||||
result = JSONObject.parseObject(resultMsg);
|
||||
log.info("momGetPackingInfo接口输出参数为:-------------------" + result.toString());
|
||||
|
||||
|
||||
String RTYPE = result.getString("RTYPE");
|
||||
if ("E".equals(RTYPE)) {
|
||||
throw new BadRequestException(result.getString("RTMSG"));
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new BadRequestException("MES提示错误:" + e.getMessage());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject momBoxPackageSubmit(JSONObject param) {
|
||||
|
||||
log.info("momBoxPackageSubmit接口输入参数为:-------------------" + param.toString());
|
||||
|
||||
|
||||
String box_no = param.getString("box_no");
|
||||
String num = param.getString("num");
|
||||
String box_weight = param.getString("box_weight");
|
||||
JSONArray rows = param.getJSONArray("rows");
|
||||
|
||||
if(StrUtil.isEmpty(box_no)){
|
||||
throw new BadRequestException("木箱号不能为空!");
|
||||
}
|
||||
|
||||
if(StrUtil.isEmpty(num)){
|
||||
throw new BadRequestException("箱内子卷数不能为空!");
|
||||
}
|
||||
|
||||
if(StrUtil.isEmpty(box_weight)){
|
||||
throw new BadRequestException("木箱毛重不能为空!");
|
||||
}
|
||||
|
||||
if(ObjectUtil.isEmpty(rows)){
|
||||
throw new BadRequestException("箱内子卷信息不能为空!");
|
||||
}
|
||||
|
||||
JSONObject result = new JSONObject();
|
||||
|
||||
String url = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_URL").getValue();
|
||||
String api = "CamstarApi/momBoxPackageSubmit";
|
||||
url = url + api;
|
||||
|
||||
String UserName = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_USERNAME").getValue();
|
||||
String Password = SpringContextHolder.getBean(SysParamServiceImpl.class).findByCode("MES_PASSWORD").getValue();
|
||||
param.put("UserName", UserName);
|
||||
param.put("Password", Password);
|
||||
param.put("ContainerName", box_no);
|
||||
|
||||
try {
|
||||
String resultMsg = HttpRequest.post(url)
|
||||
.body(String.valueOf(param))
|
||||
.execute().body();
|
||||
result = JSONObject.parseObject(resultMsg);
|
||||
log.info("momGetPackingInfo接口输出参数为:-------------------" + result.toString());
|
||||
|
||||
|
||||
String RTYPE = result.getString("RTYPE");
|
||||
if ("E".equals(RTYPE)) {
|
||||
throw new BadRequestException(result.getString("RTMSG"));
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new BadRequestException("MES提示错误:" + e.getMessage());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user