商品出入库 和 耗材出入库 日志记录 明确描述

This commit is contained in:
2024-08-03 14:43:30 +08:00
parent 96b9d50088
commit b70c00667a
3 changed files with 22 additions and 2 deletions

View File

@@ -96,6 +96,26 @@ public class LogServiceImpl implements LogService {
String value = SpelUtil.generateKeyBySpEL(split[1], joinPoint);
// 描述
log.setDescription(split[0] + ":" + value);
}
if (split.length == 3) {
// String v1 = SpelUtil.generateKeyBySpEL(split[1], joinPoint);
String v2 = SpelUtil.generateKeyBySpEL(split[2], joinPoint);
if (methodName.contains("createOutAndONOperate")) {
//subType 1入库 -1出库
if ("purchase".equals(v2) || "purveyor".equals(v2)) {
v2 = "入库";
} else {
v2 = "出库";
}
}else if(methodName.contains("stockInOut")){
if (("in".equals(v2) || "purveyor".equals(v2))) {
v2 = "入库";
} else {
v2 = "出库";
}
}
// 描述
log.setDescription(split[0] + ":" + v2 );
}else {
log.setDescription(split[0]);
}

View File

@@ -71,7 +71,7 @@ public class TbConsInfoController {
}
@PostMapping(value = "stockInOut")
@Log("耗材出入库")
@Log("耗材出入库::#resources.type")
@ApiOperation("耗材出入库")
public ResponseEntity<Object> stockInOut(@Validated @RequestBody SuppFlow resources) throws Exception {

View File

@@ -61,7 +61,7 @@ public class TbProductStockOperateController {
@PostMapping("/outAndOn")
@ApiOperation("新增/product/StockOperate")
@Log("出入库")
@Log("商品出入库::#outAndOnDto.type")
// @PreAuthorize("@el.check('tbProductStockOperate:add')")
public ResponseEntity<Object> createOutAndONOperate(@RequestBody OutAndOnDto outAndOnDto){
return new ResponseEntity<>(tbProductStockOperateService.createOutAndONOperate(outAndOnDto),HttpStatus.CREATED);