Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
ced7d9b2
Commit
ced7d9b2
authored
Apr 03, 2019
by
季圣华
Browse files
修复新增单据失败的bug
parent
e01c52a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/jsh/erp/controller/DepotHeadController.java
View file @
ced7d9b2
...
...
@@ -436,11 +436,15 @@ public class DepotHeadController {
@RequestParam
(
"deleted"
)
String
deleted
,
@RequestParam
(
"updated"
)
String
updated
,
HttpServletRequest
request
)
throws
Exception
{
JSONObject
result
=
ExceptionConstants
.
standardSuccess
();
Long
billsNumLimit
=
Long
.
parseLong
(
request
.
getSession
().
getAttribute
(
"billsNumLimit"
).
toString
());
Long
count
=
depotHeadService
.
countDepotHead
(
null
,
null
,
null
,
null
,
null
,
null
);
if
((
"open"
).
equals
(
mybatisPlusStatus
)
&&
count
>=
billsNumLimit
)
{
throw
new
BusinessParamCheckingException
(
ExceptionConstants
.
DEPOT_HEAD_OVER_LIMIT_FAILED_CODE
,
ExceptionConstants
.
DEPOT_HEAD_OVER_LIMIT_FAILED_MSG
);
if
((
"open"
).
equals
(
mybatisPlusStatus
))
{
Long
billsNumLimit
=
Long
.
parseLong
(
request
.
getSession
().
getAttribute
(
"billsNumLimit"
).
toString
());
Long
count
=
depotHeadService
.
countDepotHead
(
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
,
inserted
,
deleted
,
updated
);
}
}
else
{
depotHeadService
.
addDepotHeadAndDetail
(
beanJson
,
inserted
,
deleted
,
updated
);
}
...
...
src/main/java/com/jsh/erp/controller/UserController.java
View file @
ced7d9b2
...
...
@@ -323,11 +323,16 @@ public class UserController {
@ResponseBody
public
Object
addUser
(
@RequestParam
(
"info"
)
String
beanJson
,
HttpServletRequest
request
)
throws
Exception
{
JSONObject
result
=
ExceptionConstants
.
standardSuccess
();
Long
userNumLimit
=
Long
.
parseLong
(
request
.
getSession
().
getAttribute
(
"userNumLimit"
).
toString
());
Long
count
=
userService
.
countUser
(
null
,
null
);
if
((
"open"
).
equals
(
mybatisPlusStatus
)
&&
count
>=
userNumLimit
)
{
throw
new
BusinessParamCheckingException
(
ExceptionConstants
.
USER_OVER_LIMIT_FAILED_CODE
,
ExceptionConstants
.
USER_OVER_LIMIT_FAILED_MSG
);
if
((
"open"
).
equals
(
mybatisPlusStatus
))
{
Long
userNumLimit
=
Long
.
parseLong
(
request
.
getSession
().
getAttribute
(
"userNumLimit"
).
toString
());
Long
count
=
userService
.
countUser
(
null
,
null
);
if
(
count
>=
userNumLimit
)
{
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
{
UserEx
ue
=
JSON
.
parseObject
(
beanJson
,
UserEx
.
class
);
userService
.
addUserAndOrgUserRel
(
ue
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment