Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
P
precision-effect
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
耿迪迪
precision-effect
Commits
3e6b4708
Commit
3e6b4708
authored
Jun 20, 2023
by
吴卿华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
借支申请修改
parent
36ec15b4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
473 additions
and
143 deletions
+473
-143
TBorrowingApplyForController.java
.../controller/transaction/TBorrowingApplyForController.java
+18
-3
TBorrowingApplyFor.java
...ain/java/com/zehong/system/domain/TBorrowingApplyFor.java
+30
-2
TBorrowingApplyForMapper.xml
...main/resources/mapper/system/TBorrowingApplyForMapper.xml
+18
-5
index.vue
precision-effect-web/src/views/for/index.vue
+407
-133
No files found.
precision-effect-admin/src/main/java/com/zehong/web/controller/transaction/TBorrowingApplyForController.java
View file @
3e6b4708
...
...
@@ -51,6 +51,10 @@ public class TBorrowingApplyForController extends BaseController
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
TBorrowingApplyFor
tBorrowingApplyFor
)
{
SysUser
user
=
tokenService
.
getLoginUser
(
ServletUtils
.
getRequest
()).
getUser
();
if
(!
"核算部"
.
equals
(
user
.
getDept
().
getDeptName
())){
tBorrowingApplyFor
.
setBorrowingDeptId
(
user
.
getDeptId
());
}
startPage
();
List
<
TBorrowingApplyFor
>
list
=
tBorrowingApplyForService
.
selectTBorrowingApplyForList
(
tBorrowingApplyFor
);
return
getDataTable
(
list
);
...
...
@@ -89,6 +93,10 @@ public class TBorrowingApplyForController extends BaseController
SysUser
user
=
tokenService
.
getLoginUser
(
ServletUtils
.
getRequest
()).
getUser
();
if
(
StringUtils
.
isNotNull
(
user
))
{
tBorrowingApplyFor
.
setHandledByUserId
(
user
.
getUserId
());
//设置经办人部门
tBorrowingApplyFor
.
setBorrowingDeptId
(
user
.
getDeptId
());
//设置审批状态
tBorrowingApplyFor
.
setApprovalStatus
(
1
);
}
tBorrowingApplyFor
.
setRegistrationDate
(
new
Date
());
return
toAjax
(
tBorrowingApplyForService
.
insertTBorrowingApplyFor
(
tBorrowingApplyFor
));
...
...
@@ -102,29 +110,36 @@ public class TBorrowingApplyForController extends BaseController
@PutMapping
public
int
edit
(
@RequestBody
TBorrowingApplyFor
tBorrowingApplyFor
)
{
if
(
tBorrowingApplyFor
.
getApprovalStatus
()==
3
){
//修改借支申请表状态
tBorrowingApplyForService
.
updateTBorrowingApplyFor
(
tBorrowingApplyFor
);
return
3
;
}
/**查询部门余额是否足够*/
int
isSufficient
=
tBorrowingApplyForService
.
selectTacc
(
tBorrowingApplyFor
);
SysUser
user
=
tokenService
.
getLoginUser
(
ServletUtils
.
getRequest
()).
getUser
();
tBorrowingApplyFor
.
setApprovedUserId
(
user
.
getUserId
());
//0部门余额不足 1余额足够
if
(
isSufficient
!=
0
){
tBorrowingApplyFor
.
setApprovalTime
(
new
Date
());
//修改部门余额
tBorrowingApplyForService
.
deletebBalance
(
tBorrowingApplyFor
);
//修改借支申请表状态
tBorrowingApplyForService
.
updateTBorrowingApplyFor
(
tBorrowingApplyFor
);
tBorrowingApplyForService
.
updateTBorrowingApplyFor
(
tBorrowingApplyFor
);
TCashOperate
tCashOperate
=
new
TCashOperate
();
tCashOperate
.
setOperateDeptId
(
tBorrowingApplyFor
.
getBorrowingDeptId
());
tCashOperate
.
setOperateType
(
"2"
);
tCashOperate
.
setOperateAmount
(
tBorrowingApplyFor
.
getTotalFigures
());
tCashOperate
.
setIsDel
(
"0"
);
tCashOperate
.
setOperateType
(
"2"
);
tCashOperate
.
setOperateTime
(
new
Date
());
//增加资金操作记录
tCashOperateService
.
insertTCashOperate
(
tCashOperate
);
return
1
;
}
else
{
tBorrowingApplyFor
.
setApprovalStatus
(
3
);
//
tBorrowingApplyFor.setApprovalStatus(3);
//修改借支申请表状态
tBorrowingApplyForService
.
updateTBorrowingApplyFor
(
tBorrowingApplyFor
);
//
tBorrowingApplyForService.updateTBorrowingApplyFor(tBorrowingApplyFor);
return
2
;
}
...
...
precision-effect-system/src/main/java/com/zehong/system/domain/TBorrowingApplyFor.java
View file @
3e6b4708
...
...
@@ -54,7 +54,7 @@ public class TBorrowingApplyFor extends BaseEntity
private
Long
approvedUserId
;
/** 登记日期 */
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd
HH:mm:ss
"
)
@Excel
(
name
=
"登记日期"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
registrationDate
;
...
...
@@ -66,9 +66,35 @@ public class TBorrowingApplyFor extends BaseEntity
@Excel
(
name
=
"是否删除 0未删除 1删除"
)
private
String
isDel
;
/**审批状态 1未审批 2
审批通过 3审批拒绝
*/
/**审批状态 1未审批 2
通过 3驳回
*/
private
Integer
approvalStatus
;
private
String
deptName
;
/**
* 审批时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@Excel
(
name
=
"登记日期"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
approvalTime
;
public
Date
getApprovalTime
()
{
return
approvalTime
;
}
public
void
setApprovalTime
(
Date
approvalTime
)
{
this
.
approvalTime
=
approvalTime
;
}
public
String
getDeptName
()
{
return
deptName
;
}
public
void
setDeptName
(
String
deptName
)
{
this
.
deptName
=
deptName
;
}
private
String
handledByUserIdName
;
private
String
userIdName
;
...
...
@@ -236,6 +262,8 @@ public class TBorrowingApplyFor extends BaseEntity
", attachmentUrl='"
+
attachmentUrl
+
'\''
+
", isDel='"
+
isDel
+
'\''
+
", approvalStatus="
+
approvalStatus
+
", deptName='"
+
deptName
+
'\''
+
", approvalTime="
+
approvalTime
+
", handledByUserIdName='"
+
handledByUserIdName
+
'\''
+
", userIdName='"
+
userIdName
+
'\''
+
", ApprovedUserIdName='"
+
ApprovedUserIdName
+
'\''
+
...
...
precision-effect-system/src/main/resources/mapper/system/TBorrowingApplyForMapper.xml
View file @
3e6b4708
...
...
@@ -21,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"approvalStatus"
column=
"approval_status"
/>
<result
property=
"approvalTime"
column=
"approval_time"
/>
</resultMap>
...
...
@@ -34,6 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join sys_user c on a.user_id=c.user_id
left join sys_user d on a.approved_user_id=d.user_id
<where>
a.is_del='0'
<if
test=
"feeName != null and feeName != ''"
>
and a.fee_name like concat('%', #{feeName}, '%')
</if>
<if
test=
"borrowingDeptId != null "
>
and a.borrowing_dept_id = #{borrowingDeptId}
</if>
<if
test=
"handledByUserId != null "
>
and a.handled_by_user_id = #{handledByUserId}
</if>
...
...
@@ -50,8 +52,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select
id=
"selectTBorrowingApplyForById"
parameterType=
"Long"
resultMap=
"TBorrowingApplyForResult"
>
<include
refid=
"selectTBorrowingApplyForVo"
/>
where borrowing = #{borrowing}
SELECT a.*,b.nick_name handledByUserIdName,c.nick_name userIdName,d.nick_name ApprovedUserIdName,e.dept_name deptName FROM t_borrowing_apply_for a
left join sys_user b on a.handled_by_user_id=b.user_id
left join sys_user c on a.user_id=c.user_id
left join sys_user d on a.approved_user_id=d.user_id
left join sys_dept e on a.borrowing_dept_id=e.dept_id
where a.borrowing = #{borrowing}
</select>
...
...
@@ -73,6 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"isDel != null"
>
is_del,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"approvalTime != null"
>
approval_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"borrowing != null"
>
#{borrowing},
</if>
...
...
@@ -90,6 +97,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"isDel != null"
>
#{isDel},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"approvalTime != null"
>
#{approvalTime},
</if>
</trim>
</insert>
...
...
@@ -112,13 +120,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"approvalStatus != null"
>
approval_status = #{approvalStatus},
</if>
<if
test=
"approvalTime != null"
>
approval_time = #{approvalTime},
</if>
</trim>
where borrowing = #{borrowing}
</update>
<delete
id=
"deleteTBorrowingApplyForById"
parameterType=
"Long"
>
delete from t_borrowing_apply_for where borrowing = #{borrowing}
</delete>
<!-- <delete id="deleteTBorrowingApplyForById" parameterType="Long">-->
<!-- delete from t_borrowing_apply_for where borrowing = #{borrowing}-->
<!-- </delete>-->
<update
id=
"deleteTBorrowingApplyForById"
parameterType=
"Long"
>
update t_borrowing_apply_for set is_del='1' where borrowing = #{borrowing}
</update>
<delete
id=
"deleteTBorrowingApplyForByIds"
parameterType=
"String"
>
delete from t_borrowing_apply_for where borrowing in
...
...
precision-effect-web/src/views/for/index.vue
View file @
3e6b4708
This diff is collapsed.
Click to expand it.
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