Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
e8d92016
Commit
e8d92016
authored
Mar 10, 2023
by
hongguangwu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MVP1.5.2-开户行
parent
47d0d707
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
4 deletions
+59
-4
TBankSet.java
...a/com/yifu/cloud/plus/v1/yifu/salary/entity/TBankSet.java
+9
-0
TBankSetController.java
...ud/plus/v1/yifu/salary/controller/TBankSetController.java
+21
-1
TBankSetService.java
...fu/cloud/plus/v1/yifu/salary/service/TBankSetService.java
+10
-0
TBankSetServiceImpl.java
...plus/v1/yifu/salary/service/impl/TBankSetServiceImpl.java
+13
-0
TBankSetMapper.xml
...u-salary-biz/src/main/resources/mapper/TBankSetMapper.xml
+6
-3
No files found.
yifu-salary/yifu-salary-api/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/entity/TBankSet.java
View file @
e8d92016
...
...
@@ -18,6 +18,7 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
salary
.
entity
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.alibaba.excel.annotation.write.style.HeadFontStyle
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
...
...
@@ -58,4 +59,12 @@ public class TBankSet extends BaseEntity {
@ExcelProperty
(
"开户行"
)
@Schema
(
description
=
"开户行"
)
private
String
bankName
;
/**
* 是否删除0:正常;1:已删除
*/
@ExcelAttribute
(
name
=
"是否删除0:正常;1:已删除"
)
@HeadFontStyle
(
fontHeightInPoints
=
11
)
@ExcelProperty
(
"是否删除0:正常;1:已删除"
)
private
String
deleteFlag
;
}
\ No newline at end of file
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/controller/TBankSetController.java
View file @
e8d92016
...
...
@@ -19,6 +19,8 @@ package com.yifu.cloud.plus.v1.yifu.salary.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.Common
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.ErrorMessage
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.log.annotation.SysLog
;
...
...
@@ -101,6 +103,13 @@ public class TBankSetController {
@PostMapping
@PreAuthorize
(
"@pms.hasPermission('salary_tbankset_add')"
)
public
R
<
Boolean
>
save
(
@RequestBody
TBankSet
tBankSet
)
{
if
(
Common
.
isEmpty
(
tBankSet
.
getBankName
()))
{
return
R
.
failed
(
"开户行不可为空!"
);
}
List
<
TBankSet
>
tBankSetList
=
tBankSetService
.
getList
(
tBankSet
.
getBankName
(),
null
);
if
(
tBankSetList
!=
null
&&
!
tBankSetList
.
isEmpty
())
{
return
R
.
failed
(
"已存在该开户行!"
);
}
return
R
.
ok
(
tBankSetService
.
save
(
tBankSet
));
}
...
...
@@ -115,6 +124,10 @@ public class TBankSetController {
@PutMapping
@PreAuthorize
(
"@pms.hasPermission('salary_tbankset_edit')"
)
public
R
<
Boolean
>
updateById
(
@RequestBody
TBankSet
tBankSet
)
{
List
<
TBankSet
>
tBankSetList
=
tBankSetService
.
getList
(
tBankSet
.
getBankName
(),
tBankSet
.
getId
());
if
(
tBankSetList
!=
null
&&
!
tBankSetList
.
isEmpty
())
{
return
R
.
failed
(
"已存在该开户行!"
);
}
return
R
.
ok
(
tBankSetService
.
updateById
(
tBankSet
));
}
...
...
@@ -129,7 +142,14 @@ public class TBankSetController {
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('salary_tbankset_del')"
)
public
R
<
Boolean
>
removeById
(
@PathVariable
String
id
)
{
return
R
.
ok
(
tBankSetService
.
removeById
(
id
));
TBankSet
bankSet
=
tBankSetService
.
getById
(
id
);
if
(
bankSet
!=
null
)
{
bankSet
.
setDeleteFlag
(
CommonConstants
.
STATUS_DEL
);
tBankSetService
.
updateById
(
bankSet
);
return
R
.
ok
();
}
else
{
return
R
.
failed
(
"未找到!"
);
}
}
/**
...
...
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/TBankSetService.java
View file @
e8d92016
...
...
@@ -58,4 +58,14 @@ public interface TBankSetService extends IService<TBankSet> {
void
listExport
(
HttpServletResponse
response
,
TBankSetSearchVo
searchVo
);
List
<
TBankSet
>
noPageDiy
(
TBankSetSearchVo
searchVo
);
/**
* @param bankName
* @param id
* @Description: 获取list
* @Author: hgw
* @Date: 2023/3/10 18:08
* @return: java.util.List<com.yifu.cloud.plus.v1.yifu.salary.entity.TBankSet>
**/
List
<
TBankSet
>
getList
(
String
bankName
,
String
id
);
}
yifu-salary/yifu-salary-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/salary/service/impl/TBankSetServiceImpl.java
View file @
e8d92016
...
...
@@ -177,6 +177,7 @@ public class TBankSetServiceImpl extends ServiceImpl<TBankSetMapper, TBankSet> i
if
(
Common
.
isNotNull
(
entity
.
getCreateName
()))
{
wrapper
.
eq
(
TBankSet:
:
getCreateName
,
entity
.
getCreateName
());
}
wrapper
.
eq
(
TBankSet:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
);
return
wrapper
;
}
...
...
@@ -255,4 +256,16 @@ public class TBankSetServiceImpl extends ServiceImpl<TBankSetMapper, TBankSet> i
BeanUtil
.
copyProperties
(
excel
,
insert
);
this
.
save
(
insert
);
}
@Override
public
List
<
TBankSet
>
getList
(
String
bankName
,
String
id
)
{
LambdaQueryWrapper
<
TBankSet
>
wrapper
=
Wrappers
.
lambdaQuery
();
wrapper
.
eq
(
TBankSet:
:
getDeleteFlag
,
CommonConstants
.
STATUS_NORMAL
);
wrapper
.
eq
(
TBankSet:
:
getBankName
,
bankName
);
if
(
Common
.
isNotNull
(
id
))
{
wrapper
.
ne
(
TBankSet:
:
getId
,
id
);
}
return
baseMapper
.
selectList
(
wrapper
);
}
}
yifu-salary/yifu-salary-biz/src/main/resources/mapper/TBankSetMapper.xml
View file @
e8d92016
...
...
@@ -31,6 +31,7 @@
<result
property=
"createTime"
column=
"CREATE_TIME"
/>
<result
property=
"updateBy"
column=
"UPDATE_BY"
/>
<result
property=
"updateTime"
column=
"UPDATE_TIME"
/>
<result
property=
"deleteFlag"
column=
"DELETE_FLAG"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
a.ID,
...
...
@@ -39,7 +40,8 @@
a.CREATE_NAME,
a.CREATE_TIME,
a.UPDATE_BY,
a.UPDATE_TIME
a.UPDATE_TIME,
a.DELETE_FLAG
</sql>
<sql
id=
"tBankSet_where"
>
<if
test=
"tBankSet != null"
>
...
...
@@ -72,7 +74,7 @@
<include
refid=
"Base_Column_List"
/>
FROM t_bank_set a
<where>
1=1
a.DELETE_FLAG = '0'
<include
refid=
"tBankSet_where"
/>
</where>
order by a.CREATE_TIME desc
...
...
@@ -83,8 +85,9 @@
SELECT
a.BANK_NAME
FROM t_bank_set a
where a.DELETE_FLAG = '0'
<if
test=
"bankName != null and bankName.trim() != ''"
>
where
a.BANK_NAME = #{bankName}
and
a.BANK_NAME = #{bankName}
</if>
order by a.CREATE_TIME desc
</select>
...
...
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