优化库存逻辑和单据sku

This commit is contained in:
季圣华
2021-07-28 23:13:37 +08:00
parent f827e7c064
commit 7154492a51
14 changed files with 222 additions and 95 deletions

View File

@@ -270,13 +270,12 @@ public class DepotHeadController {
String beanJson = body.getInfo();
String rows = body.getRows();
Long billsNumLimit = Long.parseLong(redisService.getObjectFromSessionByKey(request,"billsNumLimit").toString());
Long tenantId = redisService.getTenantId(request);
Long count = depotHeadService.countDepotHead(null,null,null,null,null,null,null,null,null,null,null);
if(count>= billsNumLimit) {
throw new BusinessParamCheckingException(ExceptionConstants.DEPOT_HEAD_OVER_LIMIT_FAILED_CODE,
ExceptionConstants.DEPOT_HEAD_OVER_LIMIT_FAILED_MSG);
} else {
depotHeadService.addDepotHeadAndDetail(beanJson,rows,tenantId, request);
depotHeadService.addDepotHeadAndDetail(beanJson,rows, request);
}
return result;
}
@@ -290,11 +289,10 @@ public class DepotHeadController {
*/
@PutMapping(value = "/updateDepotHeadAndDetail")
public Object updateDepotHeadAndDetail(@RequestBody DepotHeadVo4Body body, HttpServletRequest request) throws Exception{
Long tenantId = redisService.getTenantId(request);
JSONObject result = ExceptionConstants.standardSuccess();
String beanJson = body.getInfo();
String rows = body.getRows();
depotHeadService.updateDepotHeadAndDetail(beanJson,rows,tenantId,request);
depotHeadService.updateDepotHeadAndDetail(beanJson,rows,request);
return result;
}