代码更新
This commit is contained in:
@@ -52,4 +52,12 @@ public class AcsToWmsController {
|
|||||||
public ResponseEntity<Object> apply(@RequestBody JSONObject whereJson) {
|
public ResponseEntity<Object> apply(@RequestBody JSONObject whereJson) {
|
||||||
return new ResponseEntity<>(acsToWmsService.apply(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(acsToWmsService.apply(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/towApply")
|
||||||
|
@Log("二次申请任务")
|
||||||
|
@ApiOperation("二次申请任务")
|
||||||
|
@SaCheckPermission("menu:list")
|
||||||
|
public ResponseEntity<Object> towApply(@RequestBody JSONObject whereJson) {
|
||||||
|
return new ResponseEntity<>(acsToWmsService.towApply(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,4 +41,13 @@ public interface AcsToWmsService {
|
|||||||
* @return JSONObject
|
* @return JSONObject
|
||||||
*/
|
*/
|
||||||
JSONObject apply(JSONObject whereJson);
|
JSONObject apply(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ACS客户端--->LMS服务端
|
||||||
|
* 二次任务申请
|
||||||
|
*
|
||||||
|
* @param whereJson 条件
|
||||||
|
* @return JSONObject
|
||||||
|
*/
|
||||||
|
JSONObject towApply(JSONObject whereJson);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -357,6 +357,35 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public JSONObject towApply(JSONObject whereJson) {
|
||||||
|
/*
|
||||||
|
* 1.入空载具
|
||||||
|
* 2.出空载具
|
||||||
|
* 3.入物料
|
||||||
|
* 4.出物料
|
||||||
|
*/
|
||||||
|
WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task"); // 任务表
|
||||||
|
WQLObject pointTab = WQLObject.getWQLObject("SCH_BASE_Point"); // 点位表
|
||||||
|
|
||||||
|
String task_id = whereJson.getString("task_id");
|
||||||
|
|
||||||
|
JSONObject jsonTask = taskTab.query("task_id ='" + task_id + "'").uniqueResult(0);
|
||||||
|
JSONObject jsonPoint2 = pointTab.query("point_code = '" + jsonTask.getString("point_code2") + "'").uniqueResult(0);
|
||||||
|
if (StrUtil.equals(jsonTask.getString("acs_task_type"), "1")) {
|
||||||
|
// 根据 point_code2 的类型找对对应的列
|
||||||
|
pointTab.query("region_id = '"+jsonPoint2.getString("region_id")+
|
||||||
|
"' and block_num = '"+jsonPoint2.getString("block_num")+
|
||||||
|
"' and col_num = '"+jsonPoint2.getString("col_num")+
|
||||||
|
"' and point_status = '2' order by in_empty_seq ASC").uniqueResult(0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@LokiLog(type = LokiLogType.ACS_TO_LMS)
|
@LokiLog(type = LokiLogType.ACS_TO_LMS)
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public JSONObject inCreateRegion(JSONObject json) {
|
public JSONObject inCreateRegion(JSONObject json) {
|
||||||
|
|||||||
Reference in New Issue
Block a user