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
af8cac99
Commit
af8cac99
authored
Aug 26, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'master'
Develop See merge request 8timerv2/8timerapiv200!458
parents
843613fd
b6d6b829
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
541 additions
and
228 deletions
+541
-228
src/main/java/cn/timer/api/callback/esign/service/SafeVerify.java
+25
-9
src/main/java/cn/timer/api/callback/wx/WxCallBackController.java
+1
-1
src/main/java/cn/timer/api/controller/LoginController.java
+17
-4
src/main/java/cn/timer/api/controller/crm/CrmController.java
+13
-5
src/main/java/cn/timer/api/controller/crm/CrmRuleController.java
+16
-1
src/main/java/cn/timer/api/controller/dzht/cn/tign/hz/comm/FileHelper.java
+1
-1
src/main/java/cn/timer/api/controller/htzz/HtzzController.java
+16
-2
src/main/java/cn/timer/api/controller/jxgl/JxglController.java
+30
-15
src/main/java/cn/timer/api/controller/kqgl/AttController.java
+1
-1
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
+68
-70
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
+25
-15
src/main/java/cn/timer/api/controller/kqgl/service/KqglServiceImpl.java
+19
-5
src/main/java/cn/timer/api/controller/sbgjj/SocialSecurityFundController.java
+27
-16
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
+62
-32
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+1
-1
src/main/java/cn/timer/api/controller/zcgl/ZcglController.java
+2
-2
src/main/java/cn/timer/api/controller/zzgl/service/ZzglBmgwMServiceImpl.java
+1
-1
src/main/java/cn/timer/api/dao/htzz/HtzzAssoZztxMapper.java
+1
-1
src/main/java/cn/timer/api/dao/kqgl/UserAttendanceRelMapper.java
+1
-1
src/main/java/cn/timer/api/utils/aliyun/AliyunSMS.java
+15
-2
src/main/java/cn/timer/api/utils/aliyun/OSSUtil.java
+25
-12
src/main/java/cn/timer/api/utils/router/RouterUtils.java
+29
-10
src/main/java/cn/timer/api/utils/router/business/EvectionBusiness.java
+16
-2
src/main/java/cn/timer/api/utils/router/business/GoOutBusiness.java
+15
-1
src/main/java/cn/timer/api/utils/router/business/LeaveBusiness.java
+16
-1
src/main/java/cn/timer/api/utils/router/business/RegularizationBusiness.java
+16
-1
src/main/java/cn/timer/api/utils/router/business/ReissueACardBusiness.java
+16
-1
src/main/java/cn/timer/api/utils/router/business/ResignationBusiness.java
+16
-1
src/main/java/cn/timer/api/utils/router/business/TransferPositionBusiness.java
+16
-1
src/main/java/cn/timer/api/utils/router/business/WorkOvertimeBusiness.java
+17
-1
src/main/resources/application-dev.yml
+5
-3
src/main/resources/application-pro.yml
+6
-5
src/main/resources/application-test.yml
+5
-4
src/main/resources/mapping/kqgl/UserAttendanceRelMapper.xml
+1
-0
No files found.
src/main/java/cn/timer/api/callback/esign/service/SafeVerify.java
View file @
af8cac99
...
...
@@ -12,6 +12,7 @@ import java.util.List;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -30,8 +31,8 @@ public class SafeVerify {
String
rbody2
=
"{\"action\":\"SIGN_FLOW_UPDATE\",\"flowId\":\"1e49e34bdc5f4550a8fd6d7922c68101\",\"accountId\":\"1b6d7e255140443fa65287a6ff74149d\",\"authorizedAccountId\":\"1b6d7e255140443fa65287a6ff74149d\",\"order\":1,\"signTime\":\"2020-05-20 10:01:06\",\"signResult\":2,\"resultDescription\":\"签署完成\",\"timestamp\":1589940066702,\"thirdPartyUserId\":\"431003199610102831\"}"
;
JSONObject
jsonBody
=
new
JSONObject
(
rbody
);
JSONObject
jsonBody2
=
new
JSONObject
(
rbody2
);
System
.
err
.
println
(
jsonBody
.
getStr
(
"action"
));
System
.
err
.
println
(
jsonBody2
.
getStr
(
"action"
));
//
System.err.println(jsonBody.getStr("action"));
//
System.err.println(jsonBody2.getStr("action"));
}
public
String
checkPass
(
HttpServletRequest
request
,
String
appSecret
)
throws
UnsupportedEncodingException
{
...
...
@@ -44,8 +45,8 @@ public class SafeVerify {
// 3. 获取body的数据
String
rbody
=
getRequestBody
(
request
,
"UTF-8"
);
System
.
err
.
println
(
"requestQuery:"
+
requestQuery
);
System
.
err
.
println
(
"rbody:"
+
rbody
);
Logoutput
(
"requestQuery:"
+
requestQuery
);
Logoutput
(
"rbody:"
+
rbody
);
// 3.5 保存回调结果到数据库
JSONObject
jsonBody
=
new
JSONObject
(
rbody
);
...
...
@@ -99,14 +100,14 @@ public class SafeVerify {
// 4、按照规则进行加密
String
signdata
=
timestampHeader
+
requestQuery
+
rbody
;
String
mySignature
=
DigestHelper
.
getSignature
(
signdata
,
appSecret
,
"HmacSHA256"
,
"UTF-8"
);
System
.
out
.
println
(
"加密出来的签名值:----------->>>>>>"
+
mySignature
);
System
.
out
.
println
(
"header里面的签名值:---------->>>>>>"
+
signture
);
Logoutput
(
"加密出来的签名值:----------->>>>>>"
+
mySignature
);
Logoutput
(
"header里面的签名值:---------->>>>>>"
+
signture
);
if
(
mySignature
.
equals
(
signture
))
{
System
.
out
.
println
(
"校验通过"
);
Logoutput
(
"校验通过"
);
return
"true"
;
}
else
{
System
.
out
.
println
(
"校验失败"
);
Logoutput
(
"校验失败"
);
return
"false"
;
}
...
...
@@ -166,8 +167,23 @@ public class SafeVerify {
String
value
=
request
.
getParameter
(
key
);
requestQuery
+=
value
==
null
?
""
:
value
;
}
System
.
out
.
println
(
"获取的query请求字符串是:------》》》"
+
requestQuery
);
Logoutput
(
"获取的query请求字符串是:------》》》"
+
requestQuery
);
return
requestQuery
;
}
@Value
(
"${config-8timer.environmental-science}"
)
public
String
environmental_science
;
public
void
Logoutput
(
String
science
)
{
if
(!(
"pro"
).
equals
(
environmental_science
))
{
System
.
out
.
println
(
science
);
}
else
{
System
.
out
.
println
(
""
);
}
}
}
src/main/java/cn/timer/api/callback/wx/WxCallBackController.java
View file @
af8cac99
...
...
@@ -59,7 +59,7 @@ public class WxCallBackController {
@GetMapping
(
value
=
"/t"
)
public
String
testEnv
()
{
System
.
out
.
println
(
env
);
//
System.out.println(env);
return
env
;
}
...
...
src/main/java/cn/timer/api/controller/LoginController.java
View file @
af8cac99
...
...
@@ -343,7 +343,7 @@ public class LoginController {
* "ERROR_INVALID_LIB_NAME"); //
* response.setContentType("application/octet-stream"); //
* response.addHeader("Content-Length", "0"); // response.flushBuffer();
*
System.out.println
(111); }
*
Logoutput
(111); }
*/
@PostMapping
(
value
=
"/updatePwd"
)
...
...
@@ -650,9 +650,9 @@ public class LoginController {
if
(
rullist
.
size
()
>
0
)
{
kqglassoleaverulesmapper
.
insertleaverulesList
(
rullist
);
}
System
.
out
.
println
(
"操作成功!"
);
Logoutput
(
"操作成功!"
);
}
else
{
System
.
out
.
println
(
"重复初始化数据!"
);
Logoutput
(
"重复初始化数据!"
);
}
//建立初始化的加班规则
...
...
@@ -926,7 +926,7 @@ public class LoginController {
hashMap
.
put
(
"result"
,
"true"
);
String
result
=
new
cn
.
hutool
.
json
.
JSONObject
(
hashMap
).
toString
();
//转化为json格式
System
.
out
.
println
(
"全部信息="
+
result
);
//打印json串
Logoutput
(
"全部信息="
+
result
);
//打印json串
ZzglCodeLogin
.
builder
().
keyCode
(
key
).
vlaue
(
timercode
).
datatime
(
new
Date
().
getTime
()).
build
().
insert
();
ZzglCodeLogin
.
builder
().
keyCode
(
key
+
"_code"
).
vlaue
(
"1"
).
datatime
(
new
Date
().
getTime
()).
build
().
insert
();
...
...
@@ -1094,4 +1094,17 @@ public class LoginController {
}
@Value
(
"${config-8timer.environmental-science}"
)
public
String
environmental_science
;
public
void
Logoutput
(
String
science
)
{
if
(!(
"pro"
).
equals
(
environmental_science
))
{
System
.
out
.
println
(
science
);
}
else
{
System
.
out
.
println
(
""
);
}
}
}
src/main/java/cn/timer/api/controller/crm/CrmController.java
View file @
af8cac99
...
...
@@ -503,12 +503,16 @@ public class CrmController {
// 归属我的客户
private
List
<
CrmClientData
>
getMyCilent
(
Integer
empNum
,
Integer
orgCode
,
Integer
groupId
,
Integer
status
,
String
like
)
{
String
like
,
String
startCreateTime
,
String
endCreateTime
,
String
startFollowTime
,
String
endFollowTime
)
{
return
CrmClientData
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
CrmClientData
>().
lambda
().
eq
(
CrmClientData:
:
getOrgCode
,
orgCode
)
.
eq
(
CrmClientData:
:
getBelongUser
,
empNum
)
.
eq
(
groupId
!=
null
&&
groupId
>=
0
,
CrmClientData:
:
getBelongGroup
,
groupId
)
.
eq
(
status
!=
null
&&
status
>=
0
,
CrmClientData:
:
getClientStatus
,
status
)
.
ge
(
StringUtils
.
isNotBlank
(
startCreateTime
),
CrmClientData:
:
getCreateTime
,
startCreateTime
)
.
le
(
StringUtils
.
isNotBlank
(
endCreateTime
),
CrmClientData:
:
getCreateTime
,
endCreateTime
)
.
ge
(
StringUtils
.
isNotBlank
(
startFollowTime
),
CrmClientData:
:
getCreateTime
,
startFollowTime
)
.
le
(
StringUtils
.
isNotBlank
(
endFollowTime
),
CrmClientData:
:
getCreateTime
,
endFollowTime
)
.
like
(!
StrUtil
.
isBlank
(
like
),
CrmClientData:
:
getClientName
,
like
).
or
()
.
like
(!
StrUtil
.
isBlank
(
like
),
CrmClientData:
:
getClientCellphone
,
like
)
.
orderByDesc
(
CrmClientData:
:
getCreateTime
));
...
...
@@ -538,7 +542,7 @@ public class CrmController {
// 我的全部客户
private
List
<
CrmClientData
>
getMyTotalCilent
(
Integer
empNum
,
Integer
orgCode
,
Integer
groupId
,
Integer
status
,
String
like
)
{
return
CheckUtil
.
distinct
(
getMyCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
),
return
CheckUtil
.
distinct
(
getMyCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
,
null
,
null
,
null
,
null
),
getMyAssociateCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
),
true
);
}
...
...
@@ -570,17 +574,21 @@ public class CrmController {
@RequestParam
(
required
=
false
)
Integer
groupId
,
@RequestParam
(
required
=
false
)
Integer
status
,
@RequestParam
(
required
=
false
)
String
like
,
@RequestParam
(
required
=
false
,
defaultValue
=
"1"
)
int
pageNumber
,
@RequestParam
(
required
=
false
,
defaultValue
=
"10"
)
int
pageSize
)
{
@RequestParam
(
required
=
false
,
defaultValue
=
"10"
)
int
pageSize
,
@RequestParam
(
required
=
false
)
String
startCreateTime
,
@RequestParam
(
required
=
false
)
String
endCreateTime
,
@RequestParam
(
required
=
false
)
String
startFollowTime
,
@RequestParam
(
required
=
false
)
String
endFollowTime
)
{
Integer
empNum
=
getEmpNum
(
userBean
);
Integer
orgCode
=
getOrgCode
(
userBean
);
List
<
CrmClientData
>
crmClientDatas
=
null
;
if
(
type
==
null
||
type
==
0
)
{
// 全部客户(去重)
List
<
CrmClientData
>
myClient
=
getMyCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
);
List
<
CrmClientData
>
myClient
=
getMyCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
,
startCreateTime
,
endCreateTime
,
startFollowTime
,
endFollowTime
);
List
<
CrmClientData
>
myAsso
=
getMyAssociateCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
);
crmClientDatas
=
CheckUtil
.
distinct
(
myClient
,
myAsso
,
true
).
stream
()
.
filter
(
CheckUtil
.
distinctByKey
(
CrmClientData:
:
getId
)).
collect
(
Collectors
.
toList
());
}
else
if
(
type
==
1
)
// 我负责的客户
crmClientDatas
=
getMyCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
);
crmClientDatas
=
getMyCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
,
startCreateTime
,
endCreateTime
,
startFollowTime
,
endFollowTime
);
else
if
(
type
==
2
)
// 我协作的客户
crmClientDatas
=
getMyAssociateCilent
(
empNum
,
orgCode
,
groupId
,
status
,
like
);
else
if
(
type
==
3
)
// 我关注的客户
...
...
src/main/java/cn/timer/api/controller/crm/CrmRuleController.java
View file @
af8cac99
...
...
@@ -10,6 +10,7 @@ package cn.timer.api.controller.crm;
import
java.util.Date
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -94,7 +95,7 @@ public class CrmRuleController {
*/
// app提醒
private
void
remind
(
String
belongUserName
,
String
clienName
,
Integer
four
)
{
System
.
err
.
println
(
Logoutput
(
belongUserName
+
"的客户:"
+
clienName
+
"还有"
+
four
+
"天即将过期,"
+
"正在向'"
+
belongUserName
+
"'的App发推送提醒"
);
// TODO
}
...
...
@@ -108,5 +109,19 @@ public class CrmRuleController {
new
QueryWrapper
<
CrmClientAssociate
>().
lambda
().
eq
(
CrmClientAssociate:
:
getCid
,
crmClientData
.
getId
()));
crmClientData
.
updateById
();
}
@Value
(
"${config-8timer.environmental-science}"
)
public
String
environmental_science
;
public
void
Logoutput
(
String
science
)
{
if
(!(
"pro"
).
equals
(
environmental_science
))
{
System
.
out
.
println
(
science
);
}
else
{
System
.
out
.
println
(
""
);
}
}
}
src/main/java/cn/timer/api/controller/dzht/cn/tign/hz/comm/FileHelper.java
View file @
af8cac99
...
...
@@ -216,7 +216,7 @@ public class FileHelper {
inputStream
.
close
();
}
System
.
out
.
println
(
"info:"
+
url
+
" download success"
);
//
System.out.println("info:" + url + " download success");
return
filePath
;
}
...
...
src/main/java/cn/timer/api/controller/htzz/HtzzController.java
View file @
af8cac99
...
...
@@ -5,6 +5,7 @@ import java.util.Date;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -85,7 +86,7 @@ public class HtzzController {
return
ResultUtil
.
error
(
"请充值后使用短信功能!"
);
}
if
(
date
!=
null
&&
date
.
getTime
()
<=
new
Date
().
getTime
())
{
System
.
err
.
println
(
"企业 "
+
orgCode
+
" :短信套餐已过期"
);
Logoutput
(
"企业 "
+
orgCode
+
" :短信套餐已过期"
);
return
ResultUtil
.
error
(
"短信套餐已到期!"
);
}
...
...
@@ -247,7 +248,7 @@ public class HtzzController {
CronUtil
.
schedule
(
"*/2 * * 24 * *"
,
new
Task
()
{
@Override
public
void
execute
()
{
System
.
out
.
println
(
"start:"
+
new
Date
());
Logoutput
(
"start:"
+
new
Date
());
}
});
...
...
@@ -256,4 +257,17 @@ public class HtzzController {
return
ResultUtil
.
success
(
"操作成功"
);
}
@Value
(
"${config-8timer.environmental-science}"
)
public
String
environmental_science
;
public
void
Logoutput
(
String
science
)
{
if
(!(
"pro"
).
equals
(
environmental_science
))
{
System
.
out
.
println
(
science
);
}
else
{
System
.
out
.
println
(
""
);
}
}
}
src/main/java/cn/timer/api/controller/jxgl/JxglController.java
View file @
af8cac99
...
...
@@ -6,6 +6,7 @@ import java.util.stream.Collectors;
import
javax.validation.constraints.NotNull
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
...
...
@@ -423,7 +424,7 @@ public class JxglController {
JxglAppraisalItem
appraisalItem
=
JxglAppraisalItem
.
builder
().
build
();
JxglAppraisalLog
appraisalLog
=
JxglAppraisalLog
.
builder
().
build
();
System
.
out
.
println
(
"listEmpId----"
+
listEmpId
);
Logoutput
(
"listEmpId----"
+
listEmpId
);
for
(
Integer
bAP
:
listEmpId
)
{
// 考核
appraisal
.
setPerformanceAppraisalId
(
pA
.
getId
());
...
...
@@ -434,7 +435,7 @@ public class JxglController {
appraisal
.
setSts
(
AppraisalSts
.
TARGET_FILL_IN
.
getType
());
// 新增 考核
appraisal
.
insert
();
System
.
out
.
println
(
"新增 考核:"
+
appraisal
);
Logoutput
(
"新增 考核:"
+
appraisal
);
List
<
Integer
>
pNWeights
=
listPN
.
stream
().
filter
(
p
->
p
.
getProcessType
()
==
2
||
p
.
getProcessType
()
==
3
).
map
(
ProcessNode:
:
getWeight
).
collect
(
Collectors
.
toList
());
Integer
sum
=
0
;
...
...
@@ -493,7 +494,7 @@ public class JxglController {
}
// 新增 流程节点
processNode
.
insert
();
System
.
out
.
println
(
"新增 流程节点:"
+
processNode
);
Logoutput
(
"新增 流程节点:"
+
processNode
);
});
...
...
@@ -515,7 +516,7 @@ public class JxglController {
appraisalIndicators
.
setAppraisalId
(
appraisal
.
getId
());
// 新增 考核指标
appraisalIndicators
.
insert
();
//
System.out.println
("新增 考核指标:" + appraisalIndicators);
//
Logoutput
("新增 考核指标:" + appraisalIndicators);
List
<
JxglAppraisalItemT
>
listAItemT
=
jsxglAppraisalItemTMapper
.
selectList
(
new
QueryWrapper
<
JxglAppraisalItemT
>().
lambda
()
...
...
@@ -528,7 +529,7 @@ public class JxglController {
// 新增 考核项
appraisalItem
.
insert
();
//
System.out.println
("新增 考核项:" + appraisalItem);
//
Logoutput
("新增 考核项:" + appraisalItem);
});
}
...
...
@@ -1876,11 +1877,11 @@ public class JxglController {
Integer
max
=
0
;
total
=
aWeights
*
0.01
*
selfAssessment
+
bWeights
*
0.01
*
superiorAssessment
;
System
.
out
.
println
(
total
);
System
.
out
.
println
(
aWeights
);
System
.
out
.
println
(
selfAssessment
);
System
.
out
.
println
(
bWeights
);
System
.
out
.
println
(
superiorAssessment
);
Logoutput
(
String
.
valueOf
(
total
)
);
Logoutput
(
String
.
valueOf
(
aWeights
)
);
Logoutput
(
String
.
valueOf
(
selfAssessment
)
);
Logoutput
(
String
.
valueOf
(
bWeights
)
);
Logoutput
(
String
.
valueOf
(
superiorAssessment
)
);
List
<
JxglPerformanceRating
>
listPR
=
bS
.
getPerformanceRatings
();
for
(
JxglPerformanceRating
pR
:
listPR
)
{
...
...
@@ -1889,9 +1890,9 @@ public class JxglController {
level
=
pR
.
getSectionMinScore
()
<
total
&&
total
<=
pR
.
getSectionMaxScore
()
?
pR
.
getName
()
:
null
;
}
System
.
out
.
println
(
min
);
System
.
out
.
println
(
max
);
System
.
out
.
println
(
level
);
Logoutput
(
String
.
valueOf
(
min
)
);
Logoutput
(
String
.
valueOf
(
max
)
);
Logoutput
(
level
);
if
(
level
==
null
)
{
for
(
JxglPerformanceRating
pR
:
listPR
)
{
if
(
total
<
min
&&
pR
.
getSectionMinScore
().
equals
(
min
))
{
...
...
@@ -1904,7 +1905,7 @@ public class JxglController {
}
}
}
System
.
out
.
println
(
level
);
Logoutput
(
level
);
// 更新 考核-总分 等级
jxglAppraisalMapper
.
updateById
(
JxglAppraisal
.
builder
().
id
(
appraisal
.
getId
())
...
...
@@ -2071,7 +2072,7 @@ public class JxglController {
.
select
(
ZzglBmgwM:
:
getId
)
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
eq
(
ZzglBmgwM:
:
getLeader
,
empNum
));
System
.
out
.
println
(
"listBM-----"
+
listBM
);
Logoutput
(
"listBM-----"
+
listBM
);
ZzglBmgwM
ZzglBmgwM
=
CollUtil
.
getFirst
(
listBM
);
if
(
ZzglBmgwM
==
null
)
{
return
ResultUtil
.
success
();
...
...
@@ -2109,4 +2110,18 @@ public class JxglController {
return
ResultUtil
.
data
(
pageA
,
listA
);
}
@Value
(
"${config-8timer.environmental-science}"
)
public
String
environmental_science
;
public
void
Logoutput
(
String
science
)
{
if
(!(
"pro"
).
equals
(
environmental_science
))
{
System
.
out
.
println
(
science
);
}
else
{
System
.
out
.
println
(
""
);
}
}
}
src/main/java/cn/timer/api/controller/kqgl/AttController.java
View file @
af8cac99
...
...
@@ -1427,7 +1427,7 @@ public class AttController {
if
(
attass
.
getAtttype
()
==
2
){
//排班制 考勤组与用户、用户排班
scheduleservice
.
deleteByPrimaryByUserid
(
Integer
.
valueOf
(
attser
[
u
]));
}
userattendancerelservice
.
deleteByPrimaryByUserid
(
Integer
.
valueOf
(
attser
[
u
]));
userattendancerelservice
.
deleteByPrimaryByUserid
(
Integer
.
valueOf
(
attser
[
u
])
,
qyid
);
UserAttendanceRel
kquser
=
new
UserAttendanceRel
();
kquser
.
setKqzid
(
attgrpid
);
...
...
src/main/java/cn/timer/api/controller/kqgl/ClockInController.java
View file @
af8cac99
...
...
@@ -1497,94 +1497,92 @@ public class ClockInController {
boolean
sbdkkd
=
false
;
//针对于上班 未超过上班卡打卡 视为无效打卡
long
punchcardtime
=
0
,
punchstart
=
0
,
punchend
=
0
;
//应打卡时间,应打卡开始时间,应打卡结束时间
boolean
chenexday
=
false
;
ClockCollectData
clockt
=
new
ClockCollectData
();
// putime: 根据日期 得到打卡所需的详细信息
AttendanceCardListDto
attdate
=
MethodCall
(
qyid
,
userid
,
putime
);
if
(
attgro
!=
null
)
{
//判断考勤组是否存在
if
(
attdate
.
getAttgrouptype
()
!=
3
)
{
//查询打卡当天是否有记录**********************************
List
<
AttSchedule
>
checknextday
=
attdate
.
getAttsch
();
if
(
checknextday
.
size
()
>
0
)
{
for
(
int
c
=
0
;
c
<
checknextday
.
size
();
c
++)
{
if
(
checknextday
.
get
(
c
).
getNextday
()
==
2
)
{
chenexday
=
true
;
}
}
}
KqglAssoDkmx
dkmc
=
KqglAssoDkmx
.
builder
().
build
();
String
dakariqi
=
new
SimpleDateFormat
(
"yy-MM-dd"
).
format
(
Double
.
valueOf
(
startDateyesterday
))+
" "
+
ClockInTool
.
dateToWeek2
(
yesterday
);
//检查昨日的班次是否存在次日打卡
KqglAssoDkjl
balan
=
kqglassodkjlmapper
.
selectOne
(
new
QueryWrapper
<
KqglAssoDkjl
>().
lambda
().
eq
(
KqglAssoDkjl:
:
getUserId
,
userid
).
eq
(
KqglAssoDkjl:
:
getAttdate
,
dakariqi
).
ne
(
KqglAssoDkjl:
:
getBcid
,
0
).
orderByDesc
(
KqglAssoDkjl
::
getSort
).
last
(
"LIMIT 1"
));
boolean
dnck
=
false
;
boolean
crdk
=
false
;
//当次打卡是否存在次日打卡
if
(
balan
!=
null
)
{
//前一天是否打过卡 去班次id查询是否存在次日打卡
//昨日的班次信息
KqglAssoBcsz
shif
=
kqglassobcszmapper
.
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
balan
.
getBcid
()));
int
dkcs
=
shif
.
getSxbcs
()*
2
;
List
<
AttSchedule
>
ashss
=
attdate
.
getAttsch
();
//获取今天应打卡时间
if
(
ashss
.
size
()
>
0
)
{
Date
sd1
=
df1
.
parse
(
ClockInTool
.
stampToDate
(
String
.
valueOf
(
ashss
.
get
(
0
).
getTime
())));
//当天应打的首次上班卡时间
Date
sd2
=
df1
.
parse
(
current_time
);
//当前时间
if
(
sd1
.
after
(
sd2
))
{
//大于
dnck
=
true
;
if
(
chenexday
)
{
//查询打卡当天是否有记录**********************************
// KqglAssoDkmx dkmc = KqglAssoDkmx.builder().build();
String
dakariqi
=
new
SimpleDateFormat
(
"yy-MM-dd"
).
format
(
Double
.
valueOf
(
startDateyesterday
))+
" "
+
ClockInTool
.
dateToWeek2
(
yesterday
);
//检查昨日的班次是否存在次日打卡
KqglAssoDkjl
balan
=
kqglassodkjlmapper
.
selectOne
(
new
QueryWrapper
<
KqglAssoDkjl
>().
lambda
().
eq
(
KqglAssoDkjl:
:
getUserId
,
userid
).
eq
(
KqglAssoDkjl:
:
getAttdate
,
dakariqi
).
ne
(
KqglAssoDkjl:
:
getBcid
,
0
).
orderByDesc
(
KqglAssoDkjl
::
getSort
).
last
(
"LIMIT 1"
));
// boolean dnck = false;
// boolean crdk = false;//当次打卡是否存在次日打卡
if
(
balan
!=
null
)
{
//前一天是否打过卡 去班次id查询是否存在次日打卡
//昨日的班次信息
KqglAssoBcsz
shif
=
kqglassobcszmapper
.
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
balan
.
getBcid
()));
int
dkcs
=
shif
.
getSxbcs
()*
2
;
List
<
AttSchedule
>
ashss
=
attdate
.
getAttsch
();
//获取今天应打卡时间
if
(
ashss
.
size
()
>
0
)
{
Date
sd1
=
df1
.
parse
(
ClockInTool
.
stampToDate
(
String
.
valueOf
(
ashss
.
get
(
0
).
getTime
())));
//当天应打的首次上班卡时间
Date
sd2
=
df1
.
parse
(
current_time
);
//当前时间
if
(
sd1
.
after
(
sd2
))
{
//大于
dnck
=
true
;
}
}
}
int
isXbdk1Cr
=
shif
.
getIsXbdk1Cr
();
//下班1是否次日(0:否;1:是)
int
isSbdk2Cr
=
shif
.
getIsSbdk2Cr
();
//上班2是否次日(0:否;1:是)
int
isXbdk2Cr
=
shif
.
getIsXbdk2Cr
();
//下班2是否次日(0:否;1:是)
int
isSbdk3Cr
=
shif
.
getIsSbdk3Cr
();
//上班3是否次日(0:否;1:是)
int
isXbdk3Cr
=
shif
.
getIsXbdk3Cr
();
//下班3是否次日(0:否;1:是)
if
(
balan
.
getSort
()
<=
dkcs
)
{
if
((
isXbdk1Cr
+
isSbdk2Cr
+
isXbdk2Cr
+
isSbdk3Cr
+
isXbdk3Cr
)
>
0
)
{
crdk
=
true
;
int
isXbdk1Cr
=
shif
.
getIsXbdk1Cr
();
//下班1是否次日(0:否;1:是)
int
isSbdk2Cr
=
shif
.
getIsSbdk2Cr
();
//上班2是否次日(0:否;1:是)
int
isXbdk2Cr
=
shif
.
getIsXbdk2Cr
();
//下班2是否次日(0:否;1:是)
int
isSbdk3Cr
=
shif
.
getIsSbdk3Cr
();
//上班3是否次日(0:否;1:是)
int
isXbdk3Cr
=
shif
.
getIsXbdk3Cr
();
//下班3是否次日(0:否;1:是)
if
(
balan
.
getSort
()
<=
dkcs
)
{
if
((
isXbdk1Cr
+
isSbdk2Cr
+
isXbdk2Cr
+
isSbdk3Cr
+
isXbdk3Cr
)
>
0
)
{
crdk
=
true
;
}
}
}
else
{
List
<
AttSchedule
>
ashss
=
attdate
.
getAttsch
();
//获取今天应打卡时间
// if(balan.getSort()+1 == 2 && dkcs == 2) {
// //次日
// if(isXbdk1Cr > 0) { crdk = true; }
// }
// if(balan.getSort()+1 == 3 && dkcs == 4) {
// if(isSbdk2Cr > 0) {crdk = true; }
// }
// if(balan.getSort()+1 == 4 && dkcs == 4) {
// if(isXbdk2Cr > 0) { crdk = true; }
// }
// if(balan.getSort()+1 == 5 && dkcs == 6) {
// if(isSbdk3Cr > 0) { crdk = true; }
// }
// if(balan.getSort()+1 == 6 && dkcs == 6) {
// if(isXbdk3Cr > 0) { crdk = true; }
// }
}
}
else
{
List
<
AttSchedule
>
ashss
=
attdate
.
getAttsch
();
//获取今天应打卡时间
//无记录的话就找昨天的数据
AttendanceCardListDto
attdate1
=
MethodCall
(
qyid
,
userid
,
yesterday
);
List
<
AttSchedule
>
ashssyebo
=
attdate1
.
getAttsch
();
//获取昨天应打卡时间
if
(
ashssyebo
.
size
()
>
0
)
{
Date
sd1
=
df1
.
parse
(
ClockInTool
.
stampToDate
(
String
.
valueOf
(
ashssyebo
.
get
(
0
).
getTime
())));
//当天应打的首次上班卡时间
Date
sd2
=
df1
.
parse
(
current_time
);
//当前时间
if
(
sd2
.
after
(
sd1
))
{
//大于
dnck
=
true
;
//无记录的话就找昨天的数据
AttendanceCardListDto
attdate1
=
MethodCall
(
qyid
,
userid
,
yesterday
);
List
<
AttSchedule
>
ashssyebo
=
attdate1
.
getAttsch
();
//获取昨天应打卡时间
if
(
ashssyebo
.
size
()
>
0
)
{
Date
sd1
=
df1
.
parse
(
ClockInTool
.
stampToDate
(
String
.
valueOf
(
ashssyebo
.
get
(
0
).
getTime
())));
//当天应打的首次上班卡时间
Date
sd2
=
df1
.
parse
(
current_time
);
//当前时间
if
(
sd2
.
after
(
sd1
))
{
//大于
dnck
=
true
;
}
}
}
if
(
EmptyUtil
.
isNotEmpty
(
attdate
.
getAttsch
())
&&
ashss
.
get
(
0
).
getId
()
!=
0
)
{
//班次不为空
KqglAssoBcsz
shifi
=
KqglAssoBcsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
ashss
.
get
(
0
).
getId
()));
int
isXbdk1Cr
=
shifi
.
getIsXbdk1Cr
();
//下班1是否次日(0:否;1:是)
int
isSbdk2Cr
=
shifi
.
getIsSbdk2Cr
();
//上班2是否次日(0:否;1:是)
int
isXbdk2Cr
=
shifi
.
getIsXbdk2Cr
();
//下班2是否次日(0:否;1:是)
int
isSbdk3Cr
=
shifi
.
getIsSbdk3Cr
();
//上班3是否次日(0:否;1:是)
int
isXbdk3Cr
=
shifi
.
getIsXbdk3Cr
();
//下班3是否次日(0:否;1:是)
if
((
isXbdk1Cr
+
isSbdk2Cr
+
isXbdk2Cr
+
isSbdk3Cr
+
isXbdk3Cr
)
>
0
)
{
crdk
=
true
;
if
(
EmptyUtil
.
isNotEmpty
(
attdate
.
getAttsch
())
&&
ashss
.
get
(
0
).
getId
()
!=
0
)
{
//班次不为空
KqglAssoBcsz
shifi
=
KqglAssoBcsz
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoBcsz
>().
lambda
().
eq
(
KqglAssoBcsz:
:
getId
,
ashss
.
get
(
0
).
getId
()));
int
isXbdk1Cr
=
shifi
.
getIsXbdk1Cr
();
//下班1是否次日(0:否;1:是)
int
isSbdk2Cr
=
shifi
.
getIsSbdk2Cr
();
//上班2是否次日(0:否;1:是)
int
isXbdk2Cr
=
shifi
.
getIsXbdk2Cr
();
//下班2是否次日(0:否;1:是)
int
isSbdk3Cr
=
shifi
.
getIsSbdk3Cr
();
//上班3是否次日(0:否;1:是)
int
isXbdk3Cr
=
shifi
.
getIsXbdk3Cr
();
//下班3是否次日(0:否;1:是)
attdate
=
MethodCall
(
qyid
,
userid
,
yesterday
);
}
else
{
crdk
=
false
;
if
((
isXbdk1Cr
+
isSbdk2Cr
+
isXbdk2Cr
+
isSbdk3Cr
+
isXbdk3Cr
)
>
0
)
{
crdk
=
true
;
attdate
=
MethodCall
(
qyid
,
userid
,
yesterday
);
}
else
{
crdk
=
false
;
}
}
}
}
if
(
crdk
&&
dnck
)
{
dkmc
=
KqglAssoDkmx
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
KqglAssoDkmx
>().
lambda
().
eq
(
KqglAssoDkmx:
:
getUserid
,
userid
)
.
ge
(
KqglAssoDkmx:
:
getDksj
,
startDateyesterday
).
le
(
KqglAssoDkmx:
:
getDksj
,
endDateyesterday
).
eq
(
KqglAssoDkmx:
:
getData
,
yesterday
));
...
...
src/main/java/cn/timer/api/controller/kqgl/TimeCardController.java
View file @
af8cac99
...
...
@@ -607,13 +607,12 @@ public class TimeCardController {
try
{
ResponseEntity
<
String
>
request
=
restTemplate
.
postForEntity
(
url
,
httpEntity
,
String
.
class
);
com
.
alibaba
.
fastjson
.
JSONObject
object
=
JSON
.
parseObject
(
request
.
getBody
());
System
.
err
.
println
(
object
.
get
(
"message"
));
msg
=
object
.
get
(
"message"
).
toString
();
sta
.
setCode
(
state
[
p
]);
sta
.
setState
(
Integer
.
valueOf
(
object
.
get
(
"data"
).
toString
()));
stas
.
add
(
sta
);
}
catch
(
RestClientException
e
)
{
System
.
err
.
println
(
"提示:考勤机服务出错-1"
);
Logoutput
(
"提示:考勤机服务出错-1"
);
return
ResultUtil
.
success
(
"失败"
);
}
}
...
...
@@ -636,9 +635,9 @@ public class TimeCardController {
HttpEntity
httpEntity
=
new
HttpEntity
(
params
,
headers
);
try
{
ResponseEntity
<
String
>
request
=
restTemplate
.
postForEntity
(
url
,
httpEntity
,
String
.
class
);
System
.
err
.
prin
t
(
request
.
getBody
());
Logoutpu
t
(
request
.
getBody
());
}
catch
(
RestClientException
e
)
{
System
.
err
.
println
(
"提示:考勤机服务出错-2"
);
Logoutput
(
"提示:考勤机服务出错-2"
);
return
ResultUtil
.
success
(
"失败"
);
}
return
ResultUtil
.
success
(
"成功"
);
...
...
@@ -666,9 +665,9 @@ public class TimeCardController {
HttpEntity
httpEntity
=
new
HttpEntity
(
params
,
headers
);
try
{
ResponseEntity
<
String
>
request
=
restTemplate
.
postForEntity
(
url
,
httpEntity
,
String
.
class
);
System
.
err
.
prin
t
(
request
.
getBody
());
Logoutpu
t
(
request
.
getBody
());
}
catch
(
RestClientException
e
)
{
System
.
err
.
println
(
"提示:考勤机服务出错-3"
);
Logoutput
(
"提示:考勤机服务出错-3"
);
return
ResultUtil
.
success
(
"失败"
);
}
KqglAssoYhsb
.
builder
().
id
(
id
).
isGly
(
0
).
build
().
updateById
();
...
...
@@ -698,9 +697,9 @@ public class TimeCardController {
HttpEntity
httpEntity
=
new
HttpEntity
(
params
,
headers
);
try
{
ResponseEntity
<
String
>
request
=
restTemplate
.
postForEntity
(
url
,
httpEntity
,
String
.
class
);
System
.
err
.
prin
t
(
request
.
getBody
());
Logoutpu
t
(
request
.
getBody
());
}
catch
(
RestClientException
e
)
{
System
.
err
.
println
(
"提示:考勤机服务出错-4"
);
Logoutput
(
"提示:考勤机服务出错-4"
);
return
ResultUtil
.
success
(
"失败"
);
}
...
...
@@ -743,10 +742,9 @@ public class TimeCardController {
try
{
ResponseEntity
<
String
>
request
=
restTemplate
.
postForEntity
(
url
,
httpEntity
,
String
.
class
);
com
.
alibaba
.
fastjson
.
JSONObject
object
=
JSON
.
parseObject
(
request
.
getBody
());
System
.
err
.
println
(
object
.
get
(
"message"
));
msg
=
object
.
get
(
"message"
).
toString
();
}
catch
(
RestClientException
e
)
{
//
System.err.prin
tln("提示:考勤机服务出错");
//
Logoutpu
tln("提示:考勤机服务出错");
return
ResultUtil
.
success
(
msg
);
}
...
...
@@ -1241,9 +1239,9 @@ public class TimeCardController {
HttpEntity
httpEntity
=
new
HttpEntity
(
params
,
headers
);
try
{
ResponseEntity
<
String
>
request
=
restTemplate
.
postForEntity
(
url
,
httpEntity
,
String
.
class
);
System
.
err
.
prin
t
(
request
.
getBody
());
Logoutpu
t
(
request
.
getBody
());
}
catch
(
RestClientException
e
)
{
System
.
err
.
println
(
"提示:考勤机服务出错-5"
);
Logoutput
(
"提示:考勤机服务出错-5"
);
return
ResultUtil
.
error
(
"删除失败:提示:考勤机服务出错"
);
}
...
...
@@ -1382,7 +1380,7 @@ public class TimeCardController {
RestTemplate
restTemplate
=
new
RestTemplate
();
HttpEntity
httpEntity
=
new
HttpEntity
(
params
,
headers
);
ResponseEntity
<
String
>
request
=
restTemplate
.
postForEntity
(
url
,
httpEntity
,
String
.
class
);
System
.
err
.
prin
t
(
request
.
getBody
());
Logoutpu
t
(
request
.
getBody
());
KqglAssoYhsb
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoYhsb
>().
lambda
().
eq
(
KqglAssoYhsb:
:
getUserId
,
attser
[
u
]).
eq
(
KqglAssoYhsb:
:
getKqjid
,
kqj
.
getId
()));
...
...
@@ -1555,7 +1553,7 @@ public class TimeCardController {
RestTemplate
restTemplate
=
new
RestTemplate
();
HttpEntity
httpEntity
=
new
HttpEntity
(
params
,
headers
);
ResponseEntity
<
String
>
request
=
restTemplate
.
postForEntity
(
urladd
,
httpEntity
,
String
.
class
);
System
.
err
.
prin
t
(
request
.
getBody
());
Logoutpu
t
(
request
.
getBody
());
//需要改下下
KqglAssoYhsb
uskqj
=
KqglAssoYhsb
.
builder
().
userId
(
Integer
.
valueOf
(
addmember
[
a
])).
kqjid
(
kqjid
).
type
(
1
).
isGly
(
0
).
build
();
...
...
@@ -1581,7 +1579,7 @@ public class TimeCardController {
RestTemplate
restTemplate
=
new
RestTemplate
();
HttpEntity
httpEntity
=
new
HttpEntity
(
params
,
headers
);
ResponseEntity
<
String
>
request
=
restTemplate
.
postForEntity
(
urlre
,
httpEntity
,
String
.
class
);
System
.
err
.
prin
t
(
request
.
getBody
());
Logoutpu
t
(
request
.
getBody
());
//用户与设备关系表
KqglAssoYhsb
.
builder
().
build
().
delete
(
new
QueryWrapper
<
KqglAssoYhsb
>().
lambda
().
eq
(
KqglAssoYhsb:
:
getUserId
,
removemember
[
r
]).
eq
(
KqglAssoYhsb:
:
getKqjid
,
kqjid
).
eq
(
KqglAssoYhsb:
:
getType
,
1
));
...
...
@@ -3119,7 +3117,19 @@ public class TimeCardController {
@Value
(
"${config-8timer.environmental-science}"
)
public
String
environmental_science
;
public
void
Logoutput
(
String
science
)
{
if
(!(
"pro"
).
equals
(
environmental_science
))
{
System
.
out
.
println
(
science
);
}
else
{
System
.
out
.
println
(
""
);
}
}
...
...
src/main/java/cn/timer/api/controller/kqgl/service/KqglServiceImpl.java
View file @
af8cac99
...
...
@@ -8,6 +8,7 @@ import java.util.Date;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -361,7 +362,7 @@ public class KqglServiceImpl implements KqglService {
String
DKputime
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
repaappr
.
getCardrepltime
());
//打卡时间
boolean
effectiveDate
=
ClockInTool
.
hourMinuteBetween
(
DKputime
,
staputime
,
entputime
,
"yyyy-MM-dd HH:mm"
);
if
(!
effectiveDate
)
{
System
.
out
.
println
(
"当前打卡时间不在范围内"
);
Logoutput
(
"当前打卡时间不在范围内"
);
isRange
=
false
;
}
}
...
...
@@ -390,7 +391,7 @@ public class KqglServiceImpl implements KqglService {
String
DKputime
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
repaappr
.
getCardrepltime
());
//打卡时间
boolean
effectiveDate
=
ClockInTool
.
hourMinuteBetween
(
DKputime
,
staputime
,
entputime
,
"yyyy-MM-dd HH:mm"
);
if
(!
effectiveDate
)
{
System
.
out
.
println
(
"当前打卡时间不在范围内"
);
Logoutput
(
"当前打卡时间不在范围内"
);
isRange
=
false
;
}
}
...
...
@@ -533,7 +534,7 @@ public class KqglServiceImpl implements KqglService {
String
DKputime
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
repaappr
.
getCardrepltime
());
//打卡时间
boolean
effectiveDate
=
ClockInTool
.
hourMinuteBetween
(
DKputime
,
staputime
,
entputime
,
"yyyy-MM-dd HH:mm"
);
if
(!
effectiveDate
)
{
System
.
out
.
println
(
"当前打卡时间不在范围内"
);
Logoutput
(
"当前打卡时间不在范围内"
);
isRange
=
false
;
}
}
...
...
@@ -564,7 +565,7 @@ public class KqglServiceImpl implements KqglService {
String
DKputime
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
repaappr
.
getCardrepltime
());
//打卡时间
boolean
effectiveDate
=
ClockInTool
.
hourMinuteBetween
(
DKputime
,
staputime
,
entputime
,
"yyyy-MM-dd HH:mm"
);
if
(!
effectiveDate
)
{
System
.
out
.
println
(
"当前打卡时间不在范围内"
);
Logoutput
(
"当前打卡时间不在范围内"
);
isRange
=
false
;
}
}
...
...
@@ -824,7 +825,7 @@ public class KqglServiceImpl implements KqglService {
String
DKputime
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm"
).
format
(
time_
);
//打卡时间
boolean
effectiveDate
=
ClockInTool
.
hourMinuteBetween
(
DKputime
,
staputime
,
entputime
,
"yyyy-MM-dd HH:mm"
);
if
(!
effectiveDate
)
{
System
.
out
.
println
(
"当前打卡时间不在范围内"
);
Logoutput
(
"当前打卡时间不在范围内"
);
isRange
=
false
;
}
...
...
@@ -1091,4 +1092,17 @@ public class KqglServiceImpl implements KqglService {
}
}
@Value
(
"${config-8timer.environmental-science}"
)
public
String
environmental_science
;
public
void
Logoutput
(
String
science
)
{
if
(!(
"pro"
).
equals
(
environmental_science
))
{
System
.
out
.
println
(
science
);
}
else
{
System
.
out
.
println
(
""
);
}
}
}
src/main/java/cn/timer/api/controller/sbgjj/SocialSecurityFundController.java
View file @
af8cac99
...
...
@@ -6,6 +6,7 @@ import java.util.Date;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -601,10 +602,10 @@ public class SocialSecurityFundController {
deta
.
setAddtime
(
new
Date
().
getTime
());
detalis
.
add
(
deta
);
System
.
out
.
println
(
"公司-社保:"
+
preval
);
Logoutput
(
"公司-社保:"
+
preval
);
gssocial
+=
preval
;
}
System
.
out
.
println
(
"公司社保总:"
+
formatDouble1
(
gssocial
));
Logoutput
(
"公司社保总:"
+
formatDouble1
(
gssocial
));
if
(
detalis
.
size
()>
0
){
sbgjjassodetailedmapper
.
insertsbgjjassodetailedList
(
detalis
);
...
...
@@ -638,11 +639,11 @@ public class SocialSecurityFundController {
}
System
.
out
.
println
(
"个人-社保:"
+
preval
);
Logoutput
(
"个人-社保:"
+
preval
);
grsocial
+=
preval
;
}
System
.
out
.
println
(
"个人社保总:"
+
formatDouble1
(
grsocial
));
Logoutput
(
"个人社保总:"
+
formatDouble1
(
grsocial
));
if
(!(
insuredto
.
getJnmouth
()).
equals
(
insuredto
.
getGjjJnmouth
()))
{
// sbgjjassoyjzdmapper.deletesbgjjassoyjzd(insuredto.getUsernum(),orgCode,insuredto.getJnmouth());
...
...
@@ -711,10 +712,10 @@ public class SocialSecurityFundController {
deta
.
setAddtime
(
new
Date
().
getTime
());
deta
.
insert
();
System
.
out
.
println
(
"公司-公积金:"
+
preval
);
Logoutput
(
"公司-公积金:"
+
preval
);
gsfund
+=
preval
;
}
System
.
out
.
println
(
"公司公积金总:"
+
formatDouble1
(
gsfund
));
Logoutput
(
"公司公积金总:"
+
formatDouble1
(
gsfund
));
//个人
...
...
@@ -742,10 +743,10 @@ public class SocialSecurityFundController {
SbgjjAssoDetailed
.
builder
().
id
(
dtd
.
getId
()).
personalAmount
(
preval
).
build
().
updateById
();
}
System
.
out
.
println
(
"个人-公积金:"
+
preval
);
Logoutput
(
"个人-公积金:"
+
preval
);
grgsfund
+=
preval
;
}
System
.
out
.
println
(
"个人公积金总:"
+
formatDouble1
(
grgsfund
));
Logoutput
(
"个人公积金总:"
+
formatDouble1
(
grgsfund
));
if
(!(
insuredto
.
getJnmouth
()).
equals
(
insuredto
.
getGjjJnmouth
()))
{
// sbgjjassoyjzdmapper.deletesbgjjassoyjzd(insuredto.getUsernum(),orgCode,insuredto.getGjjJnmouth());
...
...
@@ -936,10 +937,9 @@ public class SocialSecurityFundController {
double
gsh
=
gsbili
.
divide
(
bfb
).
doubleValue
();
preval
=
formatDouble1
(
Double
.
valueOf
(
jishuxx
)*
gsh
);
}
System
.
out
.
println
(
preval
);
gssocial
+=
preval
;
}
System
.
out
.
println
(
"公司社保总:"
+
formatDouble1
(
gssocial
));
Logoutput
(
"公司社保总:"
+
formatDouble1
(
gssocial
));
//个人
...
...
@@ -959,11 +959,10 @@ public class SocialSecurityFundController {
double
gsh
=
gsbigr
.
divide
(
bfgr
).
doubleValue
();
preval
=
formatDouble1
(
Double
.
valueOf
(
jishuxxgr
)*
gsh
);
}
System
.
out
.
println
(
preval
);
grsocial
+=
preval
;
}
System
.
out
.
println
(
"个人社保总:"
+
formatDouble1
(
grsocial
));
Logoutput
(
"个人社保总:"
+
formatDouble1
(
grsocial
));
String
gjjgshj_
=
"0.0"
;
String
gjjgrhj_
=
"0.0"
;
...
...
@@ -1022,10 +1021,9 @@ public class SocialSecurityFundController {
double
gsh
=
gsbili
.
divide
(
bfb
).
doubleValue
();
preval
=
formatDouble1
(
Double
.
valueOf
(
jishuxx
)*
gsh
);
}
System
.
out
.
println
(
preval
);
gsfund
+=
preval
;
}
System
.
out
.
println
(
"公司公积金总:"
+
formatDouble1
(
gsfund
));
Logoutput
(
"公司公积金总:"
+
formatDouble1
(
gsfund
));
//个人
...
...
@@ -1045,10 +1043,9 @@ public class SocialSecurityFundController {
double
gsh
=
gsbigr
.
divide
(
bfgr
).
doubleValue
();
preval
=
formatDouble1
(
Double
.
valueOf
(
jishuxxgr
)*
gsh
);
}
System
.
out
.
println
(
preval
);
grgsfund
+=
preval
;
}
System
.
out
.
println
(
"个人公积金总:"
+
formatDouble1
(
grgsfund
));
Logoutput
(
"个人公积金总:"
+
formatDouble1
(
grgsfund
));
String
sbgshj_
=
"0.0"
;
String
sbgrhj_
=
"0.0"
;
String
sbhj_
=
"0.0"
;
...
...
@@ -1172,4 +1169,18 @@ public class SocialSecurityFundController {
return
new
ResponseResult
().
success
(
"成功"
,
yjzlist
);
}
@Value
(
"${config-8timer.environmental-science}"
)
public
String
environmental_science
;
public
void
Logoutput
(
String
science
)
{
if
(!(
"pro"
).
equals
(
environmental_science
))
{
System
.
out
.
println
(
science
);
}
else
{
System
.
out
.
println
(
""
);
}
}
}
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
View file @
af8cac99
...
...
@@ -10,6 +10,7 @@ import java.util.Set;
import
cn.timer.api.dto.spmk.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.MethodArgumentNotValidException
;
...
...
@@ -314,7 +315,6 @@ public class SpmkController {
public
Result
<
Object
>
selectListAgByAdmin
(
@CurrentUser
UserBean
userBean
){
List
<
Integer
>
depts
=
zzglBmgwMService
.
empNumupGetDepts
(
userBean
.
getOrgCode
(),
userBean
.
getEmpNum
());
System
.
out
.
println
(
depts
);
return
ResultUtil
.
data
(
spmkApprovalGMapper
.
selectListAgInCaByAdmin
(
userBean
.
getOrgCode
(),
userBean
.
getEmpNum
(),
depts
));
}
...
...
@@ -480,12 +480,8 @@ public class SpmkController {
.
eq
(
YgglMainEmp:
:
getOrgCode
,
311
).
eq
(
YgglMainEmp:
:
getEmpNum
,
12512
));
Integer
getId
=
one
!=
null
?
one
.
getBmgwId
()
:
null
;
System
.
out
.
println
(
getId
);
Set
<
Integer
>
all
=
getId
!=
null
?
empNumupdept2
(
lanzi
,
bmgws
,
getId
)
:
new
HashSet
<
Integer
>();
all
.
add
(
getId
);
System
.
out
.
println
(
all
);
return
spmkCustomApprovalMapper
.
updateListRandsById
(
list
)
?
ResultUtil
.
success
()
:
ResultUtil
.
error
();
}
...
...
@@ -529,26 +525,30 @@ public class SpmkController {
Router
router
=
spmkApproveSummaryDto
.
getRouter
();
List
<
Router
>
routers
=
router
.
getChildren
();
// routers = RouterUtils.clearRouters(routers);
if
(
routers
==
null
){
return
ResultUtil
.
error
(
"无法发起,请完善审批流程"
);
}
if
(
CollectionUtil
.
isNotEmpty
(
routers
))
{
boolean
hasAudit
=
false
;
if
(
routers
.
size
()>
0
){
for
(
Relation
relation:
routers
.
get
(
0
).
getRelation
())
{
if
(
relation
.
getUsers
().
size
()>
0
){
hasAudit
=
true
;
}
}
}
// List<Relation> relations = routers.get(0).getRelation();
// if (relations == null || relations.size() < 1) {
// return ResultUtil.error("无法发起,请完善审批流程");
// boolean hasAudit=false;
// if(routers.size()>0){
// for (Relation relation:routers.get(0).getRelation()) {
// if(relation.getUsers().size()>0){
// hasAudit=true;
// }
// }
// }
// List<User> users = relations.get(0).getUsers();
// if (CollectionUtil.isEmpty(users)) {
// return ResultUtil.error("无法发起,请完善审批流程");
//// List<Relation> relations = routers.get(0).getRelation();
//// if (relations == null || relations.size() < 1) {
//// return ResultUtil.error("无法发起,请完善审批流程");
//// }
//// List<User> users = relations.get(0).getUsers();
//// if (CollectionUtil.isEmpty(users)) {
//// return ResultUtil.error("无法发起,请完善审批流程");
//// }
// if(!hasAudit){
// return ResultUtil.error("请选择审批人!");
// }
if
(!
hasAudit
){
return
ResultUtil
.
error
(
"请选择审批人!"
);
}
}
else
{
return
ResultUtil
.
error
(
"无法发起,请完善审批流程"
);
}
...
...
@@ -562,11 +562,28 @@ public class SpmkController {
.
set
(
"headUrl"
,
ygglMainEmp
.
getHeadUrl
())
.
set
(
"id"
,
userBean
.
getEmpNum
());
RouterUtils
.
NextNode
(
listRouter
,
jSONObject
,
ISFIRST
);
System
.
out
.
println
(
listRouter
);
List
<
FlowChildren
>
listFlowChildren
=
new
ArrayList
<
FlowChildren
>();
RouterUtils
.
getIsFlowChildren
(
listRouter
,
listFlowChildren
);
System
.
out
.
println
(
"listFlowChildren"
);
System
.
out
.
println
(
listFlowChildren
);
if
(
listFlowChildren
.
isEmpty
()){
return
ResultUtil
.
error
(
"无法发起,请完善审批流程"
);
}
for
(
FlowChildren
flowChildrenItem:
listFlowChildren
)
{
if
(
"audit"
.
equals
(
flowChildrenItem
.
getClassName
())){
boolean
hasAudit
=
false
;
for
(
Relation
relation:
flowChildrenItem
.
getRelation
())
{
if
(
relation
.
getUsers
().
size
()>
0
){
hasAudit
=
true
;
}
}
if
(!
hasAudit
){
return
ResultUtil
.
error
(
"审批流程设置审批人为空无法发起!"
);
}
}
}
Logoutput
(
"listFlowChildren"
);
// 当前审批人
String
currentApprover
=
jSONObject
.
getStr
(
"current_approver"
);
...
...
@@ -726,7 +743,6 @@ public class SpmkController {
approvingDto
.
getUser
()
);
System
.
out
.
println
(
listFlowChildren
);
// 更新 flowChildren
SpmkApproveDetail
.
builder
().
id
(
ad
.
getId
()).
flowChildren
(
ObjectUtil
.
serialize
(
listFlowChildren
)).
build
().
updateById
();
FlowChildren
fc
=
CollUtil
.
getLast
(
listFlowChildren
);
...
...
@@ -746,8 +762,8 @@ public class SpmkController {
//审批完成后 业务
SpmkAssoBusiness
sab
=
spmkAssoBusinessFactory
.
createSpmkService
(
ApproveEnum
.
getEnums
(
aSummary
.
getAssoType
()));
if
(
sab
!=
null
)
System
.
out
.
println
(
"1----------"
+
sab
);
System
.
out
.
println
(
"2----------"
+
jSONObject
);
Logoutput
(
"1----------"
+
sab
);
Logoutput
(
"2----------"
+
jSONObject
);
sab
.
handleApprove
(
jSONObject
);
}
}
...
...
@@ -789,8 +805,8 @@ public class SpmkController {
SpmkApproveDetail
ad
=
spmkApproveDetailMapper
.
selectOne
(
new
QueryWrapper
<
SpmkApproveDetail
>().
lambda
().
eq
(
SpmkApproveDetail:
:
getApproveSummaryId
,
sp
.
getId
()));
JSONObject
as
=
ObjectUtil
.
deserialize
(
ad
.
getRequestData
());
//
System.out.println
(as);
//
System.out.println
(sp.getId()+"==========================================="+sp.getAssoType());
//
Logoutput
(as);
//
Logoutput
(sp.getId()+"==========================================="+sp.getAssoType());
requerstr
=
""
;
//assoType : 1转正 2离职 3调薪 4调岗 5加班 6请假 7出差 8外出 9补卡
switch
(
sp
.
getAssoType
())
{
...
...
@@ -822,7 +838,7 @@ public class SpmkController {
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
//
System.out.println
(requerstr);
//
Logoutput
(requerstr);
sp
.
setDigest
(
requerstr
);
}
...
...
@@ -889,7 +905,7 @@ public class SpmkController {
spmkApproveDetailMapper
.
delete
(
null
);
spmkApproveExecuteRecordMapper
.
delete
(
null
);
spmkExecutorMapper
.
delete
(
null
);
System
.
out
.
println
(
"删除-审批组、自定义审批、审批汇总、审批详情、审批执行记录、审批执行人记录 所有数据 完成!"
);
Logoutput
(
"删除-审批组、自定义审批、审批汇总、审批详情、审批执行记录、审批执行人记录 所有数据 完成!"
);
return
ResultUtil
.
success
();
}
...
...
@@ -969,4 +985,18 @@ public class SpmkController {
return
ResultUtil
.
data
(
qna
);
}
@Value
(
"${config-8timer.environmental-science}"
)
public
String
environmental_science
;
public
void
Logoutput
(
String
science
)
{
if
(!(
"pro"
).
equals
(
environmental_science
))
{
System
.
out
.
println
(
science
);
}
else
{
System
.
out
.
println
(
""
);
}
}
}
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
af8cac99
...
...
@@ -1783,7 +1783,7 @@ public class YgglController {
loginInfo
.
setEntryTime
(
ygglMainEmp
.
getRzTime
());
if
(
ygglMainEmp
.
getSyq
()!=
null
)
{
System
.
out
.
println
(
ygglMainEmp
.
getSyq
());
//
System.out.println(ygglMainEmp.getSyq());
Date
expireDate
=
DateUtil
.
offsetMonth
(
ygglMainEmp
.
getRzTime
(),
ygglMainEmp
.
getSyq
());
// 时间偏移
loginInfo
.
setRegularTime
(
expireDate
);
}
else
{
...
...
src/main/java/cn/timer/api/controller/zcgl/ZcglController.java
View file @
af8cac99
...
...
@@ -520,7 +520,7 @@ public class ZcglController {
Integer
orgCode
=
userBean
.
getOrgCode
();
Integer
empNum
=
userBean
.
getEmpNum
();
System
.
out
.
println
(
id
);
//
System.out.println(id);
// 根据id查询资产详情
QueryWrapper
<
ZcglAssoZcda
>
queryWrapper
=
new
QueryWrapper
<
ZcglAssoZcda
>();
queryWrapper
.
eq
(
"org_code"
,
orgCode
).
eq
(
"id"
,
id
);
...
...
@@ -560,7 +560,7 @@ public class ZcglController {
}
zcly
.
update
(
updateWrapper2
);
System
.
out
.
println
(
id
);
//
System.out.println(id);
// 插入资产归还表
zcgh
.
setZcid
(
id
);
...
...
src/main/java/cn/timer/api/controller/zzgl/service/ZzglBmgwMServiceImpl.java
View file @
af8cac99
...
...
@@ -57,7 +57,7 @@ public class ZzglBmgwMServiceImpl implements ZzglBmgwMService {
.
select
(
YgglMainEmp:
:
getBmgwId
)
.
eq
(
YgglMainEmp:
:
getOrgCode
,
orgCode
).
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
one
();
Integer
getId
=
one
!=
null
?
one
.
getBmgwId
()
:
null
;
System
.
out
.
println
(
getId
);
//
System.out.println(getId);
Set
<
Integer
>
all
=
one
!=
null
?
empNumupdept2
(
lanzi
,
bmgws
,
getId
)
:
new
HashSet
<
Integer
>();
all
.
add
(
getId
);
return
ListUtil
.
toList
(
all
);
...
...
src/main/java/cn/timer/api/dao/htzz/HtzzAssoZztxMapper.java
View file @
af8cac99
...
...
@@ -20,7 +20,7 @@ public interface HtzzAssoZztxMapper extends BaseMapper<HtzzAssoZztx> {
public
static
void
main
(
String
[]
args
)
{
DateFormat
format1
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
String
a
=
format1
.
format
(
new
Date
());
System
.
err
.
println
(
a
);
//
System.err.println(a);
}
}
src/main/java/cn/timer/api/dao/kqgl/UserAttendanceRelMapper.java
View file @
af8cac99
...
...
@@ -23,7 +23,7 @@ public interface UserAttendanceRelMapper {
List
<
UserAttendanceRel
>
selectAttendanceOfficerByKqzid
(
Integer
kqzid
,
int
orgcode
);
int
deleteByPrimaryByUserid
(
Integer
userid
);
int
deleteByPrimaryByUserid
(
Integer
userid
,
Integer
qyid
);
List
<
UserAttendanceRel
>
selectAttNotMember
(
int
dkfsid
,
int
qyid
);
...
...
src/main/java/cn/timer/api/utils/aliyun/AliyunSMS.java
View file @
af8cac99
...
...
@@ -239,11 +239,11 @@ public class AliyunSMS {
String
orderNo
=
quantity
.
getOrderNo
();
if
(
quantity
==
null
||
remainder
==
null
||
remainder
<=
0
)
{
System
.
err
.
println
(
"企业 "
+
orgCode
+
" :套餐余额不足,请充钱"
);
Logoutput
(
"企业 "
+
orgCode
+
" :套餐余额不足,请充钱"
);
return
"请先充值购买短信套餐!"
;
}
if
(
date
!=
null
&&
date
.
getTime
()
<=
new
Date
().
getTime
())
{
System
.
err
.
println
(
"企业 "
+
orgCode
+
" :短信套餐已过期"
);
Logoutput
(
"企业 "
+
orgCode
+
" :短信套餐已过期"
);
return
"套餐已过期"
;
}
...
...
@@ -295,4 +295,17 @@ public class AliyunSMS {
return
"发送失败"
;
}
@Value
(
"${config-8timer.environmental-science}"
)
public
String
environmental_science
;
public
void
Logoutput
(
String
science
)
{
if
(!(
"pro"
).
equals
(
environmental_science
))
{
System
.
out
.
println
(
science
);
}
else
{
System
.
out
.
println
(
""
);
}
}
}
src/main/java/cn/timer/api/utils/aliyun/OSSUtil.java
View file @
af8cac99
...
...
@@ -89,7 +89,7 @@ public class OSSUtil {
// 关闭OSSClient。
ossClient
.
shutdown
();
// 控制台输出空间名
System
.
err
.
println
(
"bucketName:"
+
bucketName
);
Logoutput
(
"bucketName:"
+
bucketName
);
// 返回成功
return
ResultUtil
.
success
(
"创建OSS空间成功"
);
}
...
...
@@ -105,9 +105,9 @@ public class OSSUtil {
// <yourObjectName>上传文件到OSS时需要指定包含文件后缀在内的完整路径,例如abc/efg/123.jpg。
// String objectName = "8time-v2/test/123.jpg";
// 创建OSSClient实例。
System
.
err
.
println
(
endpoint
);
System
.
err
.
println
(
accessKeyId
);
System
.
err
.
println
(
accessKeySecret
);
Logoutput
(
endpoint
);
Logoutput
(
accessKeyId
);
Logoutput
(
accessKeySecret
);
OSS
ossClient
=
new
OSSClientBuilder
().
build
(
endpoint
,
accessKeyId
,
accessKeySecret
);
// 创建PutObjectRequest对象。
...
...
@@ -130,7 +130,7 @@ public class OSSUtil {
Date
expiration
=
DateUtil
.
offset
(
now
,
DateField
.
YEAR
,
100
);
// 一百年之后过期
// 生成以GET方法访问的签名URL,访客可以直接通过浏览器访问相关内容。
URL
url
=
ossClient
.
generatePresignedUrl
(
bucketName
,
path
,
expiration
);
System
.
err
.
println
(
url
);
Logoutput
(
String
.
valueOf
(
url
)
);
// 关闭OSSClient。
ossClient
.
shutdown
();
...
...
@@ -169,7 +169,7 @@ public class OSSUtil {
Date
expiration
=
new
Date
(
new
Date
().
getTime
()
+
1000
*
600
);
// 生成以GET方法访问的签名URL,访客可以直接通过浏览器访问相关内容。
URL
url
=
ossClient
.
generatePresignedUrl
(
bucketName_pri
,
path
,
expiration
);
System
.
err
.
println
(
url
);
Logoutput
(
String
.
valueOf
(
url
)
);
// 关闭OSSClient。
ossClient
.
shutdown
();
...
...
@@ -202,8 +202,8 @@ public class OSSUtil {
// 关闭OSSClient。
ossClient
.
shutdown
();
// 完整路径的文件名
System
.
err
.
println
(
"objectName:"
+
project_package
+
orgCode
+
"/"
+
moudle
+
"/"
+
dir
+
"/"
+
fileName
);
System
.
err
.
println
(
"path:"
+
path
+
fileName
);
Logoutput
(
"objectName:"
+
project_package
+
orgCode
+
"/"
+
moudle
+
"/"
+
dir
+
"/"
+
fileName
);
Logoutput
(
"path:"
+
path
+
fileName
);
// 返回成功的本地路径
return
ResultUtil
.
success
(
path
+
fileName
);
}
...
...
@@ -278,7 +278,7 @@ public class OSSUtil {
Date
expiration
=
new
Date
(
new
Date
().
getTime
()
+
Long
.
parseLong
(
expirationTime
));
// 生成以GET方法访问的签名URL,访客可以直接通过浏览器访问相关内容。
url
=
ossClient
.
generatePresignedUrl
(
bucketName
,
newFileName
,
expiration
);
System
.
err
.
println
(
url
);
Logoutput
(
String
.
valueOf
(
url
)
);
}
}
...
...
@@ -317,7 +317,7 @@ public class OSSUtil {
Date
expiration
=
new
Date
(
new
Date
().
getTime
()
+
Long
.
parseLong
(
expirationTime
));
// 生成以GET方法访问的签名URL,访客可以直接通过浏览器访问相关内容。
URL
url
=
ossClient
.
generatePresignedUrl
(
bucketName
,
path
,
expiration
);
System
.
err
.
println
(
url
);
Logoutput
(
String
.
valueOf
(
url
)
);
// 关闭OSSClient。
ossClient
.
shutdown
();
return
url
.
toString
();
...
...
@@ -336,7 +336,7 @@ public class OSSUtil {
Date
expiration
=
new
Date
(
new
Date
().
getTime
()
+
Long
.
parseLong
(
expirationTime_pri
));
// 生成以GET方法访问的签名URL,访客可以直接通过浏览器访问相关内容。
URL
url
=
ossClient
.
generatePresignedUrl
(
bucketName
,
path
,
expiration
);
System
.
err
.
println
(
url
);
Logoutput
(
String
.
valueOf
(
url
)
);
// 关闭OSSClient。
ossClient
.
shutdown
();
return
url
.
toString
();
...
...
@@ -431,7 +431,7 @@ public class OSSUtil {
if
(
objectListing
.
getObjectSummaries
().
size
()
>
0
)
{
List
<
String
>
keys
=
new
ArrayList
<
String
>();
for
(
OSSObjectSummary
s
:
objectListing
.
getObjectSummaries
())
{
System
.
out
.
println
(
"key name: "
+
s
.
getKey
());
Logoutput
(
"key name: "
+
s
.
getKey
());
keys
.
add
(
s
.
getKey
());
}
DeleteObjectsRequest
deleteObjectsRequest
=
new
DeleteObjectsRequest
(
bucketName
).
withKeys
(
keys
);
...
...
@@ -560,4 +560,17 @@ public class OSSUtil {
}
}
@Value
(
"${config-8timer.environmental-science}"
)
public
String
environmental_science
;
public
void
Logoutput
(
String
science
)
{
if
(!(
"pro"
).
equals
(
environmental_science
))
{
System
.
out
.
println
(
science
);
}
else
{
System
.
out
.
println
(
""
);
}
}
}
src/main/java/cn/timer/api/utils/router/RouterUtils.java
View file @
af8cac99
...
...
@@ -92,7 +92,7 @@ public class RouterUtils {
if
(
listRouter
.
size
()
==
1
)
{
router
=
listRouter
.
get
(
0
);
if
(
router
.
getExecute
()
==
null
)
{
System
.
out
.
println
(
"默认UNEXECUTED"
);
//
System.out.println("默认UNEXECUTED");
router
.
setExecute
(
UNEXECUTED
);
}
// 0未执行 1执行中 2已执行
...
...
@@ -389,12 +389,26 @@ public class RouterUtils {
if
(
router
.
getRelation
()
!=
null
)
{
for
(
Relation
relation
:
router
.
getRelation
())
{
if
(
relation
!=
null
&&
CollectionUtil
.
isNotEmpty
(
relation
.
getUsers
()))
{
if
(
router
.
getFlow
())
{
FlowChildren
fc
=
FlowChildren
.
builder
().
build
();
BeanUtil
.
copyProperties
(
router
,
fc
,
"condition"
,
"children"
);
listFlowChildren
.
add
(
fc
);
getIsFlowChildren
(
router
.
getChildren
(),
listFlowChildren
);
if
(
relation
!=
null
)
{
if
(
CollectionUtil
.
isNotEmpty
(
relation
.
getUsers
())){
if
(
router
.
getFlow
())
{
FlowChildren
fc
=
FlowChildren
.
builder
().
build
();
BeanUtil
.
copyProperties
(
router
,
fc
,
"condition"
,
"children"
);
listFlowChildren
.
add
(
fc
);
getIsFlowChildren
(
router
.
getChildren
(),
listFlowChildren
);
}
}
else
{
//无审批人,查询是否跳过或者失败! 0不处理 1指定成员 2自动通过
if
(
"executive"
.
equals
(
relation
.
getType
())
&&
relation
.
getEmpty
()
==
2
){
getIsFlowChildren
(
router
.
getChildren
(),
listFlowChildren
);
}
else
if
(
"executive"
.
equals
(
relation
.
getType
())
&&
relation
.
getEmpty
()
==
0
){
FlowChildren
fc
=
FlowChildren
.
builder
().
build
();
BeanUtil
.
copyProperties
(
router
,
fc
,
"condition"
,
"children"
);
listFlowChildren
.
add
(
fc
);
getIsFlowChildren
(
router
.
getChildren
(),
listFlowChildren
);
}
else
{
//未开发
}
}
}
}
...
...
@@ -579,11 +593,11 @@ public class RouterUtils {
redeployUser
.
setExecute
(
UNEXECUTED
);
users1
.
add
(
redeployUser
);
List
<
User
>
users2
=
CollectionUtil
.
sub
(
listUser
,
i_user
+
1
,
listUser
.
size
());
System
.
out
.
println
(
users1
);
System
.
out
.
println
(
users2
);
//
System.out.println(users1);
//
System.out.println(users2);
listUser
=
ListUtils
.
union
(
users1
,
users2
);
n_user
=
listUser
.
size
();
System
.
out
.
println
(
listUser
);
//
System.out.println(listUser);
}
}
else
if
(
UNEXECUTED
.
equals
(
listUser
.
get
(
i_user
).
getExecute
()))
{
SpmkExecutor
.
builder
()
...
...
@@ -714,4 +728,9 @@ public class RouterUtils {
}
public
static
List
<
Router
>
clearRouters
(
List
<
Router
>
routers
){
return
routers
;
}
}
src/main/java/cn/timer/api/utils/router/business/EvectionBusiness.java
View file @
af8cac99
...
...
@@ -5,6 +5,7 @@ import java.text.ParseException;
import
javax.annotation.PostConstruct
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
cn.hutool.core.convert.Convert
;
...
...
@@ -26,6 +27,19 @@ public class EvectionBusiness extends SpmkAssoBusiness {
@Autowired
private
KqglService
kqglService
;
@Value
(
"${config-8timer.environmental-science}"
)
public
String
environmental_science
;
public
void
Logoutput
(
String
science
)
{
if
(!(
"pro"
).
equals
(
environmental_science
))
{
System
.
out
.
println
(
science
);
}
else
{
System
.
out
.
println
(
""
);
}
}
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
throws
ParseException
{
...
...
@@ -47,7 +61,7 @@ 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
);
Logoutput
(
approveId
);
AttEvectionApprovalDto
eaD
=
AttEvectionApprovalDto
.
builder
()
.
userid
(
id
)
...
...
@@ -59,7 +73,7 @@ public class EvectionBusiness extends SpmkAssoBusiness {
.
duration
(
Convert
.
toDouble
(
longTime
))
.
build
();
System
.
out
.
println
(
"出差:"
+
eaD
);
Logoutput
(
"出差:"
+
eaD
);
// 调 考勤管理 业务-出差
kqglService
.
attevectionapproval
(
eaD
);
...
...
src/main/java/cn/timer/api/utils/router/business/GoOutBusiness.java
View file @
af8cac99
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
cn.hutool.core.convert.Convert
;
...
...
@@ -22,6 +23,19 @@ public class GoOutBusiness extends SpmkAssoBusiness {
@Autowired
private
KqglService
kqglService
;
@Value
(
"${config-8timer.environmental-science}"
)
public
String
environmental_science
;
public
void
Logoutput
(
String
science
)
{
if
(!(
"pro"
).
equals
(
environmental_science
))
{
System
.
out
.
println
(
science
);
}
else
{
System
.
out
.
println
(
""
);
}
}
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
throws
Exception
{
...
...
@@ -55,7 +69,7 @@ public class GoOutBusiness extends SpmkAssoBusiness {
.
duration
(
Convert
.
toDouble
(
longTime
))
.
build
();
System
.
out
.
println
(
"外出:"
+
eaD
);
Logoutput
(
"外出:"
+
eaD
);
// 调 考勤管理 业务-外出
kqglService
.
attevectionapproval
(
eaD
);
}
...
...
src/main/java/cn/timer/api/utils/router/business/LeaveBusiness.java
View file @
af8cac99
...
...
@@ -3,6 +3,7 @@ package cn.timer.api.utils.router.business;
import
java.text.ParseException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
cn.hutool.core.convert.Convert
;
...
...
@@ -27,6 +28,20 @@ public class LeaveBusiness extends SpmkAssoBusiness {
@Autowired
private
KqglService
kqglService
;
@Value
(
"${config-8timer.environmental-science}"
)
public
String
environmental_science
;
public
void
Logoutput
(
String
science
)
{
if
(!(
"pro"
).
equals
(
environmental_science
))
{
System
.
out
.
println
(
science
);
}
else
{
System
.
out
.
println
(
""
);
}
}
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
throws
ParseException
{
// TODO Auto-generated method stub
...
...
@@ -61,7 +76,7 @@ public class LeaveBusiness extends SpmkAssoBusiness {
.
duration
(
Convert
.
toDouble
(
longTime
))
.
build
();
System
.
out
.
println
(
"请假:"
+
laD
);
Logoutput
(
"请假:"
+
laD
);
// 调 考勤管理 业务-请假
kqglService
.
attleaveapproval
(
laD
);
}
...
...
src/main/java/cn/timer/api/utils/router/business/RegularizationBusiness.java
View file @
af8cac99
...
...
@@ -3,6 +3,7 @@ package cn.timer.api.utils.router.business;
import
java.util.Date
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
...
...
@@ -29,6 +30,20 @@ public class RegularizationBusiness extends SpmkAssoBusiness {
@Autowired
private
YgglService
ygglService
;
@Value
(
"${config-8timer.environmental-science}"
)
public
String
environmental_science
;
public
void
Logoutput
(
String
science
)
{
if
(!(
"pro"
).
equals
(
environmental_science
))
{
System
.
out
.
println
(
science
);
}
else
{
System
.
out
.
println
(
""
);
}
}
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
throws
Exception
{
// TODO Auto-generated method stub
...
...
@@ -65,7 +80,7 @@ public class RegularizationBusiness extends SpmkAssoBusiness {
.
sjzzTime
(
DateUtil
.
getFormatDate
(
newConfirmationTime
))
.
zzRemark
(
Remarks
)
.
build
();
System
.
out
.
println
(
"转正:"
+
ygzzDto
);
Logoutput
(
"转正:"
+
ygzzDto
);
// 调 员工管理 业务
// YgglMainEmp.builder()
// .jobStatus(2)
...
...
src/main/java/cn/timer/api/utils/router/business/ReissueACardBusiness.java
View file @
af8cac99
...
...
@@ -3,6 +3,7 @@ package cn.timer.api.utils.router.business;
import
java.text.ParseException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
cn.hutool.core.convert.Convert
;
...
...
@@ -25,6 +26,20 @@ public class ReissueACardBusiness extends SpmkAssoBusiness {
@Autowired
private
KqglService
kqglService
;
@Value
(
"${config-8timer.environmental-science}"
)
public
String
environmental_science
;
public
void
Logoutput
(
String
science
)
{
if
(!(
"pro"
).
equals
(
environmental_science
))
{
System
.
out
.
println
(
science
);
}
else
{
System
.
out
.
println
(
""
);
}
}
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
throws
ParseException
{
// TODO Auto-generated method stub
...
...
@@ -55,7 +70,7 @@ public class ReissueACardBusiness extends SpmkAssoBusiness {
.
cardreplperiod
(
Convert
.
toInt
(
cardSupplementType
))
.
build
();
System
.
out
.
println
(
"补卡:"
+
raD
);
Logoutput
(
"补卡:"
+
raD
);
// 调 考勤管理 业务-补卡
kqglService
.
attrepairapproval
(
raD
);
}
...
...
src/main/java/cn/timer/api/utils/router/business/ResignationBusiness.java
View file @
af8cac99
...
...
@@ -3,6 +3,7 @@ package cn.timer.api.utils.router.business;
import
java.text.ParseException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
cn.hutool.core.convert.Convert
;
...
...
@@ -26,6 +27,20 @@ public class ResignationBusiness extends SpmkAssoBusiness {
@Autowired
private
YgglService
ygglService
;
@Value
(
"${config-8timer.environmental-science}"
)
public
String
environmental_science
;
public
void
Logoutput
(
String
science
)
{
if
(!(
"pro"
).
equals
(
environmental_science
))
{
System
.
out
.
println
(
science
);
}
else
{
System
.
out
.
println
(
""
);
}
}
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
throws
Exception
{
// TODO Auto-generated method stub
...
...
@@ -50,7 +65,7 @@ public class ResignationBusiness extends SpmkAssoBusiness {
.
lzyy
(
ReasonForResignation
)
.
lzbz
(
Remarks
)
.
build
();
System
.
out
.
println
(
"离职:"
+
dtO
);
Logoutput
(
"离职:"
+
dtO
);
// 调 员工管理 业务
ygglService
.
applicationResignation
(
dtO
);
...
...
src/main/java/cn/timer/api/utils/router/business/TransferPositionBusiness.java
View file @
af8cac99
package
cn
.
timer
.
api
.
utils
.
router
.
business
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
...
...
@@ -27,6 +28,20 @@ public class TransferPositionBusiness extends SpmkAssoBusiness {
@Autowired
ZzglBmgwMService
zzglBmgwMService
;
@Value
(
"${config-8timer.environmental-science}"
)
public
String
environmental_science
;
public
void
Logoutput
(
String
science
)
{
if
(!(
"pro"
).
equals
(
environmental_science
))
{
System
.
out
.
println
(
science
);
}
else
{
System
.
out
.
println
(
""
);
}
}
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
{
// TODO Auto-generated method stub
...
...
@@ -63,7 +78,7 @@ public class TransferPositionBusiness extends SpmkAssoBusiness {
.
isdg
(
1
)
.
build
();
System
.
out
.
println
(
"调岗:"
+
upEmpDeptDto
);
Logoutput
(
"调岗:"
+
upEmpDeptDto
);
ZzglBmgwM
bmg
=
ZzglBmgwM
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
ZzglBmgwM
>().
lambda
().
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
).
eq
(
ZzglBmgwM:
:
getLeader
,
id
));
if
(
bmg
!=
null
)
{
...
...
src/main/java/cn/timer/api/utils/router/business/WorkOvertimeBusiness.java
View file @
af8cac99
...
...
@@ -3,6 +3,7 @@ package cn.timer.api.utils.router.business;
import
java.text.ParseException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
cn.hutool.core.convert.Convert
;
...
...
@@ -24,6 +25,20 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness {
@Autowired
private
KqglService
kqglService
;
@Value
(
"${config-8timer.environmental-science}"
)
public
String
environmental_science
;
public
void
Logoutput
(
String
science
)
{
if
(!(
"pro"
).
equals
(
environmental_science
))
{
System
.
out
.
println
(
science
);
}
else
{
System
.
out
.
println
(
""
);
}
}
@Override
public
void
handleApprove
(
JSONObject
jsonObj
)
throws
ParseException
{
// TODO Auto-generated method stub
...
...
@@ -62,10 +77,11 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness {
.
compensate
(
Convert
.
toInt
(
compensate
))
.
build
();
System
.
out
.
println
(
"加班:"
+
oaD
);
Logoutput
(
"加班:"
+
oaD
);
// 调 考勤管理 业务-加班
kqglService
.
attovertimeapproval
(
oaD
);
}
}
src/main/resources/application-dev.yml
View file @
af8cac99
...
...
@@ -8,8 +8,8 @@ server:
spring
:
servlet
:
multipart
:
max-file-size
:
2
0MB
max-request-size
:
2
0MB
max-file-size
:
50
0MB
max-request-size
:
50
0MB
jpa
:
# 配置生成表 存储引擎InnoDB
database-platform
:
org.hibernate.dialect.MySQL5InnoDBDialect
...
...
@@ -189,6 +189,7 @@ logging:
# operations-sorter: method # 它提供了两个配置项:alpha和method,分别代表了按字母表排序以及按方法定义顺序排序
config-8timer
:
environmental-science
:
dev
expiration_time
:
2
#扫码登录过期时长
machine8timerUrl
:
'
http://test-8timer-fk.youlingrc.com'
#machine8timerUrl: 'http://192.168.3.38:8088'
...
...
@@ -232,5 +233,5 @@ config-8timer:
crm-excel
:
realPath
:
'
D:/excel/'
\ No newline at end of file
src/main/resources/application-pro.yml
View file @
af8cac99
...
...
@@ -8,8 +8,8 @@ server:
spring
:
servlet
:
multipart
:
max-file-size
:
2
0MB
max-request-size
:
2
0MB
max-file-size
:
50
0MB
max-request-size
:
50
0MB
jpa
:
# 配置生成表 存储引擎InnoDB
database-platform
:
org.hibernate.dialect.MySQL5InnoDBDialect
...
...
@@ -154,7 +154,7 @@ pagehelper:
#showSql
logging
:
level
:
root
:
info
root
:
ERROR
cn.timer.api.dao
:
error
pattern
:
console
:
'
--%p--%m%n'
...
...
@@ -164,6 +164,7 @@ logging:
# operations-sorter: method # 它提供了两个配置项:alpha和method,分别代表了按字母表排序以及按方法定义顺序排序
config-8timer
:
environmental-science
:
pro
expiration_time
:
2
#扫码登录过期时长
machine8timerUrl
:
'
http://record.8timer.cn'
#machine8timerUrl: 'http://192.168.3.38:8088'
...
...
@@ -203,4 +204,5 @@ config-8timer:
# 客户管理导入服务器保存路径
crm-excel
:
realPath
:
'
/data/crm-excel/'
\ No newline at end of file
realPath
:
'
/data/crm-excel/'
src/main/resources/application-test.yml
View file @
af8cac99
...
...
@@ -8,8 +8,8 @@ server:
spring
:
servlet
:
multipart
:
max-file-size
:
2
0MB
max-request-size
:
2
0MB
max-file-size
:
50
0MB
max-request-size
:
50
0MB
jpa
:
# 配置生成表 存储引擎InnoDB
database-platform
:
org.hibernate.dialect.MySQL5InnoDBDialect
...
...
@@ -163,6 +163,7 @@ logging:
# operations-sorter: method # 它提供了两个配置项:alpha和method,分别代表了按字母表排序以及按方法定义顺序排序
config-8timer
:
environmental-science
:
test
expiration_time
:
2
#扫码登录过期时长
machine8timerUrl
:
'
http://test-8timer-fk.youlingrc.com'
#machine8timerUrl: 'http://192.168.3.38:8088'
...
...
@@ -202,4 +203,5 @@ config-8timer:
# 客户管理导入服务器保存路径
crm-excel
:
realPath
:
'
/data/crm-excel/'
\ No newline at end of file
realPath
:
'
/data/crm-excel/'
src/main/resources/mapping/kqgl/UserAttendanceRelMapper.xml
View file @
af8cac99
...
...
@@ -119,6 +119,7 @@
<delete
id=
"deleteByPrimaryByUserid"
parameterType=
"java.lang.Integer"
>
delete from kqgl_asso_yhkqz
where userid = #{userid,jdbcType=INTEGER}
and qyid = #{qyid}
</delete>
<select
id=
"selectAttNotMember"
resultMap=
"BaseResultMap"
>
...
...
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