Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv-springboot
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bsoft
sv-springboot
Commits
18386944
Commit
18386944
authored
Jun 05, 2020
by
Suvalue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
后台入参相关修改
parent
997c6b8e
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
44 additions
and
43 deletions
+44
-43
bsoft-admin/src/main/java/com/bsoft/admin/controller/MenuController.java
+8
-8
bsoft-admin/src/main/java/com/bsoft/admin/controller/OrgController.java
+2
-2
bsoft-admin/src/main/java/com/bsoft/admin/controller/RoleController.java
+4
-4
bsoft-admin/src/main/java/com/bsoft/admin/controller/UserController.java
+2
-2
bsoft-api/src/main/java/com/bsoft/api/mapper/SerProjValueMapper.java
+5
-1
bsoft-api/src/main/java/com/bsoft/api/model/SerProjValue.java
+0
-11
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SerProjValueServiceImpl.java
+3
-1
bsoft-api/src/main/resources/mapper/SerProjValueMapper.xml
+20
-14
No files found.
bsoft-admin/src/main/java/com/bsoft/admin/controller/MenuController.java
View file @
18386944
...
@@ -55,8 +55,8 @@ public class MenuController {
...
@@ -55,8 +55,8 @@ public class MenuController {
@PostMapping
(
"add"
)
@PostMapping
(
"add"
)
@Token
@Token
@ApiOperation
(
"添加菜单"
)
@ApiOperation
(
"添加菜单"
)
public
Object
addUser
(
@ApiIgnore
@CurrentUser
Long
userId
,
@Valid
@RequestBody
MenuReq
.
AddMenuReq
menu
)
throws
Exception
{
public
Object
addUser
(
@ApiIgnore
@CurrentUser
Integer
userId
,
@Valid
@RequestBody
MenuReq
.
AddMenuReq
menu
)
throws
Exception
{
boolean
result
=
sysMenuService
.
addMenu
(
userId
,
menu
);
boolean
result
=
sysMenuService
.
addMenu
(
Long
.
valueOf
(
userId
)
,
menu
);
if
(
result
)
if
(
result
)
return
Result
.
success
(
null
);
return
Result
.
success
(
null
);
else
else
...
@@ -96,8 +96,8 @@ public class MenuController {
...
@@ -96,8 +96,8 @@ public class MenuController {
@PostMapping
(
"saveusermenu"
)
@PostMapping
(
"saveusermenu"
)
@Token
@Token
@ApiOperation
(
"保存用户菜单"
)
@ApiOperation
(
"保存用户菜单"
)
public
Object
saveUserMenu
(
@ApiIgnore
@CurrentUser
Long
userId
,
@RequestBody
MenuReq
.
SaveUserMenuReq
menu
)
throws
Exception
{
public
Object
saveUserMenu
(
@ApiIgnore
@CurrentUser
Integer
userId
,
@RequestBody
MenuReq
.
SaveUserMenuReq
menu
)
throws
Exception
{
boolean
result
=
sysMenuService
.
saveUserMenu
(
userId
,
menu
);
boolean
result
=
sysMenuService
.
saveUserMenu
(
Long
.
valueOf
(
userId
)
,
menu
);
if
(
result
)
if
(
result
)
return
Result
.
success
(
null
);
return
Result
.
success
(
null
);
else
else
...
@@ -115,8 +115,8 @@ public class MenuController {
...
@@ -115,8 +115,8 @@ public class MenuController {
@PostMapping
(
"saverolemenu"
)
@PostMapping
(
"saverolemenu"
)
@Token
@Token
@ApiOperation
(
"保存角色菜单"
)
@ApiOperation
(
"保存角色菜单"
)
public
Object
saveRoleMenu
(
@ApiIgnore
@CurrentUser
Long
userId
,
@RequestBody
MenuReq
.
SaveRoleMenuReq
menu
)
throws
Exception
{
public
Object
saveRoleMenu
(
@ApiIgnore
@CurrentUser
Integer
userId
,
@RequestBody
MenuReq
.
SaveRoleMenuReq
menu
)
throws
Exception
{
boolean
result
=
sysMenuService
.
saveRoleMenu
(
userId
,
menu
);
boolean
result
=
sysMenuService
.
saveRoleMenu
(
Long
.
valueOf
(
userId
)
,
menu
);
if
(
result
)
if
(
result
)
return
Result
.
success
(
null
);
return
Result
.
success
(
null
);
else
else
...
@@ -126,8 +126,8 @@ public class MenuController {
...
@@ -126,8 +126,8 @@ public class MenuController {
@PostMapping
(
"updateSort"
)
@PostMapping
(
"updateSort"
)
@Token
@Token
@ApiOperation
(
"修改排序"
)
@ApiOperation
(
"修改排序"
)
public
Object
updateSort
(
@ApiIgnore
@CurrentUser
Long
userId
,
@RequestBody
MenuReq
.
UpdateSortReq
menu
)
throws
Exception
{
public
Object
updateSort
(
@ApiIgnore
@CurrentUser
Integer
userId
,
@RequestBody
MenuReq
.
UpdateSortReq
menu
)
throws
Exception
{
boolean
result
=
sysMenuService
.
updateSort
(
userId
,
menu
);
boolean
result
=
sysMenuService
.
updateSort
(
Long
.
valueOf
(
userId
)
,
menu
);
if
(
result
)
if
(
result
)
return
Result
.
success
(
null
);
return
Result
.
success
(
null
);
else
else
...
...
bsoft-admin/src/main/java/com/bsoft/admin/controller/OrgController.java
View file @
18386944
...
@@ -109,8 +109,8 @@ public class OrgController {
...
@@ -109,8 +109,8 @@ public class OrgController {
@PostMapping
(
"saveuserorg"
)
@PostMapping
(
"saveuserorg"
)
@Token
@Token
@ApiOperation
(
"保存用户机构"
)
@ApiOperation
(
"保存用户机构"
)
public
Object
saveUserOrg
(
@ApiIgnore
@CurrentUser
Long
u
serId
,
@RequestBody
OrgReq
.
SaveUserOrgReq
org
)
throws
Exception
{
public
Object
saveUserOrg
(
@ApiIgnore
@CurrentUser
Integer
loginU
serId
,
@RequestBody
OrgReq
.
SaveUserOrgReq
org
)
throws
Exception
{
boolean
result
=
dicOrgService
.
saveUserOrg
(
userId
,
org
);
boolean
result
=
dicOrgService
.
saveUserOrg
(
Long
.
valueOf
(
loginUserId
)
,
org
);
if
(
result
)
if
(
result
)
return
Result
.
success
(
null
);
return
Result
.
success
(
null
);
else
else
...
...
bsoft-admin/src/main/java/com/bsoft/admin/controller/RoleController.java
View file @
18386944
...
@@ -44,12 +44,12 @@ public class RoleController {
...
@@ -44,12 +44,12 @@ public class RoleController {
@PostMapping
(
"add"
)
@PostMapping
(
"add"
)
@Token
@Token
@ApiOperation
(
"添加角色"
)
@ApiOperation
(
"添加角色"
)
public
Object
addUser
(
@ApiIgnore
@CurrentUser
Long
userId
,
@Valid
@RequestBody
RoleReq
.
AddRoleReq
role
)
throws
Exception
{
public
Object
addUser
(
@ApiIgnore
@CurrentUser
Integer
userId
,
@Valid
@RequestBody
RoleReq
.
AddRoleReq
role
)
throws
Exception
{
SysRole
sysRole
=
sysRoleService
.
findByCode
(
role
.
getRoleCode
());
SysRole
sysRole
=
sysRoleService
.
findByCode
(
role
.
getRoleCode
());
if
(
sysRole
!=
null
){
if
(
sysRole
!=
null
){
return
Result
.
error
(
"该角色已存在!"
);
return
Result
.
error
(
"该角色已存在!"
);
}
}
boolean
result
=
sysRoleService
.
addRole
(
userId
,
role
);
boolean
result
=
sysRoleService
.
addRole
(
Long
.
valueOf
(
userId
)
,
role
);
if
(
result
)
if
(
result
)
return
Result
.
success
(
null
);
return
Result
.
success
(
null
);
else
else
...
@@ -88,8 +88,8 @@ public class RoleController {
...
@@ -88,8 +88,8 @@ public class RoleController {
@PostMapping
(
"saveuserole"
)
@PostMapping
(
"saveuserole"
)
@Token
@Token
@ApiOperation
(
"保存用户角色"
)
@ApiOperation
(
"保存用户角色"
)
public
Object
saveUserOrg
(
@ApiIgnore
@CurrentUser
Long
userId
,
@RequestBody
RoleReq
.
SavaUserRoleReq
role
)
throws
Exception
{
public
Object
saveUserOrg
(
@ApiIgnore
@CurrentUser
Integer
userId
,
@RequestBody
RoleReq
.
SavaUserRoleReq
role
)
throws
Exception
{
boolean
result
=
sysRoleService
.
saveUserRole
(
userId
,
role
);
boolean
result
=
sysRoleService
.
saveUserRole
(
Long
.
valueOf
(
userId
)
,
role
);
if
(
result
)
if
(
result
)
return
Result
.
success
(
null
);
return
Result
.
success
(
null
);
else
else
...
...
bsoft-admin/src/main/java/com/bsoft/admin/controller/UserController.java
View file @
18386944
...
@@ -52,12 +52,12 @@ public class UserController {
...
@@ -52,12 +52,12 @@ public class UserController {
@PostMapping
(
"add"
)
@PostMapping
(
"add"
)
@Token
@Token
@ApiOperation
(
"添加用户"
)
@ApiOperation
(
"添加用户"
)
public
Object
addUser
(
@ApiIgnore
@CurrentUser
Long
userId
,
@Valid
@RequestBody
UserReq
.
AddUserReq
user
)
throws
Exception
{
public
Object
addUser
(
@ApiIgnore
@CurrentUser
Integer
userId
,
@Valid
@RequestBody
UserReq
.
AddUserReq
user
)
throws
Exception
{
SysUser
sysUser
=
userService
.
findByLoginName
(
user
.
getUserCode
());
SysUser
sysUser
=
userService
.
findByLoginName
(
user
.
getUserCode
());
if
(
sysUser
!=
null
){
if
(
sysUser
!=
null
){
return
Result
.
error
(
"该账号已存在!"
);
return
Result
.
error
(
"该账号已存在!"
);
}
}
boolean
result
=
userService
.
addUser
(
userId
,
user
);
boolean
result
=
userService
.
addUser
(
Long
.
valueOf
(
userId
)
,
user
);
if
(
result
)
if
(
result
)
return
Result
.
success
(
null
);
return
Result
.
success
(
null
);
else
else
...
...
bsoft-api/src/main/java/com/bsoft/api/mapper/SerProjValueMapper.java
View file @
18386944
...
@@ -25,7 +25,10 @@ public interface SerProjValueMapper {
...
@@ -25,7 +25,10 @@ public interface SerProjValueMapper {
@Param
(
"budgetType"
)
Integer
budgetType
,
@Param
(
"hosCode"
)
String
hosCode
);
@Param
(
"budgetType"
)
Integer
budgetType
,
@Param
(
"hosCode"
)
String
hosCode
);
int
deleteByDeptWithDate
(
@Param
(
"dept"
)
String
dept
,
@Param
(
"date"
)
BigDecimal
date
,
int
deleteByDeptWithDate
(
@Param
(
"dept"
)
String
dept
,
@Param
(
"date"
)
BigDecimal
date
,
@Param
(
"projType"
)
Integer
projType
);
@Param
(
"projType"
)
Integer
projType
,
@Param
(
"orgCode"
)
String
orgCode
);
int
insertToHistory
(
@Param
(
"dept"
)
String
dept
,
@Param
(
"date"
)
BigDecimal
date
,
@Param
(
"projType"
)
Integer
projType
,
@Param
(
"orgCode"
)
String
orgCode
);
void
updateValue
(
@Param
(
"date"
)
BigDecimal
date
,
@Param
(
"hosCode"
)
String
hosCode
);
void
updateValue
(
@Param
(
"date"
)
BigDecimal
date
,
@Param
(
"hosCode"
)
String
hosCode
);
}
}
\ No newline at end of file
bsoft-api/src/main/java/com/bsoft/api/model/SerProjValue.java
View file @
18386944
...
@@ -28,9 +28,6 @@ public class SerProjValue {
...
@@ -28,9 +28,6 @@ public class SerProjValue {
this
.
szUnit
=
request
.
getSzUnit
();
this
.
szUnit
=
request
.
getSzUnit
();
}
}
private
BigDecimal
id
;
private
Date
createDate
;
private
Date
createDate
;
private
BigDecimal
createUserid
;
private
BigDecimal
createUserid
;
...
@@ -81,14 +78,6 @@ public class SerProjValue {
...
@@ -81,14 +78,6 @@ public class SerProjValue {
private
String
hoscode
;
private
String
hoscode
;
public
BigDecimal
getId
()
{
return
id
;
}
public
void
setId
(
BigDecimal
id
)
{
this
.
id
=
id
;
}
public
Date
getCreateDate
()
{
public
Date
getCreateDate
()
{
return
createDate
;
return
createDate
;
}
}
...
...
bsoft-api/src/main/java/com/bsoft/api/service/Impl/SerProjValueServiceImpl.java
View file @
18386944
...
@@ -88,8 +88,10 @@ public class SerProjValueServiceImpl implements SerProjValueService {
...
@@ -88,8 +88,10 @@ public class SerProjValueServiceImpl implements SerProjValueService {
List
<
DicOrg
>
orgList
=
dicOrgMapper
.
selectByUser
(
userId
);
List
<
DicOrg
>
orgList
=
dicOrgMapper
.
selectByUser
(
userId
);
String
orgCode
=
orgList
.
get
(
0
).
getOrgCode
();
String
orgCode
=
orgList
.
get
(
0
).
getOrgCode
();
if
(
request
!=
null
&&
request
.
getBudgetValues
()
!=
null
&&
request
.
getBudgetValues
().
size
()
>
0
){
if
(
request
!=
null
&&
request
.
getBudgetValues
()
!=
null
&&
request
.
getBudgetValues
().
size
()
>
0
){
//先将记录插入历史表
result
=
serProjValueMapper
.
insertToHistory
(
request
.
getDeptCode
(),
request
.
getDate
(),
request
.
getProjType
(),
orgCode
);
//先进行删除操作
//先进行删除操作
result
=
serProjValueMapper
.
deleteByDeptWithDate
(
request
.
getDeptCode
(),
request
.
getDate
(),
request
.
getProjType
());
result
=
serProjValueMapper
.
deleteByDeptWithDate
(
request
.
getDeptCode
(),
request
.
getDate
(),
request
.
getProjType
()
,
orgCode
);
SerProjValue
info
=
null
;
SerProjValue
info
=
null
;
long
version
=
System
.
currentTimeMillis
();
long
version
=
System
.
currentTimeMillis
();
for
(
BudgetValue
budgetValue
:
request
.
getBudgetValues
()){
for
(
BudgetValue
budgetValue
:
request
.
getBudgetValues
()){
...
...
bsoft-api/src/main/resources/mapper/SerProjValueMapper.xml
View file @
18386944
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.bsoft.api.mapper.SerProjValueMapper"
>
<mapper
namespace=
"com.bsoft.api.mapper.SerProjValueMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerProjValue"
>
<resultMap
id=
"BaseResultMap"
type=
"com.bsoft.api.model.SerProjValue"
>
<result
column=
"ID"
jdbcType=
"DECIMAL"
property=
"id"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_DATE"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"CREATE_USERID"
jdbcType=
"DECIMAL"
property=
"createUserid"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
<result
column=
"STATE"
jdbcType=
"DECIMAL"
property=
"state"
/>
...
@@ -39,11 +38,8 @@
...
@@ -39,11 +38,8 @@
where ID = #{id,jdbcType=DECIMAL}
where ID = #{id,jdbcType=DECIMAL}
</delete>
</delete>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerProjValue"
>
<insert
id=
"insert"
parameterType=
"com.bsoft.api.model.SerProjValue"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.math.BigDecimal"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into SER_PROJ_VALUE (CREATE_DATE, CREATE_USERID, `STATE`,
insert into SER_PROJ_VALUE (CREATE_DATE, CREATE_USERID, `STATE`,
PROJ_ID, QNZ, WQQS,
PROJ_ID, QNZ, WQQS,
LS, MB, CSYSZ, CSYSZ_TB,
LS, MB, CSYSZ, CSYSZ_TB,
YSZ, YSZ_TB, SZ, ZXPL,
YSZ, YSZ_TB, SZ, ZXPL,
`DATE`, DEPT_CODE, SORT,
`DATE`, DEPT_CODE, SORT,
...
@@ -143,15 +139,25 @@
...
@@ -143,15 +139,25 @@
</if>
</if>
ORDER BY p.SORT
ORDER BY p.SORT
</select>
</select>
<update
id=
"deleteByDeptWithDate"
>
<delete
id=
"deleteByDeptWithDate"
>
update SER_PROJ_VALUE v1 set v1.STATE = 0
delete v from SER_PROJ_VALUE v
where EXISTS(select v.ID from SER_PROJ_VALUE v
JOIN SER_PROJ p ON p.ID = v.PROJ_ID
join SER_PROJ p on p.ID = v.PROJ_ID
WHERE p.PROJ_TYPE = #{projType,jdbcType=DECIMAL}
where p.PROJ_TYPE = #{projType,jdbcType=DECIMAL}
AND p.IS_BUDGET
&
1>0
and v.`DATE` = #{date,jdbcType=DECIMAL}
AND v.`DATE` = LEFT(#{date,jdbcType=DECIMAL},4)
and v.DEPT_CODE = #{dept,jdbcType=VARCHAR}
AND v.DEPT_CODE = #{dept,jdbcType=VARCHAR}
and v1.ID = v.ID)
AND v.HOSCODE = #{orgCode,jdbcType=VARCHAR}
</update>
</delete>
<insert
id=
"insertToHistory"
>
INSERT into ser_proj_value_history
select v.* from SER_PROJ_VALUE v
JOIN SER_PROJ p ON p.ID = v.PROJ_ID
WHERE p.PROJ_TYPE = #{projType,jdbcType=DECIMAL}
AND p.IS_BUDGET
&
1>0
AND v.`DATE` = LEFT(#{date,jdbcType=DECIMAL},4)
AND v.DEPT_CODE = #{dept,jdbcType=VARCHAR}
AND v.HOSCODE = #{orgCode,jdbcType=VARCHAR}
</insert>
<update
id=
"updateValue"
statementType=
"CALLABLE"
>
<update
id=
"updateValue"
statementType=
"CALLABLE"
>
{call ESTIMATE_UPDATE_GZD_BL(
{call ESTIMATE_UPDATE_GZD_BL(
#{date,jdbcType=DECIMAL},
#{date,jdbcType=DECIMAL},
...
...
Write
Preview
Markdown
is supported
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