更新 AcsToWmsController.java
add:新建排产相关功能分支
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
|
||||
package org.nl.wms.ext.acs.rest;
|
||||
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -10,6 +8,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.nl.common.anno.Log;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.common.utils.api.ResultCode;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.common.exception.BizCoreException;
|
||||
import org.nl.wms.ext.acs.service.AcsToWmsService;
|
||||
import org.nl.wms.product_manage.sch.tasks.TaskScheduleService;
|
||||
@@ -30,110 +29,106 @@ import java.util.Map;
|
||||
@RequestMapping("/api/acsToWms/task")
|
||||
@Slf4j
|
||||
@SaIgnore
|
||||
public class AcsToWmsController {
|
||||
@Autowired
|
||||
private AcsToWmsService acsToWmsService;
|
||||
@Autowired
|
||||
private TaskScheduleService taskScheduleService;
|
||||
@Autowired
|
||||
private WashMachineryTask washMachineryTask;
|
||||
public class AcsToWmsController{
|
||||
@Autowired
|
||||
private AcsToWmsService acsToWmsService;
|
||||
@Autowired
|
||||
private TaskScheduleService taskScheduleService;
|
||||
@Autowired
|
||||
private WashMachineryTask washMachineryTask;
|
||||
|
||||
@PostMapping("/apply")
|
||||
@Log("ACS给WMS发送任务")
|
||||
@ApiOperation("ACS给WMS发送任务")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> receiveTaskFromAcs(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(acsToWmsService.apply(whereJson), HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/apply")
|
||||
@Log("ACS给WMS发送任务")
|
||||
@ApiOperation("ACS给WMS发送任务")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> receiveTaskFromAcs(@RequestBody JSONObject whereJson) {
|
||||
return new ResponseEntity<>(acsToWmsService.apply(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/receiveTaskIdToCacheLine")
|
||||
@Log("acs给wms发送缓存线的实时任务编号")
|
||||
@ApiOperation("acs给wms发送缓存线的实时任务编号")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> receiveTaskIdToCacheLine(@RequestBody JSONObject whereJson) {
|
||||
//参数校验
|
||||
if(StringUtils.isBlank(whereJson.getString("task_code")) || StringUtils.isBlank(whereJson.getString("position_code"))) {
|
||||
throw new BizCoreException(ResultCode.VALIDATE_FAILED);
|
||||
}
|
||||
return new ResponseEntity<>(acsToWmsService.receiveTaskIdToCacheLine(whereJson), HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/receiveTaskIdToCacheLine")
|
||||
@Log("acs给wms发送缓存线的实时任务编号")
|
||||
@ApiOperation("acs给wms发送缓存线的实时任务编号")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> receiveTaskIdToCacheLine(@RequestBody JSONObject whereJson) {
|
||||
//参数校验
|
||||
if(StringUtils.isBlank(whereJson.getString("task_code")) || StringUtils.isBlank(whereJson.getString("position_code"))) {
|
||||
throw new BadRequestException("任务id或点位编码缺失!");
|
||||
}
|
||||
return new ResponseEntity<>(acsToWmsService.receiveTaskIdToCacheLine(whereJson), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/status")
|
||||
@Log("ACS给WMS反馈任务状态")
|
||||
@ApiOperation("ACS给WMS反馈任务状态")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> receiveTaskStatusAcs(@RequestBody String string) {
|
||||
return new ResponseEntity<>(acsToWmsService.receiveTaskStatusAcs(string), HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/status")
|
||||
@Log("ACS给WMS反馈任务状态")
|
||||
@ApiOperation("ACS给WMS反馈任务状态")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> receiveTaskStatusAcs(@RequestBody String string) {
|
||||
return new ResponseEntity<>(acsToWmsService.receiveTaskStatusAcs(string), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/orderStatus")
|
||||
@Log("ACS给WMS下发工单完成状态")
|
||||
@ApiOperation("ACS给WMS下发工单完成状态")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> orderStatus(@RequestBody JSONObject param) {
|
||||
return new ResponseEntity<>(acsToWmsService.orderStatus(param), HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/orderStatus")
|
||||
@Log("ACS给WMS下发工单完成状态")
|
||||
@ApiOperation("ACS给WMS下发工单完成状态")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> orderStatus(@RequestBody JSONObject param) {
|
||||
return new ResponseEntity<>(acsToWmsService.orderStatus(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/washOrder")
|
||||
@Log("ACS给WMS反馈清洗工单完成")
|
||||
@ApiOperation("ACS给WMS反馈清洗工单完成")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> washOrderFinish(@RequestBody JSONObject param) {
|
||||
washMachineryTask.updateTaskStatus( param, param.getString("status"));
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/washOrder")
|
||||
@Log("ACS给WMS反馈清洗工单完成")
|
||||
@ApiOperation("ACS给WMS反馈清洗工单完成")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> washOrderFinish(@RequestBody JSONObject param) {
|
||||
washMachineryTask.updateTaskStatus(param, param.getString("status"));
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/feedDeviceStatusType")
|
||||
@ApiOperation("向wms反馈设备状态")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> feedDeviceStatusType(@RequestBody JSONObject param) {
|
||||
return new ResponseEntity<>(acsToWmsService.feedDeviceStatusType(param), HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/feedDeviceStatusType")
|
||||
@ApiOperation("向wms反馈设备状态")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> feedDeviceStatusType(@RequestBody JSONObject param) {
|
||||
return new ResponseEntity<>(acsToWmsService.feedDeviceStatusType(param), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/feedDeviceQty")
|
||||
@ApiOperation("向wms反馈设备实时数量")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> feedDeviceRealQty(@RequestBody Map param) {
|
||||
acsToWmsService.feedDevQty(param);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/feedDeviceQty2")
|
||||
@ApiOperation("反馈深坑数量")
|
||||
@SaIgnore
|
||||
@Log("反馈深坑数量")
|
||||
public ResponseEntity<Object> feedDeviceRealQty2(@RequestBody Map param) {
|
||||
acsToWmsService.feedDevQty(param);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/feedDeviceQty")
|
||||
@ApiOperation("向wms反馈设备实时数量")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> feedDeviceRealQty(@RequestBody Map param) {
|
||||
acsToWmsService.feedDevQty(param);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/feedCacheLineBarcodes")
|
||||
@Log("向wms反馈缓存载具信息")
|
||||
@ApiOperation("向wms反馈缓存载具信息")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> feedcachelineVe(@RequestBody JSONObject param) {
|
||||
acsToWmsService.feedcachelineVe(param);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/feedDeviceQty2")
|
||||
@ApiOperation("反馈深坑数量")
|
||||
@SaIgnore
|
||||
@Log("反馈深坑数量")
|
||||
public ResponseEntity<Object> feedDeviceRealQty2(@RequestBody Map param) {
|
||||
acsToWmsService.feedDevQty(param);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/feedOrderRealQty")
|
||||
@Log("向wms反实施数量")
|
||||
@ApiOperation("向wms反订单实施数量")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> feedOrderRealQty(@RequestBody JSONObject string) {
|
||||
acsToWmsService.feedOrderRealQty(string);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/feedCacheLineBarcodes")
|
||||
@Log("向wms反馈缓存载具信息")
|
||||
@ApiOperation("向wms反馈缓存载具信息")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> feedcachelineVe(@RequestBody JSONObject param) {
|
||||
acsToWmsService.feedcachelineVe(param);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/feedOrderRealQty")
|
||||
@Log("向wms反实施数量")
|
||||
@ApiOperation("向wms反订单实施数量")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> feedOrderRealQty(@RequestBody JSONObject string) {
|
||||
acsToWmsService.feedOrderRealQty(string);
|
||||
return new ResponseEntity<>( HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/taskPublish")
|
||||
@Log("taskPublish")
|
||||
@ApiOperation("taskPublish")
|
||||
@SaIgnore
|
||||
public void taskScheduleService(){
|
||||
taskScheduleService.taskPublish();
|
||||
}
|
||||
@GetMapping("/taskPublish")
|
||||
@Log("taskPublish")
|
||||
@ApiOperation("taskPublish")
|
||||
@SaIgnore
|
||||
public void taskScheduleService() {
|
||||
taskScheduleService.taskPublish();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user