1 Commits

Author SHA1 Message Date
c2d7011506 更新 AcsToWmsController.java
add:新建排产相关功能分支
2023-06-13 09:21:59 +08:00

View File

@@ -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,7 +29,7 @@ import java.util.Map;
@RequestMapping("/api/acsToWms/task")
@Slf4j
@SaIgnore
public class AcsToWmsController {
public class AcsToWmsController{
@Autowired
private AcsToWmsService acsToWmsService;
@Autowired
@@ -53,7 +52,7 @@ public class AcsToWmsController {
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);
throw new BadRequestException("任务id或点位编码缺失!");
}
return new ResponseEntity<>(acsToWmsService.receiveTaskIdToCacheLine(whereJson), HttpStatus.OK);
}
@@ -79,7 +78,7 @@ public class AcsToWmsController {
@ApiOperation("ACS给WMS反馈清洗工单完成")
@SaIgnore
public ResponseEntity<Object> washOrderFinish(@RequestBody JSONObject param) {
washMachineryTask.updateTaskStatus( param, param.getString("status"));
washMachineryTask.updateTaskStatus(param, param.getString("status"));
return new ResponseEntity<>(HttpStatus.OK);
}
@@ -90,8 +89,6 @@ public class AcsToWmsController {
return new ResponseEntity<>(acsToWmsService.feedDeviceStatusType(param), HttpStatus.OK);
}
@PostMapping("/feedDeviceQty")
@ApiOperation("向wms反馈设备实时数量")
@SaIgnore
@@ -118,22 +115,20 @@ public class AcsToWmsController {
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);
return new ResponseEntity<>(HttpStatus.OK);
}
@GetMapping("/taskPublish")
@Log("taskPublish")
@ApiOperation("taskPublish")
@SaIgnore
public void taskScheduleService(){
public void taskScheduleService() {
taskScheduleService.taskPublish();
}
}