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
7df05a62
Commit
7df05a62
authored
May 20, 2020
by
lal
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of develop-gitlab.youlingrc.com:8timerv2/8timerapiv200 into lal
parents
89897b83
05b13cbd
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
785 additions
and
152 deletions
+785
-152
src/main/java/cn/timer/api/bean/clazz/CommonArea.java
+0
-2
src/main/java/cn/timer/api/bean/dzht/DzhtSignflowFinish.java
+71
-0
src/main/java/cn/timer/api/bean/qyzx/businessService/QyzxUseRecord.java
+4
-1
src/main/java/cn/timer/api/bean/yggl/YgglMainEmp.java
+3
-0
src/main/java/cn/timer/api/callback/esign/EsignCallBackController.java
+65
-0
src/main/java/cn/timer/api/callback/esign/service/DigestHelper.java
+197
-0
src/main/java/cn/timer/api/callback/esign/service/SafeVerify.java
+173
-0
src/main/java/cn/timer/api/config/enuminterface/SpmkEnumInterface.java
+1
-1
src/main/java/cn/timer/api/config/enuminterface/YgEnumInterface.java
+1
-1
src/main/java/cn/timer/api/config/enums/CommonEnum.java
+5
-3
src/main/java/cn/timer/api/config/exception/GlobalExceptionHandler.java
+10
-2
src/main/java/cn/timer/api/controller/LoginController.java
+6
-9
src/main/java/cn/timer/api/controller/dzht/DzhtController2.java
+52
-8
src/main/java/cn/timer/api/controller/dzht/cn/tign/hz/helper/SignHelper.java
+4
-2
src/main/java/cn/timer/api/controller/qyzx/QyzxBusinessController.java
+5
-3
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
+8
-77
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
+8
-21
src/main/java/cn/timer/api/controller/spmk/service/SpmkService.java
+4
-0
src/main/java/cn/timer/api/controller/spmk/service/SpmkServiceImpl.java
+35
-1
src/main/java/cn/timer/api/controller/yggl/YgglController.java
+0
-0
src/main/java/cn/timer/api/dao/dzht/DzhtSignflowFinishMapper.java
+19
-0
src/main/java/cn/timer/api/dto/yggl/AddygdaDto.java
+0
-1
src/main/java/cn/timer/api/dto/yggl/ImportEmpDto.java
+63
-0
src/main/java/cn/timer/api/utils/router/RouterUtils.java
+39
-14
src/main/java/cn/timer/api/utils/router/business/EvectionBusiness.java
+1
-1
src/main/java/cn/timer/api/utils/router/business/GoOutBusiness.java
+1
-1
src/main/java/cn/timer/api/utils/router/business/LeaveBusiness.java
+1
-1
src/main/java/cn/timer/api/utils/router/business/ReissueACardBusiness.java
+2
-2
src/main/java/cn/timer/api/utils/router/business/WorkOvertimeBusiness.java
+1
-1
src/main/resources/application-dev.yml
+2
-0
src/main/resources/application-pro.yml
+2
-0
src/main/resources/application-test.yml
+2
-0
No files found.
src/main/java/cn/timer/api/bean/clazz/CommonArea.java
View file @
7df05a62
...
...
@@ -2,10 +2,8 @@ package cn.timer.api.bean.clazz;
import
java.util.List
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
...
...
src/main/java/cn/timer/api/bean/dzht/DzhtSignflowFinish.java
0 → 100644
View file @
7df05a62
/**
* <p>Title: DzhtSignflowFinish.java</p>
* <p>Description: </p>
* @author dsc
* @date 2020年5月20日
* @version 1.0
*/
package
cn
.
timer
.
api
.
bean
.
dzht
;
import
javax.persistence.Entity
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.extension.activerecord.Model
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* <p>
* Title: DzhtSignflowFinish.java
* </p>
* <p>
* Description:
* </p>
*
* @author dsc
* @date 2020年5月20日
* @version 1.0
*/
@Entity
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"dzht_signflow_finish"
)
@ApiModel
(
"e签宝流程结束回调"
)
public
class
DzhtSignflowFinish
extends
Model
<
DzhtSignflowFinish
>{
private
static
final
long
serialVersionUID
=
7207935929987536355L
;
@Id
@GeneratedValue
@TableId
(
type
=
IdType
.
AUTO
)
@ApiModelProperty
(
value
=
"编号"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"标记该通知的业务类型,该通知固定为:SIGN_FLOW_FINISH"
)
private
String
action
;
@ApiModelProperty
(
value
=
"流程id"
)
private
String
flowId
;
@ApiModelProperty
(
value
=
"签署文件主题描述"
)
private
String
businessScence
;
@ApiModelProperty
(
value
=
"可能存在的任务状态: 2-完成,所有签署人完成签署 3-撤销,发起方撤销签署任务 5-过期(签署截止日到期后触发)7-拒签"
)
private
String
flowStatus
;
@ApiModelProperty
(
value
=
"签署任务发起时间 格式yyyy-MM-dd HH:mm:ss"
)
private
String
createTime
;
@ApiModelProperty
(
value
=
"签署任务结束时间 格式yyyy-MM-dd HH:mm:ss"
)
private
String
endTime
;
@ApiModelProperty
(
value
=
"当流程异常结束时,附加终止原因描述"
)
private
String
statusDescription
;
@ApiModelProperty
(
value
=
"时间戳"
)
private
Long
timestamp
;
}
src/main/java/cn/timer/api/bean/qyzx/businessService/QyzxUseRecord.java
View file @
7df05a62
...
...
@@ -88,6 +88,9 @@ public class QyzxUseRecord extends Model<QyzxUseRecord> {
@ApiModelProperty
(
value
=
"创建人 "
,
example
=
""
)
private
String
createUser
;
@ApiModelProperty
(
value
=
"使用人手机号 "
,
example
=
""
)
@ApiModelProperty
(
value
=
"使用人手机号
(短信)
"
,
example
=
""
)
private
String
userPhone
;
@ApiModelProperty
(
value
=
"流程id(合同) "
,
example
=
""
)
private
String
flowId
;
}
src/main/java/cn/timer/api/bean/yggl/YgglMainEmp.java
View file @
7df05a62
...
...
@@ -190,6 +190,9 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@ApiModelProperty
(
value
=
"是否企业中心管理员 "
,
example
=
"0-否 1-主账号 2-子账号"
)
private
Integer
isManager
;
@ApiModelProperty
(
value
=
"离职前状态 1试用、2正式 "
,
example
=
"1试用、2正式"
)
private
Integer
beforeLeavingSts
;
@Transient
@TableField
(
exist
=
false
)
private
String
workTime
;
//工龄
...
...
src/main/java/cn/timer/api/callback/esign/EsignCallBackController.java
0 → 100644
View file @
7df05a62
/**
* <p>Title: EsignCallBackController.java</p>
* <p>Description: </p>
* @author dsc
* @date 2020年5月19日
* @version 1.0
*/
package
cn
.
timer
.
api
.
callback
.
esign
;
import
java.io.IOException
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.transaction.Transactional
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
cn.timer.api.callback.esign.service.SafeVerify
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* <p>
* Title: EsignCallBackController.java
* </p>
* <p>
* Description:
* </p>
*
* @author dsc
* @date 2020年5月19日
* @version 1.0
*/
@RestController
@Transactional
@Api
(
tags
=
"99.97 e签宝回调接口"
)
@RequestMapping
(
value
=
"/callback/esign"
,
produces
=
{
"application/json"
})
public
class
EsignCallBackController
{
@Autowired
private
HttpServletRequest
request
;
// @Autowired
// private HttpServletResponse response;
private
static
final
String
appSecret
=
"7b100813cca2746081c57837855ac5af"
;
@PostMapping
(
value
=
"/dev"
)
// TODO
@ApiOperation
(
value
=
"合同流程结束通知(dev)"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Integer
wxcallback_test
()
{
String
res
=
null
;
SafeVerify
sv
=
new
SafeVerify
();
try
{
res
=
sv
.
checkPass
(
request
,
appSecret
);
// response.setCharacterEncoding("UTF-8");
// response.getWriter().append("Served at: ").append(request.getContextPath()).append("\n")
// .append("是否通过验证:----》").append(res);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
if
(
res
!=
null
&&
res
.
equals
(
"true"
))
return
200
;
// 返回响应码
return
500
;
}
}
src/main/java/cn/timer/api/callback/esign/service/DigestHelper.java
0 → 100644
View file @
7df05a62
package
cn
.
timer
.
api
.
callback
.
esign
.
service
;
import
java.io.File
;
import
java.io.FileInputStream
;
import
java.io.FileNotFoundException
;
import
java.io.IOException
;
import
java.io.UnsupportedEncodingException
;
import
java.security.InvalidKeyException
;
import
java.security.MessageDigest
;
import
java.security.NoSuchAlgorithmException
;
import
java.util.Base64
;
import
java.util.Base64.Encoder
;
import
javax.crypto.Mac
;
import
javax.crypto.spec.SecretKeySpec
;
/***
*
* @Description: 摘要加密算法辅助类
* @Team: 公有云技术支持小组
* @Author: 天云小生
* @Date: 2018年01月14日
*/
public
class
DigestHelper
{
/***
* 获取请求签名值
*
* @param data
* 加密前数据
* @param key
* 密钥
* @param algorithm
* HmacMD5 HmacSHA1 HmacSHA256 HmacSHA384 HmacSHA512
* @param encoding
* 编码格式
* @return HMAC加密后16进制字符串
* @throws Exception
*/
public
static
String
getSignature
(
String
data
,
String
key
,
String
algorithm
,
String
encoding
)
{
Mac
mac
=
null
;
try
{
mac
=
Mac
.
getInstance
(
algorithm
);
SecretKeySpec
secretKey
=
new
SecretKeySpec
(
key
.
getBytes
(
encoding
),
algorithm
);
mac
.
init
(
secretKey
);
mac
.
update
(
data
.
getBytes
(
encoding
));
}
catch
(
NoSuchAlgorithmException
e
)
{
e
.
printStackTrace
();
System
.
out
.
println
(
"获取Signature签名信息异常:"
+
e
.
getMessage
());
return
null
;
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
System
.
out
.
println
(
"获取Signature签名信息异常:"
+
e
.
getMessage
());
return
null
;
}
catch
(
InvalidKeyException
e
)
{
e
.
printStackTrace
();
System
.
out
.
println
(
"获取Signature签名信息异常:"
+
e
.
getMessage
());
return
null
;
}
return
byte2hex
(
mac
.
doFinal
());
}
/***
* 计算文件的Content-MD5
*
* @param filePath
* @return
*/
public
static
String
getContentMD5
(
String
filePath
)
{
Encoder
encoder
=
Base64
.
getEncoder
();
// 获取文件MD5的二进制数组(128位)
byte
[]
bytes
=
getFileMD5Bytes128
(
filePath
);
// 对文件MD5的二进制数组进行base64编码(而不是对32位的16进制字符串进行编码)
return
encoder
.
encodeToString
(
bytes
);
}
/***
* 获取文件MD5-二进制数组(128位)
*
* @param filePath
* @return
* @throws IOException
*/
public
static
byte
[]
getFileMD5Bytes128
(
String
filePath
)
{
FileInputStream
fis
=
null
;
byte
[]
md5Bytes
=
null
;
try
{
File
file
=
new
File
(
filePath
);
fis
=
new
FileInputStream
(
file
);
MessageDigest
md5
=
MessageDigest
.
getInstance
(
"MD5"
);
byte
[]
buffer
=
new
byte
[
1024
];
int
length
=
-
1
;
while
((
length
=
fis
.
read
(
buffer
,
0
,
1024
))
!=
-
1
)
{
md5
.
update
(
buffer
,
0
,
length
);
}
md5Bytes
=
md5
.
digest
();
fis
.
close
();
}
catch
(
FileNotFoundException
e
)
{
System
.
out
.
println
(
e
.
getMessage
());
e
.
printStackTrace
();
}
catch
(
NoSuchAlgorithmException
e
)
{
System
.
out
.
println
(
e
.
getMessage
());
e
.
printStackTrace
();
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
e
.
getMessage
());
e
.
printStackTrace
();
}
return
md5Bytes
;
}
/***
* 获取文件SHA256-十六进制字符串(原文SHA256摘要)
*
* @param filePath
* @return
* @throws IOException
*/
public
static
String
getFileSHA256
(
String
filePath
)
{
FileInputStream
fis
=
null
;
byte
[]
md5Bytes
=
null
;
String
hashSHA256
=
null
;
try
{
File
file
=
new
File
(
filePath
);
fis
=
new
FileInputStream
(
file
);
MessageDigest
md5
=
MessageDigest
.
getInstance
(
"SHA-256"
);
byte
[]
buffer
=
new
byte
[
1024
];
int
length
=
-
1
;
while
((
length
=
fis
.
read
(
buffer
,
0
,
1024
))
!=
-
1
)
{
md5
.
update
(
buffer
,
0
,
length
);
}
md5Bytes
=
md5
.
digest
();
fis
.
close
();
hashSHA256
=
byte2hex
(
md5Bytes
);
}
catch
(
FileNotFoundException
e
)
{
e
.
printStackTrace
();
System
.
out
.
println
(
e
.
getMessage
());
}
catch
(
NoSuchAlgorithmException
e
)
{
e
.
printStackTrace
();
System
.
out
.
println
(
e
.
getMessage
());
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
System
.
out
.
println
(
e
.
getMessage
());
}
return
hashSHA256
;
}
/***
* 获取字符串的SHA256-十六进制字符串
*
* @param str
* @return
* @throws IOException
*/
public
static
String
getStringSHA256
(
String
str
)
{
byte
[]
md5Bytes
=
null
;
try
{
md5Bytes
=
str
.
getBytes
(
"UTF-8"
);
// 拿到一个SHA256转换器
MessageDigest
messageDigest
;
messageDigest
=
MessageDigest
.
getInstance
(
"SHA-256"
);
// 输入的字符串转换成字节数组
byte
[]
inputByteArray
=
str
.
getBytes
();
// inputByteArray是输入字符串转换得到的字节数组
messageDigest
.
update
(
inputByteArray
);
// 转换并返回结果,也是字节数组,包含16个元素
md5Bytes
=
messageDigest
.
digest
();
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
}
catch
(
NoSuchAlgorithmException
e
)
{
e
.
printStackTrace
();
}
return
byte2hex
(
md5Bytes
);
}
/***
* 将byte[]转成16进制字符串
*
* @param data
*
* @return 16进制字符串
*/
public
static
String
byte2hex
(
byte
[]
data
)
{
StringBuilder
hash
=
new
StringBuilder
();
String
stmp
;
for
(
int
n
=
0
;
data
!=
null
&&
n
<
data
.
length
;
n
++)
{
stmp
=
Integer
.
toHexString
(
data
[
n
]
&
0XFF
);
if
(
stmp
.
length
()
==
1
)
hash
.
append
(
'0'
);
hash
.
append
(
stmp
);
}
return
hash
.
toString
();
}
}
src/main/java/cn/timer/api/callback/esign/service/SafeVerify.java
0 → 100644
View file @
7df05a62
/**
*
*/
package
cn
.
timer
.
api
.
callback
.
esign
.
service
;
import
java.io.IOException
;
import
java.io.UnsupportedEncodingException
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Enumeration
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
cn.hutool.json.JSONObject
;
import
cn.timer.api.bean.dzht.DzhtSignflowFinish
;
import
cn.timer.api.bean.qyzx.businessService.QyzxUseRecord
;
/**
* @author chen_xi 验证签名
*/
@Transactional
public
class
SafeVerify
{
public
static
void
main
(
String
[]
args
)
{
String
rbody
=
"{\"action\":\"SIGN_FLOW_FINISH\",\"flowId\":\"1e49e34bdc5f4550a8fd6d7922c68101\",\"businessScence\":\"随便\",\"flowStatus\":\"2\",\"createTime\":\"2020-05-20 10:00:06\",\"endTime\":\"2020-05-20 10:01:06\",\"statusDescription\":\"完成\",\"timestamp\":1589940066939}"
;
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"
));
}
public
String
checkPass
(
HttpServletRequest
request
,
String
appSecret
)
throws
UnsupportedEncodingException
{
String
signture
=
request
.
getHeader
(
"X-Tsign-Open-SIGNATURE"
);
// 1. 获取时间戳的字节流
String
timestampHeader
=
request
.
getHeader
(
"X-Tsign-Open-TIMESTAMP"
);
// String content_type =request
// 2. 获取query请求字符串
String
requestQuery
=
getRequestQueryStr
(
request
);
// 3. 获取body的数据
String
rbody
=
getRequestBody
(
request
,
"UTF-8"
);
System
.
err
.
println
(
"requestQuery:"
+
requestQuery
);
System
.
err
.
println
(
"rbody:"
+
rbody
);
// 3.5 保存回调结果到数据库
JSONObject
jsonBody
=
new
JSONObject
(
rbody
);
String
action
=
jsonBody
.
getStr
(
"action"
);
String
flowId
=
jsonBody
.
getStr
(
"flowId"
);
Long
timestamp
=
jsonBody
.
getLong
(
"timestamp"
);
if
(
action
.
equals
(
"SIGN_FLOW_FINISH"
))
{
// 签署人签署完成回调通知
String
businessScence
=
jsonBody
.
getStr
(
"businessScence"
);
String
flowStatus
=
jsonBody
.
getStr
(
"flowStatus"
);
String
createTime
=
jsonBody
.
getStr
(
"createTime"
);
String
endTime
=
jsonBody
.
getStr
(
"endTime"
);
String
statusDescription
=
jsonBody
.
getStr
(
"statusDescription"
);
DzhtSignflowFinish
dzhtSignflowFinish
=
new
DzhtSignflowFinish
();
dzhtSignflowFinish
.
setAction
(
action
);
dzhtSignflowFinish
.
setBusinessScence
(
businessScence
);
dzhtSignflowFinish
.
setCreateTime
(
createTime
);
dzhtSignflowFinish
.
setEndTime
(
endTime
);
dzhtSignflowFinish
.
setFlowId
(
flowId
);
dzhtSignflowFinish
.
setFlowStatus
(
flowStatus
);
dzhtSignflowFinish
.
setStatusDescription
(
statusDescription
);
dzhtSignflowFinish
.
setTimestamp
(
timestamp
);
boolean
result
=
dzhtSignflowFinish
.
insert
();
String
scene
=
null
;
if
(
result
)
{
if
(
flowStatus
==
"2"
)
{
scene
=
"完成"
;
}
else
if
(
flowStatus
==
"3"
)
{
scene
=
"撤销"
;
}
else
if
(
flowStatus
==
"5"
)
{
scene
=
"过期"
;
}
else
if
(
flowStatus
==
"7"
)
{
scene
=
"拒签"
;
}
QyzxUseRecord
.
builder
().
scene
(
scene
).
build
()
.
update
(
new
QueryWrapper
<
QyzxUseRecord
>().
lambda
().
eq
(
QyzxUseRecord:
:
getFlowId
,
flowId
));
}
}
else
if
(
action
.
equals
(
"SIGN_FLOW_UPDATE"
))
{
// 流程结束回调通知
// String accountId = jsonBody.getStr("accountId");
// String authorizedAccountId = jsonBody.getStr("authorizedAccountId");
// String order = jsonBody.getStr("order");
// String signTime = jsonBody.getStr("signTime");
// String signResult = jsonBody.getStr("signResult");
// String resultDescription = jsonBody.getStr("resultDescription");
// String thirdPartyUserId = jsonBody.getStr("thirdPartyUserId");
}
else
if
(
action
.
equals
(
"SIGN_DOC_EXPIRE_REMIND"
))
{
// 流程文件过期前提醒通知
}
else
if
(
action
.
equals
(
"SIGN_DOC_EXPIRE"
))
{
// 流程文件过期通知
}
// 4、按照规则进行加密
String
signdata
=
timestampHeader
+
requestQuery
+
rbody
;
String
mySignature
=
DigestHelper
.
getSignature
(
signdata
,
appSecret
,
"HmacSHA256"
,
"UTF-8"
);
System
.
out
.
println
(
"加密出来的签名值:----------->>>>>>"
+
mySignature
);
System
.
out
.
println
(
"header里面的签名值:---------->>>>>>"
+
signture
);
if
(
mySignature
.
equals
(
signture
))
{
System
.
out
.
println
(
"校验通过"
);
return
"true"
;
}
else
{
System
.
out
.
println
(
"校验失败"
);
return
"false"
;
}
}
/**
* 获取请求body
*
* @param request
* @param encoding
* @return
*/
private
String
getRequestBody
(
HttpServletRequest
request
,
String
encoding
)
{
// 请求内容RequestBody
String
reqBody
=
null
;
int
contentLength
=
request
.
getContentLength
();
if
(
contentLength
<
0
)
{
return
null
;
}
byte
buffer
[]
=
new
byte
[
contentLength
];
try
{
for
(
int
i
=
0
;
i
<
contentLength
;)
{
int
readlen
=
request
.
getInputStream
().
read
(
buffer
,
i
,
contentLength
-
i
);
if
(
readlen
==
-
1
)
{
break
;
}
i
+=
readlen
;
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
try
{
reqBody
=
new
String
(
buffer
,
encoding
);
}
catch
(
UnsupportedEncodingException
e
)
{
e
.
printStackTrace
();
}
return
reqBody
;
}
/**
* 获取query请求字符串
*
* @param request
* @return
*/
private
String
getRequestQueryStr
(
HttpServletRequest
request
)
{
// 对 Query 参数按照字典对 Key 进行排序后,按照value1+value2方法拼接
// 转换一下数据类型并排序
List
<
String
>
req_List
=
new
ArrayList
<
String
>();
Enumeration
<
String
>
reqEnu
=
request
.
getParameterNames
();
while
(
reqEnu
.
hasMoreElements
())
{
req_List
.
add
(
reqEnu
.
nextElement
());
}
Collections
.
sort
(
req_List
);
String
requestQuery
=
""
;
for
(
String
key
:
req_List
)
{
String
value
=
request
.
getParameter
(
key
);
requestQuery
+=
value
==
null
?
""
:
value
;
}
System
.
out
.
println
(
"获取的query请求字符串是:------》》》"
+
requestQuery
);
return
requestQuery
;
}
}
src/main/java/cn/timer/api/config/enuminterface/SpmkEnumInterface.java
View file @
7df05a62
...
...
@@ -98,7 +98,7 @@ public interface SpmkEnumInterface {
*/
@Getter
enum
ParticipatorType
implements
SpmkEnumInterface
{
INITIATOR
(
0
,
"发起
人
"
),
COPY
(
1
,
"抄送人"
),
APPROVER
(
2
,
"审批人"
);
INITIATOR
(
0
,
"发起
申请
"
),
COPY
(
1
,
"抄送人"
),
APPROVER
(
2
,
"审批人"
);
private
Integer
type
;
private
String
name
;
...
...
src/main/java/cn/timer/api/config/enuminterface/YgEnumInterface.java
View file @
7df05a62
...
...
@@ -64,7 +64,7 @@ public interface YgEnumInterface {
*/
@Getter
enum
YgJobType
implements
YgEnumInterface
{
QUANZHI
(
0
,
"全
"
),
SHIXI
(
1
,
"实习"
),
JIANZHI
(
2
,
"兼
"
),
LWPQ
(
3
,
"劳务派遣"
),
LAOWU
(
4
,
"劳务"
),
PAIQIAN
(
5
,
"派遣"
),
QUANZHI
(
0
,
"全
职"
),
SHIXI
(
1
,
"实习"
),
JIANZHI
(
2
,
"兼职
"
),
LWPQ
(
3
,
"劳务派遣"
),
LAOWU
(
4
,
"劳务"
),
PAIQIAN
(
5
,
"派遣"
),
WAIBAO
(
6
,
"外包"
),
TUIXIU
(
7
,
"退休"
);
private
Integer
type
;
...
...
src/main/java/cn/timer/api/config/enums/CommonEnum.java
View file @
7df05a62
...
...
@@ -11,20 +11,22 @@ import lombok.Getter;
@Getter
public
enum
CommonEnum
{
NULL_STR
(
0
,
""
),
/**
* 1 超管理员
*/
U_TYPE_ADMIN
(
1
,
"超管理员"
),
U_TYPE_ADMIN
(
0
,
"超管理员"
),
/**
* 2 子管理
*/
U_TYPE_C_ADMIN
(
2
,
"子管理"
),
U_TYPE_C_ADMIN
(
1
,
"子管理"
),
/**
* 3 普通员工
*/
U_TYPE_EMP
(
3
,
"普通员工"
),
U_TYPE_EMP
(
2
,
"普通员工"
),
/**
* 0 关闭
...
...
src/main/java/cn/timer/api/config/exception/GlobalExceptionHandler.java
View file @
7df05a62
package
cn
.
timer
.
api
.
config
.
exception
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -11,8 +12,6 @@ import org.springframework.web.bind.annotation.ExceptionHandler;
import
org.springframework.web.bind.annotation.RestControllerAdvice
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.json.JSONObject
;
import
cn.hutool.json.JSONUtil
;
import
cn.timer.api.aspect.lang.bean.ValidationError
;
import
cn.timer.api.utils.Result
;
import
cn.timer.api.utils.ResultUtil
;
...
...
@@ -66,6 +65,15 @@ public class GlobalExceptionHandler {
return
ResultUtil
.
error
(
e
.
getCode
(),
e
.
getMessage
());
}
/**
* io异常
*/
@ExceptionHandler
(
IOException
.
class
)
public
Result
<
Object
>
ioException
(
IOException
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
return
ResultUtil
.
error
(
e
.
getMessage
());
}
/**
* 自定义验证异常
*/
...
...
src/main/java/cn/timer/api/controller/LoginController.java
View file @
7df05a62
...
...
@@ -38,6 +38,8 @@ import cn.timer.api.bean.zzgl.ZzglAuth;
import
cn.timer.api.bean.zzgl.ZzglBmgwM
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
import
cn.timer.api.config.enuminterface.YgEnumInterface
;
import
cn.timer.api.config.enuminterface.YgEnumInterface.YgJobType
;
import
cn.timer.api.config.enums.CommonEnum
;
import
cn.timer.api.controller.spmk.service.SpmkServiceImpl
;
import
cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper
;
...
...
@@ -430,7 +432,7 @@ public class LoginController {
@ApiOperation
(
value
=
"6.注册企业"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
@ApiOperationSupport
(
order
=
6
)
@Log
(
title
=
"企业注册"
,
businessType
=
BusinessType
.
INSERT
)
public
Result
<
String
>
register
(
@RequestBody
EntRegisterDto
entRegisterDto
)
{
public
Result
<
String
>
register
(
@RequestBody
EntRegisterDto
entRegisterDto
)
throws
Exception
{
// 事务回滚
/*
* DefaultTransactionDefinition def = new DefaultTransactionDefinition();
...
...
@@ -473,12 +475,6 @@ public class LoginController {
if
(
login
==
null
)
{
// 员工信息
/*
* QyzxEmpLogin qyzxEmpLogin =
* QyzxEmpLogin.builder().phone(phone).pw(Md5.md5(pw))
* .sts(CommonEnum.U_STS_ON.getType()).orgId(qyzxEntInfoM.getId()).regTime(
* DateUtil.date()) .endTime(DateUtil.nextMonth()).build();
*/
QyzxEmpLogin
qyzxEmpLogin
=
QyzxEmpLogin
.
builder
().
phone
(
phone
).
pw
(
Md5
.
md5
(
pw
))
.
sts
(
CommonEnum
.
U_STS_ON
.
getType
()).
orgId
(
qyzxEntInfoM
.
getId
()).
regTime
(
DateUtil
.
date
())
.
build
();
...
...
@@ -489,8 +485,9 @@ public class LoginController {
}
}
boolean
b4
=
YgglMainEmp
.
builder
().
orgCode
(
qyzxEntInfoM
.
getId
()).
empNum
(
login
.
getId
()).
rzTime
(
new
Date
()).
isManager
(
1
)
.
name
(
username
).
jobStatus
(
1
).
build
().
insert
();
boolean
b4
=
YgglMainEmp
.
builder
().
orgCode
(
qyzxEntInfoM
.
getId
()).
empNum
(
login
.
getId
()).
rzTime
(
new
Date
())
.
isManager
(
CommonEnum
.
U_TYPE_ADMIN
.
getType
()).
name
(
username
).
phone
(
phone
).
jobType
(
YgJobType
.
QUANZHI
.
getType
()).
jobStatus
(
YgEnumInterface
.
jobStatus
.
ZHENSHI
.
getType
())
.
build
().
insert
();
if
(!
b4
)
{
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
return
ResultUtil
.
error
(
"注册企业失败3"
);
...
...
src/main/java/cn/timer/api/controller/dzht/DzhtController2.java
View file @
7df05a62
...
...
@@ -9,6 +9,7 @@ import java.util.List;
import
java.util.Map
;
import
java.util.UUID
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.StringUtils
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
...
...
@@ -42,6 +43,7 @@ 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.businessService.QyzxRemainingQuantity
;
import
cn.timer.api.bean.qyzx.businessService.QyzxUseRecord
;
import
cn.timer.api.bean.yggl.YgglMainEmp
;
import
cn.timer.api.config.annotation.CurrentUser
;
import
cn.timer.api.config.annotation.UserBean
;
...
...
@@ -73,6 +75,12 @@ import io.swagger.annotations.ApiOperation;
@RequestMapping
(
value
=
"/dzhtApi"
,
produces
=
{
"application/json"
})
public
class
DzhtController2
{
@Value
(
"${config-8timer.esign.callbackUrl}"
)
public
String
callbackUrl
;
// 回调地址
@Value
(
"${config-8timer.esign.redirectUrl}"
)
public
String
redirectUrl
;
// 重定向地址
private
String
getID
(
Integer
empNum
)
{
QueryWrapper
<
DzhtAssoGrzc
>
queryWrapper
=
new
QueryWrapper
<
DzhtAssoGrzc
>();
queryWrapper
.
eq
(
"emp_num"
,
empNum
);
...
...
@@ -407,12 +415,13 @@ public class DzhtController2 {
}
// 创建签署流程
@Transactional
@PostMapping
(
"/signflows"
)
@ApiOperation
(
value
=
"创建签署流程"
,
httpMethod
=
"POST"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
signflows
(
@CurrentUser
UserBean
userBean
,
@RequestBody
DzhtAssoCjlc
lc
)
{
Integer
empNum
=
userBean
.
getEmpNum
();
Integer
orgCode
=
userBean
.
getOrgCode
();
String
flowId
=
null
;
QyzxRemainingQuantity
quantity
=
QyzxRemainingQuantity
.
builder
().
build
().
selectOne
(
new
LambdaQueryWrapper
<
QyzxRemainingQuantity
>().
eq
(
QyzxRemainingQuantity:
:
getOrgCode
,
orgCode
)
.
eq
(
QyzxRemainingQuantity:
:
getPmid
,
2
).
gt
(
QyzxRemainingQuantity:
:
getRemainder
,
0
));
...
...
@@ -434,9 +443,18 @@ public class DzhtController2 {
// SignFlowStart sfs = new SignFlowStart(null, "测试签署流程开启", null, null, null,
// null, null, cfgInfo);
String
a
=
lc
.
getNoticeDeveloperUrl
();
String
a
=
null
;
if
(
callbackUrl
!=
null
)
{
a
=
callbackUrl
;
}
// lc.getNoticeDeveloperUrl(); // 回调地址
String
c
=
null
;
if
(
redirectUrl
!=
null
)
{
c
=
redirectUrl
;
}
// lc.getRedirectUrl(); // 签署完成回调地址
String
b
=
lc
.
getNoticeType
();
String
c
=
lc
.
getRedirectUrl
();
String
d
=
lc
.
getSignPlatform
();
ConfigInfo
cfgInfo
=
new
ConfigInfo
(
a
,
b
,
c
,
d
);
...
...
@@ -460,8 +478,9 @@ public class DzhtController2 {
try
{
TokenHelper
.
getTokenData
();
// 获取鉴权
jsonObject
=
SignHelper
.
createSignFlow
(
sfs
);
lc
.
setFlowId
(
jsonObject
.
getString
(
"flowId"
));
lc
.
setCreater
(
userBean
.
getEmpNum
());
flowId
=
jsonObject
.
getString
(
"flowId"
);
lc
.
setFlowId
(
flowId
);
lc
.
setCreater
(
empNum
);
lc
.
setCreatedTime
(
new
Date
());
lc
.
setOrgCode
(
orgCode
);
lc
.
insert
();
...
...
@@ -469,6 +488,28 @@ public class DzhtController2 {
e1
.
printStackTrace
();
return
ResultUtil
.
error
();
}
QyzxUseRecord
qyzxUseRecord
=
new
QyzxUseRecord
();
qyzxUseRecord
.
setCreateTime
(
new
Date
());
YgglMainEmp
ygglMainEmp
=
YgglMainEmp
.
builder
().
build
().
selectOne
(
new
QueryWrapper
<
YgglMainEmp
>().
lambda
()
.
eq
(
YgglMainEmp:
:
getEmpNum
,
empNum
).
select
(
YgglMainEmp:
:
getName
));
String
name
=
null
;
if
(
ygglMainEmp
!=
null
)
{
name
=
ygglMainEmp
.
getName
();
}
qyzxUseRecord
.
setCreateUser
(
name
);
qyzxUseRecord
.
setOriginalTotalNum
(
remainder
);
qyzxUseRecord
.
setNowTotalNum
(--
remainder
);
qyzxUseRecord
.
setOrderNo
(
quantity
.
getOrderNo
());
qyzxUseRecord
.
setOrgCode
(
orgCode
);
qyzxUseRecord
.
setUseNum
(
1
);
qyzxUseRecord
.
setScene
(
"签署中"
);
qyzxUseRecord
.
setFlowId
(
flowId
);
qyzxUseRecord
.
insert
();
quantity
.
setRemainder
(
remainder
);
quantity
.
updateById
();
return
ResultUtil
.
data
(
jsonObject
,
"创建签署流程成功"
);
}
...
...
@@ -877,10 +918,13 @@ public class DzhtController2 {
try
{
TokenHelper
.
getTokenData
();
// 获取鉴权
SignHelper
.
rushSign
(
flowId
,
getID
(
userBean
.
getEmpNum
()),
noticeTypes
,
rushsignAccountId
);
JSONObject
json
=
SignHelper
.
rushSign
(
flowId
,
getID
(
userBean
.
getEmpNum
()),
noticeTypes
,
rushsignAccountId
);
if
(
json
!=
null
&&
json
.
getLong
(
"code"
)
!=
0
)
{
return
ResultUtil
.
error
(
json
.
getString
(
"message"
));
}
}
catch
(
DefineException
e
)
{
// return ResultUtil.error("当前用户非流程发起人, 不能执行催签操作");
e
.
printStackTrace
();
return
ResultUtil
.
error
(
"当前用户非流程发起人, 不能执行催签操作"
);
}
return
ResultUtil
.
success
();
}
...
...
src/main/java/cn/timer/api/controller/dzht/cn/tign/hz/helper/SignHelper.java
View file @
7df05a62
...
...
@@ -426,14 +426,16 @@ public class SignHelper {
* @param flowId 创建签署流程时返回的签署流程ID
* @throws DefineException
* @author 宫清
* @return
* @date 2019年7月21日 下午9:27:41
*/
public
static
void
rushSign
(
String
flowId
,
String
accoundId
,
String
noticeTypes
,
String
rushsignAccountId
)
public
static
JSONObject
rushSign
(
String
flowId
,
String
accoundId
,
String
noticeTypes
,
String
rushsignAccountId
)
throws
DefineException
{
String
param
=
SignParamUtil
.
rushsignersParam
(
accoundId
,
noticeTypes
,
rushsignAccountId
);
JSONObject
json
=
HttpHelper
.
doCommHttp
(
RequestType
.
PUT
,
ConfigConstant
.
urgeSgin_URL
(
flowId
),
param
);
JSONHelper
.
castDataJson
(
json
,
Object
.
class
);
// JSONHelper.castDataJson(json, Object.class);
return
json
;
}
/**
...
...
src/main/java/cn/timer/api/controller/qyzx/QyzxBusinessController.java
View file @
7df05a62
...
...
@@ -305,9 +305,11 @@ public class QyzxBusinessController {
@GetMapping
(
value
=
"/queryContractUseRecord"
)
@ApiOperation
(
value
=
"查询电子合同套餐使用记录"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
Object
>
queryContractUseRecord
(
@CurrentUser
UserBean
userBean
)
{
// TODO
return
null
;
public
Result
<
Object
>
queryContractUseRecord
(
@CurrentUser
UserBean
userBean
,
String
orderNo
)
{
return
ResultUtil
.
data
(
QyzxUseRecord
.
builder
().
build
()
.
selectList
(
new
LambdaQueryWrapper
<
QyzxUseRecord
>().
eq
(
QyzxUseRecord:
:
getOrgCode
,
userBean
.
getOrgCode
())
.
eq
(
QyzxUseRecord:
:
getPmid
,
2
).
eq
(
orderNo
!=
null
,
QyzxUseRecord:
:
getOrderNo
,
orderNo
)),
"查询成功"
);
}
}
src/main/java/cn/timer/api/controller/qyzx/QyzxController.java
View file @
7df05a62
...
...
@@ -142,25 +142,6 @@ public class QyzxController {
}
/**
* 企业认证-审核-通过/未通过
*
* @param qyzxEntAuth
* @return
*/
/*
* @PostMapping(value = "/entauthcheck")
*
* @ApiOperation(value = "企业认证-审核-通过/未通过", httpMethod = "POST", notes =
* "接口发布说明") public Result<QyzxEntAuth> entauthcheck1(@CurrentUser UserBean
* userBean, @RequestBody QyzxEntAuth qyzxEntAuth) { Integer id =
* qyzxEntAuth.getId(); Integer authType = qyzxEntAuth.getAuthType(); if (id ==
* null || authType == null) { return ResultUtil.error("参数缺少/异常"); } QyzxEntAuth
* entAuth = QyzxEntAuth.builder().id(id).authType(authType).build(); boolean b
* = entAuth.updateById(); if (b) { return ResultUtil.data(qyzxEntAuth,
* "企业认证-审批成功"); } else { return ResultUtil.error("企业认证-审批失败"); } }
*/
/**
* 运营管理 企业认证-审核-通过/不通过(weng)
*
* @param qyzxEntAuth
...
...
@@ -267,10 +248,10 @@ public class QyzxController {
@GetMapping
(
value
=
"/entlist"
)
@ApiOperation
(
value
=
"企业列表"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
QyzxEntInfoM
>>
entlist1
(
@CurrentUser
UserBean
userBean
)
{
Integer
empNum
=
userBean
.
getEmpNum
();
QueryWrapper
<
QyzxEmpEntAsso
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
select
(
"org_code"
).
eq
(
"emp_num"
,
empNum
);
List
<
Object
>
orgCodes
=
qyzxEmpEntAssoMapper
.
selectObjs
(
queryWrapper
);
List
<
Object
>
orgCodes
=
qyzxEmpEntAssoMapper
.
selectObjs
(
new
QueryWrapper
<
QyzxEmpEntAsso
>().
lambda
()
.
select
(
QyzxEmpEntAsso:
:
getOrgCode
)
.
eq
(
QyzxEmpEntAsso:
:
getEmpNum
,
userBean
.
getEmpNum
())
);
List
<
QyzxEntInfoM
>
qyzxEntInfoMs
=
new
LambdaQueryChainWrapper
<
QyzxEntInfoM
>(
qyzxEntInfoMMapper
)
.
in
(
CollUtil
.
isNotEmpty
(
orgCodes
),
QyzxEntInfoM:
:
getId
,
orgCodes
).
list
();
return
ResultUtil
.
data
(
qyzxEntInfoMs
,
"获取企业信息成功"
);
...
...
@@ -327,56 +308,6 @@ public class QyzxController {
}
}
// 下载系统使用手册 直接提供(OSS公共读权限文件)url地址到前端按钮
/**
* 意见反馈
*/
/*
* @PostMapping(value = "/feedback")
*
* @ApiOperation(value = "意见反馈", httpMethod = "POST", notes = "接口发布说明") public
* Result<QyzxSuggestionFeeback> feedback(@CurrentUser UserBean userBean,
*
* @RequestParam(required = false) String opinionText, @RequestParam(required =
* false) String moudle,
*
* @Param("files") List<MultipartFile> files) { String url = null; List<String>
* list = new ArrayList<String>(); if (files != null) { for (MultipartFile file
* : files) { String path = "8timer2.0/" + userBean.getOrgCode() + "/" + moudle
* + "/" + file.getOriginalFilename(); if (file == null || file.getSize() <= 0)
* { return ResultUtil.error("上传的文件为空,请重新选择!"); } else { try { url =
* oss.uploadFile(path, file.getInputStream()); list.add(url); } catch
* (IOException e) { e.printStackTrace(); } } } } QyzxSuggestionFeeback feeback
* = new QyzxSuggestionFeeback(); feeback.setEmpNum(userBean.getEmpNum());
* feeback.setOpinionText(opinionText); feeback.setCreateTime(new Date());
* feeback.setOrgCode(userBean.getOrgCode()); boolean a = feeback.insert(); if
* (a && list.size() > 0) { for (String opinionUrl : list) {
* QyzxFeebackAccessory.builder().feebackId(feeback.getId()).opinionUrl(
* opinionUrl).build().insert(); } } return ResultUtil.success("意见反馈成功!"); }
*/
// /**
// * 意见反馈2
// */
// @PostMapping(value = "/feedback")
// @ApiOperation(value = "意见反馈", httpMethod = "POST", notes = "接口发布说明")
// public Result<String> feedback(@CurrentUser UserBean userBean, @RequestBody FeebackDto feebackDto) {
// String opinionText = feebackDto.getOpinionText();
// List<String> urlList = feebackDto.getUrlList();
// QyzxSuggestionFeeback qs = QyzxSuggestionFeeback.builder().orgCode(userBean.getOrgCode()).empNum(userBean.getEmpNum()).opinionText(opinionText).bugType(1).createTime(new Date()).build();
//
// boolean tof = qs.insert();
// Integer feebackId = qs.getId();
// if (tof) {
// for (String str : urlList) {
// QyzxFeebackAccessory.builder().feebackId(feebackId).opinionUrl(str).build().insert();
// }
// return ResultUtil.data("意见反馈成功!");
// }
//
// return ResultUtil.data("意见反馈失败!");
// }
/**
* 意见反馈
*/
...
...
@@ -438,8 +369,8 @@ public class QyzxController {
.
build
().
insertOrUpdate
();
// 添加或修改服务计算表
Integer
number
=
qyzxPayServe
.
getNum
();
QueryWrapper
<
QyzxAttaFwjsb
>
queryWrapper
=
new
QueryWrapper
<>
();
queryWrapper
.
eq
(
"emp_num"
,
userBean
.
getEmpNum
()).
eq
(
"code"
,
code
);
LambdaQueryWrapper
<
QyzxAttaFwjsb
>
queryWrapper
=
new
QueryWrapper
<
QyzxAttaFwjsb
>().
lambda
();
queryWrapper
.
eq
(
QyzxAttaFwjsb:
:
getEmpNum
,
userBean
.
getEmpNum
()).
eq
(
QyzxAttaFwjsb:
:
getCode
,
code
);
Integer
result
=
QyzxAttaFwjsb
.
builder
().
build
().
selectCount
(
queryWrapper
);
if
(
result
!=
null
&&
result
>
0
)
{
QyzxAttaFwjsb
fwjb
=
QyzxAttaFwjsb
.
builder
().
build
().
selectOne
(
queryWrapper
);
...
...
@@ -465,7 +396,7 @@ public class QyzxController {
@ApiOperation
(
value
=
"查看服务计算"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
QyzxAttaFwjsb
>>
fwjs
(
@CurrentUser
UserBean
userBean
)
{
List
<
QyzxAttaFwjsb
>
qyzxAttaFpgl
=
QyzxAttaFwjsb
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
QyzxAttaFwjsb
>().
eq
(
"emp_num"
,
userBean
.
getEmpNum
()));
.
selectList
(
new
QueryWrapper
<
QyzxAttaFwjsb
>().
lambda
().
eq
(
QyzxAttaFwjsb:
:
getEmpNum
,
userBean
.
getEmpNum
()));
return
ResultUtil
.
data
(
qyzxAttaFpgl
,
"获取服务计算成功"
);
}
...
...
@@ -479,7 +410,7 @@ public class QyzxController {
@ApiOperation
(
value
=
"获取购买记录"
,
httpMethod
=
"GET"
,
notes
=
"接口发布说明"
)
public
Result
<
List
<
QyzxLogBuy
>>
selectgmjl
(
@CurrentUser
UserBean
userBean
)
{
List
<
QyzxLogBuy
>
qyzxLogBuy
=
QyzxLogBuy
.
builder
().
build
()
.
selectList
(
new
QueryWrapper
<
QyzxLogBuy
>().
eq
(
"emp_num"
,
userBean
.
getEmpNum
()));
.
selectList
(
new
QueryWrapper
<
QyzxLogBuy
>().
lambda
().
eq
(
QyzxLogBuy:
:
getEmpNum
,
userBean
.
getEmpNum
()));
return
ResultUtil
.
data
(
qyzxLogBuy
,
"获取购买记录成功"
);
}
...
...
src/main/java/cn/timer/api/controller/spmk/SpmkController.java
View file @
7df05a62
...
...
@@ -47,6 +47,7 @@ import cn.timer.api.config.annotation.UserBean;
import
cn.timer.api.config.enuminterface.SpmkEnumInterface
;
import
cn.timer.api.config.enuminterface.SpmkEnumInterface.ApproveSummarySts
;
import
cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecutorSts
;
import
cn.timer.api.config.enums.CommonEnum
;
import
cn.timer.api.config.exception.CustomException
;
import
cn.timer.api.config.validation.Ranks
;
import
cn.timer.api.config.validation.ValidList
;
...
...
@@ -88,6 +89,8 @@ produces = { "application/json","multipart/form-data" })
public
class
SpmkController
{
@Autowired
SpmkServiceImpl
spmkService
;
@Autowired
private
SpmkApprovalTemplateGMapper
spmkApprovalTemplateGMapper
;
@Autowired
private
SpmkApprovalTemplateMapper
spmkApprovalTemplateMapper
;
...
...
@@ -375,8 +378,6 @@ public class SpmkController {
}
//
/**
* 注意: 为保证该api的原子性 要加 事务处理 回滚(方法注解-@Transactional(rollbackFor = Exception.class))
...
...
@@ -408,7 +409,6 @@ public class SpmkController {
}
return
ResultUtil
.
success
(
"操作成功!"
);
}
/**
...
...
@@ -462,7 +462,7 @@ public class SpmkController {
listRouter
.
add
(
spmkApproveSummaryDto
.
getRouter
());
JSONObject
jSONObject
=
spmkApproveSummaryDto
.
getRequestData
()
.
set
(
"orgCode"
,
FromData
.
builder
().
value
(
String
.
valueOf
(
userBean
.
getOrgCode
())).
build
())
.
set
(
"initiator"
,
FromData
.
builder
().
value
(
spmkApproveSummaryDto
.
getInitiator
()).
build
())
.
set
(
"initiator"
,
FromData
.
builder
().
value
(
ygglMainEmp
.
getName
()).
build
())
.
set
(
"headUrl"
,
FromData
.
builder
().
value
(
ygglMainEmp
.
getHeadUrl
()).
build
())
.
set
(
"id"
,
FromData
.
builder
().
value
(
StrUtil
.
toString
(
userBean
.
getEmpNum
())).
build
());
RouterUtils
.
NextNode
(
listRouter
,
jSONObject
,
ISFIRST
);
...
...
@@ -555,18 +555,7 @@ public class SpmkController {
@Log
(
title
=
"审批-审批详情"
,
businessType
=
BusinessType
.
OTHER
)
public
Result
<
Object
>
selectAd
(
@PathVariable
(
required
=
true
)
Integer
id
)
{
SpmkApproveDetail
ad
=
spmkApproveDetailMapper
.
selectOne
(
new
QueryWrapper
<
SpmkApproveDetail
>().
lambda
().
eq
(
SpmkApproveDetail:
:
getApproveSummaryId
,
id
));
SpmkApproveDetailDto
adD
=
SpmkApproveDetailDto
.
builder
().
build
();
if
(
ad
==
null
)
{
return
ResultUtil
.
data
(
adD
,
"操作成功!"
);
}
List
<
SpmkApproveExecuteRecord
>
listAer
=
spmkApproveExecuteRecordMapper
.
selectListByAsId
(
id
);
BeanUtil
.
copyProperties
(
ad
,
adD
,
"requestData"
,
"froms"
,
"router"
,
"spmkApproveExecuteRecord"
);
adD
.
setRequestData
(
ObjectUtil
.
deserialize
(
ad
.
getRequestData
()));
adD
.
setFroms
(
ObjectUtil
.
deserialize
(
ad
.
getFroms
()));
adD
.
setRouter
(
ObjectUtil
.
deserialize
(
ad
.
getRouter
()));
adD
.
setFlowChildren
(
ObjectUtil
.
deserialize
(
ad
.
getFlowChildren
()));
adD
.
setApproveExecuteRecord
(
listAer
);
SpmkApproveDetailDto
adD
=
spmkService
.
selectApproveDetailByAsId
(
id
);
return
ResultUtil
.
data
(
adD
,
"操作成功!"
);
}
...
...
@@ -620,6 +609,7 @@ public class SpmkController {
if
(
aSummary
.
getSts
()
==
0
)
{
List
<
FlowChildren
>
listFlowChildren
=
ObjectUtil
.
deserialize
(
ad
.
getFlowChildren
());
// 审批逻辑
RouterUtils
.
approving
(
listFlowChildren
,
approvingDto
.
getAsId
(),
...
...
@@ -641,7 +631,7 @@ public class SpmkController {
.
eq
(
SpmkApproveSummary:
:
getId
,
approvingDto
.
getAsId
()));
if
(
aSummary
.
getSts
()
!=
SpmkEnumInterface
.
ApproveSummarySts
.
REFUSE
.
ordinal
())
{
SpmkApproveSummary
.
builder
().
id
(
approvingDto
.
getAsId
()).
currentApprover
(
""
).
endTime
(
new
Date
()).
sts
(
ApproveSummarySts
.
FINISH
.
ordinal
()).
build
().
updateById
();
SpmkApproveSummary
.
builder
().
id
(
approvingDto
.
getAsId
()).
currentApprover
(
CommonEnum
.
NULL_STR
.
getDesc
()
).
endTime
(
new
Date
()).
sts
(
ApproveSummarySts
.
FINISH
.
ordinal
()).
build
().
updateById
();
JSONObject
jSONObject
=
ObjectUtil
.
deserialize
(
ad
.
getRequestData
());
jSONObject
.
set
(
"approveId"
,
approvingDto
.
getAsId
());
...
...
@@ -754,16 +744,13 @@ public class SpmkController {
return
ResultUtil
.
data
(
spmkIcons
,
"获取图标列表成功"
);
}
@Autowired
SpmkServiceImpl
SpmkService
;
//TODO 测试-生成 审批组 和 自定义审批
@GetMapping
(
value
=
"/test"
)
@ApiOperation
(
value
=
"98.测试-生成 审批组 和 自定义审批"
,
httpMethod
=
"GET"
,
notes
=
"测试-生成 审批组 和 自定义审批"
)
@ApiOperationSupport
(
order
=
98
)
public
Result
<
List
<
SpmkIcon
>>
createCustomApproval
(
@RequestParam
Integer
orgCode
){
S
pmkService
.
createCustomApproval
(
orgCode
);
s
pmkService
.
createCustomApproval
(
orgCode
);
List
<
SpmkIcon
>
spmkIcons
=
SpmkIcon
.
builder
().
build
().
selectAll
();
...
...
src/main/java/cn/timer/api/controller/spmk/service/SpmkService.java
View file @
7df05a62
package
cn
.
timer
.
api
.
controller
.
spmk
.
service
;
import
cn.timer.api.dto.spmk.SpmkApproveDetailDto
;
public
interface
SpmkService
{
boolean
createCustomApproval
(
Integer
orgCode
);
SpmkApproveDetailDto
selectApproveDetailByAsId
(
Integer
asId
);
}
src/main/java/cn/timer/api/controller/spmk/service/SpmkServiceImpl.java
View file @
7df05a62
...
...
@@ -10,17 +10,29 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.lang.Console
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.timer.api.bean.spmk.SpmkApprovalG
;
import
cn.timer.api.bean.spmk.SpmkApprovalTemplate
;
import
cn.timer.api.bean.spmk.SpmkApprovalTemplateG
;
import
cn.timer.api.bean.spmk.SpmkApproveDetail
;
import
cn.timer.api.bean.spmk.SpmkApproveExecuteRecord
;
import
cn.timer.api.bean.spmk.SpmkCustomApproval
;
import
cn.timer.api.dao.spmk.SpmkApproveDetailMapper
;
import
cn.timer.api.dao.spmk.SpmkApproveExecuteRecordMapper
;
import
cn.timer.api.dao.spmk.SpmkCustomApprovalMapper
;
import
cn.timer.api.dto.spmk.SpmkApproveDetailDto
;
@Service
public
class
SpmkServiceImpl
implements
SpmkService
{
@Autowired
SpmkCustomApprovalMapper
spmkCustomApprovalMapper
;
private
SpmkCustomApprovalMapper
spmkCustomApprovalMapper
;
@Autowired
private
SpmkApproveDetailMapper
spmkApproveDetailMapper
;
@Autowired
private
SpmkApproveExecuteRecordMapper
spmkApproveExecuteRecordMapper
;
/**
* 根据orgCode查数据库 审批模板 生成 自定义模板
...
...
@@ -62,4 +74,26 @@ public class SpmkServiceImpl implements SpmkService{
return
true
;
}
/**
* 根据审批汇总id 获取 审批详情
*/
@Override
public
SpmkApproveDetailDto
selectApproveDetailByAsId
(
Integer
asId
)
{
// TODO Auto-generated method stub
SpmkApproveDetail
ad
=
spmkApproveDetailMapper
.
selectOne
(
new
QueryWrapper
<
SpmkApproveDetail
>().
lambda
().
eq
(
SpmkApproveDetail:
:
getApproveSummaryId
,
asId
));
SpmkApproveDetailDto
adD
=
SpmkApproveDetailDto
.
builder
().
build
();
if
(
ad
==
null
)
{
return
null
;
}
List
<
SpmkApproveExecuteRecord
>
listAer
=
spmkApproveExecuteRecordMapper
.
selectListByAsId
(
asId
);
BeanUtil
.
copyProperties
(
ad
,
adD
,
"requestData"
,
"froms"
,
"router"
,
"spmkApproveExecuteRecord"
);
adD
.
setRequestData
(
ObjectUtil
.
deserialize
(
ad
.
getRequestData
()));
adD
.
setFroms
(
ObjectUtil
.
deserialize
(
ad
.
getFroms
()));
adD
.
setRouter
(
ObjectUtil
.
deserialize
(
ad
.
getRouter
()));
adD
.
setFlowChildren
(
ObjectUtil
.
deserialize
(
ad
.
getFlowChildren
()));
adD
.
setApproveExecuteRecord
(
listAer
);
return
adD
;
}
}
src/main/java/cn/timer/api/controller/yggl/YgglController.java
View file @
7df05a62
This diff is collapsed.
Click to expand it.
src/main/java/cn/timer/api/dao/dzht/DzhtSignflowFinishMapper.java
0 → 100644
View file @
7df05a62
package
cn
.
timer
.
api
.
dao
.
dzht
;
import
org.springframework.stereotype.Repository
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
cn.timer.api.bean.dzht.DzhtSignflowFinish
;
/**
* e签宝结束回调
*
* @author Administrator
*
*/
@Repository
public
interface
DzhtSignflowFinishMapper
extends
BaseMapper
<
DzhtSignflowFinish
>
{
}
\ No newline at end of file
src/main/java/cn/timer/api/dto/yggl/AddygdaDto.java
View file @
7df05a62
...
...
@@ -67,7 +67,6 @@ public class AddygdaDto extends Page implements Serializable{
@ApiModelProperty
(
value
=
"性别 0:男;1:女"
,
example
=
"0"
)
private
Integer
sex
;
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@ApiModelProperty
(
value
=
"部门岗位id"
,
example
=
"0"
)
private
Integer
bmgwId
;
...
...
src/main/java/cn/timer/api/dto/yggl/ImportEmpDto.java
0 → 100644
View file @
7df05a62
package
cn
.
timer
.
api
.
dto
.
yggl
;
import
java.io.Serializable
;
import
java.util.Date
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Pattern
;
import
cn.timer.api.config.exception.Regular
;
import
cn.timer.api.config.exception.ValidationMsg
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* 员工导入模板
* @author Tang
*
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
ImportEmpDto
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1230023773946170942L
;
@NotBlank
(
message
=
ValidationMsg
.
NOTBLANK
)
@ApiModelProperty
(
value
=
"员工姓名"
,
example
=
"华仔"
)
private
String
name
;
@NotBlank
(
message
=
ValidationMsg
.
NOTBLANK
)
@Pattern
(
regexp
=
Regular
.
PHONE
,
message
=
ValidationMsg
.
PATTERN
)
@ApiModelProperty
(
value
=
"手机号"
,
example
=
"101"
)
private
String
phone
;
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@ApiModelProperty
(
value
=
"证件类型 0:身份证;1:港澳居民来往内地通行证;2:台湾居民来往大陆通行证;3:外国护照;4:其他"
,
example
=
"0"
)
private
Integer
zjType
;
@NotBlank
(
message
=
ValidationMsg
.
NOTBLANK
)
@ApiModelProperty
(
value
=
"证件号码 "
,
example
=
"证件号码"
)
private
String
zjNum
;
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@ApiModelProperty
(
value
=
"工作性质 0全职、1实习生、2兼职、3劳务派遣、4劳务、5派遣、6外包、7退休返聘"
,
example
=
"0"
)
private
Integer
jobType
;
@ApiModelProperty
(
value
=
"入职日期 "
,
example
=
"客户注册后的时间为入职时间"
)
private
String
rzTime
;
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@ApiModelProperty
(
value
=
"试用期 0:无试用期;1:1个月;2:2个月;3:3个月;4:4个月;5:5个月;6:6个月(有试用期显示选项)"
,
example
=
"0"
)
private
Integer
syq
;
@NotNull
(
message
=
ValidationMsg
.
NOTNULL
)
@ApiModelProperty
(
value
=
"性别 0:男;1:女"
,
example
=
"0"
)
private
Integer
sex
;
}
src/main/java/cn/timer/api/utils/router/RouterUtils.java
View file @
7df05a62
...
...
@@ -22,6 +22,7 @@ import cn.timer.api.bean.zzgl.ZzglBmgwM;
import
cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecuteRecordSts
;
import
cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecutorSts
;
import
cn.timer.api.config.enuminterface.SpmkEnumInterface.ParticipatorType
;
import
cn.timer.api.config.enums.CommonEnum
;
import
cn.timer.api.dto.spmk.Condition
;
import
cn.timer.api.dto.spmk.FlowChildren
;
import
cn.timer.api.dto.spmk.FromData
;
...
...
@@ -36,14 +37,37 @@ import cn.timer.api.dto.spmk.User;
*
*/
public
class
RouterUtils
{
/**
* 0 未执行
*/
private
final
static
String
UNEXECUTED
=
"0"
;
/**
* 1 执行中
*/
private
final
static
String
EXECUTING
=
"1"
;
/**
* 2 已执行
*/
private
final
static
String
EXECUTED
=
"2"
;
/**
* creator 抄送人
*/
private
final
static
String
CREATOR
=
"creator"
;
/**
* audit 审批人
*/
private
final
static
String
AUDIT
=
"audit"
;
/**
* copy 抄送人
*/
private
final
static
String
COPY
=
"copy"
;
/**
* department 部门类型
*/
private
final
static
String
RELATION_TYPE_DEPARTMENT
=
"department"
;
/**
* users 用户类型
*/
private
final
static
String
RELATION_TYPE_USERS
=
"users"
;
public
static
List
<
Router
>
NextNode
(
List
<
Router
>
listRouter
,
JSONObject
obj
,
boolean
isFirse
)
throws
NumberFormatException
,
ConvertException
,
Exception
{
...
...
@@ -76,7 +100,7 @@ public class RouterUtils {
.
name
(
obj
.
get
(
"initiator"
,
FromData
.
class
).
getValue
())
.
id
(
obj
.
get
(
"id"
,
FromData
.
class
).
getValue
())
.
headUrl
(
obj
.
get
(
"headUrl"
,
FromData
.
class
).
getValue
())
.
execute
(
"0"
)
.
execute
(
UNEXECUTED
)
.
build
();
users
.
add
(
userFirst
);
List
<
Relation
>
relations
=
new
ArrayList
<
Relation
>();
...
...
@@ -238,9 +262,8 @@ public class RouterUtils {
public
static
List
<
YgglMainEmp
>
selectOtherlistent
(
Integer
orgCode
,
Integer
id
){
ArrayList
<
Integer
>
list
=
new
ArrayList
<
Integer
>();
QueryWrapper
<
ZzglBmgwM
>
queryWrapper
=
new
QueryWrapper
<
ZzglBmgwM
>();
queryWrapper
.
eq
(
"org_code"
,
orgCode
);
List
<
ZzglBmgwM
>
zzglBmgwMs
=
ZzglBmgwM
.
builder
().
build
().
selectList
(
queryWrapper
);
List
<
ZzglBmgwM
>
zzglBmgwMs
=
ZzglBmgwM
.
builder
().
build
().
selectList
(
new
QueryWrapper
<
ZzglBmgwM
>().
lambda
()
.
eq
(
ZzglBmgwM:
:
getOrgCode
,
orgCode
));
list
.
add
(
id
);
ZzglBmgwM
.
getDepts
(
list
,
id
,
zzglBmgwMs
);
...
...
@@ -293,13 +316,14 @@ public class RouterUtils {
continue
;
}
// ClassName 区分参与审批流程人的角色 CREATOR(发起人)、AUDIT(审核人)、COPY(抄送人)
// 各个角色的逻辑不同
switch
(
listFlowChildren
.
get
(
i
).
getClassName
())
{
case
CREATOR:
SpmkApproveExecuteRecord
aer
=
SpmkApproveExecuteRecord
.
builder
()
.
approveSummaryId
(
asId
)
.
name
(
"发起申请"
)
.
name
(
ParticipatorType
.
INITIATOR
.
getName
()
)
.
type
(
ParticipatorType
.
INITIATOR
.
ordinal
())
.
sts
(
ExecuteRecordSts
.
AGREE
.
ordinal
())
.
build
();
...
...
@@ -321,7 +345,7 @@ public class RouterUtils {
SpmkApproveExecuteRecord
aer2
=
SpmkApproveExecuteRecord
.
builder
()
.
approveSummaryId
(
asId
)
.
name
(
"审批人"
)
.
name
(
ParticipatorType
.
APPROVER
.
getName
()
)
.
type
(
ParticipatorType
.
APPROVER
.
ordinal
())
.
sts
(
ExecuteRecordSts
.
IN_EXECUTION
.
ordinal
())
.
build
();
...
...
@@ -354,7 +378,7 @@ public class RouterUtils {
SpmkApproveExecuteRecord
aer3
=
SpmkApproveExecuteRecord
.
builder
()
.
approveSummaryId
(
asId
)
.
name
(
"抄送人"
)
.
name
(
ParticipatorType
.
COPY
.
getName
()
)
.
type
(
ParticipatorType
.
COPY
.
ordinal
())
.
sts
(
ExecuteRecordSts
.
AGREE
.
ordinal
())
.
build
();
...
...
@@ -423,7 +447,7 @@ public class RouterUtils {
// 0未执行 1执行中 2同意 3拒绝 4 转派
if
(
sts
==
ExecutorSts
.
REFUSE
.
ordinal
())
{
// 更新 审批汇总 状态
SpmkApproveSummary
.
builder
().
id
(
asId
).
currentApprover
(
""
).
endTime
(
new
Date
()).
sts
(
sts
).
build
().
updateById
();
SpmkApproveSummary
.
builder
().
id
(
asId
).
currentApprover
(
CommonEnum
.
NULL_STR
.
getDesc
()
).
endTime
(
new
Date
()).
sts
(
sts
).
build
().
updateById
();
SpmkApproveExecuteRecord
.
builder
()
.
id
(
executeRecordId
)
...
...
@@ -434,6 +458,7 @@ public class RouterUtils {
listFlowChildren
.
get
(
i_user
).
setExecute
(
EXECUTED
);
return
;
//转派 处理
//在 原审批人 列表中 插入 一个被转派人(审批人)
}
else
if
(
sts
==
ExecutorSts
.
REDEPLOY
.
ordinal
())
{
List
<
User
>
users1
=
CollectionUtil
.
sub
(
listUser
,
0
,
i_user
+
1
);
users1
.
add
(
redeployUser
);
...
...
@@ -480,8 +505,8 @@ public class RouterUtils {
SpmkApproveExecuteRecord
aer
=
SpmkApproveExecuteRecord
.
builder
()
.
approveSummaryId
(
asId
)
.
name
(
"发起申请"
)
.
type
(
0
)
.
name
(
ParticipatorType
.
INITIATOR
.
getName
()
)
.
type
(
ParticipatorType
.
INITIATOR
.
ordinal
()
)
.
sts
(
ExecuteRecordSts
.
AGREE
.
ordinal
())
.
build
();
// 新增 审批执行记录
...
...
@@ -504,7 +529,7 @@ public class RouterUtils {
SpmkApproveExecuteRecord
aer2
=
SpmkApproveExecuteRecord
.
builder
()
.
approveSummaryId
(
asId
)
.
name
(
"审批人"
)
.
name
(
ParticipatorType
.
APPROVER
.
getName
()
)
.
type
(
ParticipatorType
.
APPROVER
.
ordinal
())
.
sts
(
ExecuteRecordSts
.
IN_EXECUTION
.
ordinal
())
.
build
();
...
...
@@ -530,7 +555,7 @@ public class RouterUtils {
SpmkApproveExecuteRecord
aer3
=
SpmkApproveExecuteRecord
.
builder
()
.
approveSummaryId
(
asId
)
.
name
(
"抄送人"
)
.
name
(
ParticipatorType
.
COPY
.
getName
()
)
.
type
(
ParticipatorType
.
COPY
.
ordinal
())
.
sts
(
ExecuteRecordSts
.
AGREE
.
ordinal
())
.
build
();
...
...
src/main/java/cn/timer/api/utils/router/business/EvectionBusiness.java
View file @
7df05a62
...
...
@@ -53,7 +53,7 @@ public class EvectionBusiness extends SpmkAssoBusiness {
.
evectiontype
(
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
)
*
60
D
)
.
duration
(
Convert
.
toDouble
(
longTime
))
.
build
();
// 调 考勤管理 业务-出差
...
...
src/main/java/cn/timer/api/utils/router/business/GoOutBusiness.java
View file @
7df05a62
...
...
@@ -51,7 +51,7 @@ public class GoOutBusiness extends SpmkAssoBusiness {
.
evectiontype
(
2
)
.
starttime
(
DateUtil
.
getStringTime
(
startTime
,
"yyyy-MM-dd HH:mm:ss"
))
.
endtime
(
DateUtil
.
getStringTime
(
endTime
,
"yyyy-MM-dd HH:mm:ss"
))
.
duration
(
Convert
.
toDouble
(
longTime
)
*
60
D
)
.
duration
(
Convert
.
toDouble
(
longTime
))
.
build
();
// 调 考勤管理 业务-外出
...
...
src/main/java/cn/timer/api/utils/router/business/LeaveBusiness.java
View file @
7df05a62
...
...
@@ -58,7 +58,7 @@ public class LeaveBusiness extends SpmkAssoBusiness {
.
leavetype
(
Convert
.
toInt
(
LeaveType
))
.
starttime
(
DateUtil
.
getStringTime
(
startTime
,
"yyyy-MM-dd HH:mm:ss"
))
.
endtime
(
DateUtil
.
getStringTime
(
endTime
,
"yyyy-MM-dd HH:mm:ss"
))
.
duration
(
Convert
.
toDouble
(
longTime
)
*
60
D
)
.
duration
(
Convert
.
toDouble
(
longTime
))
.
build
();
// 调 考勤管理 业务-请假
...
...
src/main/java/cn/timer/api/utils/router/business/ReissueACardBusiness.java
View file @
7df05a62
...
...
@@ -42,7 +42,7 @@ public class ReissueACardBusiness extends SpmkAssoBusiness {
String
cardShortage
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"cardShortage"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"cardShortage"
,
FromData
.
class
).
getValue
();
// 缺卡时段-上班、下班-前端未改
//
String cardreplperiod = ObjectUtil.isNull(jsonObj.get("cardreplperiod",FromData.class)) ? null : jsonObj.get("cardreplperiod",FromData.class).getValue();
String
cardreplperiod
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"cardreplperiod"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"cardreplperiod"
,
FromData
.
class
).
getValue
();
// 上传文件
String
UploadAttachment
=
ObjectUtil
.
isNull
(
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
))
?
null
:
jsonObj
.
get
(
"UploadAttachment"
,
FromData
.
class
).
getValue
();
...
...
@@ -51,7 +51,7 @@ public class ReissueACardBusiness extends SpmkAssoBusiness {
.
builder
()
.
repairid
(
Convert
.
toInt
(
approveId
))
.
cardrepltime
(
DateUtil
.
getStringTime
(
PatchCardTime
,
"yyyy-MM-dd HH:mm:ss"
))
//
.cardreplperiod(Convert.toInt(cardreplperiod))
.
cardreplperiod
(
Convert
.
toInt
(
cardreplperiod
))
.
build
();
// 调 考勤管理 业务-补卡
...
...
src/main/java/cn/timer/api/utils/router/business/WorkOvertimeBusiness.java
View file @
7df05a62
...
...
@@ -58,7 +58,7 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness {
.
overtimetype
(
Convert
.
toInt
(
overtimetype
))
.
starttime
(
DateUtil
.
getStringTime
(
startTime
,
"yyyy-MM-dd HH:mm:ss"
))
.
endtime
(
DateUtil
.
getStringTime
(
endTime
,
"yyyy-MM-dd HH:mm:ss"
))
.
duration
(
Convert
.
toDouble
(
timeLong
)
*
60
D
)
.
duration
(
Convert
.
toDouble
(
timeLong
))
.
compensate
(
Convert
.
toInt
(
compensate
))
.
build
();
...
...
src/main/resources/application-dev.yml
View file @
7df05a62
...
...
@@ -167,6 +167,8 @@ config-8timer:
expirationTime
:
3153600000000L
expirationTime_pri
:
600000L
esign
:
# e签宝
callbackUrl
:
'
https://test-8timer-pc.youlingrc.com/callback/esign/dev'
redirectUrl
:
'
http://test-8timer-pc.youlingrc.com/#/ElecCon/index'
# host: https://smlopenapi.esign.cn
# test: https://smlopenapi.esign.cn
# pro: https://openapi.esign.cn
...
...
src/main/resources/application-pro.yml
View file @
7df05a62
...
...
@@ -141,6 +141,8 @@ config-8timer:
expirationTime
:
3153600000000L
expirationTime_pri
:
600000L
esign
:
# e签宝
callbackUrl
:
'
https://test-8timer-pc.youlingrc.com/callback/esign/dev'
redirectUrl
:
'
http://test-8timer-pc.youlingrc.com/#/ElecCon/index'
# host: https://openapi.esign.cn
# PROJECT_ID: 4438775940
# PROJECT_SECRET: 7b100813cca2746081c57837855ac5af
...
...
src/main/resources/application-test.yml
View file @
7df05a62
...
...
@@ -141,6 +141,8 @@ config-8timer:
expirationTime
:
3153600000000L
expirationTime_pri
:
600000L
esign
:
# e签宝
callbackUrl
:
'
https://test-8timer-pc.youlingrc.com/callback/esign/dev'
redirectUrl
:
'
http://test-8timer-pc.youlingrc.com/#/ElecCon/index'
# host: https://smlopenapi.esign.cn
# PROJECT_ID: 4438775940
# PROJECT_SECRET: 7b100813cca2746081c57837855ac5af
...
...
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