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
7619f8eb
Commit
7619f8eb
authored
Oct 30, 2020
by
mobh
Browse files
Options
Browse Files
Download
Plain Diff
修改冲突
parents
b66f5115
1bf44f61
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
260 additions
and
107 deletions
+260
-107
src/main/java/cn/timer/api/bean/xcgl/XcglAssoXzdadx.java
+1
-1
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
+85
-17
src/main/java/cn/timer/api/controller/xcgl/atttimer/SalaryTaskTiming.java
+114
-0
src/main/java/cn/timer/api/dao/xcgl/XcglAssoXzdadxMapper.java
+11
-0
src/main/java/cn/timer/api/dao/xcgl/XcglAssoXzdazdyMapper.java
+2
-1
src/main/java/cn/timer/api/dto/xcgl/CustomDto.java
+1
-1
src/main/java/cn/timer/api/dto/xcgl/FixedSalaryStaffDto.java
+2
-0
src/main/java/cn/timer/api/dto/xcgl/FixedsalaryDto.java
+2
-1
src/main/java/cn/timer/api/utils/DateUtil.java
+0
-45
src/main/java/cn/timer/api/utils/Page.java
+11
-2
src/main/resources/mapping/xcgl/XcglAssoGztztMapper.xml
+1
-1
src/main/resources/mapping/xcgl/XcglAssoXzdadxMapper.xml
+9
-34
src/main/resources/mapping/xcgl/XcglAssoXzdazdyMapper.xml
+21
-4
No files found.
src/main/java/cn/timer/api/bean/xcgl/XcglAssoXzdadx.java
View file @
7619f8eb
...
...
@@ -62,7 +62,7 @@ public class XcglAssoXzdadx extends Model<XcglAssoXzdadx> {
@ApiModelProperty
(
value
=
"企业id"
,
example
=
"117"
)
private
Integer
qyid
;
@ApiModelProperty
(
value
=
"使用状态(0:使用中;1:历史)"
,
example
=
"0"
)
@ApiModelProperty
(
value
=
"使用状态(0:使用中;1:历史
, 2: 未生效
)"
,
example
=
"0"
)
private
Integer
txzt
;
...
...
src/main/java/cn/timer/api/controller/xcgl/SalaryManagementController.java
View file @
7619f8eb
...
...
@@ -3,19 +3,13 @@ package cn.timer.api.controller.xcgl;
import
java.math.BigDecimal
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
javax.annotation.Resource
;
import
javax.script.ScriptEngine
;
import
javax.script.ScriptEngineManager
;
import
javax.script.ScriptException
;
import
cn.timer.api.bean.sbgjj.SbgjjAssoCbfa
;
import
cn.timer.api.dto.xcgl.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -841,8 +835,10 @@ public class SalaryManagementController {
search
.
getCurrentPage
()
==
null
?
1
:
search
.
getCurrentPage
(),
search
.
getTotalPage
()
==
null
?
10
:
search
.
getTotalPage
());
IPage
<
FixedSalaryStaffDto
>
dxrypage
=
xcglassoxzdazdymapper
.
selectFixedSalaryStaff
(
page
,
search
);
//
return
ResultUtil
.
data
(
dxrypage
,
dxrypage
.
getRecords
(),
"获取自定义薪资组表头信息"
);
long
total
=
xcglassoxzdazdymapper
.
selectFixedSalaryStaffCount
(
search
);
List
<
FixedSalaryStaffDto
>
dxrylist
=
xcglassoxzdazdymapper
.
selectFixedSalaryStaff
(
search
);
page
.
setTotal
(
total
);
return
ResultUtil
.
data
(
page
,
dxrylist
,
"获取自定义薪资组表头信息"
);
}
/**
...
...
@@ -958,12 +954,12 @@ public class SalaryManagementController {
@ApiOperation
(
value
=
"定薪"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
ResponseResult
fixedsalary
(
@CurrentUser
UserBean
userBean
,
@RequestBody
FixedsalaryDto
fixedsalarydto
)
{
XcglAssoXzdadx
xzdadx
=
XcglAssoXzdadx
.
builder
().
build
();
xzdadx
.
setUserid
(
Integer
.
valueOf
(
fixedsalarydto
.
get
I
d
()));
//用户id
xzdadx
.
setUserid
(
Integer
.
valueOf
(
fixedsalarydto
.
get
Useri
d
()));
//用户id
xzdadx
.
setSxrq
(
fixedsalarydto
.
getSxrq
());
//生效日期
xzdadx
.
setAddtime
(
new
Date
().
getTime
());
xzdadx
.
setRemarks
(
fixedsalarydto
.
getRemarks
());
xzdadx
.
setQyid
(
userBean
.
getOrgCode
());
xzdadx
.
setTxzt
(
0
);
//0:使用中;1:
最近使用;2:历史
xzdadx
.
setTxzt
(
0
);
//0:使用中;1:
历史, 2: 未生效
xcglassoxzdadxmapper
.
xzdadxinsert
(
xzdadx
);
int
zdyid
=
xzdadx
.
getId
();
List
<
XcglAssoXzdaz
>
xzdazlist
=
new
ArrayList
<
XcglAssoXzdaz
>();
...
...
@@ -1010,20 +1006,40 @@ public class SalaryManagementController {
@PostMapping
(
value
=
"/payensaad"
)
@ApiOperation
(
value
=
"调薪"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
ResponseResult
EnterSalaryAdjustment
(
@CurrentUser
UserBean
userBean
,
@RequestBody
FixedsalaryDto
fixedsalarydto
)
{
XcglAssoXzdadx
xzds
=
new
LambdaQueryChainWrapper
<
XcglAssoXzdadx
>(
xcglassoxzdadxmapper
).
eq
(
XcglAssoXzdadx:
:
getUserid
,
Integer
.
valueOf
(
fixedsalarydto
.
getId
())).
eq
(
XcglAssoXzdadx:
:
getTxzt
,
0
).
one
();
// 当前日期
String
curDate
=
DateUtil
.
getStringFormat
(
new
Date
().
getTime
());
// 未生效的调薪记录同一天只能有一条
XcglAssoXzdadx
tmp
=
new
LambdaQueryChainWrapper
<
XcglAssoXzdadx
>(
xcglassoxzdadxmapper
)
.
eq
(
XcglAssoXzdadx:
:
getUserid
,
Integer
.
valueOf
(
fixedsalarydto
.
getUserid
()))
.
eq
(
XcglAssoXzdadx:
:
getTxzt
,
2
)
.
eq
(
XcglAssoXzdadx:
:
getSxrq
,
fixedsalarydto
.
getSxrq
())
.
one
();
if
(!
Objects
.
isNull
(
tmp
))
{
return
new
ResponseResult
().
fail
(
"调薪成功失败, 已存在生效日期"
+
fixedsalarydto
.
getSxrq
()
+
"的待生效记录, 请到调薪记录页面查看!"
);
}
int
txzt
=
2
;
if
(
curDate
.
equals
(
fixedsalarydto
.
getSxrq
()))
{
// 生效日期在当天, 立即生效, 原使用中的记录变成历史记录
XcglAssoXzdadx
xzds
=
new
LambdaQueryChainWrapper
<
XcglAssoXzdadx
>(
xcglassoxzdadxmapper
)
.
eq
(
XcglAssoXzdadx:
:
getUserid
,
Integer
.
valueOf
(
fixedsalarydto
.
getUserid
()))
.
eq
(
XcglAssoXzdadx:
:
getTxzt
,
0
)
.
one
();
if
(
xzds
!=
null
)
{
XcglAssoXzdadx
txrz
=
XcglAssoXzdadx
.
builder
().
build
();
txrz
.
setTxzt
(
1
);
//
使用状态(0:使用中;1:历史
txrz
.
setTxzt
(
1
);
//
0:使用中;1:历史, 2: 未生效
txrz
.
setId
(
xzds
.
getId
());
txrz
.
updateById
();
}
txzt
=
0
;
}
XcglAssoXzdadx
xzdadx
=
XcglAssoXzdadx
.
builder
().
build
();
xzdadx
.
setUserid
(
Integer
.
valueOf
(
fixedsalarydto
.
getI
d
()));
//用户id
xzdadx
.
setUserid
(
Integer
.
valueOf
(
fixedsalarydto
.
getUseri
d
()));
//用户id
xzdadx
.
setSxrq
(
fixedsalarydto
.
getSxrq
());
//生效日期
xzdadx
.
setAddtime
(
new
Date
().
getTime
());
xzdadx
.
setXgyhid
(
userBean
.
getEmpNum
());
//修改用户id
xzdadx
.
setRemarks
(
fixedsalarydto
.
getRemarks
());
xzdadx
.
setQyid
(
userBean
.
getOrgCode
());
xzdadx
.
setTxzt
(
0
);
//0:使用中;1:历史
xzdadx
.
setTxzt
(
txzt
);
xcglassoxzdadxmapper
.
xzdadxinsert
(
xzdadx
);
int
zdyid
=
xzdadx
.
getId
();
List
<
XcglAssoXzdaz
>
xzdazlist
=
new
ArrayList
<
XcglAssoXzdaz
>();
...
...
@@ -1042,8 +1058,6 @@ public class SalaryManagementController {
}
return
new
ResponseResult
().
success
(
"调薪成功"
,
xzdadx
);
}
return
new
ResponseResult
().
error
(
"调薪失败"
);
}
/**
* 调薪记录
...
...
@@ -1056,6 +1070,60 @@ public class SalaryManagementController {
}
/**
* 调薪记录编辑保存
*/
@PostMapping
(
value
=
"/saveTXjlEdit"
)
@ApiOperation
(
value
=
"调薪"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
ResponseResult
saveTXjlEdit
(
@CurrentUser
UserBean
userBean
,
@RequestBody
FixedsalaryDto
fixedsalarydto
)
{
// 当前日期
String
curDate
=
DateUtil
.
getStringFormat
(
new
Date
().
getTime
());
// 未生效的调薪记录同一天只能有一条
XcglAssoXzdadx
tmp
=
new
LambdaQueryChainWrapper
<
XcglAssoXzdadx
>(
xcglassoxzdadxmapper
)
.
eq
(
XcglAssoXzdadx:
:
getUserid
,
Integer
.
valueOf
(
fixedsalarydto
.
getUserid
()))
.
eq
(
XcglAssoXzdadx:
:
getTxzt
,
2
)
.
eq
(
XcglAssoXzdadx:
:
getSxrq
,
fixedsalarydto
.
getSxrq
())
.
one
();
if
(!
Objects
.
isNull
(
tmp
)
&&
!
tmp
.
getId
().
equals
(
fixedsalarydto
.
getId
()))
{
return
new
ResponseResult
().
fail
(
"调薪成功失败, 已存在生效日期"
+
fixedsalarydto
.
getSxrq
()
+
"的待生效记录, 请到调薪记录页面查看!"
);
}
int
txzt
=
2
;
if
(
curDate
.
equals
(
fixedsalarydto
.
getSxrq
()))
{
// 生效日期在当天, 立即生效, 原使用中的记录变成历史记录
XcglAssoXzdadx
xzds
=
new
LambdaQueryChainWrapper
<
XcglAssoXzdadx
>(
xcglassoxzdadxmapper
)
.
eq
(
XcglAssoXzdadx:
:
getUserid
,
Integer
.
valueOf
(
fixedsalarydto
.
getUserid
()))
.
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
=
new
XcglAssoXzdadx
();
xzdadx
.
setId
(
fixedsalarydto
.
getId
());
xzdadx
.
setSxrq
(
fixedsalarydto
.
getSxrq
());
//生效日期
xzdadx
.
setAddtime
(
new
Date
().
getTime
());
xzdadx
.
setXgyhid
(
userBean
.
getEmpNum
());
//修改用户id
xzdadx
.
setRemarks
(
fixedsalarydto
.
getRemarks
());
xzdadx
.
setTxzt
(
txzt
);
xcglassoxzdadxmapper
.
updateById
(
xzdadx
);
CustomDto
[]
cus
=
fixedsalarydto
.
getCus
();
if
(
cus
.
length
>
0
){
for
(
int
p
=
0
;
p
<
cus
.
length
;
p
++){
XcglAssoXzdaz
xzdaz
=
new
XcglAssoXzdaz
();
xzdaz
.
setId
(
cus
[
p
].
getId
());
xzdaz
.
setRsz
(
cus
[
p
].
getVal
());
//输入值
xcglassoxzdazmapper
.
updateById
(
xzdaz
);
}
}
return
new
ResponseResult
().
success
(
"保存成功"
);
}
/**
* 删除调薪记录
*/
@DeleteMapping
(
value
=
"/delSalaryAdjustmentRecord/{id}"
)
...
...
src/main/java/cn/timer/api/controller/xcgl/atttimer/SalaryTaskTiming.java
0 → 100644
View file @
7619f8eb
package
cn
.
timer
.
api
.
controller
.
xcgl
.
atttimer
;
import
java.text.DateFormat
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Locale
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.timer.api.bean.xcgl.XcglAssoXzdadx
;
import
cn.timer.api.bean.xcgl.XcglAssoXzdaz
;
import
cn.timer.api.dao.xcgl.XcglAssoXzdadxMapper
;
import
com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
cn.timer.api.bean.kqgl.AttendanceWeeklySch
;
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.kqmk.KqglAssoBcsz
;
import
cn.timer.api.bean.kqmk.KqglAssoDkmx
;
import
cn.timer.api.bean.kqmk.KqglAssoLeaveRules
;
import
cn.timer.api.bean.kqmk.KqglAssoMonthPunchSummary
;
import
cn.timer.api.bean.kqmk.KqglAssoOvertimeBasics
;
import
cn.timer.api.bean.kqmk.KqglAssoPbmx
;
import
cn.timer.api.bean.kqmk.KqglAssoRelationSummary
;
import
cn.timer.api.bean.kqmk.KqglAssoTeshu
;
import
cn.timer.api.bean.kqmk.KqglAssoZhoupaiban
;
import
cn.timer.api.bean.kqmk.KqglMainKqz
;
import
cn.timer.api.bean.kqmk.KqmkRedletterDay
;
import
cn.timer.api.bean.qyzx.QyzxEntInfoM
;
import
cn.timer.api.bean.yggl.YgglMainLzb
;
import
cn.timer.api.controller.kqgl.ClockInController
;
import
cn.timer.api.controller.kqgl.ClockInTool
;
import
cn.timer.api.controller.kqgl.EmptyUtil
;
import
cn.timer.api.dao.kqgl.AttendanceWeeklySchMapper
;
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.kqmk.KqglAssoDkmxMapper
;
import
cn.timer.api.dao.kqmk.KqglAssoLeaveBalanceMapper
;
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.AttSchedule
;
import
cn.timer.api.dto.kqmk.AttSubsidiaryDto
;
import
cn.timer.api.dto.kqmk.AttendanceCardListDto
;
import
cn.timer.api.utils.DateUtil
;
import
javax.annotation.Resource
;
/**
* 调薪记录生效定时任务
*/
//@Component
//@Lazy
@Configuration
//1.主要用于标记配置类,兼备Component的效果。
@EnableScheduling
// 2.开启定时任务
public
class
SalaryTaskTiming
{
// 薪酬管理-定薪
@Resource
private
XcglAssoXzdadxMapper
xcglassoxzdadxmapper
;
//3.添加定时任务 每天凌晨1点执行一次
@Scheduled
(
cron
=
"0 0 1 * * ?"
)
public
void
AttendanceTask
()
throws
ParseException
{
// 使用状态(0:使用中;1:历史, 2: 未生效)
// 当前日期
String
curDate
=
DateUtil
.
getStringFormat
(
new
Date
().
getTime
());
// 获取小于等于当前日期的未生效数据
List
<
XcglAssoXzdadx
>
xzdxlist
=
xcglassoxzdadxmapper
.
listIneffective
(
curDate
);
if
(
CollectionUtil
.
isNotEmpty
(
xzdxlist
))
{
xzdxlist
.
forEach
(
o
->
{
// 将使用中的薪资数据置为历史
XcglAssoXzdadx
dadxUsed
=
new
LambdaQueryChainWrapper
<
XcglAssoXzdadx
>(
xcglassoxzdadxmapper
)
.
eq
(
XcglAssoXzdadx:
:
getUserid
,
o
.
getUserid
())
.
eq
(
XcglAssoXzdadx:
:
getTxzt
,
0
).
one
();
dadxUsed
.
setTxzt
(
1
);
xcglassoxzdadxmapper
.
updateById
(
dadxUsed
);
// 将未生效的薪资数据置为使用中
o
.
setTxzt
(
0
);
xcglassoxzdadxmapper
.
updateById
(
o
);
});
}
// 处理出现多个使用中的错误数据, list 按工号、生效日期升序
List
<
XcglAssoXzdadx
>
listRepeat
=
xcglassoxzdadxmapper
.
listRepeatUsed
();
if
(
CollectionUtil
.
isNotEmpty
(
listRepeat
))
{
for
(
int
i
=
0
;
i
<
listRepeat
.
size
();
i
++)
{
XcglAssoXzdadx
xzdadx
=
listRepeat
.
get
(
i
);
while
((
i
+
1
)
<
listRepeat
.
size
()
&&
xzdadx
.
getUserid
().
equals
(
listRepeat
.
get
(
i
+
1
).
getUserid
()))
{
xzdadx
.
setTxzt
(
1
);
xcglassoxzdadxmapper
.
updateById
(
xzdadx
);
xzdadx
=
listRepeat
.
get
(
i
+
1
);
i
=
i
+
1
;
}
}
}
}
}
src/main/java/cn/timer/api/dao/xcgl/XcglAssoXzdadxMapper.java
View file @
7619f8eb
...
...
@@ -2,6 +2,7 @@ package cn.timer.api.dao.xcgl;
import
java.util.List
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
...
...
@@ -16,4 +17,14 @@ public interface XcglAssoXzdadxMapper extends BaseMapper<XcglAssoXzdadx> {
int
xzdadxinsert
(
XcglAssoXzdadx
xcglassoxzdadx
);
int
insertxcglassoxzdadxList
(
List
<
XcglAssoXzdadx
>
xcglassoxzdadx
);
/**
* 获取小于等于当前日期的未生效数据 yyyy-mm-dd
*/
List
<
XcglAssoXzdadx
>
listIneffective
(
@Param
(
"curDate"
)
String
curDate
);
/**
* 获取使用中多于1条数据的记录
*/
List
<
XcglAssoXzdadx
>
listRepeatUsed
();
}
src/main/java/cn/timer/api/dao/xcgl/XcglAssoXzdazdyMapper.java
View file @
7619f8eb
...
...
@@ -25,7 +25,8 @@ public interface XcglAssoXzdazdyMapper extends BaseMapper<XcglAssoXzdazdy> {
int
dazdyupdate
(
XcglAssoXzdazdy
xcglassoxzdazdy
);
IPage
<
FixedSalaryStaffDto
>
selectFixedSalaryStaff
(
IPage
<
FixedSalaryStaffDto
>
page
,
@Param
(
"param"
)
SearchSalariedPeopleDto
search
);
long
selectFixedSalaryStaffCount
(
@Param
(
"param"
)
SearchSalariedPeopleDto
search
);
List
<
FixedSalaryStaffDto
>
selectFixedSalaryStaff
(
@Param
(
"param"
)
SearchSalariedPeopleDto
search
);
List
<
ChangeSalaryDto
>
AchieveSalaryAdjustment
(
Integer
orgcode
,
Integer
empnum
);
...
...
src/main/java/cn/timer/api/dto/xcgl/CustomDto.java
View file @
7619f8eb
...
...
@@ -15,6 +15,6 @@ public class CustomDto implements Serializable {
*/
private
static
final
long
serialVersionUID
=
-
7594521197951361545L
;
Integer
id
;
//
薪资档案自定义
id
Integer
id
;
//
记录
id
String
val
;
// 输入值
}
src/main/java/cn/timer/api/dto/xcgl/FixedSalaryStaffDto.java
View file @
7619f8eb
...
...
@@ -27,7 +27,9 @@ public class FixedSalaryStaffDto implements Serializable {
String
empzztime
;
// 转正日期
int
sfdx
;
//是否定薪 0:无;1:有
String
tratime
;
//调薪日期
Integer
txzt
;
//使用状态 0:使用中;1:历史, 2 未生效
int
id
;
String
remarks
;
//备注
List
<
DefinedItemsDto
>
defdto
=
new
ArrayList
<
DefinedItemsDto
>();
}
src/main/java/cn/timer/api/dto/xcgl/FixedsalaryDto.java
View file @
7619f8eb
...
...
@@ -15,7 +15,8 @@ public class FixedsalaryDto implements Serializable {
*/
private
static
final
long
serialVersionUID
=
2239288307511437403L
;
CustomDto
[]
cus
;
// 自定义输入值
String
id
;
// 用户工号
String
user
id
;
// 用户工号
String
remarks
;
// 备注
String
sxrq
;
// 生效日期
Integer
id
;
// 记录ID
}
src/main/java/cn/timer/api/utils/DateUtil.java
View file @
7619f8eb
...
...
@@ -479,49 +479,4 @@ public class DateUtil {
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
calendar
.
getActualMinimum
(
Calendar
.
DAY_OF_MONTH
));
return
dft
.
format
(
calendar
.
getTime
());
}
public
static
void
main
(
String
[]
args
)
throws
ParseException
{
// System.out.println(getStartTime(0).getTime());
// System.out.println(getnowEndTime(23).getTime());
// long ts=getStartTime(0).getTime();
// System.out.println(getnowEndTime(23).getTime());
// System.out.println(getStringFormat(ts));
// String time=getStringFormat(ts);
// time +="9:00";
// System.out.println(getStringTime(time,"yyyy-MM-ddHH:mm"));
// System.out.println(System.currentTimeMillis());
// System.out.println(getStringTime("23:00","HH:mm"));
// System.out.println(getStringTime("00:00","HH:mm"));
// System.out.println(getStringDate(System.currentTimeMillis()));
//
//
// SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("dd");
// Date date = new Date(1516291200000L);
// System.out.println(simpleDateFormat1.format(date));
// System.out.println("--------------根据特定的日期‘2014-8-1’获取特定日期所在一个月的每一天--------------");
// SimpleDateFormat dateFm = new SimpleDateFormat("EEEE",Locale.CHINA);
// Date d2=paraseStringToDate("2018-7-3");
// List<String> lst4=getAllDaysMonthByDate(d2);
// for(String s3:lst4){
// System.out.print(s3+" ");
// System.out.print(dateFm.format(paraseStringToDate(s3))+" ");
// System.out.println(s3.substring(s3.length()-2, s3.length()));
// }
// System.out.println(Math.abs((1514854800000L-1514865600000L)/60000));
// System.out.println(getFirstDayOfMonth("2018-1-1"));
// System.out.println(getLastDayOfMonth("2018-1-1"));
// System.out.println(getStringFormat(1520179200000L));
// Calendar todayStart = Calendar.getInstance();
// todayStart.setTimeInMillis(1515164400000L);
// todayStart.set(Calendar.HOUR_OF_DAY, 0);
// todayStart.set(Calendar.MINUTE, 0);
// todayStart.set(Calendar.SECOND, 0);
// todayStart.set(Calendar.MILLISECOND, 0);
// System.out.println(todayStart.getTime().getTime());
Date
da
=
new
Date
();
System
.
out
.
println
(
da
);
System
.
out
.
println
(
da
.
getTime
());
}
}
src/main/java/cn/timer/api/utils/Page.java
View file @
7619f8eb
...
...
@@ -19,6 +19,11 @@ public class Page {
*/
private
Integer
totalPage
;
/**
* 偏移
*/
private
Integer
offset
;
public
Integer
getCurrentPage
()
{
return
currentPage
==
null
||
currentPage
<=
0
?
1
:
currentPage
;
}
...
...
@@ -29,13 +34,17 @@ public class Page {
}
public
Integer
getTotalPage
()
{
return
totalPage
==
null
||
totalPage
<=
0
?
10
:
totalPage
;
}
public
void
setTotalPage
(
Integer
totalPage
)
{
this
.
totalPage
=
totalPage
;
}
public
Integer
getOffset
()
{
return
this
.
currentPage
>
0
?
(
this
.
currentPage
-
1
)
*
this
.
totalPage
:
0
;
}
public
void
setOffset
(
Integer
offset
)
{
this
.
offset
=
offset
;
}
}
src/main/resources/mapping/xcgl/XcglAssoGztztMapper.xml
View file @
7619f8eb
...
...
@@ -79,7 +79,7 @@
left join zzgl_bmgw_m um on um.id = m.up_id
) as bmgw on bmgw.mid = emp.bmgw_id
<if
test=
"xzzid != null"
>
LEFT JOIN xcgl_asso_xzury xzury ON xzury.userid = emp.
id
and xzury.xzzid = #{xzzid}
LEFT JOIN xcgl_asso_xzury xzury ON xzury.userid = emp.
emp_num
and xzury.xzzid = #{xzzid}
</if>
where gztzt.qyid = #{orgcode}
<if
test=
"gztszid != null"
>
and gztzt.gztszid = #{gztszid}
</if>
...
...
src/main/resources/mapping/xcgl/XcglAssoXzdadxMapper.xml
View file @
7619f8eb
...
...
@@ -116,42 +116,18 @@
</trim>
</insert>
<!-- <delete id="delete" >
DELETE FROM xcgl_asso_xzdadx
WHERE id = #{id}
</delete>
<update id="update" parameterType="cn.timer.api.bean.xcgl.XcglAssoXzdadx">
UPDATE xcgl_asso_xzdadx
<set>
<if test ='null != userid'>userid = #{userid},</if>
<if test ='null != sxrq'>sxrq = #{sxrq},</if>
<if test ='null != addtime'>addtime = #{addtime},</if>
<if test ='null != xgyhid'>xgyhid = #{xgyhid},</if>
<if test ='null != remarks'>remarks = #{remarks},</if>
<if test ='null != qyid'>qyid = #{qyid},</if>
<if test ='null != txzt'>txzt = #{txzt}</if>
</set>
WHERE id = #{id}
</update>
<select id="load" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
<!-- 获取小于等于当前日期的未生效记录 -->
<select
id=
"listIneffective"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
></include>
FROM xcgl_asso_xzdadx
WHERE
id = #{id
}
WHERE
txzt = 2 AND sxrq
<
= #{curDate
}
</select>
<select id="pageList" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List" />
<!-- 获取使用中多于1条数据的记录 -->
<select
id=
"listRepeatUsed"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
></include>
FROM xcgl_asso_xzdadx
LIMIT #{offset}, #{pageSize}
WHERE txzt = 0 AND exists (SELECT * from (select userid, count(*) as cnt from xcgl_asso_xzdadx where txzt = 0 group by userid) as tmp where cnt > 1)
ORDER BY userid, sxrq asc
</select>
<select id="pageListCount" resultType="java.lang.Integer">
SELECT count(1)
FROM xcgl_asso_xzdadx
</select>
-->
</mapper>
\ No newline at end of file
src/main/resources/mapping/xcgl/XcglAssoXzdazdyMapper.xml
View file @
7619f8eb
...
...
@@ -22,6 +22,9 @@
<result
column=
"empzztime"
property=
"empzztime"
/>
<result
column=
"sfdx"
property=
"sfdx"
/>
<result
column=
"tratime"
property=
"tratime"
/>
<result
column=
"txzt"
property=
"txzt"
/>
<result
column=
"remarks"
property=
"remarks"
/>
<collection
property=
"defdto"
ofType=
"cn.timer.api.dto.xcgl.DefinedItemsDto"
>
<result
column=
"dazid"
property=
"dazid"
/>
...
...
@@ -169,6 +172,16 @@
FROM xcgl_asso_xzdazdy
</select> -->
<select
id=
"selectFixedSalaryStaffCount"
resultType=
"java.lang.Long"
>
select COUNT(*) from yggl_main_emp emp
where emp.org_code = #{param.orgcode}
<if
test=
"param.status != ''"
>
and emp.job_status = #{param.status}
</if>
<if
test=
"param.text != ''"
>
and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text})
</if>
</select>
<select
id=
"selectFixedSalaryStaff"
resultMap=
"FixedSalaryStaffMap"
>
select emp.emp_num empnum,
emp.`name` empname,
...
...
@@ -194,9 +207,7 @@
xzdaz.xzdazdyid as xzdazdyid,
xzdaz.rsz as dazrsz,
xzdaz.xzdadxid as xzdadxid
from yggl_main_emp emp
LEFT JOIN xcgl_asso_xzdadx as dadx on dadx.userid = emp.emp_num and dadx.txzt = 0 and dadx.qyid = #{param.orgcode}
LEFT JOIN xcgl_asso_xzdaz as xzdaz on xzdaz.xzdadxid = dadx.id
from (select * from yggl_main_emp emp
where emp.org_code = #{param.orgcode}
<if
test=
"param.status != ''"
>
and emp.job_status = #{param.status}
...
...
@@ -204,6 +215,9 @@
<if
test=
"param.text != ''"
>
and (emp.`name` like CONCAT('%',#{param.text},'%') or emp.emp_num = #{param.text})
</if>
LIMIT #{param.offset}, #{param.totalPage}
) emp
LEFT JOIN xcgl_asso_xzdadx as dadx on dadx.userid = emp.emp_num and dadx.txzt = 0
</select>
...
...
@@ -283,6 +297,8 @@
SUBSTR(emp.zz_time,1,10) empzztime,
IF(dadx.userid IS NOT NULL,1,0) AS sfdx,
dadx.sxrq as tratime,
dadx.txzt as txzt,
dadx.remarks as remarks,
xzdaz.id as dazid,
xzdaz.xzdazdyid as xzdazdyid,
xzdaz.rsz as dazrsz,
...
...
@@ -292,7 +308,7 @@
LEFT JOIN xcgl_asso_xzdaz as xzdaz on xzdaz.xzdadxid = dadx.id
where emp.org_code = #{orgcode}
and emp.emp_num = #{empnum}
and dadx.txzt = 1
ORDER BY dadx.txzt, dadx.sxrq DESC
</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