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
a1f5fda5
Commit
a1f5fda5
authored
Oct 21, 2020
by
ilal
Committed by
chenzg
Jul 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
cbf8c6ff
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
91 additions
and
238 deletions
+91
-238
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
+12
-0
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
+27
-0
src/main/java/cn/timer/api/dao/kqmk/KqglAssoDkjlMapper.java
+7
-0
src/main/resources/mapping/kqmk/KqglAssoDkjlMapper.xml
+45
-238
No files found.
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
View file @
a1f5fda5
...
...
@@ -717,6 +717,18 @@ public class ClockInTool {
return
res
;
}
/**
* 时间戳转换时间
*/
public
static
String
stampToDate5
(
String
s
){
String
res
;
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"MM-dd HH:mm"
);
long
lt
=
new
Long
(
s
);
Date
date
=
new
Date
(
lt
);
res
=
simpleDateFormat
.
format
(
date
);
return
res
;
}
public
static
String
Str_Time_formatting
(
String
str
,
String
Format
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
Format
);
...
...
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
View file @
a1f5fda5
...
...
@@ -40,6 +40,7 @@ import cn.timer.api.bean.kqgl.PunchCardDetails;
import
cn.timer.api.bean.kqgl.PunchRecord
;
import
cn.timer.api.bean.kqgl.Schedule
;
import
cn.timer.api.bean.kqgl.SpecialDate
;
import
cn.timer.api.bean.kqmk.KqglAssoDkjl
;
import
cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary
;
import
cn.timer.api.bean.kqmk.KqglAssoRelationSummary
;
import
cn.timer.api.bean.sbgjj.SbgjjAssoDetailed
;
...
...
@@ -71,6 +72,7 @@ import cn.timer.api.dao.kqgl.PunchCardDetailsMapper;
import
cn.timer.api.dao.kqgl.PunchRecordMapper
;
import
cn.timer.api.dao.kqgl.ScheduleMapper
;
import
cn.timer.api.dao.kqgl.SpecialDateMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoDkjlMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoMonthPunchSummaryMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoRelationSummaryMapper
;
import
cn.timer.api.dao.sbgjj.SbgjjAssoDetailedMapper
;
...
...
@@ -3368,6 +3370,9 @@ public class SalaryManagementController {
@Autowired
private
KqglAssoRelationSummaryMapper
kqglassorelationsummarymapper
;
@Autowired
private
KqglAssoDkjlMapper
kqglassodkjlmapper
;
@PostMapping
(
value
=
"/pushpayslip"
)
@ApiOperation
(
value
=
"发送工资条"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
PushPayslip
(
@CurrentUser
UserBean
userBean
,
@RequestBody
PushPayslipDto
pays
)
{
...
...
@@ -3502,10 +3507,32 @@ public class SalaryManagementController {
if
(
xzx
.
getOptionid
()
==
30
)
{
spe
.
setItemname
(
xzx
.
getSalaryitem
());
//
spe
.
setDeduction
(
xzb
==
null
?
0
:
xzb
.
getXzxjg
());
//扣款金额
if
(
xzx
.
getGsid
()
==
1
)
{
//次数
HolidayInquiryDto
cdcs
=
kqglassodkjlmapper
.
TimesBeingLateLeavingEarly
(
userBean
.
getOrgCode
(),
pays
.
getUserid
(),
1
,
pays
.
getXzyf
().
substring
(
2
,
7
));
HolidayInquiryDto
ztcs
=
kqglassodkjlmapper
.
TimesBeingLateLeavingEarly
(
userBean
.
getOrgCode
(),
pays
.
getUserid
(),
2
,
pays
.
getXzyf
().
substring
(
2
,
7
));
spe
.
setFieldone
(
"迟到"
+
cdcs
.
getNum
()+
"次"
);
//迟到
spe
.
setFieldtwo
(
"早退"
+
ztcs
.
getNum
()+
"次"
);
//早退
}
else
if
(
xzx
.
getGsid
()
==
2
)
{
//分钟
HolidayInquiryDto
cdfz
=
kqglassodkjlmapper
.
MinutesLateLeaveEarly
(
userBean
.
getOrgCode
(),
pays
.
getUserid
(),
1
,
pays
.
getXzyf
().
substring
(
2
,
7
));
HolidayInquiryDto
ztfz
=
kqglassodkjlmapper
.
MinutesLateLeaveEarly
(
userBean
.
getOrgCode
(),
pays
.
getUserid
(),
2
,
pays
.
getXzyf
().
substring
(
2
,
7
));
spe
.
setFieldone
(
"迟到"
+
cdfz
.
getBalance
()+
"分钟"
);
//迟到
spe
.
setFieldtwo
(
"早退"
+
ztfz
.
getBalance
()+
"分钟"
);
//早退
}
List
<
KqglAssoDkjl
>
cdzts
=
kqglassodkjlmapper
.
LateleaveEarly
(
userBean
.
getOrgCode
(),
pays
.
getUserid
(),
pays
.
getXzyf
().
substring
(
2
,
7
));
for
(
KqglAssoDkjl
cz
:
cdzts
)
{
AppPaysSalaryTwoDto
two
=
new
AppPaysSalaryTwoDto
();
if
(
cz
.
getType
()
==
1
)
{
//上班
two
.
setTerm
(
"迟到日期"
);
}
else
if
(
cz
.
getType
()
==
2
)
{
//下班
two
.
setTerm
(
"早退日期"
);
}
two
.
setSpecifictime
(
ClockInTool
.
stampToDate5
(
String
.
valueOf
(
cz
.
getDktime
())));
two
.
setField
(
Double
.
valueOf
(
String
.
valueOf
(
cz
.
getResults
())));
detailed
.
add
(
two
);
}
spe
.
setDetailed
(
detailed
);
...
...
src/main/java/cn/timer/api/dao/kqmk/KqglAssoDkjlMapper.java
View file @
a1f5fda5
...
...
@@ -7,6 +7,7 @@ import org.springframework.stereotype.Repository;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.kqmk.KqglAssoDkjl
;
import
cn.timer.api.dto.xcgl.HolidayInquiryDto
;
/**
* 打卡记录表
...
...
@@ -16,4 +17,10 @@ import cn.timer.api.bean.kqmk.KqglAssoDkjl;
@Repository
public
interface
KqglAssoDkjlMapper
extends
BaseMapper
<
KqglAssoDkjl
>
{
List
<
KqglAssoDkjl
>
getDetailedRecordClock
(
Long
start
,
Long
end
,
Integer
userId
,
String
attdate
,
Integer
qyid
);
List
<
KqglAssoDkjl
>
LateleaveEarly
(
int
qyid
,
int
userid
,
String
attdate
);
HolidayInquiryDto
MinutesLateLeaveEarly
(
int
qyid
,
int
userid
,
int
mark
,
String
attdate
);
HolidayInquiryDto
TimesBeingLateLeavingEarly
(
int
qyid
,
int
userid
,
int
mark
,
String
attdate
);
}
src/main/resources/mapping/kqmk/KqglAssoDkjlMapper.xml
View file @
a1f5fda5
...
...
@@ -27,56 +27,52 @@
<result
column=
"punchequipment"
property=
"punchequipment"
/>
<result
column=
"commentary"
property=
"commentary"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id,
dktime,
lon,
lat,
address,
results,
user_id,
type,
status,
sort,
card_type,
mac,
macname,
qyid,
attdate,
attime,
dkmxid,
bcid,
remarks,
punchmode,
punchequipment,
commentary
</sql>
<sql
id=
"Base_Column_List_Alias"
>
id KqglAssoDkjl_id,
dktime KqglAssoDkjl_dktime,
lon KqglAssoDkjl_lon,
lat KqglAssoDkjl_lat,
address KqglAssoDkjl_address,
results KqglAssoDkjl_results,
user_id KqglAssoDkjl_user_id,
type KqglAssoDkjl_type,
status KqglAssoDkjl_status,
sort KqglAssoDkjl_sort,
card_type KqglAssoDkjl_card_type,
mac KqglAssoDkjl_mac,
macname KqglAssoDkjl_macname,
qyid KqglAssoDkjl_qyid,
attdate KqglAssoDkjl_attdate,
attime KqglAssoDkjl_attime,
dkmxid KqglAssoDkjl_dkmxid,
bcid KqglAssoDkjl_bcid,
remarks KqglAssoDkjl_remarks,
punchmode KqglAssoDkjl_punchmode,
punchequipment KqglAssoDkjl_punchequipment,
commentary KqglAssoDkjl_explain
</sql>
<resultMap
id=
"HolidayInquiryDtoMap"
type=
"cn.timer.api.dto.xcgl.HolidayInquiryDto"
>
<result
column=
"num"
property=
"num"
/>
<result
column=
"balance"
property=
"balance"
/>
</resultMap>
<select
id=
"TimesBeingLateLeavingEarly"
resultMap=
"HolidayInquiryDtoMap"
>
select COUNT(*) as num
from kqgl_asso_dkjl dkjl
where dkjl.qyid = #{qyid}
and dkjl.sort != 0
and dkjl.user_id = #{userid}
<if
test=
"mark == 1"
>
and dkjl.`status` in (3,10,13)
</if>
<if
test=
"mark == 2"
>
and dkjl.`status` in (4,11,14)
</if>
and SUBSTR(dkjl.attdate,1,5) = #{attdate}
</select>
<select
id=
"MinutesLateLeaveEarly"
resultMap=
"HolidayInquiryDtoMap"
>
select IFNULL(SUM(dkjl.results),0) as balance
from kqgl_asso_dkjl dkjl
where dkjl.qyid = #{qyid}
and dkjl.sort != 0
and dkjl.user_id = #{userid}
<if
test=
"mark == 1"
>
and dkjl.`status` in (3,10,13)
</if>
<if
test=
"mark == 2"
>
and dkjl.`status` in (4,11,14)
</if>
and SUBSTR(dkjl.attdate,1,5) = #{attdate}
</select>
<select
id=
"LateleaveEarly"
resultMap=
"BaseResultMap"
>
select dkjl.*
from kqgl_asso_dkjl dkjl
where dkjl.qyid = #{qyid}
and dkjl.sort != 0
and dkjl.user_id = #{userid}
and dkjl.`status` in (3,4,10,11,13,14)
and SUBSTR(dkjl.attdate,1,5) = #{attdate}
</select>
<select
id=
"getDetailedRecordClock"
resultMap=
"BaseResultMap"
>
select * from kqgl_asso_dkjl dkjl
...
...
@@ -87,193 +83,5 @@
and dkjl.attdate = #{attdate}
and dkjl.qyid = #{qyid}
</select>
<!--
<insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoDkjl">
INSERT INTO kqgl_asso_dkjl
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test ='null != dktime'>
dktime,
</if>
<if test ='null != lon'>
lon,
</if>
<if test ='null != lat'>
lat,
</if>
<if test ='null != address'>
address,
</if>
<if test ='null != results'>
results,
</if>
<if test ='null != userId'>
user_id,
</if>
<if test ='null != type'>
type,
</if>
<if test ='null != status'>
status,
</if>
<if test ='null != sort'>
sort,
</if>
<if test ='null != cardType'>
card_type,
</if>
<if test ='null != mac'>
mac,
</if>
<if test ='null != macname'>
macname,
</if>
<if test ='null != qyid'>
qyid,
</if>
<if test ='null != attdate'>
attdate,
</if>
<if test ='null != attime'>
attime,
</if>
<if test ='null != dkmxid'>
dkmxid,
</if>
<if test ='null != bcid'>
bcid,
</if>
<if test ='null != remarks'>
remarks,
</if>
<if test ='null != punchmode'>
punchmode,
</if>
<if test ='null != punchequipment'>
punchequipment,
</if>
<if test ='null != commentary'>
commentary
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test ='null != dktime'>
#{dktime},
</if>
<if test ='null != lon'>
#{lon},
</if>
<if test ='null != lat'>
#{lat},
</if>
<if test ='null != address'>
#{address},
</if>
<if test ='null != results'>
#{results},
</if>
<if test ='null != userId'>
#{userId},
</if>
<if test ='null != type'>
#{type},
</if>
<if test ='null != status'>
#{status},
</if>
<if test ='null != sort'>
#{sort},
</if>
<if test ='null != cardType'>
#{cardType},
</if>
<if test ='null != mac'>
#{mac},
</if>
<if test ='null != macname'>
#{macname},
</if>
<if test ='null != qyid'>
#{qyid},
</if>
<if test ='null != attdate'>
#{attdate},
</if>
<if test ='null != attime'>
#{attime},
</if>
<if test ='null != dkmxid'>
#{dkmxid},
</if>
<if test ='null != bcid'>
#{bcid},
</if>
<if test ='null != remarks'>
#{remarks},
</if>
<if test ='null != punchmode'>
#{punchmode},
</if>
<if test ='null != punchequipment'>
#{punchequipment},
</if>
<if test ='null != commentary'>
#{commentary}
</if>
</trim>
</insert>
<delete id="delete" >
DELETE FROM kqgl_asso_dkjl
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssoDkjl">
UPDATE kqgl_asso_dkjl
<set>
<if test ='null != dktime'>dktime = #{dktime},</if>
<if test ='null != lon'>lon = #{lon},</if>
<if test ='null != lat'>lat = #{lat},</if>
<if test ='null != address'>address = #{address},</if>
<if test ='null != results'>results = #{results},</if>
<if test ='null != userId'>user_id = #{userId},</if>
<if test ='null != type'>type = #{type},</if>
<if test ='null != status'>status = #{status},</if>
<if test ='null != sort'>sort = #{sort},</if>
<if test ='null != cardType'>card_type = #{cardType},</if>
<if test ='null != mac'>mac = #{mac},</if>
<if test ='null != macname'>macname = #{macname},</if>
<if test ='null != qyid'>qyid = #{qyid},</if>
<if test ='null != attdate'>attdate = #{attdate},</if>
<if test ='null != attime'>attime = #{attime},</if>
<if test ='null != dkmxid'>dkmxid = #{dkmxid},</if>
<if test ='null != bcid'>bcid = #{bcid},</if>
<if test ='null != remarks'>remarks = #{remarks},</if>
<if test ='null != punchmode'>punchmode = #{punchmode},</if>
<if test ='null != punchequipment'>punchequipment = #{punchequipment},</if>
<if test ='null != commentary'>commentary = #{commentary}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_dkjl
WHERE id = #{id}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
FROM kqgl_asso_dkjl
LIMIT #{offset}, #{pageSize}
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM kqgl_asso_dkjl
</select>
-->
</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