feat(wms): 增加请求日志记录功能
- 在保存出库单据接口中增加请求日志记录逻辑 - 在接收物料接口中增加请求日志记录逻辑 - 在修改物料管理接口中增加请求日志记录逻辑 - 在作废物料接口中增加请求日志记录逻辑 - 更新ToWmsServiceImpl注入IRequestLogService服务 - 引入JSONUtil工具类用于序列化请求参数 - 调整接口注解中的title属性值以准确描述操作内容
This commit is contained in:
@@ -125,38 +125,50 @@ public class ToWmsApiController {
|
||||
@ResponseBody
|
||||
public AjaxResult saveBill(@RequestBody OutStockoutVo outStockoutVo) {
|
||||
String stockOutId = outStockoutService.saveBill(outStockoutVo);
|
||||
return AjaxResult.success(stockOutId);
|
||||
AjaxResult ajaxResult = AjaxResult.success(stockOutId);
|
||||
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(outStockoutVo), "出库单据保存", ajaxResult);
|
||||
requestLogService.insertRequestLog(requestLog);
|
||||
return ajaxResult;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 接收物料
|
||||
*/
|
||||
@Log(title = "物料管理", businessType = BusinessType.INSERT)
|
||||
@Log(title = "接收物料", businessType = BusinessType.INSERT)
|
||||
@PutMapping("/receiveProduct")
|
||||
public AjaxResult receiveProduct(@RequestBody ErpProduct erpProduct)
|
||||
{
|
||||
return toWmsService.receiveProduct(erpProduct);
|
||||
AjaxResult ajaxResult = toWmsService.receiveProduct(erpProduct);
|
||||
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(erpProduct), "接收物料", ajaxResult);
|
||||
requestLogService.insertRequestLog(requestLog);
|
||||
return ajaxResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物料管理
|
||||
*/
|
||||
@Log(title = "物料管理", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "修改物料管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/updateProduct")
|
||||
public AjaxResult updateProduct(@RequestBody ErpProduct erpProduct)
|
||||
{
|
||||
return toWmsService.updateProduct(erpProduct);
|
||||
AjaxResult ajaxResult = toWmsService.updateProduct(erpProduct);
|
||||
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(erpProduct), "修改物料管理", ajaxResult);
|
||||
requestLogService.insertRequestLog(requestLog);
|
||||
return ajaxResult;
|
||||
}
|
||||
|
||||
/**
|
||||
* 作废物料
|
||||
*/
|
||||
@Log(title = "物料管理", businessType = BusinessType.UPDATE)
|
||||
@Log(title = "作废物料", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/InvalidProduct")
|
||||
public AjaxResult InvalidProduct(@RequestBody ErpProduct erpProduct)
|
||||
{
|
||||
return toWmsService.InvalidProduct(erpProduct);
|
||||
AjaxResult ajaxResult = toWmsService.InvalidProduct(erpProduct);
|
||||
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(erpProduct), "作废物料", ajaxResult);
|
||||
requestLogService.insertRequestLog(requestLog);
|
||||
return ajaxResult;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user