opt: 接口改动

This commit is contained in:
2026-01-29 15:36:55 +08:00
parent c3b97cfc92
commit 4e4ce188c1
2 changed files with 15 additions and 1 deletions

View File

@@ -6,6 +6,8 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.common.logging.annotation.Log;
import org.nl.wms.pda.general_management.service.PdaProductionService;
import org.nl.wms.pda.util.PdaResponse;
import org.nl.wms.sch_manage.service.SecondaryPackagingService;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
@@ -28,6 +30,8 @@ public class PdaProductionController {
@Resource
private PdaProductionService pdaProductionService;
@Resource
private SecondaryPackagingService secondaryPackagingService;
@PostMapping("/getStockGroupInfo")
@Log("托盘叫料-获取物料库存信息")
@@ -142,4 +146,10 @@ public class PdaProductionController {
public ResponseEntity<Object> manualOutbound(@RequestBody JSONObject whereJson) {
return new ResponseEntity<>(pdaProductionService.manualOutbound(whereJson), HttpStatus.OK);
}
@PostMapping("/palletizingDown")
@SaIgnore
public ResponseEntity<Object> palletizingDown(@RequestBody JSONObject whereJson) {
secondaryPackagingService.palletizingDown(whereJson);
return new ResponseEntity<>(PdaResponse.requestOk(), HttpStatus.OK);
}
}

View File

@@ -72,7 +72,11 @@ public class SecondaryPackagingServiceImpl implements SecondaryPackagingService
// ....待定
groupplateService.save(groupPlate);
// todo: 校验任务
// 校验任务
Integer num = taskService.haveTaskAll(param.getString("device_code"));
if (num > 0) {
throw new BadRequestException("该点位已存在任务!");
}
param.put("config_code", "PalletizingDownTask");
param.put("group_id", groupPlate.getGroup_id());
param.put("material_id", materialCode.getMaterial_id());