|
|
@ -164,15 +164,14 @@ public class CallMaterialTask extends AbstractAcsTask { |
|
|
|
String start_point_code = form.getString("start_point_code"); |
|
|
|
String next_point_code = form.getString("next_point_code"); |
|
|
|
String vehicle_code = form.getString("vehicle_code"); |
|
|
|
String task_status = TaskStatusEnum.SURE_START.getCode(); |
|
|
|
String material_id = form.getString("material_id"); |
|
|
|
String cust_id = form.getString("cust_id"); |
|
|
|
String create_mode = form.getString("create_mode"); |
|
|
|
String pcsn = form.getString("pcsn"); |
|
|
|
String is_full = form.getString("is_full"); |
|
|
|
String workprocedure_id = form.getString("workprocedure_id"); |
|
|
|
WQLObject taskTable = WQLObject.getWQLObject("SCH_BASE_Task"); |
|
|
|
String iostorinv_id = form.getString("iostorinv_id"); |
|
|
|
WQLObject taskTable = WQLObject.getWQLObject("SCH_BASE_Task"); |
|
|
|
if (StrUtil.isEmpty(next_point_code)) { |
|
|
|
throw new BadRequestException("终点不能为空!"); |
|
|
|
} |
|
|
@ -183,8 +182,8 @@ public class CallMaterialTask extends AbstractAcsTask { |
|
|
|
throw new BadRequestException("是否满托不能为空!"); |
|
|
|
} |
|
|
|
//判断终点有没有未完成的指令
|
|
|
|
JSONObject beforTaskObj = taskTable. |
|
|
|
query("is_delete='0' and next_point_code='" + next_point_code + "' and task_status <>'" + TaskStatusEnum.FINISHED.getCode() + "'") |
|
|
|
JSONObject beforTaskObj = taskTable |
|
|
|
.query("is_delete='0' and next_point_code='" + next_point_code + "' and task_status <>'" + TaskStatusEnum.FINISHED.getCode() + "'") |
|
|
|
.uniqueResult(0); |
|
|
|
if (ObjectUtil.isNotEmpty(beforTaskObj)) { |
|
|
|
throw new BadRequestException("存在指令号为'" + beforTaskObj.getString("task_code") + "' 未完成!"); |
|
|
@ -216,12 +215,15 @@ public class CallMaterialTask extends AbstractAcsTask { |
|
|
|
|
|
|
|
} |
|
|
|
PointDto nextPoint = pointService.findByCode(next_point_code); |
|
|
|
//如果没给终点,根据起点去找工序,找一个合适的仓位 并且生成入库单,并且锁定点位
|
|
|
|
//如果没给起点,根据重点去找工序,找一个合适的仓位 并且生成出库单,并且锁定点位
|
|
|
|
if (StrUtil.isEmpty(start_point_code)) { |
|
|
|
if (StrUtil.isEmpty(workprocedure_id)) { |
|
|
|
|
|
|
|
JSONObject workInfo = WQL.getWO("QSTRUCT_RULE").addParam("flag", "1").addParam("code", next_point_code) |
|
|
|
.process().uniqueResult(0); |
|
|
|
JSONObject workInfo = WQL |
|
|
|
.getWO("QSTRUCT_RULE") |
|
|
|
.addParam("flag", "1") |
|
|
|
.addParam("code", next_point_code) |
|
|
|
.process() |
|
|
|
.uniqueResult(0); |
|
|
|
workprocedure_id = workInfo.getString("workprocedure_id"); |
|
|
|
|
|
|
|
WorkProcedureEnum workProcedureEnum = WorkProcedureEnum.get(workprocedure_id); |
|
|
@ -316,7 +318,7 @@ public class CallMaterialTask extends AbstractAcsTask { |
|
|
|
WQLObject.getWQLObject("ST_IVT_workProcedureIOS").insert(iosObj); |
|
|
|
} |
|
|
|
|
|
|
|
task_status = TaskStatusEnum.START_AND_POINT.getCode(); |
|
|
|
String task_status = TaskStatusEnum.START_AND_POINT.getCode(); |
|
|
|
|
|
|
|
PointDto startPoint = pointService.findByCode(start_point_code); |
|
|
|
start_area = nextPoint.getArea_type(); |
|
|
|