This commit is contained in:
2022-12-27 14:46:29 +08:00
parent c91b7238e0
commit 137fed8a19
2 changed files with 12 additions and 6 deletions

View File

@@ -3,6 +3,7 @@ package org.nl.wms.pdm.bi.service.impl;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import lombok.RequiredArgsConstructor;
import org.nl.modules.common.exception.BadRequestException;
@@ -136,6 +137,11 @@ public class SubpackagerelationServiceImpl implements SubpackagerelationService
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
WQLObject wo = WQLObject.getWQLObject("pdm_bi_subpackagerelation");
JSONObject json = JSONObject.parseObject(JSON.toJSONString(dto));
//判断包装关系状态,只能修改状态为生成的
String status = json.getString("status");
if (!StrUtil.equals(status,"0")){
throw new BadRequestException("只能修改状态为生成的包装关系!");
}
wo.update(json);
}

View File

@@ -18,7 +18,7 @@ import java.util.Map;
@RestController
@RequiredArgsConstructor
@Api(tags = "PC端原辅料入库")
@Api(tags = "PC端入库")
@RequestMapping("/api/in/rawAssist")
@Slf4j
public class RawAssistIStorController {
@@ -27,8 +27,8 @@ public class RawAssistIStorController {
private RawAssistIStorService rawAssistIStorService;
@GetMapping
@Log("查询原辅料入库单据")
@ApiOperation("查询原辅料入库单据")
@Log("查询入库单据")
@ApiOperation("查询入库单据")
//@PreAuthorize("@el.check('checkoutbill:list')")
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
return new ResponseEntity<>(rawAssistIStorService.pageQuery(whereJson, page), HttpStatus.OK);
@@ -44,8 +44,8 @@ public class RawAssistIStorController {
}
@GetMapping("/getBillDtl")
@Log("查询到货通知单")
@ApiOperation("查询到货通知单")
@Log("查询入库单来源")
@ApiOperation("查询入库单来源")
//@PreAuthorize("@el.check('materialtype:list')")
public ResponseEntity<Object> getBillDtl(@RequestParam Map whereJson, Pageable page) {
return new ResponseEntity<>(rawAssistIStorService.getBillDtl(whereJson, page), HttpStatus.OK);
@@ -114,7 +114,7 @@ public class RawAssistIStorController {
@PostMapping("/divPoint")
@Log("设置起点")
@ApiOperation("分配货位")
@ApiOperation("设置起点")
//@PreAuthorize("@el.check('materialtype:list')")
public ResponseEntity<Object> divPoint(@RequestBody Map whereJson) {
rawAssistIStorService.divPoint(whereJson);