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
8df5694e
Commit
8df5694e
authored
Nov 24, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'master'
Develop See merge request 8timerv2/8timerapiv200!550
parents
2f493572
638fa38d
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
720 additions
and
28 deletions
+720
-28
src/main/java/cn/timer/api/bean/kqgl/AttendanceAssistant.java
+4
-1
src/main/java/cn/timer/api/bean/kqgl/SpecialDate.java
+14
-2
src/main/java/cn/timer/api/bean/kqmk/KqglAssoTeshu.java
+4
-0
src/main/java/cn/timer/api/controller/LoginController.java
+3
-0
src/main/java/cn/timer/api/controller/htzz/HtzzController.java
+1
-1
src/main/java/cn/timer/api/controller/kqgl/AttController.java
+7
-2
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
+4
-0
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+7
-3
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
+15
-3
src/main/java/cn/timer/api/controller/kqgl/atttimer/LastMonthtimingExport.java
+13
-3
src/main/java/cn/timer/api/controller/kqgl/atttimer/RealTimeUpdate.java
+286
-3
src/main/java/cn/timer/api/controller/sbgjj/SocialSecurityFundController.java
+67
-1
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
+150
-2
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+60
-2
src/main/java/cn/timer/api/dto/kqmk/AttendanceAssistantDto.java
+3
-1
src/main/java/cn/timer/api/dto/kqmk/ResttryfixdayDto.java
+15
-0
src/main/java/cn/timer/api/dto/sbgjj/VerifyInsuredDto.java
+15
-0
src/main/java/cn/timer/api/dto/sbgjj/VerifyInsuredDtoListDto.java
+14
-0
src/main/java/cn/timer/api/dto/xcgl/FixedSalaryStaffDto.java
+3
-0
src/main/java/cn/timer/api/dto/xcgl/ImportSalaryfileDto.java
+17
-0
src/main/resources/mapping/kqgl/SpecialDateMapper.xml
+6
-2
src/main/resources/mapping/kqmk/KqglAssoTeshuMapper.xml
+7
-2
src/main/resources/mapping/xcgl/XcglAssoXzdazdyMapper.xml
+5
-0
No files found.
src/main/java/cn/timer/api/bean/kqgl/AttendanceAssistant.java
View file @
8df5694e
...
...
@@ -2,6 +2,7 @@ package cn.timer.api.bean.kqgl;
import
java.io.Serializable
;
import
cn.timer.api.dto.kqmk.ResttryfixdayDto
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
...
...
@@ -27,7 +28,9 @@ public class AttendanceAssistant implements Serializable{
String
[]
attWeekdaysShifts
;
// 周工作日班次【固定排班】
String
[]
attMustPunchData
;
// 必须打卡的日期【固定排班】
String
[]
attMustPunchShifid
;
// 必须打卡的班次id【固定排班】
String
[]
attNonPunchData
;
// 不用打卡的日期【固定排班】
// String[] attNonPunchData;// 不用打卡的日期【固定排班】
ResttryfixdayDto
[]
attNonPunchData
;
String
[]
attShifts
;
// 排班制 选择的班次【排班制】
int
attRemind
;
// 是否开启提醒:0-否、1-是【排班制】
...
...
src/main/java/cn/timer/api/bean/kqgl/SpecialDate.java
View file @
8df5694e
...
...
@@ -22,7 +22,8 @@ public class SpecialDate implements Serializable{
private
Long
lusjTime
;
// 录入时间
private
Integer
luryid
;
// 录入人员
private
Integer
type
;
// 类型 1:必须打卡日期;2:不用打卡日期(扩展字段)
private
Integer
legalday
;
private
String
bcname
;
private
String
sbdk1
;
private
String
xbdk1
;
...
...
@@ -30,7 +31,9 @@ public class SpecialDate implements Serializable{
private
String
xbdk2
;
private
String
sbdk3
;
private
String
xbdk3
;
public
Integer
getId
()
{
return
id
;
}
...
...
@@ -143,4 +146,12 @@ public class SpecialDate implements Serializable{
this
.
xbdk3
=
xbdk3
;
}
public
Integer
getLegalday
()
{
return
legalday
;
}
public
void
setLegalday
(
Integer
legalday
)
{
this
.
legalday
=
legalday
;
}
}
\ No newline at end of file
src/main/java/cn/timer/api/bean/kqmk/KqglAssoTeshu.java
View file @
8df5694e
...
...
@@ -54,5 +54,8 @@ public class KqglAssoTeshu extends Model<KqglAssoTeshu> {
@ApiModelProperty
(
value
=
"类型(1:必须打卡日期;2:不用打卡日期(扩展字段)) 类型(1:必须打卡日期;2:不用打卡日期(扩展字段))"
,
example
=
"101"
)
private
Integer
type
;
@ApiModelProperty
(
value
=
"是否是法定节假日(0:否;1:是)"
,
example
=
"0"
)
private
Integer
legalday
;
}
\ No newline at end of file
src/main/java/cn/timer/api/controller/LoginController.java
View file @
8df5694e
...
...
@@ -51,6 +51,7 @@ import cn.timer.api.bean.qyzx.QyzxAdminMenu;
import
cn.timer.api.bean.qyzx.QyzxEmpEntAsso
;
import
cn.timer.api.bean.qyzx.QyzxEmpLogin
;
import
cn.timer.api.bean.qyzx.QyzxEntInfoM
;
import
cn.timer.api.bean.xcgl.XcglAssoBszqsz
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.bean.zzgl.ZzglAuth
;
import
cn.timer.api.bean.zzgl.ZzglBmgwM
;
...
...
@@ -640,6 +641,8 @@ public class LoginController {
//加班基础设置
KqglAssoOvertimeBasics
.
builder
().
minimumUnit
(
3
).
modifyUserid
(
999
).
modifyTime
(
new
Date
().
getTime
()).
orgCode
(
qyzxEntInfoM
.
getId
()).
build
().
insert
();
//报税周期设置
XcglAssoBszqsz
.
builder
().
taxReturnCycle
(
2
).
qyid
(
qyzxEntInfoM
.
getId
()).
build
().
insert
();
// 绩效设置初始化
JxglBasicSetting
bS
=
jxglService
.
selectAT
(
qyId
);
...
...
src/main/java/cn/timer/api/controller/htzz/HtzzController.java
View file @
8df5694e
...
...
@@ -162,7 +162,7 @@ public class HtzzController {
QueryWrapper
<
HtzzAdminZzda
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
"org_code"
,
userBean
.
getOrgCode
())
.
select
(
"id"
,
"zjmc"
,
"czry"
,
"
czrdh
"
,
"fzrq"
,
"yxdqr"
,
"txkg_type"
).
eq
(
"is_delete"
,
0
).
eq
(
"document_type"
,
htzzQueryDto
.
getDocumentType
())
.
select
(
"id"
,
"zjmc"
,
"czry"
,
"
fzjg
"
,
"fzrq"
,
"yxdqr"
,
"txkg_type"
).
eq
(
"is_delete"
,
0
).
eq
(
"document_type"
,
htzzQueryDto
.
getDocumentType
())
.
gt
(!
StrUtil
.
hasBlank
(
e
),
"yxdqr"
,
!
StrUtil
.
hasBlank
(
e
)
?
e
:
"9999-01-01 00:00:00"
)
.
and
(!
StrUtil
.
hasBlank
(
q
),
wq
->
wq
.
like
(
"zjmc"
,
q
).
or
().
like
(
"czry"
,
q
)).
orderByDesc
(
"lrsj_time"
);
...
...
src/main/java/cn/timer/api/controller/kqgl/AttController.java
View file @
8df5694e
...
...
@@ -101,6 +101,7 @@ import cn.timer.api.dao.yggl.YgglMainEmpMapper;
import
cn.timer.api.dto.kqmk.AttqueryCriteriaDto
;
import
cn.timer.api.dto.kqmk.KqglAssoPbmxDto
;
import
cn.timer.api.dto.kqmk.KqglMainKqzDto
;
import
cn.timer.api.dto.kqmk.ResttryfixdayDto
;
import
cn.timer.api.utils.DateUtil
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
...
...
@@ -1563,7 +1564,10 @@ public class AttController {
List
<
SpecialDate
>
speclist
=
new
ArrayList
<
SpecialDate
>();
String
[]
attmuspudata
=
attass
.
getAttMustPunchData
();
// 必须打卡的日期【固定排班】
String
[]
attmuspushifid
=
attass
.
getAttMustPunchShifid
();
// 必须打卡的班次id【固定排班】
String
[]
attnonpudata
=
attass
.
getAttNonPunchData
();
// 不用打卡的日期【固定排班】
// String[] attnonpudata = attass.getAttNonPunchData();// 不用打卡的日期【固定排班】
ResttryfixdayDto
[]
attnonpudata
=
attass
.
getAttNonPunchData
();
// 不用打卡的日期【固定排班】
if
(
attmuspudata
.
length
>
0
&&
attmuspushifid
.
length
>
0
&&
attass
.
getAtttype
()
==
1
){
for
(
int
m
=
0
;
m
<
attmuspudata
.
length
;
m
++){
SpecialDate
mut
=
new
SpecialDate
();
...
...
@@ -1581,12 +1585,13 @@ public class AttController {
for
(
int
n
=
0
;
n
<
attnonpudata
.
length
;
n
++){
SpecialDate
non
=
new
SpecialDate
();
non
.
setKqzid
(
attgrpid
);
//考勤组id
non
.
setTsrq
(
attnonpudata
[
n
]);
//日期
non
.
setTsrq
(
attnonpudata
[
n
]
.
getDate
()
);
//日期
non
.
setBcid
(
0
);
//班次id
long
date
=
new
Date
().
getTime
();
non
.
setLusjTime
(
date
);
//录入时间
non
.
setLuryid
(
180658
);
// 录入人员***********
non
.
setType
(
2
);
// 类型 1:必须打卡日期;2:不用打卡日期(扩展字段)
non
.
setLegalday
(
attnonpudata
[
n
].
getWhether
());
speclist
.
add
(
non
);
}
}
...
...
src/main/java/cn/timer/api/controller/kqgl/ClockInTool.java
View file @
8df5694e
...
...
@@ -396,6 +396,10 @@ public class ClockInTool {
* @return
*/
public
static
String
[]
doChinFilters
(
String
[]
filters
,
String
target
)
{
target
=
ClockInTool
.
Str_Time_formatting
(
target
,
"yyyy-MM-dd"
);
String
[]
res
=
null
;
if
(
filters
.
length
>
0
)
{
List
<
String
>
tempList
=
Arrays
.
asList
(
filters
);
...
...
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
View file @
8df5694e
...
...
@@ -65,7 +65,6 @@ import cn.timer.api.bean.kqmk.KqglAssoYhkqz;
import
cn.timer.api.bean.kqmk.KqglAssoYhsb
;
import
cn.timer.api.bean.kqmk.KqglAssoZhoupaiban
;
import
cn.timer.api.bean.kqmk.KqglMainKqz
;
import
cn.timer.api.bean.qyxx.CmsContent
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
...
...
@@ -127,6 +126,7 @@ import cn.timer.api.dto.kqmk.LeaveTypeDto;
import
cn.timer.api.dto.kqmk.MachinememberDto
;
import
cn.timer.api.dto.kqmk.ModifyEmployeeBalanceDto
;
import
cn.timer.api.dto.kqmk.OriginalRecordDto
;
import
cn.timer.api.dto.kqmk.ResttryfixdayDto
;
import
cn.timer.api.dto.kqmk.SetConditionsDto
;
import
cn.timer.api.dto.kqmk.StartTimeRestDto
;
import
cn.timer.api.dto.kqmk.UserAttendanceRelDto
;
...
...
@@ -1428,16 +1428,19 @@ public class TimeCardController {
List
<
KqglAssoTeshu
>
speclist
=
new
ArrayList
<
KqglAssoTeshu
>();
String
[]
attmuspudata
=
attass
.
getAttMustPunchData
();
// 必须打卡的日期【固定排班】
String
[]
attmuspushifid
=
attass
.
getAttMustPunchShifid
();
// 必须打卡的班次id【固定排班】
String
[]
attnonpudata
=
attass
.
getAttNonPunchData
();
// 不用打卡的日期【固定排班】
// String[] attnonpudata = attass.getAttNonPunchData();// 不用打卡的日期【固定排班】
ResttryfixdayDto
[]
attnonpudata
=
attass
.
getAttNonPunchData
();
// 不用打卡的日期【固定排班】
if
(
attmuspudata
.
length
>
0
&&
attmuspushifid
.
length
>
0
&&
attass
.
getAtttype
()
==
1
){
for
(
int
m
=
0
;
m
<
attmuspudata
.
length
;
m
++){
KqglAssoTeshu
mut
=
KqglAssoTeshu
.
builder
().
kqzid
(
attid
).
tsrq
(
attmuspudata
[
m
]).
bcid
(
Integer
.
valueOf
(
attmuspushifid
[
m
])).
lusjTime
(
new
Date
().
getTime
()).
luryid
(
userBean
.
getEmpNum
()).
type
(
1
).
build
();
speclist
.
add
(
mut
);
}
}
if
(
attnonpudata
.
length
>
0
&&
attass
.
getAtttype
()
==
1
){
for
(
int
n
=
0
;
n
<
attnonpudata
.
length
;
n
++){
KqglAssoTeshu
non
=
KqglAssoTeshu
.
builder
().
kqzid
(
attid
).
tsrq
(
attnonpudata
[
n
]).
bcid
(
0
).
lusjTime
(
new
Date
().
getTime
()).
luryid
(
userBean
.
getEmpNum
()).
type
(
2
).
build
();
KqglAssoTeshu
non
=
KqglAssoTeshu
.
builder
().
kqzid
(
attid
).
tsrq
(
attnonpudata
[
n
]
.
getDate
()).
legalday
(
attnonpudata
[
n
].
getWhether
()
).
bcid
(
0
).
lusjTime
(
new
Date
().
getTime
()).
luryid
(
userBean
.
getEmpNum
()).
type
(
2
).
build
();
speclist
.
add
(
non
);
}
}
...
...
@@ -1445,6 +1448,7 @@ public class TimeCardController {
kqglassoteshumapper
.
insertKqglAssoTeshuList
(
speclist
);
}
//记录排班(排班制)
List
<
KqglAssoPbmxDto
>
schlist
=
new
ArrayList
<
KqglAssoPbmxDto
>();
KqglAssoPbmxDto
[]
schedules
=
attass
.
getSchedules
();
// 排班日期【排班制】--班次id、日期
...
...
src/main/java/cn/timer/api/controller/kqgl/atttimer/AttendanceTaskTiming.java
View file @
8df5694e
...
...
@@ -101,7 +101,7 @@ public class AttendanceTaskTiming{
//typeid:1-员工 2-考勤组
// @Scheduled(cron = "0 */5 * * * ?")
// @Scheduled(cron = "0
6 17
* * ?")
// @Scheduled(cron = "0
19 18
* * ?")
@Scheduled
(
cron
=
"0 0 8,12,16,20 * * ?"
)
//每天上午8、12点,下午16点,20点 执行
public
void
AttendanceTask
()
throws
ParseException
{
...
...
@@ -170,6 +170,16 @@ public class AttendanceTaskTiming{
KqglMainKqz
attgro
=
kqglmainkqzmapper
.
getAttendanceGroupInformationByUserid
(
user
.
getEmpnum
(),
org_code
);
//目前为止打卡记录
List
<
PunchCardDetails
>
attendance
=
punchcarddetailsmapper
.
selectAttendanceDays
(
user
.
getEmpnum
(),
startDate
,
endDate
);
int
fdjjrnum
=
0
;
if
(
attgro
!=
null
)
{
//特殊日期中 为法定带薪休假的
List
<
KqglAssoTeshu
>
fdjjr
=
KqglAssoTeshu
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
KqglAssoTeshu
>().
lambda
().
eq
(
KqglAssoTeshu:
:
getKqzid
,
attgro
.
getId
()).
eq
(
KqglAssoTeshu:
:
getLegalday
,
1
).
eq
(
KqglAssoTeshu:
:
getType
,
2
));
fdjjrnum
=
fdjjr
.
size
();
}
int
dkjl
=
0
;
//目前为止打卡次数
int
sbqkcs
=
0
,
xbqkcs
=
0
,
dk
=
0
;
String
[]
sblacks
=
new
String
[
31
];
//上班缺卡天数
...
...
@@ -177,7 +187,7 @@ public class AttendanceTaskTiming{
String
[]
dkjtts
=
new
String
[
attendance
.
size
()];
//目前打卡日期明细
int
bccs
=
0
;
if
(
attendance
.
size
()
>
0
)
{
dkjl
=
attendance
.
size
();
dkjl
=
attendance
.
size
()
+
fdjjrnum
;
for
(
PunchCardDetails
pcd:
attendance
){
AttendanceCardListDto
attdate
=
MethodCall
(
org_code
,
user
.
getEmpnum
(),
pcd
.
getData
());
List
<
AttSchedule
>
ashss
=
attdate
.
getAttsch
();
//获取今天应打卡时间
...
...
@@ -320,7 +330,9 @@ public class AttendanceTaskTiming{
}
if
(
appmaps
.
length
>
0
)
{
for
(
String
aa
:
ClockInTool
.
deleteArrayNull
(
zdxx
))
{
appmaps
=
ClockInTool
.
doChinFilters
(
ClockInTool
.
deleteArrayNull
(
appmaps
),
aa
);
if
(
appmaps
.
length
>
0
)
{
appmaps
=
ClockInTool
.
doChinFilters
(
ClockInTool
.
deleteArrayNull
(
appmaps
),
aa
);
}
}
}
...
...
src/main/java/cn/timer/api/controller/kqgl/atttimer/LastMonthtimingExport.java
View file @
8df5694e
...
...
@@ -93,7 +93,7 @@ public class LastMonthtimingExport {
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
// @Scheduled(cron = "0
48 16
* * ?")
// @Scheduled(cron = "0
31 18
* * ?")
@Scheduled
(
cron
=
"0 0 4,20 * * ?"
)
//每天上午4点,下午20点 执行
public
void
LastMonthtimingAttendanceTask
()
throws
ParseException
{
...
...
@@ -160,6 +160,14 @@ public class LastMonthtimingExport {
KqglMainKqz
attgro
=
kqglmainkqzmapper
.
getAttendanceGroupInformationByUserid
(
user
.
getEmpnum
(),
org_code
);
//目前为止打卡记录
List
<
PunchCardDetails
>
attendance
=
punchcarddetailsmapper
.
selectAttendanceDays
(
user
.
getEmpnum
(),
startDate
,
endDate
);
int
fdjjrnum
=
0
;
if
(
attgro
!=
null
)
{
//特殊日期中 为法定带薪休假的
List
<
KqglAssoTeshu
>
fdjjr
=
KqglAssoTeshu
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
KqglAssoTeshu
>().
lambda
().
eq
(
KqglAssoTeshu:
:
getKqzid
,
attgro
.
getId
()).
eq
(
KqglAssoTeshu:
:
getLegalday
,
1
).
eq
(
KqglAssoTeshu:
:
getType
,
2
));
fdjjrnum
=
fdjjr
.
size
();
}
int
dkjl
=
0
;
//目前为止打卡次数
int
sbqkcs
=
0
,
xbqkcs
=
0
,
dk
=
0
;
String
[]
sblacks
=
new
String
[
31
];
//上班缺卡天数
...
...
@@ -167,7 +175,7 @@ public class LastMonthtimingExport {
String
[]
dkjtts
=
new
String
[
attendance
.
size
()];
//目前打卡日期明细
int
bccs
=
0
;
if
(
attendance
.
size
()
>
0
)
{
dkjl
=
attendance
.
size
();
dkjl
=
attendance
.
size
()
+
fdjjrnum
;
for
(
PunchCardDetails
pcd:
attendance
){
AttendanceCardListDto
attdate
=
MethodCall
(
org_code
,
user
.
getEmpnum
(),
pcd
.
getData
());
List
<
AttSchedule
>
ashss
=
attdate
.
getAttsch
();
//获取今天应打卡时间
...
...
@@ -312,7 +320,9 @@ public class LastMonthtimingExport {
// System.out.println(zdxx);
if
(
appmaps
.
length
>
0
)
{
for
(
String
aa
:
ClockInTool
.
deleteArrayNull
(
zdxx
))
{
appmaps
=
ClockInTool
.
doChinFilters
(
ClockInTool
.
deleteArrayNull
(
appmaps
),
aa
);
if
(
appmaps
.
length
>
0
)
{
appmaps
=
ClockInTool
.
doChinFilters
(
ClockInTool
.
deleteArrayNull
(
appmaps
),
aa
);
}
}
}
...
...
src/main/java/cn/timer/api/controller/kqgl/atttimer/RealTimeUpdate.java
View file @
8df5694e
...
...
@@ -40,14 +40,17 @@ import cn.timer.api.dao.kqgl.PunchRecordMapper;
import
cn.timer.api.dao.kqgl.ScheduleMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoDkmxMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoLeaveBalanceMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoPbmxMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoRelationSummaryMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoTeshuMapper
;
import
cn.timer.api.dao.kqmk.KqglMainKqzMapper
;
import
cn.timer.api.dao.qyzx.QyzxEntInfoMMapper
;
import
cn.timer.api.dto.kqmk.AdditionalDto
;
import
cn.timer.api.dto.kqmk.AttLateLate
;
import
cn.timer.api.dto.kqmk.AttSchedule
;
import
cn.timer.api.dto.kqmk.AttSubsidiaryDto
;
import
cn.timer.api.dto.kqmk.AttendanceCardListDto
;
import
cn.timer.api.dto.kqmk.KqglAssoPbmxDto
;
import
cn.timer.api.utils.DateUtil
;
/**
...
...
@@ -148,6 +151,15 @@ public class RealTimeUpdate{
KqglMainKqz
attgro
=
kqglmainkqzmapper
.
getAttendanceGroupInformationByUserid
(
user
.
getEmpnum
(),
org_code
);
//目前为止打卡记录
List
<
PunchCardDetails
>
attendance
=
punchcarddetailsmapper
.
selectAttendanceDays
(
user
.
getEmpnum
(),
startDate
,
endDateyesterday
);
int
fdjjrnum
=
0
;
if
(
attgro
!=
null
)
{
//特殊日期中 为法定带薪休假的
List
<
KqglAssoTeshu
>
fdjjr
=
KqglAssoTeshu
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
KqglAssoTeshu
>().
lambda
().
eq
(
KqglAssoTeshu:
:
getKqzid
,
attgro
.
getId
()).
eq
(
KqglAssoTeshu:
:
getLegalday
,
1
).
eq
(
KqglAssoTeshu:
:
getType
,
2
));
fdjjrnum
=
fdjjr
.
size
();
}
int
dkjl
=
0
;
//目前为止打卡次数
int
sbqkcs
=
0
,
xbqkcs
=
0
,
dk
=
0
;
String
[]
sblacks
=
new
String
[
31
];
//上班缺卡天数
...
...
@@ -155,9 +167,9 @@ public class RealTimeUpdate{
String
[]
dkjtts
=
new
String
[
attendance
.
size
()];
//目前打卡日期明细
int
bccs
=
0
;
if
(
attendance
.
size
()
>
0
)
{
dkjl
=
attendance
.
size
();
dkjl
=
attendance
.
size
()
+
fdjjrnum
;
for
(
PunchCardDetails
pcd:
attendance
){
AttendanceCardListDto
attdate
=
clockincontroller
.
MethodCall
(
org_code
,
user
.
getEmpnum
(),
pcd
.
getData
());
AttendanceCardListDto
attdate
=
MethodCall
(
org_code
,
user
.
getEmpnum
(),
pcd
.
getData
());
List
<
AttSchedule
>
ashss
=
attdate
.
getAttsch
();
//获取今天应打卡时间
if
(
EmptyUtil
.
isNotEmpty
(
attdate
.
getAttsch
())
&&
ashss
.
get
(
0
).
getId
()
!=
0
)
{
//班次不为空
bccs
=
attdate
.
getAttsch
().
size
();
...
...
@@ -296,7 +308,10 @@ public class RealTimeUpdate{
}
if
(
appmaps
.
length
>
0
)
{
for
(
String
aa
:
ClockInTool
.
deleteArrayNull
(
zdxx
))
{
appmaps
=
ClockInTool
.
doChinFilters
(
ClockInTool
.
deleteArrayNull
(
appmaps
),
aa
);
if
(
appmaps
.
length
>
0
)
{
appmaps
=
ClockInTool
.
doChinFilters
(
ClockInTool
.
deleteArrayNull
(
appmaps
),
aa
);
}
}
}
...
...
@@ -879,4 +894,272 @@ public class RealTimeUpdate{
}
@Autowired
private
KqglAssoPbmxMapper
kqglassopbmxmapper
;
/**
* @param qyid
* @param userid
* @param date
* @return
* 获取当天打卡班次数据
*/
public
AttendanceCardListDto
MethodCall
(
int
qyid
,
int
userid
,
String
date
)
throws
ParseException
{
AttendanceCardListDto
attcar
=
new
AttendanceCardListDto
();
String
str
=
null
;
if
(!(
""
).
equals
(
date
)){
str
=
date
;
}
else
{
Date
d
=
new
Date
();
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
str
=
sdf
.
format
(
d
);
}
KqglMainKqz
attgro
=
kqglmainkqzmapper
.
getAttendanceGroupInformationByUserid
(
userid
,
qyid
);
//考勤组信息
//pbfs:排班方式 1:固定排班;2:自由排班;3:自由工时
if
(
attgro
!=
null
){
//判断当前用户是否加入到考勤组
//排班制
KqglAssoPbmxDto
jrpb
=
kqglassopbmxmapper
.
getScheduleSpecificAttendance
(
attgro
.
getId
(),
userid
,
str
);
//固定排班
int
week
=
Integer
.
valueOf
(
ClockInTool
.
dateToWeek
(
str
));
//4
KqglAssoZhoupaiban
atwek
=
KqglAssoZhoupaiban
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoZhoupaiban
>().
lambda
().
eq
(
KqglAssoZhoupaiban:
:
getKqzid
,
attgro
.
getId
())
.
eq
(
KqglAssoZhoupaiban:
:
getType
,
week
).
ne
(
KqglAssoZhoupaiban:
:
getBcid
,
0
));
if
(
attgro
.
getPbfs
()
==
1
){
//固定排班
if
(
atwek
!=
null
){
//有固定周排班
KqglAssoTeshu
rest
=
KqglAssoTeshu
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoTeshu
>().
lambda
().
eq
(
KqglAssoTeshu:
:
getKqzid
,
attgro
.
getId
())
.
eq
(
KqglAssoTeshu:
:
getTsrq
,
str
).
eq
(
KqglAssoTeshu:
:
getBcid
,
0
));
if
(
rest
!=
null
){
//今天休息 Sort返回0【特殊日期--休息】
List
<
AttSchedule
>
atts
=
new
ArrayList
<
AttSchedule
>();
AttSchedule
as
=
AttSchedule
.
builder
().
id
(
0
).
sort
(
0
).
time
(
0
l
).
starttime
(
0
l
).
endtime
(
0
l
).
build
();
atts
.
add
(
as
);
attcar
.
setAttsch
(
atts
);
}
else
{
//今天上班
KqglAssoBcsz
bcz
=
KqglAssoBcsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
atwek
.
getBcid
()));
if
(
bcz
!=
null
){
Getshiftinformationbatch
(
bcz
,
attcar
,
str
);
}
}
}
else
{
//必须打卡
KqglAssoTeshu
tsri
=
KqglAssoTeshu
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoTeshu
>().
lambda
().
eq
(
KqglAssoTeshu:
:
getKqzid
,
attgro
.
getId
())
.
eq
(
KqglAssoTeshu:
:
getTsrq
,
str
).
ne
(
KqglAssoTeshu:
:
getBcid
,
0
));
if
(
tsri
!=
null
){
KqglAssoBcsz
tsrq
=
KqglAssoBcsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
tsri
.
getBcid
()));
if
(
tsrq
!=
null
){
Getshiftinformationbatch
(
tsrq
,
attcar
,
str
);
}
}
else
{
//休息
List
<
AttSchedule
>
atts
=
new
ArrayList
<
AttSchedule
>();
AttSchedule
as
=
AttSchedule
.
builder
().
id
(
0
).
sort
(
0
).
time
(
0
l
).
starttime
(
0
l
).
endtime
(
0
l
).
build
();
atts
.
add
(
as
);
attcar
.
setAttsch
(
atts
);
}
}
}
else
if
(
attgro
.
getPbfs
()
==
2
){
//自由排班
//未排班时,员工可选择班次打卡
// if(attgro.getIsXzbcdk() == 1){
// attcar.setOptscheduling(true);
// }else{
// attcar.setOptscheduling(false);
// }
if
(
jrpb
!=
null
){
if
(
jrpb
.
getBcid
()
!=
0
){
//有班次时("Bcid"不为0时)
KqglAssoBcsz
tsrq
=
KqglAssoBcsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
jrpb
.
getBcid
()));
/**已简化**/
Getshiftinformationbatch
(
tsrq
,
attcar
,
str
);
}
else
{
//当天排班为休息
List
<
AttSchedule
>
atts1
=
new
ArrayList
<
AttSchedule
>();
AttSchedule
as
=
AttSchedule
.
builder
().
id
(
0
).
sort
(
0
).
time
(
0
l
).
starttime
(
0
l
).
endtime
(
0
l
).
build
();
atts1
.
add
(
as
);
attcar
.
setAttsch
(
atts1
);
}
}
}
else
{
//自由工时
KqglAssoZhoupaiban
wekz
=
KqglAssoZhoupaiban
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoZhoupaiban
>().
lambda
().
eq
(
KqglAssoZhoupaiban:
:
getKqzid
,
attgro
.
getId
())
.
eq
(
KqglAssoZhoupaiban:
:
getBcid
,
0
).
eq
(
KqglAssoZhoupaiban:
:
getType
,
week
));
if
(
wekz
!=
null
){
//
String
dada
=
str
+
" "
+
attgro
.
getKqkssjTime
()+
":00"
;
attcar
.
setStapclotime
(
Long
.
valueOf
(
ClockInTool
.
dateToStamp
(
dada
)));
}
if
(!(
""
).
equals
(
attgro
.
getJbzdsc
())){
attcar
.
setCanpunchworkdate
(
Double
.
valueOf
(
attgro
.
getJbzdsc
()));
//上班打卡后多久大下班卡
}
}
if
(
jrpb
!=
null
||
atwek
!=
null
){
KqglAssoBcsz
shif
=
KqglAssoBcsz
.
builder
().
build
();
if
(
attgro
.
getPbfs
()
==
1
){
shif
=
shif
.
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
atwek
.
getBcid
()));
}
else
if
(
attgro
.
getPbfs
()
==
2
){
shif
=
shif
.
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
jrpb
.
getBcid
()));
}
if
(
shif
!=
null
){
if
(
shif
.
getIsXbdk
()
==
1
){
attcar
.
setNoclockout
(
true
);
// 下班不用打卡
}
else
{
attcar
.
setNoclockout
(
false
);
// 下班不用打卡
}
attcar
.
setAllowlate
(
shif
.
getYxcdfzs
());
// 允许迟到分钟数
attcar
.
setSeriouslate
(
shif
.
getYzcdfzs
());
// 严重迟到分钟数
attcar
.
setAbsenteeismlate
(
shif
.
getKgcdfzs
());
// 旷工迟到分钟数
if
(
shif
.
getIsWzwd
()
==
1
){
attcar
.
setIslatelate
(
true
);
// 晚走晚到
List
<
AttLateLate
>
atwzwd
=
new
ArrayList
<
AttLateLate
>();
int
p
=
0
;
if
(!(
""
).
equals
(
shif
.
getXbwz1
())
&&
!(
""
).
equals
(
shif
.
getSbwd1
())){
p
=
2
;}
if
(!(
""
).
equals
(
shif
.
getXbwz1
())
&&
!(
""
).
equals
(
shif
.
getSbwd1
())
&&
!(
""
).
equals
(
shif
.
getXbwz2
())
&&
!(
""
).
equals
(
shif
.
getSbwd2
())){
p
=
4
;}
if
(!(
""
).
equals
(
shif
.
getXbwz1
())
&&
!(
""
).
equals
(
shif
.
getSbwd1
())
&&
!(
""
).
equals
(
shif
.
getXbwz2
())
&&
!(
""
).
equals
(
shif
.
getSbwd2
())
&&
!(
""
).
equals
(
shif
.
getXbwz3
())
&&
!(
""
).
equals
(
shif
.
getSbwd3
())){
p
=
6
;}
AttLateLate
ala
=
AttLateLate
.
builder
().
build
();
ala
.
setLatewalk
(
shif
.
getXbwz1
());
ala
.
setArrivelate
(
shif
.
getSbwd1
());
atwzwd
.
add
(
ala
);
if
(
p
==
4
||
p
==
6
){
AttLateLate
alat
=
AttLateLate
.
builder
().
build
();
alat
.
setLatewalk
(
shif
.
getXbwz2
());
alat
.
setArrivelate
(
shif
.
getSbwd2
());
atwzwd
.
add
(
alat
);
}
if
(
p
==
6
){
AttLateLate
alas
=
AttLateLate
.
builder
().
build
();
alas
.
setLatewalk
(
shif
.
getXbwz3
());
alas
.
setArrivelate
(
shif
.
getSbwd3
());
atwzwd
.
add
(
alas
);
}
attcar
.
setAttlat
(
atwzwd
);
}
else
{
attcar
.
setIslatelate
(
false
);
// 晚走晚到
}
}
}
attcar
.
setAttgrouptype
(
attgro
.
getPbfs
());
//1:固定排班;2:自由排班;3:自由工时
}
else
{
attcar
.
setAttgrouptype
(
0
);
//1:固定排班;2:自由排班;3:自由工时
}
return
attcar
;
}
/**
* @param shiftm
* @param attcar
* @param str
*/
public
void
Getshiftinformationbatch
(
KqglAssoBcsz
shiftm
,
AttendanceCardListDto
attcar
,
String
str
){
int
isXbdk1Cr
=
shiftm
.
getIsXbdk1Cr
();
//下班1是否次日(0:否;1:是)
int
isSbdk2Cr
=
shiftm
.
getIsSbdk2Cr
();
//上班2是否次日(0:否;1:是)
int
isXbdk2Cr
=
shiftm
.
getIsXbdk2Cr
();
//下班2是否次日(0:否;1:是)
int
isSbdk3Cr
=
shiftm
.
getIsSbdk3Cr
();
//上班3是否次日(0:否;1:是)
int
isXbdk3Cr
=
shiftm
.
getIsXbdk3Cr
();
//下班3是否次日(0:否;1:是)
//次日专用
String
next_day
=
ClockInTool
.
requires_extra_times
(
str
,
1
,
2
,
1
);
List
<
AttSchedule
>
atts
=
new
ArrayList
<
AttSchedule
>();
if
(
shiftm
.
getSxbcs
()
==
1
||
shiftm
.
getSxbcs
()
==
2
||
shiftm
.
getSxbcs
()
==
3
){
//1次上下班
for
(
int
o
=
0
;
o
<
2
;
o
++){
if
(
o
==
0
){
AttSchedule
as
=
AttSchedule
.
builder
().
id
(
shiftm
.
getId
()).
sort
(
1
).
time
(
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
str
+
" "
+
shiftm
.
getSbdk1
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
starttime
((
""
).
equals
(
shiftm
.
getSbqjks1
())
||
shiftm
.
getSbqjks1
()
==
null
?
0
:
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
str
+
" "
+
shiftm
.
getSbqjks1
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
endtime
((
""
).
equals
(
shiftm
.
getSbqjjs1
())
||
shiftm
.
getSbqjjs1
()
==
null
?
0
:
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
str
+
" "
+
shiftm
.
getSbqjjs1
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
nextday
(
0
).
build
();
atts
.
add
(
as
);
}
else
{
//次日
if
(
isXbdk1Cr
>
0
)
{
AttSchedule
as
=
AttSchedule
.
builder
().
id
(
shiftm
.
getId
()).
sort
(
2
).
time
(
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
next_day
+
" "
+
shiftm
.
getXbdk1
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
starttime
((
""
).
equals
(
shiftm
.
getXbqjks1
())
||
shiftm
.
getXbqjks1
()
==
null
?
0
:
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
next_day
+
" "
+
shiftm
.
getXbqjks1
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
endtime
((
""
).
equals
(
shiftm
.
getXbqjjs1
())
||
shiftm
.
getXbqjjs1
()
==
null
?
0
:
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
next_day
+
" "
+
shiftm
.
getXbqjjs1
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
nextday
(
1
).
build
();
atts
.
add
(
as
);
}
else
{
AttSchedule
as
=
AttSchedule
.
builder
().
id
(
shiftm
.
getId
()).
sort
(
2
).
time
(
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
str
+
" "
+
shiftm
.
getXbdk1
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
starttime
((
""
).
equals
(
shiftm
.
getXbqjks1
())
||
shiftm
.
getXbqjks1
()
==
null
?
0
:
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
str
+
" "
+
shiftm
.
getXbqjks1
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
endtime
((
""
).
equals
(
shiftm
.
getXbqjjs1
())
||
shiftm
.
getXbqjjs1
()
==
null
?
0
:
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
str
+
" "
+
shiftm
.
getXbqjjs1
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
nextday
(
0
).
build
();
atts
.
add
(
as
);
}
}
}
attcar
.
setAttsch
(
atts
);
}
if
(
shiftm
.
getSxbcs
()
==
2
||
shiftm
.
getSxbcs
()
==
3
){
//2次上下班
for
(
int
o
=
0
;
o
<
2
;
o
++){
if
(
o
==
0
){
if
(
isSbdk2Cr
>
0
)
{
//次日
AttSchedule
as
=
AttSchedule
.
builder
().
id
(
shiftm
.
getId
()).
sort
(
3
).
time
(
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
next_day
+
" "
+
shiftm
.
getSbdk2
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
starttime
((
""
).
equals
(
shiftm
.
getSbqjks2
())||
shiftm
.
getSbqjks2
()==
null
?
0
:
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
next_day
+
" "
+
shiftm
.
getSbqjks2
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
endtime
((
""
).
equals
(
shiftm
.
getSbqjjs2
())
||
shiftm
.
getSbqjjs2
()==
null
?
0
:
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
next_day
+
" "
+
shiftm
.
getSbqjjs2
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
nextday
(
1
).
build
();
atts
.
add
(
as
);
}
else
{
AttSchedule
as
=
AttSchedule
.
builder
().
id
(
shiftm
.
getId
()).
sort
(
3
).
time
(
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
str
+
" "
+
shiftm
.
getSbdk2
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
starttime
((
""
).
equals
(
shiftm
.
getSbqjks2
())||
shiftm
.
getSbqjks2
()==
null
?
0
:
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
str
+
" "
+
shiftm
.
getSbqjks2
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
endtime
((
""
).
equals
(
shiftm
.
getSbqjjs2
())
||
shiftm
.
getSbqjjs2
()==
null
?
0
:
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
str
+
" "
+
shiftm
.
getSbqjjs2
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
nextday
(
0
).
build
();
atts
.
add
(
as
);
}
}
else
{
if
(
isXbdk2Cr
>
0
)
{
//次日
AttSchedule
as
=
AttSchedule
.
builder
().
id
(
shiftm
.
getId
()).
sort
(
4
).
time
(
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
next_day
+
" "
+
shiftm
.
getXbdk2
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
starttime
((
""
).
equals
(
shiftm
.
getXbqjks2
())
||
shiftm
.
getXbqjks2
()==
null
?
0
:
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
next_day
+
" "
+
shiftm
.
getXbqjks2
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
endtime
((
""
).
equals
(
shiftm
.
getXbqjjs2
())
||
shiftm
.
getXbqjjs2
()==
null
?
0
:
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
next_day
+
" "
+
shiftm
.
getXbqjjs2
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
nextday
(
1
).
build
();
atts
.
add
(
as
);
}
else
{
AttSchedule
as
=
AttSchedule
.
builder
().
id
(
shiftm
.
getId
()).
sort
(
4
).
time
(
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
str
+
" "
+
shiftm
.
getXbdk2
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
starttime
((
""
).
equals
(
shiftm
.
getXbqjks2
())
||
shiftm
.
getXbqjks2
()==
null
?
0
:
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
str
+
" "
+
shiftm
.
getXbqjks2
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
endtime
((
""
).
equals
(
shiftm
.
getXbqjjs2
())
||
shiftm
.
getXbqjjs2
()==
null
?
0
:
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
str
+
" "
+
shiftm
.
getXbqjjs2
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
nextday
(
0
).
build
();
atts
.
add
(
as
);
}
}
}
attcar
.
setAttsch
(
atts
);
}
if
(
shiftm
.
getSxbcs
()
==
3
){
//3次上下班
for
(
int
o
=
0
;
o
<
2
;
o
++){
if
(
o
==
0
){
if
(
isSbdk3Cr
>
0
)
{
//次日
AttSchedule
as
=
AttSchedule
.
builder
().
id
(
shiftm
.
getId
()).
sort
(
5
).
time
(
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
next_day
+
" "
+
shiftm
.
getSbdk3
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
starttime
((
""
).
equals
(
shiftm
.
getSbqjks3
())
||
shiftm
.
getSbqjks3
()
==
null
?
0
:
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
next_day
+
" "
+
shiftm
.
getSbqjks3
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
endtime
((
""
).
equals
(
shiftm
.
getSbqjjs3
())
||
shiftm
.
getSbqjjs3
()
==
null
?
0
:
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
next_day
+
" "
+
shiftm
.
getSbqjjs3
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
nextday
(
1
).
build
();
atts
.
add
(
as
);
}
else
{
AttSchedule
as
=
AttSchedule
.
builder
().
id
(
shiftm
.
getId
()).
sort
(
5
).
time
(
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
str
+
" "
+
shiftm
.
getSbdk3
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
starttime
((
""
).
equals
(
shiftm
.
getSbqjks3
())
||
shiftm
.
getSbqjks3
()
==
null
?
0
:
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
str
+
" "
+
shiftm
.
getSbqjks3
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
endtime
((
""
).
equals
(
shiftm
.
getSbqjjs3
())
||
shiftm
.
getSbqjjs3
()
==
null
?
0
:
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
str
+
" "
+
shiftm
.
getSbqjjs3
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
nextday
(
0
).
build
();
atts
.
add
(
as
);
}
}
else
{
if
(
isXbdk3Cr
>
0
)
{
//次日
AttSchedule
as
=
AttSchedule
.
builder
().
id
(
shiftm
.
getId
()).
sort
(
6
).
time
(
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
next_day
+
" "
+
shiftm
.
getXbdk3
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
starttime
((
""
).
equals
(
shiftm
.
getXbqjks3
())
||
shiftm
.
getXbqjks3
()==
null
?
0
:
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
next_day
+
" "
+
shiftm
.
getXbqjks3
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
endtime
((
""
).
equals
(
shiftm
.
getXbqjjs3
())
||
shiftm
.
getXbqjjs3
()
==
null
?
0
:
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
next_day
+
" "
+
shiftm
.
getXbqjjs3
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
nextday
(
1
).
build
();
atts
.
add
(
as
);
}
else
{
AttSchedule
as
=
AttSchedule
.
builder
().
id
(
shiftm
.
getId
()).
sort
(
6
).
time
(
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
str
+
" "
+
shiftm
.
getXbdk3
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
starttime
((
""
).
equals
(
shiftm
.
getXbqjks3
())
||
shiftm
.
getXbqjks3
()==
null
?
0
:
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
str
+
" "
+
shiftm
.
getXbqjks3
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
endtime
((
""
).
equals
(
shiftm
.
getXbqjjs3
())
||
shiftm
.
getXbqjjs3
()
==
null
?
0
:
Long
.
valueOf
(
ClockInTool
.
dateToStamp
((
str
+
" "
+
shiftm
.
getXbqjjs3
()+
":00"
).
replaceAll
(
"\r|\n"
,
""
))))
.
nextday
(
0
).
build
();
atts
.
add
(
as
);
}
}
}
attcar
.
setAttsch
(
atts
);
}
}
}
src/main/java/cn/timer/api/controller/sbgjj/SocialSecurityFundController.java
View file @
8df5694e
...
...
@@ -7,7 +7,9 @@ import java.text.SimpleDateFormat;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.validation.annotation.Validated
;
...
...
@@ -25,6 +27,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
import
cn.hutool.core.util.StrUtil
;
import
cn.timer.api.bean.sbgjj.SbgjjAdminCbry
;
...
...
@@ -35,7 +39,7 @@ import cn.timer.api.bean.sbgjj.SbgjjAssoDetailed;
import
cn.timer.api.bean.sbgjj.SbgjjAssoYjzd
;
import
cn.timer.api.bean.sbgjj.SbgjjTypeDetails
;
import
cn.timer.api.bean.sbgjj.SbgjjYjCsbh
;
import
cn.timer.api.bean.xcgl.XcglAsso
Jsgzzx
;
import
cn.timer.api.bean.xcgl.XcglAsso
Bszqsz
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
...
...
@@ -57,6 +61,9 @@ import cn.timer.api.dto.sbgjj.SearchPlanDto;
import
cn.timer.api.dto.sbgjj.SocialSecurityFundDto
;
import
cn.timer.api.dto.sbgjj.SocialfundDto
;
import
cn.timer.api.dto.sbgjj.StopimmediatelyDto
;
import
cn.timer.api.dto.sbgjj.VerifyInsuredDto
;
import
cn.timer.api.dto.sbgjj.VerifyInsuredDtoListDto
;
import
cn.timer.api.dto.xcgl.ImportDescriptionDto
;
import
cn.timer.api.utils.ResponseResult
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
...
...
@@ -1514,6 +1521,65 @@ public class SocialSecurityFundController {
return
ResultUtil
.
data
(
yjzlist
,
"成功"
);
}
@PostMapping
(
value
=
"/verifytheinsured"
)
@ApiOperation
(
value
=
"验证参保人员"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
40
)
public
Result
<
Object
>
Verifytheinsured
(
@CurrentUser
UserBean
userBean
,
@RequestBody
VerifyInsuredDtoListDto
verinlist
)
{
int
toinsert
=
0
;
//新增
int
toupdate
=
0
;
//更新
int
failure
=
0
;
//失败
List
<
Map
<
String
,
String
>>
reasons
=
Lists
.
newArrayList
();
List
<
YgglMainEmp
>
ygs
=
new
ArrayList
<
YgglMainEmp
>();
VerifyInsuredDto
[]
verin
=
verinlist
.
getVerin
();
if
(
verin
.
length
>
0
){
for
(
int
n
=
0
;
n
<
verin
.
length
;
n
++){
Map
<
String
,
String
>
map
=
Maps
.
newHashMap
();
String
name
=
verin
[
n
].
getEmpname
();
try
{
YgglMainEmp
yg
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getName
,
verin
[
n
].
getEmpname
()).
eq
(
YgglMainEmp:
:
getPhone
,
verin
[
n
].
getPhone
())
.
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()));
if
(
yg
!=
null
)
{
YgglMainEmp
ygl
=
YgglMainEmp
.
builder
().
build
();
ygl
.
setName
(
yg
.
getName
());
ygl
.
setEmpNum
(
yg
.
getEmpNum
());
ygs
.
add
(
ygl
);
toinsert
++;
}
else
{
failure
++;
map
.
put
(
"name"
,
name
);
map
.
put
(
"msg"
,
"该员工不存在"
);
reasons
.
add
(
map
);
}
}
catch
(
Exception
e
)
{
failure
++;
map
.
put
(
"name"
,
name
);
map
.
put
(
"msg"
,
StringUtils
.
isBlank
(
e
.
getMessage
())
?
"必填数据出现空值"
:
e
.
getMessage
());
reasons
.
add
(
map
);
}
}
}
ImportDescriptionDto
imds
=
new
ImportDescriptionDto
();
imds
.
setSuccess
(
toinsert
+
toupdate
);
//成功
imds
.
setToinsert
(
toinsert
);
imds
.
setToupdate
(
toupdate
);
//更新
imds
.
setFailure
(
failure
);
//失败
imds
.
setReasons
(
reasons
);
// return ResultUtil.data(ygs, "成功");
return
ResultUtil
.
datas
(
ygs
,
imds
,
"成功"
);
}
@Value
(
"${config-8timer.environmental-science}"
)
public
String
environmental_science
;
...
...
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
View file @
8df5694e
...
...
@@ -1497,6 +1497,153 @@ public class SalaryManagementController {
return
ResultUtil
.
data
(
imds
,
"导入成功"
);
}
/**
* 导入薪资
* @throws ParseException
*/
@PostMapping
(
value
=
"/paysalaryfile"
)
@ApiOperation
(
value
=
"导入薪资"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
paySalaryfile
(
@CurrentUser
UserBean
userBean
,
@Validated
@RequestBody
ValidList
<
ImportSalaryfileDto
>
impor
)
{
int
toinsert
=
0
;
//新增
int
toupdate
=
0
;
//更新
int
failure
=
0
;
//失败
List
<
Map
<
String
,
String
>>
reasons
=
Lists
.
newArrayList
();
for
(
ImportSalaryfileDto
file
:
impor
)
{
String
name
=
file
.
getEmpname
();
Map
<
String
,
String
>
map
=
Maps
.
newHashMap
();
try
{
YgglMainEmp
emp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getName
,
file
.
getEmpname
()).
eq
(
YgglMainEmp:
:
getPhone
,
file
.
getPhone
())
.
eq
(
YgglMainEmp:
:
getOrgCode
,
userBean
.
getOrgCode
()));
if
(
emp
!=
null
)
{
if
(
ClockInTool
.
Str_Time_formatting
(
file
.
getSxrq
().
replace
(
"/"
,
"-"
),
"yyyy-MM-dd"
).
length
()
==
10
)
{
//0:定薪 1:调薪
if
(
file
.
getSfdx
()
==
0
)
{
XcglAssoXzdadx
xzdadx
=
XcglAssoXzdadx
.
builder
().
build
();
xzdadx
.
setUserid
(
emp
.
getEmpNum
());
//用户id
xzdadx
.
setSxrq
(
file
.
getSxrq
().
replace
(
"/"
,
"-"
));
//生效日期
xzdadx
.
setAddtime
(
new
Date
().
getTime
());
xzdadx
.
setRemarks
(
""
);
xzdadx
.
setQyid
(
userBean
.
getOrgCode
());
xzdadx
.
setTxzt
(
0
);
//0:使用中;1:历史, 2: 未生效
xcglassoxzdadxmapper
.
xzdadxinsert
(
xzdadx
);
int
zdyid
=
xzdadx
.
getId
();
List
<
XcglAssoXzdaz
>
xzdazlist
=
new
ArrayList
<
XcglAssoXzdaz
>();
CustomDto
[]
cus
=
file
.
getCus
();
List
<
XcglAssoXzdazdy
>
xzs
=
XcglAssoXzdazdy
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
XcglAssoXzdazdy
>().
lambda
().
eq
(
XcglAssoXzdazdy:
:
getQyid
,
userBean
.
getOrgCode
()));
for
(
XcglAssoXzdazdy
xz
:
xzs
)
{
XcglAssoXzdaz
xzdaz
=
XcglAssoXzdaz
.
builder
().
build
();
xzdaz
.
setXzdazdyid
(
xz
.
getId
());
//薪资档案自定义id
xzdaz
.
setRsz
(
"0"
);
//输入值
xzdaz
.
setXzdadxid
(
zdyid
);
//薪资档案-定薪id
xzdaz
.
insert
();
}
if
(
cus
.
length
>
0
){
for
(
int
p
=
0
;
p
<
cus
.
length
;
p
++){
XcglAssoXzdaz
.
builder
().
build
().
delete
(
new
QueryWrapper
<
XcglAssoXzdaz
>().
lambda
().
eq
(
XcglAssoXzdaz:
:
getXzdazdyid
,
cus
[
p
].
getId
()).
eq
(
XcglAssoXzdaz:
:
getXzdadxid
,
zdyid
));
XcglAssoXzdaz
xzdaz
=
new
XcglAssoXzdaz
();
xzdaz
.
setXzdazdyid
(
cus
[
p
].
getId
());
//薪资档案自定义id
xzdaz
.
setRsz
(
cus
[
p
].
getVal
());
//输入值
xzdaz
.
setXzdadxid
(
zdyid
);
//薪资档案-定薪id
xzdazlist
.
add
(
xzdaz
);
}
}
if
(
xzdazlist
.
size
()>
0
){
xcglassoxzdazmapper
.
insertxcglassoxzdazList
(
xzdazlist
);
}
toinsert
++;
}
else
{
// 当前日期
String
curDate
=
DateUtil
.
getStringFormat
(
new
Date
().
getTime
());
// 未生效的调薪记录同一天只能有一条
XcglAssoXzdadx
tmp
=
new
LambdaQueryChainWrapper
<
XcglAssoXzdadx
>(
xcglassoxzdadxmapper
)
.
eq
(
XcglAssoXzdadx:
:
getUserid
,
emp
.
getEmpNum
())
.
eq
(
XcglAssoXzdadx:
:
getTxzt
,
2
)
.
eq
(
XcglAssoXzdadx:
:
getSxrq
,
file
.
getSxrq
())
.
one
();
if
(!
Objects
.
isNull
(
tmp
))
{
return
ResultUtil
.
error
(
"调薪成功失败, 已存在生效日期"
+
file
.
getSxrq
()
+
"的待生效记录, 请到调薪记录页面查看!"
);
}
int
txzt
=
2
;
if
(
DateUtil
.
getFormat
(
file
.
getSxrq
())
<=
DateUtil
.
getFormat
(
curDate
))
{
// 生效日期在当天或之前的, 立即生效, 原使用中的记录变成历史记录
XcglAssoXzdadx
xzds
=
new
LambdaQueryChainWrapper
<
XcglAssoXzdadx
>(
xcglassoxzdadxmapper
)
.
eq
(
XcglAssoXzdadx:
:
getUserid
,
emp
.
getEmpNum
())
.
eq
(
XcglAssoXzdadx:
:
getTxzt
,
0
)
.
one
();
if
(
xzds
!=
null
)
{
XcglAssoXzdadx
txrz
=
XcglAssoXzdadx
.
builder
().
build
();
txrz
.
setTxzt
(
1
);
//0:使用中;1:历史, 2: 未生效
txrz
.
setId
(
xzds
.
getId
());
txrz
.
updateById
();
}
txzt
=
0
;
}
XcglAssoXzdadx
xzdadx
=
XcglAssoXzdadx
.
builder
().
build
();
xzdadx
.
setUserid
(
emp
.
getEmpNum
());
//用户id
xzdadx
.
setSxrq
(
file
.
getSxrq
());
//生效日期
xzdadx
.
setAddtime
(
new
Date
().
getTime
());
xzdadx
.
setXgyhid
(
userBean
.
getEmpNum
());
//修改用户id
xzdadx
.
setRemarks
(
""
);
xzdadx
.
setQyid
(
userBean
.
getOrgCode
());
xzdadx
.
setTxzt
(
txzt
);
xcglassoxzdadxmapper
.
xzdadxinsert
(
xzdadx
);
int
zdyid
=
xzdadx
.
getId
();
List
<
XcglAssoXzdaz
>
xzdazlist
=
new
ArrayList
<
XcglAssoXzdaz
>();
CustomDto
[]
cus
=
file
.
getCus
();
if
(
cus
.
length
>
0
){
for
(
int
p
=
0
;
p
<
cus
.
length
;
p
++){
XcglAssoXzdaz
xzdaz
=
new
XcglAssoXzdaz
();
xzdaz
.
setXzdazdyid
(
cus
[
p
].
getId
());
//薪资档案自定义id
xzdaz
.
setRsz
(
cus
[
p
].
getVal
());
//输入值
xzdaz
.
setXzdadxid
(
zdyid
);
//薪资档案-定薪id
xzdazlist
.
add
(
xzdaz
);
}
}
if
(
xzdazlist
.
size
()>
0
){
xcglassoxzdazmapper
.
insertxcglassoxzdazList
(
xzdazlist
);
}
toinsert
++;
}
}
else
{
failure
++;
map
.
put
(
"name"
,
name
);
map
.
put
(
"msg"
,
"日期格式不对(Excel中输入时间处设置为“短日期”即可)"
);
reasons
.
add
(
map
);
}
}
else
{
failure
++;
map
.
put
(
"name"
,
name
);
map
.
put
(
"msg"
,
"该员工不存在"
);
reasons
.
add
(
map
);
}
}
catch
(
Exception
e
)
{
failure
++;
map
.
put
(
"name"
,
name
);
map
.
put
(
"msg"
,
StringUtils
.
isBlank
(
e
.
getMessage
())
?
"必填数据出现空值"
:
e
.
getMessage
());
reasons
.
add
(
map
);
}
}
ImportDescriptionDto
imds
=
new
ImportDescriptionDto
();
imds
.
setSuccess
(
toinsert
+
toupdate
);
//成功
imds
.
setToinsert
(
toinsert
);
imds
.
setToupdate
(
toupdate
);
//更新
imds
.
setFailure
(
failure
);
//失败
imds
.
setReasons
(
reasons
);
return
ResultUtil
.
data
(
imds
,
"成功"
);
}
@PostMapping
(
value
=
"/determinesalaryrules"
)
@ApiOperation
(
value
=
"是否确定薪资规则"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
DetermineSalaryRules
(
@CurrentUser
UserBean
userBean
,
@RequestBody
SalaryRulesDto
salaryrulesdto
)
{
...
...
@@ -3334,9 +3481,10 @@ public class SalaryManagementController {
XcglAssoBszqsz
bssz
=
XcglAssoBszqsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
XcglAssoBszqsz
>().
lambda
().
eq
(
XcglAssoBszqsz:
:
getQyid
,
orgCode
));
String
taxmonth
=
""
;
if
(
bssz
.
getTaxReturnCycle
().
equals
(
1
))
{
taxmonth
=
indv
.
getTaxMonth
();
// taxmonth = indv.getTaxMonth();
taxmonth
=
indv
.
getSalaryMonth
();
}
else
{
taxmonth
=
SalaryTool
.
getfirstnextMo
(
indv
.
get
Tax
Month
()+
"-01 00:00:00"
);
taxmonth
=
SalaryTool
.
getfirstnextMo
(
indv
.
get
Salary
Month
()+
"-01 00:00:00"
);
}
YgglMainEmp
ygl
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
().
eq
(
YgglMainEmp:
:
getName
,
userName
)
.
eq
(
YgglMainEmp:
:
getPhone
,
phone
).
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
));
...
...
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
8df5694e
...
...
@@ -25,7 +25,12 @@ import javax.transaction.Transactional;
import
cn.timer.api.utils.redis.RedisUtil
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.util.LinkedMultiValueMap
;
import
org.springframework.util.MultiValueMap
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -34,6 +39,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.client.RestTemplate
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -63,9 +69,13 @@ import cn.hutool.poi.excel.ExcelUtil;
import
cn.hutool.poi.excel.ExcelWriter
;
import
cn.timer.api.bean.clazz.CommonArea
;
import
cn.timer.api.bean.clazz.SysRegion
;
import
cn.timer.api.bean.kqgl.UserEquiRelation
;
import
cn.timer.api.bean.kqmk.KqglAssoKqj
;
import
cn.timer.api.bean.kqmk.KqglAssoKqzdkfs
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveEmployeeBalance
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveRules
;
import
cn.timer.api.bean.kqmk.KqglAssoYhkqz
;
import
cn.timer.api.bean.kqmk.KqglAssoYhsb
;
import
cn.timer.api.bean.qyzx.QyzxEmpEntAsso
;
import
cn.timer.api.bean.qyzx.QyzxEmpLogin
;
import
cn.timer.api.bean.yggl.YgglAttaClfjb
;
...
...
@@ -95,6 +105,8 @@ import cn.timer.api.controller.kqgl.ClockInTool;
import
cn.timer.api.controller.kqgl.atttimer.RealTimeUpdate
;
import
cn.timer.api.controller.zzgl.service.ZzglBmgwMService
;
import
cn.timer.api.dao.clazz.CommonAreaMapper
;
import
cn.timer.api.dao.kqgl.UserEquiRelationMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoKqzdkfsMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoLeaveBalanceMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper
;
import
cn.timer.api.dao.qyzx.QyzxEmpLoginMapper
;
...
...
@@ -235,6 +247,14 @@ public class YgglController {
@Autowired
private
RealTimeUpdate
realtimeupdate
;
@Autowired
private
KqglAssoKqzdkfsMapper
kqglassokqzdkfsmapper
;
@Value
(
"${config-8timer.machine8timerUrl}"
)
public
String
mac_command
;
// 回调地址
@Autowired
private
UserEquiRelationMapper
userequirelationmapper
;
/**
* 添加员工档案
*
...
...
@@ -312,6 +332,40 @@ public class YgglController {
if
(
addygdaDto
.
getAttgroupid
()
!=
null
)
{
KqglAssoYhkqz
.
builder
().
kqzid
(
attgroupid
).
userid
(
login
.
getId
()).
qyid
(
userBean
.
getOrgCode
()).
build
().
insert
();
List
<
KqglAssoKqzdkfs
>
kqjs
=
kqglassokqzdkfsmapper
.
selectList
(
new
QueryWrapper
<
KqglAssoKqzdkfs
>().
lambda
().
eq
(
KqglAssoKqzdkfs:
:
getKqzId
,
addygdaDto
.
getAttgroupid
()).
eq
(
KqglAssoKqzdkfs:
:
getType
,
1
));
for
(
KqglAssoKqzdkfs
abp:
kqjs
)
{
KqglAssoKqj
kqj
=
KqglAssoKqj
.
builder
().
id
(
abp
.
getDkfsid
()).
build
().
selectById
();
KqglAssoYhsb
kqjry
=
KqglAssoYhsb
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoYhsb
>().
lambda
().
eq
(
KqglAssoYhsb:
:
getUserId
,
login
.
getId
()).
eq
(
KqglAssoYhsb:
:
getKqjid
,
kqj
.
getId
()));
if
(
kqjry
==
null
)
{
// YgglMainEmp yggluser = YgglMainEmp.builder().build().selectOne(new QueryWrapper<YgglMainEmp>().lambda().eq(YgglMainEmp::getOrgCode, userBean.getOrgCode()).eq(YgglMainEmp::getEmpNum, login.getId()));
String
url
=
mac_command
+
"/addUserName"
;
HttpHeaders
headers
=
new
HttpHeaders
();
MultiValueMap
<
String
,
Object
>
params
=
new
LinkedMultiValueMap
<>();
params
.
add
(
"devId"
,
kqj
.
getCode
());
params
.
add
(
"userId"
,
login
.
getId
());
params
.
add
(
"userName"
,
ygglMainEmp
.
getName
());
RestTemplate
restTemplate
=
new
RestTemplate
();
HttpEntity
httpEntity
=
new
HttpEntity
(
params
,
headers
);
ResponseEntity
<
String
>
request
=
restTemplate
.
postForEntity
(
url
,
httpEntity
,
String
.
class
);
KqglAssoYhsb
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoYhsb
>().
lambda
().
eq
(
KqglAssoYhsb:
:
getUserId
,
login
.
getId
()).
eq
(
KqglAssoYhsb:
:
getKqjid
,
kqj
.
getId
()));
KqglAssoYhsb
uskqj
=
KqglAssoYhsb
.
builder
().
userId
(
login
.
getId
()).
kqjid
(
kqj
.
getId
()).
type
(
1
).
build
();
UserEquiRelation
isgly
=
userequirelationmapper
.
selectByuserId
(
login
.
getId
());
if
(
isgly
!=
null
)
{
uskqj
.
setIsGly
(
isgly
.
getIsGly
());
}
else
{
uskqj
.
setIsGly
(
0
);
}
if
(!
uskqj
.
insert
())
return
ResultUtil
.
error
(
"操作失败--新增用户与设备关系"
);
}
}
}
if
(
syq
==
0
)
{
...
...
@@ -483,10 +537,14 @@ public class YgglController {
List
<
YgglMainEmp
>
listYmp
=
new
ArrayList
<
YgglMainEmp
>();
// 过滤掉 导入数据中, listPhone已存在 的 phone 的对象集合和证件号码
// List<AddygdaDto> list = listAddygdaDto.stream()
// .filter(o -> o != null && !listPhone.contains(o.getPhone()) && !listzjNum.contains(o.getZjNum()))
// .collect(Collectors.toList());
// 过滤掉 导入数据中, listPhone已存在 的 phone 的对象集合
List
<
AddygdaDto
>
list
=
listAddygdaDto
.
stream
()
.
filter
(
o
->
o
!=
null
&&
!
listPhone
.
contains
(
o
.
getPhone
())
&&
!
listzjNum
.
contains
(
o
.
getZjNum
()))
.
collect
(
Collectors
.
toList
());
.
filter
(
o
->
o
!=
null
&&
!
listPhone
.
contains
(
o
.
getPhone
())).
collect
(
Collectors
.
toList
());
// 过滤出 导入数据中, listPhone已存在 的 phone 的对象集合
List
<
AddygdaDto
>
phoneRepetitions
=
listAddygdaDto
.
stream
()
...
...
src/main/java/cn/timer/api/dto/kqmk/AttendanceAssistantDto.java
View file @
8df5694e
...
...
@@ -29,7 +29,9 @@ public class AttendanceAssistantDto implements Serializable{
String
[]
attWeekdaysShifts
;
// 周工作日班次【固定排班】
String
[]
attMustPunchData
;
// 必须打卡的日期【固定排班】
String
[]
attMustPunchShifid
;
// 必须打卡的班次id【固定排班】
String
[]
attNonPunchData
;
// 不用打卡的日期【固定排班】
// String[] attNonPunchData;// 不用打卡的日期【固定排班】
ResttryfixdayDto
[]
attNonPunchData
;
String
[]
attShifts
;
// 排班制 选择的班次【排班制】
int
attRemind
;
// 是否开启提醒:0-否、1-是【排班制】
...
...
src/main/java/cn/timer/api/dto/kqmk/ResttryfixdayDto.java
0 → 100644
View file @
8df5694e
package
cn
.
timer
.
api
.
dto
.
kqmk
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
ResttryfixdayDto
{
private
String
date
;
//日期
private
Integer
whether
;
//是否法定节假日
}
src/main/java/cn/timer/api/dto/sbgjj/VerifyInsuredDto.java
0 → 100644
View file @
8df5694e
package
cn
.
timer
.
api
.
dto
.
sbgjj
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
VerifyInsuredDto
{
private
String
empname
;
private
String
phone
;
}
src/main/java/cn/timer/api/dto/sbgjj/VerifyInsuredDtoListDto.java
0 → 100644
View file @
8df5694e
package
cn
.
timer
.
api
.
dto
.
sbgjj
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
VerifyInsuredDtoListDto
{
VerifyInsuredDto
[]
verin
;
}
src/main/java/cn/timer/api/dto/xcgl/FixedSalaryStaffDto.java
View file @
8df5694e
...
...
@@ -31,5 +31,8 @@ public class FixedSalaryStaffDto implements Serializable {
int
id
;
String
remarks
;
//备注
String
phone
;
//
String
sxrq
;
//
List
<
DefinedItemsDto
>
defdto
=
new
ArrayList
<
DefinedItemsDto
>();
}
src/main/java/cn/timer/api/dto/xcgl/ImportSalaryfileDto.java
0 → 100644
View file @
8df5694e
package
cn
.
timer
.
api
.
dto
.
xcgl
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
ImportSalaryfileDto
{
String
empname
;
// 用户姓名
String
phone
;
// 电话号码
String
sxrq
;
// 生效日期
Integer
sfdx
;
//0:定薪 1:调薪
CustomDto
[]
cus
;
// 自定义输入值
}
src/main/resources/mapping/kqgl/SpecialDateMapper.xml
View file @
8df5694e
...
...
@@ -9,6 +9,7 @@
<result
column=
"lusj_time"
property=
"lusjTime"
jdbcType=
"BIGINT"
/>
<result
column=
"luryid"
property=
"luryid"
jdbcType=
"INTEGER"
/>
<result
column=
"type"
property=
"type"
jdbcType=
"INTEGER"
/>
<result
column=
"legalday"
property=
"legalday"
jdbcType=
"INTEGER"
/>
<result
column=
"bcname"
property=
"bcname"
jdbcType=
"VARCHAR"
/>
<result
column=
"sbdk1"
property=
"sbdk1"
jdbcType=
"VARCHAR"
/>
...
...
@@ -124,7 +125,7 @@
</update>
<insert
id=
"insertKqglAssoTeshuList"
parameterType=
"java.util.List"
>
insert into kqgl_asso_teshu (kqzid, tsrq, bcid, lusj_time, luryid, type)
insert into kqgl_asso_teshu (kqzid, tsrq, bcid, lusj_time, luryid, type
,legalday
)
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"values "
close=
""
separator=
","
>
(
<if
test=
"item.kqzid != null"
>
...
...
@@ -143,7 +144,10 @@
#{item.luryid,jdbcType=INTEGER},
</if>
<if
test=
"item.type != null"
>
#{item.type,jdbcType=INTEGER}
#{item.type,jdbcType=INTEGER},
</if>
<if
test=
"item.legalday != null"
>
#{item.legalday,jdbcType=INTEGER}
</if>
)
</foreach>
...
...
src/main/resources/mapping/kqmk/KqglAssoTeshuMapper.xml
View file @
8df5694e
...
...
@@ -11,6 +11,7 @@
<result
column=
"lusj_time"
property=
"lusjTime"
/>
<result
column=
"luryid"
property=
"luryid"
/>
<result
column=
"type"
property=
"type"
/>
<result
column=
"legalday"
property=
"legalday"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
...
...
@@ -34,7 +35,7 @@
</sql>
<insert
id=
"insertKqglAssoTeshuList"
parameterType=
"java.util.List"
>
insert into kqgl_asso_teshu (kqzid, tsrq, bcid, lusj_time, luryid, type)
insert into kqgl_asso_teshu (kqzid, tsrq, bcid, lusj_time, luryid, type
,legalday
)
<foreach
collection=
"list"
item=
"item"
index=
"index"
open=
"values "
close=
""
separator=
","
>
(
<if
test=
"item.kqzid != null"
>
...
...
@@ -53,7 +54,10 @@
#{item.luryid,jdbcType=INTEGER},
</if>
<if
test=
"item.type != null"
>
#{item.type,jdbcType=INTEGER}
#{item.type,jdbcType=INTEGER},
</if>
<if
test=
"item.legalday != null"
>
#{item.legalday,jdbcType=INTEGER}
</if>
)
</foreach>
...
...
@@ -65,6 +69,7 @@
where teshu.kqzid = #{kqzid}
and SUBSTR(teshu.tsrq,1,7) = #{tsrq}
and teshu.type = #{type}
and teshu.legalday = 0
</select>
<!--
...
...
src/main/resources/mapping/xcgl/XcglAssoXzdazdyMapper.xml
View file @
8df5694e
...
...
@@ -24,6 +24,9 @@
<result
column=
"tratime"
property=
"tratime"
/>
<result
column=
"txzt"
property=
"txzt"
/>
<result
column=
"remarks"
property=
"remarks"
/>
<result
column=
"phone"
property=
"phone"
/>
<result
column=
"sxrq"
property=
"sxrq"
/>
<collection
property=
"defdto"
ofType=
"cn.timer.api.dto.xcgl.DefinedItemsDto"
>
...
...
@@ -202,6 +205,8 @@
when 1 then '正式'
when 2 then '离职中'
else '已离职' end as empjobstatus,
emp.phone,
(select xsz.sxrq from xcgl_asso_xzdadx xsz where xsz.txzt = 0 and xsz.userid = emp.emp_num) as sxrq,
SUBSTR(emp.rz_time,1,10) emprztime ,
SUBSTR(emp.zz_time,1,10) empzztime,
IF(dadx.userid IS NOT NULL,1,0) as sfdx,
...
...
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