Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
8
8timerapiv200
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
8timerv2
8timerapiv200
Commits
224e84a5
Commit
224e84a5
authored
Oct 17, 2020
by
mobh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
发送工资条 接口
parent
585bdb16
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
83 additions
and
149 deletions
+83
-149
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
+13
-40
src/main/java/cn/timer/api/dao/xcgl/XcglAssoGztztMapper.java
+8
-1
src/main/java/cn/timer/api/dto/xcgl/PayslipDetailsDto.java
+4
-0
src/main/java/cn/timer/api/dto/xcgl/PayslipSearchDto.java
+33
-0
src/main/resources/mapping/xcgl/XcglAssoGztztMapper.xml
+25
-108
No files found.
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
View file @
224e84a5
...
@@ -12,6 +12,7 @@ import java.util.Map;
...
@@ -12,6 +12,7 @@ import java.util.Map;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
cn.timer.api.dto.xcgl.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
...
@@ -84,41 +85,6 @@ import cn.timer.api.dao.xcgl.XcglSalaryItemMapper;
...
@@ -84,41 +85,6 @@ import cn.timer.api.dao.xcgl.XcglSalaryItemMapper;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
import
cn.timer.api.dto.kqmk.CalculatingCompensationDto
;
import
cn.timer.api.dto.kqmk.CalculatingCompensationDto
;
import
cn.timer.api.dto.sbgjj.InspersonnelDto
;
import
cn.timer.api.dto.sbgjj.InspersonnelDto
;
import
cn.timer.api.dto.xcgl.AdditionalDeductionDto
;
import
cn.timer.api.dto.xcgl.BuildPayGroupDto
;
import
cn.timer.api.dto.xcgl.CalculatedFieldDto
;
import
cn.timer.api.dto.xcgl.CalculationDto
;
import
cn.timer.api.dto.xcgl.CalculationOptionsDto
;
import
cn.timer.api.dto.xcgl.ChangeSalaryDto
;
import
cn.timer.api.dto.xcgl.CheckSalaryStaffDto
;
import
cn.timer.api.dto.xcgl.CjPayrollGroupDto
;
import
cn.timer.api.dto.xcgl.CustomDto
;
import
cn.timer.api.dto.xcgl.FixedSalaryStaffDto
;
import
cn.timer.api.dto.xcgl.FixedsalaryDto
;
import
cn.timer.api.dto.xcgl.ImportDescriptionDto
;
import
cn.timer.api.dto.xcgl.ImportSalaryDto
;
import
cn.timer.api.dto.xcgl.ImportSalarySetDto
;
import
cn.timer.api.dto.xcgl.IndividualTaxDetailsDto
;
import
cn.timer.api.dto.xcgl.ModifyPayslipDto
;
import
cn.timer.api.dto.xcgl.ModifysalaryruleDto
;
import
cn.timer.api.dto.xcgl.PayCustomDto
;
import
cn.timer.api.dto.xcgl.PayCustomZDYDto
;
import
cn.timer.api.dto.xcgl.PayGroupedDataDto
;
import
cn.timer.api.dto.xcgl.PayTermDto
;
import
cn.timer.api.dto.xcgl.PayrollExceptionDto
;
import
cn.timer.api.dto.xcgl.PayrollGroupDto
;
import
cn.timer.api.dto.xcgl.PayslipDetailsDto
;
import
cn.timer.api.dto.xcgl.PayslipListDto
;
import
cn.timer.api.dto.xcgl.SalaryCustomizationDto
;
import
cn.timer.api.dto.xcgl.SalaryFieldDto
;
import
cn.timer.api.dto.xcgl.SalaryGroupGroupingDto
;
import
cn.timer.api.dto.xcgl.SalaryItemRulesDto
;
import
cn.timer.api.dto.xcgl.SearchSalariedPeopleDto
;
import
cn.timer.api.dto.xcgl.SpecialDeductionDto
;
import
cn.timer.api.dto.xcgl.TjSalaryItemDot
;
import
cn.timer.api.dto.xcgl.XcglAssoGsjsmxDto
;
import
cn.timer.api.dto.xcgl.XcglAssoOptionDto
;
import
cn.timer.api.dto.xcgl.YdMobilePacketDto
;
import
cn.timer.api.utils.DateUtil
;
import
cn.timer.api.utils.DateUtil
;
import
cn.timer.api.utils.ResponseResult
;
import
cn.timer.api.utils.ResponseResult
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.Result
;
...
@@ -1540,7 +1506,7 @@ public class SalaryManagementController {
...
@@ -1540,7 +1506,7 @@ public class SalaryManagementController {
if
(
xtzd
.
getRulestate
()
==
2
||
xtzd
.
getRulestate
()
==
3
||
xtzd
.
getRulestate
()
==
4
)
{
if
(
xtzd
.
getRulestate
()
==
2
||
xtzd
.
getRulestate
()
==
3
||
xtzd
.
getRulestate
()
==
4
)
{
if
(
xtzd
.
getOptionid
()
>
0
)
{
//说明阔以根据表查出结果
if
(
xtzd
.
getOptionid
()
>
0
)
{
//说明阔以根据表查出结果
XcglAssoOption
lbcx
=
new
LambdaQueryChainWrapper
<
XcglAssoOption
>(
xcglassooptionmapper
).
eq
(
XcglAssoOption:
:
getId
,
xtzd
.
getOptionid
()).
one
();
XcglAssoOption
lbcx
=
new
LambdaQueryChainWrapper
<
XcglAssoOption
>(
xcglassooptionmapper
).
eq
(
XcglAssoOption:
:
getId
,
xtzd
.
getOptionid
()).
one
();
if
(
lbcx
.
getTablename
()
!=
null
&&
!
lbcx
.
getTablename
().
equals
(
""
)
&&
lbcx
.
getFieldname
()
!=
null
&&
!
lbcx
.
getFieldname
().
equals
(
""
))
{
if
(
lbcx
!=
null
&&
lbcx
.
getTablename
()
!=
null
&&
!
lbcx
.
getTablename
().
equals
(
""
)
&&
lbcx
.
getFieldname
()
!=
null
&&
!
lbcx
.
getFieldname
().
equals
(
""
))
{
@SuppressWarnings
(
"unused"
)
@SuppressWarnings
(
"unused"
)
String
tablename
=
lbcx
.
getTablename
();
//对应库表名
String
tablename
=
lbcx
.
getTablename
();
//对应库表名
@SuppressWarnings
(
"unused"
)
@SuppressWarnings
(
"unused"
)
...
@@ -2422,10 +2388,10 @@ public class SalaryManagementController {
...
@@ -2422,10 +2388,10 @@ public class SalaryManagementController {
return
new
ResponseResult
().
success
(
"成功"
,
paydan
);
return
new
ResponseResult
().
success
(
"成功"
,
paydan
);
}
}
@
GetMapping
(
value
=
"/details/{id}
"
)
@
PostMapping
(
value
=
"/payslipSearch
"
)
@ApiOperation
(
value
=
"工资条
明细"
,
httpMethod
=
"GE
T"
,
notes
=
"接口发布说明"
)
@ApiOperation
(
value
=
"工资条
搜索"
,
httpMethod
=
"POS
T"
,
notes
=
"接口发布说明"
)
public
ResponseResult
PayslipDetails
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
)
{
public
ResponseResult
payslipSearch
(
@CurrentUser
UserBean
userBean
,
@RequestBody
PayslipSearchDto
dto
)
{
List
<
PayslipDetailsDto
>
paydetlist
=
xcglassogztztmapper
.
PayslipDetails
(
id
,
userBean
.
getOrgCode
()
);
List
<
PayslipDetailsDto
>
paydetlist
=
xcglassogztztmapper
.
payslipSearch
(
dto
);
return
new
ResponseResult
().
success
(
"成功"
,
paydetlist
);
return
new
ResponseResult
().
success
(
"成功"
,
paydetlist
);
}
}
...
@@ -2780,4 +2746,11 @@ public class SalaryManagementController {
...
@@ -2780,4 +2746,11 @@ public class SalaryManagementController {
xcglassoxzbmapper
.
updateBatchXzxjg
(
list
);
xcglassoxzbmapper
.
updateBatchXzxjg
(
list
);
return
new
ResponseResult
().
success
(
"保存成功"
);
return
new
ResponseResult
().
success
(
"保存成功"
);
}
}
@PostMapping
(
value
=
"/sendpayslip/{id}/{fsType}"
)
@ApiOperation
(
value
=
"发送工资条--操作"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
ResponseResult
sendpayslip
(
@CurrentUser
UserBean
userBean
,
@PathVariable
Integer
id
,
@PathVariable
Integer
fsType
)
{
xcglassogztztmapper
.
payslipSend
(
id
,
fsType
);
return
new
ResponseResult
().
success
(
"成功"
);
}
}
}
src/main/java/cn/timer/api/dao/xcgl/XcglAssoGztztMapper.java
View file @
224e84a5
package
cn
.
timer
.
api
.
dao
.
xcgl
;
package
cn
.
timer
.
api
.
dao
.
xcgl
;
import
java.util.List
;
import
java.util.List
;
import
cn.timer.api.dto.xcgl.PayslipSearchDto
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
...
@@ -19,8 +20,14 @@ public interface XcglAssoGztztMapper extends BaseMapper<XcglAssoGztzt> {
...
@@ -19,8 +20,14 @@ public interface XcglAssoGztztMapper extends BaseMapper<XcglAssoGztzt> {
int
deletexcglassogztzt
(
int
gztszid
);
int
deletexcglassogztzt
(
int
gztszid
);
List
<
PayslipDetailsDto
>
PayslipDetails
(
int
gztszid
,
int
qyid
);
List
<
PayslipDetailsDto
>
payslipSearch
(
PayslipSearchDto
dto
);
int
deletegztztByxzzid
(
int
xzzid
);
int
deletegztztByxzzid
(
int
xzzid
);
/**
* 发送
* @param id
* @param fsType
*/
void
payslipSend
(
Integer
id
,
Integer
fsType
);
}
}
src/main/java/cn/timer/api/dto/xcgl/PayslipDetailsDto.java
View file @
224e84a5
...
@@ -23,4 +23,8 @@ public class PayslipDetailsDto implements Serializable {
...
@@ -23,4 +23,8 @@ public class PayslipDetailsDto implements Serializable {
String
dept
;
String
dept
;
String
post
;
String
post
;
/**
* 实发工资
*/
private
double
sfgz
;
}
}
src/main/java/cn/timer/api/dto/xcgl/PayslipSearchDto.java
0 → 100644
View file @
224e84a5
package
cn
.
timer
.
api
.
dto
.
xcgl
;
import
cn.timer.api.utils.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
PayslipSearchDto
extends
Page
{
@ApiModelProperty
(
value
=
"姓名/工号 "
,
example
=
"姓名/工号"
)
String
text
;
@ApiModelProperty
(
value
=
"薪资组id "
,
example
=
"薪资组id"
)
Integer
xzzid
;
@ApiModelProperty
(
value
=
"工资条组id "
,
example
=
"工资条组id"
)
Integer
gztszid
;
@ApiModelProperty
(
value
=
"发送状态 "
,
example
=
"发送状态"
)
private
Integer
fsType
;
@ApiModelProperty
(
value
=
"确认状态 "
,
example
=
"确认状态"
)
private
Integer
qrType
;
@ApiModelProperty
(
value
=
"企业编号 "
,
example
=
"企业编号"
)
Integer
orgcode
;
}
src/main/resources/mapping/xcgl/XcglAssoGztztMapper.xml
View file @
224e84a5
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
<result
column=
"yhqm"
property=
"yhqm"
/>
<result
column=
"yhqm"
property=
"yhqm"
/>
<result
column=
"qyid"
property=
"qyid"
/>
<result
column=
"qyid"
property=
"qyid"
/>
<result
column=
"gztszid"
property=
"gztszid"
/>
<result
column=
"gztszid"
property=
"gztszid"
/>
<result
column=
"sfgz"
property=
"sfgz"
/>
</resultMap>
</resultMap>
<resultMap
id=
"PayslipDetailsMap"
type=
"cn.timer.api.dto.xcgl.PayslipDetailsDto"
>
<resultMap
id=
"PayslipDetailsMap"
type=
"cn.timer.api.dto.xcgl.PayslipDetailsDto"
>
...
@@ -23,6 +24,7 @@
...
@@ -23,6 +24,7 @@
<result
column=
"fstype"
property=
"fstype"
/>
<result
column=
"fstype"
property=
"fstype"
/>
<result
column=
"cktype"
property=
"cktype"
/>
<result
column=
"cktype"
property=
"cktype"
/>
<result
column=
"qrtype"
property=
"qrtype"
/>
<result
column=
"qrtype"
property=
"qrtype"
/>
<result
column=
"sfgz"
property=
"sfgz"
/>
<result
column=
"dept"
property=
"dept"
/>
<result
column=
"dept"
property=
"dept"
/>
<result
column=
"post"
property=
"post"
/>
<result
column=
"post"
property=
"post"
/>
</resultMap>
</resultMap>
...
@@ -37,7 +39,8 @@
...
@@ -37,7 +39,8 @@
fkyj,
fkyj,
yhqm,
yhqm,
qyid,
qyid,
gztszid
gztszid,
sfgz
</sql>
</sql>
<sql
id=
"Base_Column_List_Alias"
>
<sql
id=
"Base_Column_List_Alias"
>
...
@@ -47,13 +50,14 @@
...
@@ -47,13 +50,14 @@
fs_type XcglAssoGztzt_fs_type,
fs_type XcglAssoGztzt_fs_type,
ck_type XcglAssoGztzt_ck_type,
ck_type XcglAssoGztzt_ck_type,
qr_type XcglAssoGztzt_qr_type,
qr_type XcglAssoGztzt_qr_type,
sfgz XcglAssoGztzt_sfgz,
fkyj XcglAssoGztzt_fkyj,
fkyj XcglAssoGztzt_fkyj,
yhqm XcglAssoGztzt_yhqm,
yhqm XcglAssoGztzt_yhqm,
qyid XcglAssoGztzt_qyid,
qyid XcglAssoGztzt_qyid,
gztszid XcglAssoGztzt_gztszid
gztszid XcglAssoGztzt_gztszid
</sql>
</sql>
<select
id=
"
PayslipDetails
"
resultMap=
"PayslipDetailsMap"
>
<select
id=
"
payslipSearch
"
resultMap=
"PayslipDetailsMap"
>
select emp.`name` as empname,
select emp.`name` as empname,
case emp.job_status
case emp.job_status
when 0 then '试用'
when 0 then '试用'
...
@@ -64,16 +68,25 @@
...
@@ -64,16 +68,25 @@
gztzt.ck_type as cktype,
gztzt.ck_type as cktype,
gztzt.qr_type as qrtype,
gztzt.qr_type as qrtype,
gztzt.id,
gztzt.id,
gztzt.sfgz,
bmgw.dept,
bmgw.dept,
bmgw.post
bmgw.post
from xcgl_asso_gztzt gztzt
from xcgl_asso_gztzt gztzt
LEFT JOIN yggl_main_emp as emp on emp.emp_num = gztzt.userid and emp.org_code = #{
qyid
}
LEFT JOIN yggl_main_emp as emp on emp.emp_num = gztzt.userid and emp.org_code = #{
orgcode
}
LEFT JOIN (select m.name as post,um.name as dept,m.id as mid
LEFT JOIN (select m.name as post,um.name as dept,m.id as mid
from zzgl_bmgw_m m
from zzgl_bmgw_m m
left join zzgl_bmgw_m um on um.id = m.up_id
left join zzgl_bmgw_m um on um.id = m.up_id
) as bmgw on bmgw.mid = emp.bmgw_id
) as bmgw on bmgw.mid = emp.bmgw_id
where gztzt.gztszid = #{gztszid}
<if
test=
"xzzid != null"
>
and gztzt.qyid = #{qyid}
LEFT JOIN xcgl_asso_xzury xzury ON xzury.userid = emp.id and xzury.xzzid = #{xzzid}
</if>
where gztzt.qyid = #{orgcode}
<if
test=
"gztszid != null"
>
and gztzt.gztszid = #{gztszid}
</if>
<if
test=
"fsType != null"
>
and gztzt.fs_type = #{fsType}
</if>
<if
test=
"qrType != null"
>
and gztzt.qr_type = #{qrType}
</if>
<if
test=
"text != null and text != ''"
>
and (emp.`name` like CONCAT('%',#{text},'%') or emp.emp_num = #{text})
</if>
</select>
</select>
<delete
id=
"deletexcglassogztzt"
>
<delete
id=
"deletexcglassogztzt"
>
...
@@ -89,7 +102,7 @@
...
@@ -89,7 +102,7 @@
</delete>
</delete>
<insert
id=
"insertxcglassogztztList"
parameterType=
"java.util.List"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
<insert
id=
"insertxcglassogztztList"
parameterType=
"java.util.List"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into xcgl_asso_gztzt (userid,xzyf,fs_type,ck_type,qr_type,fkyj,yhqm,qyid,gztszid)
insert into xcgl_asso_gztzt (userid,xzyf,fs_type,ck_type,qr_type,fkyj,yhqm,qyid,gztszid
,sfgz
)
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"values "
close=
""
separator=
","
>
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"values "
close=
""
separator=
","
>
(
(
<if
test=
"item.userid != null"
>
<if
test=
"item.userid != null"
>
...
@@ -113,6 +126,9 @@
...
@@ -113,6 +126,9 @@
<if
test=
"item.yhqm != null"
>
<if
test=
"item.yhqm != null"
>
#{item.yhqm,jdbcType=VARCHAR},
#{item.yhqm,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"item.sfgz != null"
>
#{item.sfgz,jdbcType=DOUBLE},
</if>
<if
test=
"item.qyid != null"
>
<if
test=
"item.qyid != null"
>
#{item.qyid,jdbcType=INTEGER},
#{item.qyid,jdbcType=INTEGER},
</if>
</if>
...
@@ -123,107 +139,9 @@
...
@@ -123,107 +139,9 @@
</foreach>
</foreach>
</insert>
</insert>
<!-- 发送工资条 操作 -->
<!-- <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.xcgl.XcglAssoGztzt">
<update
id=
"payslipSend"
parameterType=
"java.lang.Integer"
>
INSERT INTO xcgl_asso_gztzt
UPDATE xcgl_asso_gztzt SET fs_type = #{fsType}
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != userid'>
userid,
</if>
<if test ='null != xzyf'>
xzyf,
</if>
<if test ='null != fsType'>
fs_type,
</if>
<if test ='null != ckType'>
ck_type,
</if>
<if test ='null != qrType'>
qr_type,
</if>
<if test ='null != fkyj'>
fkyj,
</if>
<if test ='null != yhqm'>
yhqm,
</if>
<if test ='null != qyid'>
qyid,
</if>
<if test ='null != gztszid'>
gztszid
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != userid'>
#{userid},
</if>
<if test ='null != xzyf'>
#{xzyf},
</if>
<if test ='null != fsType'>
#{fsType},
</if>
<if test ='null != ckType'>
#{ckType},
</if>
<if test ='null != qrType'>
#{qrType},
</if>
<if test ='null != fkyj'>
#{fkyj},
</if>
<if test ='null != yhqm'>
#{yhqm},
</if>
<if test ='null != qyid'>
#{qyid},
</if>
<if test ='null != gztszid'>
#{gztszid}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM xcgl_asso_gztzt
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.xcgl.XcglAssoGztzt">
UPDATE xcgl_asso_gztzt
<set>
<if test ='null != userid'>userid = #{userid},</if>
<if test ='null != xzyf'>xzyf = #{xzyf},</if>
<if test ='null != fsType'>fs_type = #{fsType},</if>
<if test ='null != ckType'>ck_type = #{ckType},</if>
<if test ='null != qrType'>qr_type = #{qrType},</if>
<if test ='null != fkyj'>fkyj = #{fkyj},</if>
<if test ='null != yhqm'>yhqm = #{yhqm},</if>
<if test ='null != qyid'>qyid = #{qyid},</if>
<if test ='null != qyid'>gztszid = #{gztszid}</if>
</set>
WHERE id = #{id}
WHERE id = #{id}
</update>
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM xcgl_asso_gztzt
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM xcgl_asso_gztzt
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM xcgl_asso_gztzt
</select>
-->
</mapper>
</mapper>
\ No newline at end of file
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