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
fb78b8b1
Commit
fb78b8b1
authored
Jun 19, 2020
by
lal
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of develop-gitlab.youlingrc.com:8timerv2/8timerapiv200 into lal
parents
10cd9957
13286b6d
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
76 additions
and
39 deletions
+76
-39
src/main/java/cn/timer/api/controller/dzht/DzhtController2.java
+6
-7
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
+3
-2
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+6
-1
src/main/java/cn/timer/api/controller/yggl/service/YgglServiceImpl.java
+26
-11
src/main/java/cn/timer/api/utils/router/business/EvectionBusiness.java
+6
-2
src/main/java/cn/timer/api/utils/router/business/GoOutBusiness.java
+3
-1
src/main/java/cn/timer/api/utils/router/business/LeaveBusiness.java
+5
-3
src/main/java/cn/timer/api/utils/router/business/RecruitBusiness.java
+1
-1
src/main/java/cn/timer/api/utils/router/business/ReissueACardBusiness.java
+3
-1
src/main/java/cn/timer/api/utils/router/business/ResignationBusiness.java
+1
-1
src/main/java/cn/timer/api/utils/router/business/TransferPositionBusiness.java
+6
-2
src/main/java/cn/timer/api/utils/router/business/WorkOvertimeBusiness.java
+9
-7
src/main/resources/mapping/yggl/YgglMainEmpMapper.xml
+1
-0
No files found.
src/main/java/cn/timer/api/controller/dzht/DzhtController2.java
View file @
fb78b8b1
...
...
@@ -42,7 +42,6 @@ import cn.timer.api.bean.dzht.DzhtAssoQyyz;
import
cn.timer.api.bean.dzht.DzhtAssoQyzc
;
import
cn.timer.api.bean.dzht.DzhtAssoSdgzq
;
import
cn.timer.api.bean.dzht.DzhtAssoTpyz
;
import
cn.timer.api.bean.qyzx.QyzxEmpEntAsso
;
import
cn.timer.api.bean.qyzx.businessService.QyzxRemainingQuantity
;
import
cn.timer.api.bean.qyzx.businessService.QyzxUseRecord
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
...
...
@@ -206,16 +205,16 @@ public class DzhtController2 {
@GetMapping
(
"/getOrganizations"
)
@ApiOperation
(
value
=
"查询企业信息s"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
getOrganizations
(
@CurrentUser
UserBean
userBean
)
{
List
<
QyzxEmpEntAsso
>
list
=
QyzxEmpEntAsso
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
QyzxEmpEntAsso
>().
lambda
().
eq
(
QyzxEmpEntAsso:
:
getEmpNum
,
userBean
.
getEmpNum
()));
List
<
Integer
>
orgCodeList
=
Lists
.
transform
(
list
,
newList
->
newList
.
getOrgCode
());
//
List<QyzxEmpEntAsso> list = QyzxEmpEntAsso.builder().build().selectList(
//
new QueryWrapper<QyzxEmpEntAsso>().lambda().eq(QyzxEmpEntAsso::getEmpNum, userBean.getEmpNum()));
//
List<Integer> orgCodeList = Lists.transform(list, newList -> newList.getOrgCode());
List
<
String
>
orgIds
=
new
ArrayList
<
String
>();
for
(
Integer
orgCode
:
orgCodeList
)
{
//
for (Integer orgCode : orgCodeList) {
DzhtAssoQyzc
qyzc
=
DzhtAssoQyzc
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
DzhtAssoQyzc
>().
lambda
()
.
eq
(
DzhtAssoQyzc:
:
getOrgCode
,
orgCode
).
select
(
DzhtAssoQyzc:
:
getOrgId
));
.
eq
(
DzhtAssoQyzc:
:
getOrgCode
,
userBean
.
getOrgCode
()
).
select
(
DzhtAssoQyzc:
:
getOrgId
));
if
(
qyzc
!=
null
)
orgIds
.
add
(
qyzc
.
getOrgId
());
}
//
}
JSONObject
j
=
null
;
List
<
JSONObject
>
result
=
new
ArrayList
<
JSONObject
>();
try
{
...
...
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
View file @
fb78b8b1
...
...
@@ -671,17 +671,18 @@ public class SpmkController {
SpmkApproveSummary
.
builder
().
id
(
asId
).
currentApprover
(
CommonEnum
.
NULL_STR
.
getDesc
()).
endTime
(
new
Date
()).
sts
(
ApproveSummarySts
.
FINISH
.
ordinal
()).
build
().
updateById
();
JSONObject
jSONObject
=
ObjectUtil
.
deserialize
(
ad
.
getRequestData
());
jSONObject
.
set
(
"approveId"
,
FromData
.
builder
().
value
(
String
.
valueOf
(
asId
)));
jSONObject
.
set
(
"approveId"
,
FromData
.
builder
().
value
(
String
.
valueOf
(
asId
))
.
build
()
);
jSONObject
.
set
(
"orgCode"
,
userBean
.
getOrgCode
());
System
.
out
.
println
(
"0----------"
+
FromData
.
builder
().
value
(
String
.
valueOf
(
asId
)));
System
.
out
.
println
(
"1----------"
+
aSummary
.
getAssoType
());
System
.
out
.
println
(
"2----------"
+
ApproveEnum
.
getEnums
(
aSummary
.
getAssoType
()));
//审批完成后 业务
SpmkAssoBusiness
sab
=
spmkAssoBusinessFactory
.
createSpmkService
(
ApproveEnum
.
getEnums
(
aSummary
.
getAssoType
()));
if
(
sab
!=
null
)
System
.
out
.
println
(
"3----------"
+
sab
);
System
.
out
.
println
(
"4----------"
+
jSONObject
);
sab
.
handleApprove
(
jSONObject
);
System
.
out
.
println
(
"4----------"
+
aSummary
.
getAssoType
());
}
}
...
...
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
fb78b8b1
...
...
@@ -454,7 +454,12 @@ public class YgglController {
break
;
case
1
:
String
[]
strs
=
IdcardUtil
.
isValidCard10
(
zjNum
);
isvalid
=
"澳门/香港"
.
contains
(
strs
[
0
])
&&
"true"
.
equals
(
strs
[
2
]);
if
(
strs
==
null
)
{
isvalid
=
false
;
break
;
}
String
str2
=
strs
!=
null
&&
strs
.
length
>
2
?
strs
[
2
]
:
"false"
;
isvalid
=
"澳门/香港"
.
contains
(
strs
[
0
])
&&
"true"
.
equals
(
str2
);
break
;
case
2
:
isvalid
=
IdcardUtil
.
isValidTWCard
(
zjNum
);
...
...
src/main/java/cn/timer/api/controller/yggl/service/YgglServiceImpl.java
View file @
fb78b8b1
...
...
@@ -16,10 +16,12 @@ import cn.timer.api.bean.yggl.YgglMainEmp;
import
cn.timer.api.bean.yggl.YgglMainLzb
;
import
cn.timer.api.bean.zzgl.ZzglBmgwM
;
import
cn.timer.api.config.enuminterface.YgEnumInterface
;
import
cn.timer.api.config.enuminterface.YgEnumInterface.jobStatus
;
import
cn.timer.api.dao.yggl.YgglMainEmpMapper
;
import
cn.timer.api.dao.zzgl.ZzglBmgwMMapper
;
import
cn.timer.api.dto.yggl.LzygQueryDto
;
import
cn.timer.api.dto.yggl.YgzzDto
;
import
cn.timer.api.utils.ResultUtil
;
@Service
public
class
YgglServiceImpl
implements
YgglService
{
...
...
@@ -33,23 +35,36 @@ public class YgglServiceImpl implements YgglService {
@Override
public
void
applicationResignation
(
LzygQueryDto
lzygQueryDto
)
{
// TODO Auto-generated method stub
Integer
empNum
=
lzygQueryDto
.
getEmpNum
();
Integer
orgCode
=
lzygQueryDto
.
getOrgCode
();
YgglMainEmp
ygglMainEmp
=
ygglMainEmpMapper
.
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
()
.
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
));
// if (ygglMainEmp.getJobStatus() == jobStatus.LIZHIZHONG.getType()) {
// return ResultUtil.success("你已在离职中");
// }
QueryWrapper
<
YgglMainEmp
>
queryWrapper
=
new
QueryWrapper
<
YgglMainEmp
>();
queryWrapper
.
eq
(
"emp_num"
,
empNum
).
eq
(
"org_code"
,
lzygQueryDto
.
getOrgCode
());
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
queryWrapper
);
YgglMainLzb
ygglMainLzb
=
YgglMainLzb
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
build
();
// 移动员工表数据到离职表
BeanUtil
.
copyProperties
(
ygglMainEmp
,
ygglMainLzb
);
BeanUtil
.
copyProperties
(
ygglMainEmp
,
ygglMainLzb
,
"before_leaving_sts"
);
ygglMainLzb
.
insert
();
UpdateWrapper
<
YgglMainEmp
>
updateWrapper
=
new
UpdateWrapper
<
YgglMainEmp
>();
updateWrapper
.
eq
(
"emp_num"
,
empNum
);
UpdateWrapper
<
YgglMainLzb
>
updateWrapper1
=
new
UpdateWrapper
<
YgglMainLzb
>();
updateWrapper1
.
eq
(
"emp_num"
,
empNum
);
YgglMainEmp
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
jobStatus
(
YgEnumInterface
.
jobStatus
.
YILIZHI
.
getType
()).
build
().
update
(
updateWrapper
);
YgglMainLzb
.
builder
().
jobStatus
(
YgEnumInterface
.
jobStatus
.
LIZHIZHONG
.
getType
()).
lzTime
(
lzygQueryDto
.
getLzTime
())
.
lzyy
(
lzygQueryDto
.
getLzyy
()).
lzbz
(
lzygQueryDto
.
getLzbz
()).
build
().
update
(
updateWrapper1
);
YgglMainEmp
.
builder
().
empNum
(
lzygQueryDto
.
getEmpNum
()).
jobStatus
(
jobStatus
.
LIZHIZHONG
.
getType
())
.
beforeLeavingSts
(
ygglMainEmp
.
getJobStatus
()).
build
()
.
update
(
new
UpdateWrapper
<
YgglMainEmp
>().
lambda
()
.
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
));
YgglMainLzb
.
builder
()
.
jobStatus
(
jobStatus
.
LIZHIZHONG
.
getType
())
.
lzTime
(
lzygQueryDto
.
getLzTime
())
.
lzyy
(
lzygQueryDto
.
getLzyy
()).
lzbz
(
lzygQueryDto
.
getLzbz
()).
build
()
.
update
(
new
UpdateWrapper
<
YgglMainLzb
>().
lambda
()
.
eq
(
YgglMainLzb:
:
getEmpNum
,
empNum
)
.
eq
(
YgglMainLzb:
:
getOrgCode
,
orgCode
));
}
@Override
...
...
src/main/java/cn/timer/api/utils/router/business/EvectionBusiness.java
View file @
fb78b8b1
...
...
@@ -2,6 +2,8 @@ package cn.timer.api.utils.router.business;
import
java.text.ParseException
;
import
javax.annotation.PostConstruct
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -31,7 +33,7 @@ public class EvectionBusiness extends SpmkAssoBusiness {
// 发起人企业id
Integer
orgCode
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"orgCode"
))
?
null
:
Convert
.
toInt
(
jsonObj
.
get
(
"orgCode"
));
// 发起人id
String
id
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"id"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"id"
,
FromData
.
class
).
getValue
(
);
Integer
id
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"id"
,
FromData
.
class
))
?
null
:
Integer
.
parseInt
(
jsonObj
.
get
(
"id"
,
FromData
.
class
).
getValue
()
);
// 发起人名称
String
initiator
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"initiator"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"initiator"
,
FromData
.
class
).
getValue
();
...
...
@@ -47,9 +49,11 @@ public class EvectionBusiness extends SpmkAssoBusiness {
String
businessTrip
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"__businessTrip"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"__businessTrip"
,
FromData
.
class
).
getValue
();
// 上传文件
String
UploadAttachment
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
).
getValue
();
System
.
out
.
println
(
approveId
);
AttEvectionApprovalDto
eaD
=
AttEvectionApprovalDto
.
builder
()
.
userid
(
id
)
.
orgcode
(
orgCode
)
.
evectionid
(
Convert
.
toInt
(
approveId
))
.
evectiontype
(
1
)
.
starttime
(
DateUtil
.
getStringTime
(
startTime
,
"yyyy-MM-dd HH:mm:ss"
))
...
...
src/main/java/cn/timer/api/utils/router/business/GoOutBusiness.java
View file @
fb78b8b1
...
...
@@ -29,7 +29,7 @@ public class GoOutBusiness extends SpmkAssoBusiness {
// 发起人企业id
Integer
orgCode
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"orgCode"
))
?
null
:
Convert
.
toInt
(
jsonObj
.
get
(
"orgCode"
));
// 发起人id
String
id
=
jsonObj
.
get
(
"id"
,
FromData
.
class
).
getValue
(
);
Integer
id
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"id"
,
FromData
.
class
))
?
null
:
Integer
.
parseInt
(
jsonObj
.
get
(
"id"
,
FromData
.
class
).
getValue
()
);
// 发起人名称
String
initiator
=
jsonObj
.
get
(
"initiator"
,
FromData
.
class
).
getValue
();
...
...
@@ -48,6 +48,8 @@ public class GoOutBusiness extends SpmkAssoBusiness {
AttEvectionApprovalDto
eaD
=
AttEvectionApprovalDto
.
builder
()
.
userid
(
id
)
.
orgcode
(
orgCode
)
.
evectionid
(
Convert
.
toInt
(
approveId
))
.
evectiontype
(
2
)
.
starttime
(
DateUtil
.
getStringTime
(
startTime
,
"yyyy-MM-dd HH:mm:ss"
))
...
...
src/main/java/cn/timer/api/utils/router/business/LeaveBusiness.java
View file @
fb78b8b1
...
...
@@ -33,14 +33,14 @@ public class LeaveBusiness extends SpmkAssoBusiness {
// 发起人企业id
Integer
orgCode
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"orgCode"
))
?
null
:
Convert
.
toInt
(
jsonObj
.
get
(
"orgCode"
));
// 发起人id
String
id
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"id"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"id"
,
FromData
.
class
).
getValue
(
);
Integer
id
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"id"
,
FromData
.
class
))
?
null
:
Integer
.
parseInt
(
jsonObj
.
get
(
"id"
,
FromData
.
class
).
getValue
()
);
// 发起人名称
String
initiator
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"initiator"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"initiator"
,
FromData
.
class
).
getValue
();
// 审批汇总id
String
approveId
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"approveId"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"approveId"
,
FromData
.
class
).
getValue
();
// 请假类型
// 请假类型
- 前端传中文
String
LeaveType
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"__LeaveType"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"__LeaveType"
,
FromData
.
class
).
getValue
();
// 开始时间
String
startTime
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"__startTime"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"__startTime"
,
FromData
.
class
).
getValue
();
...
...
@@ -55,8 +55,10 @@ public class LeaveBusiness extends SpmkAssoBusiness {
AttLeaveApprovalDto
laD
=
AttLeaveApprovalDto
.
builder
()
.
userid
(
id
)
.
orgcode
(
orgCode
)
.
leaveid
(
Convert
.
toInt
(
approveId
))
.
leavetype
(
Convert
.
toInt
(
LeaveType
))
.
leavetype
(
Convert
.
toInt
(
1
))
.
starttime
(
DateUtil
.
getStringTime
(
startTime
,
"yyyy-MM-dd HH:mm:ss"
))
.
endtime
(
DateUtil
.
getStringTime
(
endTime
,
"yyyy-MM-dd HH:mm:ss"
))
.
duration
(
Convert
.
toDouble
(
longTime
))
...
...
src/main/java/cn/timer/api/utils/router/business/RecruitBusiness.java
View file @
fb78b8b1
...
...
@@ -23,7 +23,7 @@ public class RecruitBusiness extends SpmkAssoBusiness {
// 发起人企业id
Integer
orgCode
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"orgCode"
))
?
null
:
Convert
.
toInt
(
jsonObj
.
get
(
"orgCode"
));
// 发起人id
String
id
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"id"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"id"
,
FromData
.
class
).
getValue
(
);
Integer
id
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"id"
,
FromData
.
class
))
?
null
:
Integer
.
parseInt
(
jsonObj
.
get
(
"id"
,
FromData
.
class
).
getValue
()
);
// 发起人名称
String
initiator
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"initiator"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"initiator"
,
FromData
.
class
).
getValue
();
...
...
src/main/java/cn/timer/api/utils/router/business/ReissueACardBusiness.java
View file @
fb78b8b1
...
...
@@ -31,7 +31,7 @@ public class ReissueACardBusiness extends SpmkAssoBusiness {
// 发起人企业id
Integer
orgCode
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"orgCode"
))
?
null
:
Convert
.
toInt
(
jsonObj
.
get
(
"orgCode"
));
// 发起人id
String
id
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"id"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"id"
,
FromData
.
class
).
getValue
(
);
Integer
id
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"id"
,
FromData
.
class
))
?
null
:
Integer
.
parseInt
(
jsonObj
.
get
(
"id"
,
FromData
.
class
).
getValue
()
);
// 发起人名称
String
initiator
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"initiator"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"initiator"
,
FromData
.
class
).
getValue
();
...
...
@@ -50,6 +50,8 @@ public class ReissueACardBusiness extends SpmkAssoBusiness {
AttRepairApprovalDto
raD
=
AttRepairApprovalDto
.
builder
()
.
userid
(
id
)
.
orgcode
(
orgCode
)
.
repairid
(
Convert
.
toInt
(
approveId
))
.
cardrepltime
(
DateUtil
.
getStringTime
(
PatchCardTime
,
"yyyy-MM-dd HH:mm:ss"
))
.
cardreplperiod
(
Convert
.
toInt
(
cardreplperiod
))
...
...
src/main/java/cn/timer/api/utils/router/business/ResignationBusiness.java
View file @
fb78b8b1
...
...
@@ -32,7 +32,7 @@ public class ResignationBusiness extends SpmkAssoBusiness {
// 发起人企业id
Integer
orgCode
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"orgCode"
))
?
null
:
Convert
.
toInt
(
jsonObj
.
get
(
"orgCode"
));
// 发起人id
Integer
id
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"id"
,
FromData
.
class
))
?
null
:
Integer
.
parseInt
(
jsonObj
.
get
(
""
,
FromData
.
class
).
getValue
());
Integer
id
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"id"
,
FromData
.
class
))
?
null
:
Integer
.
parseInt
(
jsonObj
.
get
(
"
id
"
,
FromData
.
class
).
getValue
());
// 发起人名称
String
initiator
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"initiator"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"initiator"
,
FromData
.
class
).
getValue
();
...
...
src/main/java/cn/timer/api/utils/router/business/TransferPositionBusiness.java
View file @
fb78b8b1
...
...
@@ -6,6 +6,7 @@ import org.springframework.stereotype.Service;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.config.exception.CustomException
;
import
cn.timer.api.controller.zzgl.service.ZzglBmgwMService
;
import
cn.timer.api.dto.spmk.FromData
;
import
cn.timer.api.dto.zzgl.UpEmpDeptDto
;
...
...
@@ -38,9 +39,12 @@ public class TransferPositionBusiness extends SpmkAssoBusiness {
// 申请原因
String
ReasonForApplication
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"__ReasonForApplication"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"__ReasonForApplication"
,
FromData
.
class
).
getValue
();
// 调入部门
Integer
TransferInDepartment
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"__TransferInDepartment"
,
FromData
.
class
))
?
null
:
Integer
.
parse
Int
(
jsonObj
.
get
(
"__TransferInDepartment"
,
FromData
.
class
).
getValue
());
Integer
TransferInDepartment
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"__TransferInDepartment"
,
FromData
.
class
))
?
null
:
Convert
.
to
Int
(
jsonObj
.
get
(
"__TransferInDepartment"
,
FromData
.
class
).
getValue
());
// 调入岗位
String
TransferInPosition
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"__TransferInPosition"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"__TransferInPosition"
,
FromData
.
class
).
getValue
();
Integer
TransferInPosition
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"__TransferInPosition"
,
FromData
.
class
))
?
null
:
Integer
.
parseInt
(
jsonObj
.
get
(
"__TransferInPosition"
,
FromData
.
class
).
getValue
());
if
(
TransferInDepartment
==
null
||
TransferInPosition
==
null
)
{
throw
new
CustomException
(
"部门或岗位 未填写,审批失败"
);
}
// 生效日期
String
effectiveDate
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"__effectiveDate"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"__effectiveDate"
,
FromData
.
class
).
getValue
();
// 备注
...
...
src/main/java/cn/timer/api/utils/router/business/WorkOvertimeBusiness.java
View file @
fb78b8b1
...
...
@@ -30,7 +30,7 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness {
// 发起人企业id
Integer
orgCode
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"orgCode"
))
?
null
:
Convert
.
toInt
(
jsonObj
.
get
(
"orgCode"
));
// 发起人id
String
id
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"id"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"id"
,
FromData
.
class
).
getValue
(
);
Integer
id
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"id"
,
FromData
.
class
))
?
null
:
Integer
.
parseInt
(
jsonObj
.
get
(
"id"
,
FromData
.
class
).
getValue
()
);
// 发起人名称
String
initiator
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"initiator"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"initiator"
,
FromData
.
class
).
getValue
();
...
...
@@ -43,23 +43,25 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness {
String
endTime
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"__endTime"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"__endTime"
,
FromData
.
class
).
getValue
();
// 时长
String
timeLong
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"__timeLong"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"__timeLong"
,
FromData
.
class
).
getValue
();
// 加班补偿方式
// 加班补偿方式
-前端传中文
String
compensate
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"__compensate"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"__compensate"
,
FromData
.
class
).
getValue
();
// 加班原因
String
OvertimeReason
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"__OvertimeReason"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"__OvertimeReason"
,
FromData
.
class
).
getValue
();
// 加班类型-前端未给
String
overtimetype
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"__overtimetype"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"__overtimet
ype"
,
FromData
.
class
).
getValue
();
String
workOvertimeType
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"__workOvertimeType"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"__workOvertimeT
ype"
,
FromData
.
class
).
getValue
();
// 上传文件
String
UploadAttachment
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
).
getValue
();
AttOvertimeApprovalDto
oaD
=
AttOvertimeApprovalDto
.
builder
()
.
userid
(
id
)
.
orgcode
(
orgCode
)
.
overtimeid
(
Convert
.
toInt
(
approveId
))
.
overtimetype
(
Convert
.
toInt
(
overtimetype
))
.
starttime
(
DateUtil
.
getStringTime
(
startTime
,
"yyyy-MM-dd HH:mm
:ss
"
))
.
endtime
(
DateUtil
.
getStringTime
(
endTime
,
"yyyy-MM-dd HH:mm
:ss
"
))
.
overtimetype
(
Convert
.
toInt
(
1
))
.
starttime
(
DateUtil
.
getStringTime
(
startTime
,
"yyyy-MM-dd HH:mm"
))
.
endtime
(
DateUtil
.
getStringTime
(
endTime
,
"yyyy-MM-dd HH:mm"
))
.
duration
(
Convert
.
toDouble
(
timeLong
))
.
compensate
(
Convert
.
toInt
(
compensate
))
.
compensate
(
Convert
.
toInt
(
1
))
.
build
();
System
.
out
.
println
(
"加班:"
+
oaD
);
...
...
src/main/resources/mapping/yggl/YgglMainEmpMapper.xml
View file @
fb78b8b1
...
...
@@ -211,6 +211,7 @@
FROM yggl_main_emp a
<where>
AND a.org_code = #{param.orgCode}
AND a.job_status IN (0,1,2)
<if
test=
"param.jobType != null"
>
AND a.job_type = #{param.jobType}
</if>
...
...
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