修复新增单据失败的bug
This commit is contained in:
@@ -436,11 +436,15 @@ public class DepotHeadController {
|
|||||||
@RequestParam("deleted") String deleted,
|
@RequestParam("deleted") String deleted,
|
||||||
@RequestParam("updated") String updated, HttpServletRequest request) throws Exception{
|
@RequestParam("updated") String updated, HttpServletRequest request) throws Exception{
|
||||||
JSONObject result = ExceptionConstants.standardSuccess();
|
JSONObject result = ExceptionConstants.standardSuccess();
|
||||||
Long billsNumLimit = Long.parseLong(request.getSession().getAttribute("billsNumLimit").toString());
|
if(("open").equals(mybatisPlusStatus)) {
|
||||||
Long count = depotHeadService.countDepotHead(null,null,null,null,null,null);
|
Long billsNumLimit = Long.parseLong(request.getSession().getAttribute("billsNumLimit").toString());
|
||||||
if(("open").equals(mybatisPlusStatus) && count>= billsNumLimit) {
|
Long count = depotHeadService.countDepotHead(null,null,null,null,null,null);
|
||||||
throw new BusinessParamCheckingException(ExceptionConstants.DEPOT_HEAD_OVER_LIMIT_FAILED_CODE,
|
if(count>= billsNumLimit) {
|
||||||
ExceptionConstants.DEPOT_HEAD_OVER_LIMIT_FAILED_MSG);
|
throw new BusinessParamCheckingException(ExceptionConstants.DEPOT_HEAD_OVER_LIMIT_FAILED_CODE,
|
||||||
|
ExceptionConstants.DEPOT_HEAD_OVER_LIMIT_FAILED_MSG);
|
||||||
|
} else {
|
||||||
|
depotHeadService.addDepotHeadAndDetail(beanJson,inserted,deleted,updated);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
depotHeadService.addDepotHeadAndDetail(beanJson,inserted,deleted,updated);
|
depotHeadService.addDepotHeadAndDetail(beanJson,inserted,deleted,updated);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -323,11 +323,16 @@ public class UserController {
|
|||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Object addUser(@RequestParam("info") String beanJson, HttpServletRequest request)throws Exception{
|
public Object addUser(@RequestParam("info") String beanJson, HttpServletRequest request)throws Exception{
|
||||||
JSONObject result = ExceptionConstants.standardSuccess();
|
JSONObject result = ExceptionConstants.standardSuccess();
|
||||||
Long userNumLimit = Long.parseLong(request.getSession().getAttribute("userNumLimit").toString());
|
if(("open").equals(mybatisPlusStatus)) {
|
||||||
Long count = userService.countUser(null,null);
|
Long userNumLimit = Long.parseLong(request.getSession().getAttribute("userNumLimit").toString());
|
||||||
if(("open").equals(mybatisPlusStatus) && count>= userNumLimit) {
|
Long count = userService.countUser(null,null);
|
||||||
throw new BusinessParamCheckingException(ExceptionConstants.USER_OVER_LIMIT_FAILED_CODE,
|
if(count>= userNumLimit) {
|
||||||
ExceptionConstants.USER_OVER_LIMIT_FAILED_MSG);
|
throw new BusinessParamCheckingException(ExceptionConstants.USER_OVER_LIMIT_FAILED_CODE,
|
||||||
|
ExceptionConstants.USER_OVER_LIMIT_FAILED_MSG);
|
||||||
|
} else {
|
||||||
|
UserEx ue= JSON.parseObject(beanJson, UserEx.class);
|
||||||
|
userService.addUserAndOrgUserRel(ue);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
UserEx ue= JSON.parseObject(beanJson, UserEx.class);
|
UserEx ue= JSON.parseObject(beanJson, UserEx.class);
|
||||||
userService.addUserAndOrgUserRel(ue);
|
userService.addUserAndOrgUserRel(ue);
|
||||||
|
|||||||
Reference in New Issue
Block a user