添加@RequestBody注解

main
Comair 7 months ago
parent 3318835637
commit ef1c5bdde3
  1. 3
      shkj-admin/src/main/java/com/shkj/ShkjApplication.java
  2. 12
      shkj-admin/src/main/resources/logback.xml
  3. 24
      shkj-wms/src/main/java/com/shkj/wcs/controller/busin/WcsTaskController.java
  4. 2
      shkj-wms/src/main/java/com/shkj/wcs/domain/BusinDataTask.java

@ -4,6 +4,7 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration; import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableAsync;
/** /**
@ -11,7 +12,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
* *
* @author lch * @author lch
*/ */
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class, MongoAutoConfiguration.class},scanBasePackages = {"org.jeecg.modules.jmreport", "com.shkj"}) @SpringBootApplication(exclude = { SecurityAutoConfiguration.class,DataSourceAutoConfiguration.class, MongoAutoConfiguration.class},scanBasePackages = {"org.jeecg.modules.jmreport", "com.shkj"})
//@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, MongoAutoConfiguration.class}, scanBasePackages = {"com.shkj"}) //@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, MongoAutoConfiguration.class}, scanBasePackages = {"com.shkj"})
@EnableAsync @EnableAsync
public class ShkjApplication { public class ShkjApplication {

@ -190,4 +190,16 @@
</root> </root>
</springProfile> </springProfile>
<springProfile name="yun">
<logger name="com.shkj" level="INFO" />
<root level="INFO">
<appender-ref ref="CONSOLE" />
<!--<appender-ref ref="DEBUG_FILE" />-->
<appender-ref ref="INFO_FILE" />
<appender-ref ref="ERROR_FILE" />
<appender-ref ref="WARN_FILE" />
</root>
</springProfile>
</configuration> </configuration>

@ -15,10 +15,12 @@ import com.shkj.wcs.third.workbinWcs.WCSUtil;
import com.shkj.wcs.third.workbinWcs.dto.*; import com.shkj.wcs.third.workbinWcs.dto.*;
import com.shkj.wcs.vo.WcsResponseVo; import com.shkj.wcs.vo.WcsResponseVo;
import com.shkj.wcs.domain.BusinDataTask; import com.shkj.wcs.domain.BusinDataTask;
import com.shkj.wms.enums.TaskStatusEnum;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@ -44,10 +46,9 @@ public class WcsTaskController {
/** /**
* wz-wcs任务下发 * wz-wcs任务下发
*/ */
@Log(title = "wz-wcs任务下发", businessType = BusinessType.UPDATE)
@PostMapping("/toKjWcs/commonApi") @PostMapping("/toKjWcs/commonApi")
@RepeatSubmit @RepeatSubmit
public WcsResponseVo commonApi(WcsCreateTaskDto bo) { public WcsResponseVo commonApi(@RequestBody WcsCreateTaskDto bo) {
if (bo != null) { if (bo != null) {
List<WcsCreateTaskBody> body = bo.getBody(); List<WcsCreateTaskBody> body = bo.getBody();
if (!body.isEmpty()) { if (!body.isEmpty()) {
@ -60,8 +61,8 @@ public class WcsTaskController {
String dataChange = by.getDataChange(); String dataChange = by.getDataChange();
String priority = by.getPriority(); String priority = by.getPriority();
LambdaQueryWrapper<BusinDataTask> lqwDataTask = new LambdaQueryWrapper<BusinDataTask>() LambdaQueryWrapper<BusinDataTask> lqwDataTask = new LambdaQueryWrapper<BusinDataTask>()
.eq(BusinDataTask::getContainerId, trayCode) .eq(BusinDataTask::getContainerCode, trayCode)
.in(BusinDataTask::getTaskStatus, "1", "2"); .in(BusinDataTask::getTaskStatus, TaskStatusEnum.wait_put.getValue(),TaskStatusEnum.wait_callback.getValue() );
BusinDataTask one = iBusinDataTaskService.getOne(lqwDataTask); BusinDataTask one = iBusinDataTaskService.getOne(lqwDataTask);
if (dataChange.equals("1")) { if (dataChange.equals("1")) {
if (one != null) { if (one != null) {
@ -70,9 +71,10 @@ public class WcsTaskController {
BusinDataTask businDataTask = new BusinDataTask(); BusinDataTask businDataTask = new BusinDataTask();
businDataTask.setTaskCode(taskId); businDataTask.setTaskCode(taskId);
businDataTask.setTaskType(taskType); businDataTask.setTaskType(taskType);
businDataTask.setContainerId(Long.valueOf(trayCode)); businDataTask.setContainerCode(trayCode);
businDataTask.setFromSide(fromBinCode); businDataTask.setFromSide(fromBinCode);
businDataTask.setToSide(toBinCode); businDataTask.setToSide(toBinCode);
businDataTask.setTaskStatus(TaskStatusEnum.wait_put.getValue());
businDataTask.setCreateTime(DateUtils.getNowDate()); businDataTask.setCreateTime(DateUtils.getNowDate());
if (!priority.isEmpty()){ if (!priority.isEmpty()){
businDataTask.setPriority(priority); businDataTask.setPriority(priority);
@ -121,10 +123,10 @@ public class WcsTaskController {
} }
@Log(title = "查询是否存在出库任务测试接口", businessType = BusinessType.UPDATE) @Log(title = "查询是否存在出库任务测试接口")
@PostMapping("/toWzWcs/queryTaskStatus") @PostMapping("/toWzWcs/queryTaskStatus")
@RepeatSubmit @RepeatSubmit
public WcsResponseVo queryTaskStatus(WCSQueryTaskStatusBody body) { public WcsResponseVo queryTaskStatus(@RequestBody WCSQueryTaskStatusBody body) {
WcsResponseVo vo = wcsUtil.queryTaskStatus(body); WcsResponseVo vo = wcsUtil.queryTaskStatus(body);
return vo; return vo;
} }
@ -133,7 +135,7 @@ public class WcsTaskController {
@Log(title = "查询每个库区状态测试接口", businessType = BusinessType.UPDATE) @Log(title = "查询每个库区状态测试接口", businessType = BusinessType.UPDATE)
@PostMapping("/toKjWcs/queryAreaStatus") @PostMapping("/toKjWcs/queryAreaStatus")
@RepeatSubmit @RepeatSubmit
public WcsResponseVo queryAreaStatus(WCSQueryAreaStatusDto dto) { public WcsResponseVo queryAreaStatus(@RequestBody WCSQueryAreaStatusDto dto) {
//调用plc接口 暂时不用 //调用plc接口 暂时不用
WCSQueryAreaStatusDto wcsQueryAreaStatusDto = new WCSQueryAreaStatusDto(); WCSQueryAreaStatusDto wcsQueryAreaStatusDto = new WCSQueryAreaStatusDto();
List<WCSQueryAreaStatusBody> areaStatusBodyList = new ArrayList<>(); List<WCSQueryAreaStatusBody> areaStatusBodyList = new ArrayList<>();
@ -156,7 +158,7 @@ public class WcsTaskController {
@Log(title = "任务状态上报测试接口", businessType = BusinessType.UPDATE) @Log(title = "任务状态上报测试接口", businessType = BusinessType.UPDATE)
@PostMapping("/toWzWcs/uploadWCSTaskStatus") @PostMapping("/toWzWcs/uploadWCSTaskStatus")
@RepeatSubmit @RepeatSubmit
public WcsResponseVo uploadWCSTaskStatus(UploadWCSTaskStatusDto dto) { public WcsResponseVo uploadWCSTaskStatus(@RequestBody UploadWCSTaskStatusDto dto) {
//调用plc接口 暂时不用 //调用plc接口 暂时不用
WcsResponseVo vo = wcsUtil.uploadWCSTaskStatus(dto); WcsResponseVo vo = wcsUtil.uploadWCSTaskStatus(dto);
return vo; return vo;
@ -166,7 +168,7 @@ public class WcsTaskController {
@Log(title = "扫码处入库申请测试接口", businessType = BusinessType.UPDATE) @Log(title = "扫码处入库申请测试接口", businessType = BusinessType.UPDATE)
@PostMapping("/toWzWcs/wcsIncomingTaskRequest") @PostMapping("/toWzWcs/wcsIncomingTaskRequest")
@RepeatSubmit @RepeatSubmit
public WcsResponseVo wcsIncomingTaskRequest(WcsIncomingTaskRequestDto dto) { public WcsResponseVo wcsIncomingTaskRequest(@RequestBody WcsIncomingTaskRequestDto dto) {
//调用plc接口 暂时不用 //调用plc接口 暂时不用
WcsResponseVo vo = wcsUtil.wcsIncomingTaskRequest(dto); WcsResponseVo vo = wcsUtil.wcsIncomingTaskRequest(dto);
return vo; return vo;
@ -175,7 +177,7 @@ public class WcsTaskController {
@Log(title = "生产区入库校验测试接口", businessType = BusinessType.UPDATE) @Log(title = "生产区入库校验测试接口", businessType = BusinessType.UPDATE)
@PostMapping("/toWzWcs/wcsIncomingTrayCheck") @PostMapping("/toWzWcs/wcsIncomingTrayCheck")
@RepeatSubmit @RepeatSubmit
public WcsResponseVo wcsIncomingTrayCheck(WcsIncomingTrayCheckBody dto) { public WcsResponseVo wcsIncomingTrayCheck(@RequestBody WcsIncomingTrayCheckBody dto) {
WcsResponseVo vo = wcsUtil.wcsIncomingTrayCheck(dto); WcsResponseVo vo = wcsUtil.wcsIncomingTrayCheck(dto);
return vo; return vo;

@ -136,7 +136,7 @@ public class BusinDataTask implements Serializable {
/** 治具编号 */ /** 治具编号 */
@Excel(name = "治具编号") @Excel(name = "治具编号")
private Long containerId; private String containerCode;
/** 业务单据 */ /** 业务单据 */
@Excel(name = "业务单据") @Excel(name = "业务单据")

Loading…
Cancel
Save