rev:发货任务二次分配修改
This commit is contained in:
@@ -1943,21 +1943,26 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public JSONObject applySendOutTwo(JSONObject whereJson) {
|
||||
log.info("applySendOutTwo输入参数:---------------------------------------------" + whereJson.toString());
|
||||
|
||||
// 校验
|
||||
if (ObjectUtil.isEmpty(whereJson.getString("device_code"))) {
|
||||
throw new BadRequestException("设备号不能为空!");
|
||||
}
|
||||
|
||||
if (ObjectUtil.isEmpty(whereJson.getString("vehicle_code"))) {
|
||||
throw new BadRequestException("载具号不能为空!");
|
||||
}
|
||||
|
||||
JSONObject result = new JSONObject();
|
||||
try {
|
||||
// 调用服务
|
||||
sendOutManageService.createSendOutTask(whereJson);
|
||||
|
||||
try{
|
||||
// 校验是否是二次分配
|
||||
if (ObjectUtil.isEmpty(whereJson.getString("task_code"))) {
|
||||
// 第一次申请
|
||||
if (ObjectUtil.isEmpty(whereJson.getString("device_code"))) {
|
||||
throw new BadRequestException("设备号不能为空!");
|
||||
}
|
||||
|
||||
if (ObjectUtil.isEmpty(whereJson.getString("vehicle_code"))) {
|
||||
throw new BadRequestException("载具号不能为空!");
|
||||
}
|
||||
|
||||
// 调用服务
|
||||
sendOutManageService.createSendOutTaskOne(whereJson);
|
||||
} else {
|
||||
// 第二次申请
|
||||
sendOutManageService.createSendOutTaskTwo(whereJson);
|
||||
}
|
||||
result.put("status", HttpStatus.OK.value());
|
||||
result.put("message", "下发成功!");
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user