Commit 7df05a62 by lal

Merge branch 'develop' of develop-gitlab.youlingrc.com:8timerv2/8timerapiv200 into lal

parents 89897b83 05b13cbd
...@@ -2,10 +2,8 @@ package cn.timer.api.bean.clazz; ...@@ -2,10 +2,8 @@ package cn.timer.api.bean.clazz;
import java.util.List; import java.util.List;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;
import javax.persistence.Id; import javax.persistence.Id;
import javax.persistence.Table;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
......
/**
* <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;
}
...@@ -88,6 +88,9 @@ public class QyzxUseRecord extends Model<QyzxUseRecord> { ...@@ -88,6 +88,9 @@ public class QyzxUseRecord extends Model<QyzxUseRecord> {
@ApiModelProperty(value = "创建人 ", example = "") @ApiModelProperty(value = "创建人 ", example = "")
private String createUser; private String createUser;
@ApiModelProperty(value = "使用人手机号 ", example = "") @ApiModelProperty(value = "使用人手机号(短信) ", example = "")
private String userPhone; private String userPhone;
@ApiModelProperty(value = "流程id(合同) ", example = "")
private String flowId;
} }
...@@ -190,6 +190,9 @@ public class YgglMainEmp extends Model<YgglMainEmp> { ...@@ -190,6 +190,9 @@ public class YgglMainEmp extends Model<YgglMainEmp> {
@ApiModelProperty(value="是否企业中心管理员 ",example="0-否 1-主账号 2-子账号") @ApiModelProperty(value="是否企业中心管理员 ",example="0-否 1-主账号 2-子账号")
private Integer isManager; private Integer isManager;
@ApiModelProperty(value="离职前状态 1试用、2正式 ",example="1试用、2正式")
private Integer beforeLeavingSts;
@Transient @Transient
@TableField(exist = false) @TableField(exist = false)
private String workTime;//工龄 private String workTime;//工龄
......
/**
* <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;
}
}
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();
}
}
/**
*
*/
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;
}
}
...@@ -98,7 +98,7 @@ public interface SpmkEnumInterface { ...@@ -98,7 +98,7 @@ public interface SpmkEnumInterface {
*/ */
@Getter @Getter
enum ParticipatorType implements SpmkEnumInterface { enum ParticipatorType implements SpmkEnumInterface {
INITIATOR(0, "发起"), COPY(1, "抄送人"), APPROVER(2, "审批人"); INITIATOR(0, "发起申请"), COPY(1, "抄送人"), APPROVER(2, "审批人");
private Integer type; private Integer type;
private String name; private String name;
......
...@@ -64,7 +64,7 @@ public interface YgEnumInterface { ...@@ -64,7 +64,7 @@ public interface YgEnumInterface {
*/ */
@Getter @Getter
enum YgJobType implements YgEnumInterface { 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, "退休"); WAIBAO(6, "外包"), TUIXIU(7, "退休");
private Integer type; private Integer type;
......
...@@ -11,20 +11,22 @@ import lombok.Getter; ...@@ -11,20 +11,22 @@ import lombok.Getter;
@Getter @Getter
public enum CommonEnum { public enum CommonEnum {
NULL_STR(0,""),
/** /**
* 1 超管理员 * 1 超管理员
*/ */
U_TYPE_ADMIN(1, "超管理员"), U_TYPE_ADMIN(0, "超管理员"),
/** /**
* 2 子管理 * 2 子管理
*/ */
U_TYPE_C_ADMIN(2, "子管理"), U_TYPE_C_ADMIN(1, "子管理"),
/** /**
* 3 普通员工 * 3 普通员工
*/ */
U_TYPE_EMP(3, "普通员工"), U_TYPE_EMP(2, "普通员工"),
/** /**
* 0 关闭 * 0 关闭
......
package cn.timer.api.config.exception; package cn.timer.api.config.exception;
import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -11,8 +12,6 @@ import org.springframework.web.bind.annotation.ExceptionHandler; ...@@ -11,8 +12,6 @@ import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice; import org.springframework.web.bind.annotation.RestControllerAdvice;
import cn.hutool.core.util.StrUtil; 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.aspect.lang.bean.ValidationError;
import cn.timer.api.utils.Result; import cn.timer.api.utils.Result;
import cn.timer.api.utils.ResultUtil; import cn.timer.api.utils.ResultUtil;
...@@ -66,6 +65,15 @@ public class GlobalExceptionHandler { ...@@ -66,6 +65,15 @@ public class GlobalExceptionHandler {
return ResultUtil.error(e.getCode(), e.getMessage()); 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());
}
/** /**
* 自定义验证异常 * 自定义验证异常
*/ */
......
...@@ -38,6 +38,8 @@ import cn.timer.api.bean.zzgl.ZzglAuth; ...@@ -38,6 +38,8 @@ import cn.timer.api.bean.zzgl.ZzglAuth;
import cn.timer.api.bean.zzgl.ZzglBmgwM; import cn.timer.api.bean.zzgl.ZzglBmgwM;
import cn.timer.api.config.annotation.CurrentUser; import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean; 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.config.enums.CommonEnum;
import cn.timer.api.controller.spmk.service.SpmkServiceImpl; import cn.timer.api.controller.spmk.service.SpmkServiceImpl;
import cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper; import cn.timer.api.dao.qyzx.QyzxEmpEntAssoMapper;
...@@ -430,7 +432,7 @@ public class LoginController { ...@@ -430,7 +432,7 @@ public class LoginController {
@ApiOperation(value = "6.注册企业", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "6.注册企业", httpMethod = "POST", notes = "接口发布说明")
@ApiOperationSupport(order = 6) @ApiOperationSupport(order = 6)
@Log(title = "企业注册", businessType = BusinessType.INSERT) @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(); * DefaultTransactionDefinition def = new DefaultTransactionDefinition();
...@@ -473,12 +475,6 @@ public class LoginController { ...@@ -473,12 +475,6 @@ public class LoginController {
if (login == null) { 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)) QyzxEmpLogin qyzxEmpLogin = QyzxEmpLogin.builder().phone(phone).pw(Md5.md5(pw))
.sts(CommonEnum.U_STS_ON.getType()).orgId(qyzxEntInfoM.getId()).regTime(DateUtil.date()) .sts(CommonEnum.U_STS_ON.getType()).orgId(qyzxEntInfoM.getId()).regTime(DateUtil.date())
.build(); .build();
...@@ -489,8 +485,9 @@ public class LoginController { ...@@ -489,8 +485,9 @@ public class LoginController {
} }
} }
boolean b4 = YgglMainEmp.builder().orgCode(qyzxEntInfoM.getId()).empNum(login.getId()).rzTime(new Date()).isManager(1) boolean b4 = YgglMainEmp.builder().orgCode(qyzxEntInfoM.getId()).empNum(login.getId()).rzTime(new Date())
.name(username).jobStatus(1).build().insert(); .isManager(CommonEnum.U_TYPE_ADMIN.getType()).name(username).phone(phone).jobType(YgJobType.QUANZHI.getType()).jobStatus(YgEnumInterface.jobStatus.ZHENSHI.getType())
.build().insert();
if (!b4) { if (!b4) {
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
return ResultUtil.error("注册企业失败3"); return ResultUtil.error("注册企业失败3");
......
...@@ -9,6 +9,7 @@ import java.util.List; ...@@ -9,6 +9,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.UUID; import java.util.UUID;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.DeleteMapping;
...@@ -42,6 +43,7 @@ import cn.timer.api.bean.dzht.DzhtAssoQyzc; ...@@ -42,6 +43,7 @@ import cn.timer.api.bean.dzht.DzhtAssoQyzc;
import cn.timer.api.bean.dzht.DzhtAssoSdgzq; import cn.timer.api.bean.dzht.DzhtAssoSdgzq;
import cn.timer.api.bean.dzht.DzhtAssoTpyz; import cn.timer.api.bean.dzht.DzhtAssoTpyz;
import cn.timer.api.bean.qyzx.businessService.QyzxRemainingQuantity; 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.bean.yggl.YgglMainEmp;
import cn.timer.api.config.annotation.CurrentUser; import cn.timer.api.config.annotation.CurrentUser;
import cn.timer.api.config.annotation.UserBean; import cn.timer.api.config.annotation.UserBean;
...@@ -73,6 +75,12 @@ import io.swagger.annotations.ApiOperation; ...@@ -73,6 +75,12 @@ import io.swagger.annotations.ApiOperation;
@RequestMapping(value = "/dzhtApi", produces = { "application/json" }) @RequestMapping(value = "/dzhtApi", produces = { "application/json" })
public class DzhtController2 { public class DzhtController2 {
@Value("${config-8timer.esign.callbackUrl}")
public String callbackUrl; // 回调地址
@Value("${config-8timer.esign.redirectUrl}")
public String redirectUrl; // 重定向地址
private String getID(Integer empNum) { private String getID(Integer empNum) {
QueryWrapper<DzhtAssoGrzc> queryWrapper = new QueryWrapper<DzhtAssoGrzc>(); QueryWrapper<DzhtAssoGrzc> queryWrapper = new QueryWrapper<DzhtAssoGrzc>();
queryWrapper.eq("emp_num", empNum); queryWrapper.eq("emp_num", empNum);
...@@ -407,12 +415,13 @@ public class DzhtController2 { ...@@ -407,12 +415,13 @@ public class DzhtController2 {
} }
// 创建签署流程 // 创建签署流程
@Transactional
@PostMapping("/signflows") @PostMapping("/signflows")
@ApiOperation(value = "创建签署流程", httpMethod = "POST", notes = "接口发布说明") @ApiOperation(value = "创建签署流程", httpMethod = "POST", notes = "接口发布说明")
public Result<Object> signflows(@CurrentUser UserBean userBean, @RequestBody DzhtAssoCjlc lc) { public Result<Object> signflows(@CurrentUser UserBean userBean, @RequestBody DzhtAssoCjlc lc) {
Integer empNum = userBean.getEmpNum();
Integer orgCode = userBean.getOrgCode(); Integer orgCode = userBean.getOrgCode();
String flowId = null;
QyzxRemainingQuantity quantity = QyzxRemainingQuantity.builder().build().selectOne( QyzxRemainingQuantity quantity = QyzxRemainingQuantity.builder().build().selectOne(
new LambdaQueryWrapper<QyzxRemainingQuantity>().eq(QyzxRemainingQuantity::getOrgCode, orgCode) new LambdaQueryWrapper<QyzxRemainingQuantity>().eq(QyzxRemainingQuantity::getOrgCode, orgCode)
.eq(QyzxRemainingQuantity::getPmid, 2).gt(QyzxRemainingQuantity::getRemainder, 0)); .eq(QyzxRemainingQuantity::getPmid, 2).gt(QyzxRemainingQuantity::getRemainder, 0));
...@@ -434,9 +443,18 @@ public class DzhtController2 { ...@@ -434,9 +443,18 @@ public class DzhtController2 {
// SignFlowStart sfs = new SignFlowStart(null, "测试签署流程开启", null, null, null, // SignFlowStart sfs = new SignFlowStart(null, "测试签署流程开启", null, null, null,
// null, null, cfgInfo); // 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 b = lc.getNoticeType();
String c = lc.getRedirectUrl();
String d = lc.getSignPlatform(); String d = lc.getSignPlatform();
ConfigInfo cfgInfo = new ConfigInfo(a, b, c, d); ConfigInfo cfgInfo = new ConfigInfo(a, b, c, d);
...@@ -460,8 +478,9 @@ public class DzhtController2 { ...@@ -460,8 +478,9 @@ public class DzhtController2 {
try { try {
TokenHelper.getTokenData();// 获取鉴权 TokenHelper.getTokenData();// 获取鉴权
jsonObject = SignHelper.createSignFlow(sfs); jsonObject = SignHelper.createSignFlow(sfs);
lc.setFlowId(jsonObject.getString("flowId")); flowId = jsonObject.getString("flowId");
lc.setCreater(userBean.getEmpNum()); lc.setFlowId(flowId);
lc.setCreater(empNum);
lc.setCreatedTime(new Date()); lc.setCreatedTime(new Date());
lc.setOrgCode(orgCode); lc.setOrgCode(orgCode);
lc.insert(); lc.insert();
...@@ -469,6 +488,28 @@ public class DzhtController2 { ...@@ -469,6 +488,28 @@ public class DzhtController2 {
e1.printStackTrace(); e1.printStackTrace();
return ResultUtil.error(); 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, "创建签署流程成功"); return ResultUtil.data(jsonObject, "创建签署流程成功");
} }
...@@ -877,10 +918,13 @@ public class DzhtController2 { ...@@ -877,10 +918,13 @@ public class DzhtController2 {
try { try {
TokenHelper.getTokenData();// 获取鉴权 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) { } catch (DefineException e) {
// return ResultUtil.error("当前用户非流程发起人, 不能执行催签操作");
e.printStackTrace(); e.printStackTrace();
return ResultUtil.error("当前用户非流程发起人, 不能执行催签操作");
} }
return ResultUtil.success(); return ResultUtil.success();
} }
......
...@@ -426,14 +426,16 @@ public class SignHelper { ...@@ -426,14 +426,16 @@ public class SignHelper {
* @param flowId 创建签署流程时返回的签署流程ID * @param flowId 创建签署流程时返回的签署流程ID
* @throws DefineException * @throws DefineException
* @author 宫清 * @author 宫清
* @return
* @date 2019年7月21日 下午9:27:41 * @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 { throws DefineException {
String param = SignParamUtil.rushsignersParam(accoundId, noticeTypes, rushsignAccountId); String param = SignParamUtil.rushsignersParam(accoundId, noticeTypes, rushsignAccountId);
JSONObject json = HttpHelper.doCommHttp(RequestType.PUT, ConfigConstant.urgeSgin_URL(flowId), param); JSONObject json = HttpHelper.doCommHttp(RequestType.PUT, ConfigConstant.urgeSgin_URL(flowId), param);
JSONHelper.castDataJson(json, Object.class); // JSONHelper.castDataJson(json, Object.class);
return json;
} }
/** /**
......
...@@ -305,9 +305,11 @@ public class QyzxBusinessController { ...@@ -305,9 +305,11 @@ public class QyzxBusinessController {
@GetMapping(value = "/queryContractUseRecord") @GetMapping(value = "/queryContractUseRecord")
@ApiOperation(value = "查询电子合同套餐使用记录", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "查询电子合同套餐使用记录", httpMethod = "GET", notes = "接口发布说明")
public Result<Object> queryContractUseRecord(@CurrentUser UserBean userBean) { public Result<Object> queryContractUseRecord(@CurrentUser UserBean userBean, String orderNo) {
// TODO return ResultUtil.data(QyzxUseRecord.builder().build()
return null; .selectList(new LambdaQueryWrapper<QyzxUseRecord>().eq(QyzxUseRecord::getOrgCode, userBean.getOrgCode())
.eq(QyzxUseRecord::getPmid, 2).eq(orderNo != null, QyzxUseRecord::getOrderNo, orderNo)),
"查询成功");
} }
} }
...@@ -142,25 +142,6 @@ public class QyzxController { ...@@ -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) * 运营管理 企业认证-审核-通过/不通过(weng)
* *
* @param qyzxEntAuth * @param qyzxEntAuth
...@@ -267,10 +248,10 @@ public class QyzxController { ...@@ -267,10 +248,10 @@ public class QyzxController {
@GetMapping(value = "/entlist") @GetMapping(value = "/entlist")
@ApiOperation(value = "企业列表", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "企业列表", httpMethod = "GET", notes = "接口发布说明")
public Result<List<QyzxEntInfoM>> entlist1(@CurrentUser UserBean userBean) { public Result<List<QyzxEntInfoM>> entlist1(@CurrentUser UserBean userBean) {
Integer empNum = userBean.getEmpNum();
QueryWrapper<QyzxEmpEntAsso> queryWrapper = new QueryWrapper<>(); List<Object> orgCodes = qyzxEmpEntAssoMapper.selectObjs(new QueryWrapper<QyzxEmpEntAsso>().lambda()
queryWrapper.select("org_code").eq("emp_num", empNum); .select(QyzxEmpEntAsso::getOrgCode)
List<Object> orgCodes = qyzxEmpEntAssoMapper.selectObjs(queryWrapper); .eq(QyzxEmpEntAsso::getEmpNum, userBean.getEmpNum()));
List<QyzxEntInfoM> qyzxEntInfoMs = new LambdaQueryChainWrapper<QyzxEntInfoM>(qyzxEntInfoMMapper) List<QyzxEntInfoM> qyzxEntInfoMs = new LambdaQueryChainWrapper<QyzxEntInfoM>(qyzxEntInfoMMapper)
.in(CollUtil.isNotEmpty(orgCodes), QyzxEntInfoM::getId, orgCodes).list(); .in(CollUtil.isNotEmpty(orgCodes), QyzxEntInfoM::getId, orgCodes).list();
return ResultUtil.data(qyzxEntInfoMs, "获取企业信息成功"); return ResultUtil.data(qyzxEntInfoMs, "获取企业信息成功");
...@@ -327,56 +308,6 @@ public class QyzxController { ...@@ -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 { ...@@ -438,8 +369,8 @@ public class QyzxController {
.build().insertOrUpdate(); .build().insertOrUpdate();
// 添加或修改服务计算表 // 添加或修改服务计算表
Integer number = qyzxPayServe.getNum(); Integer number = qyzxPayServe.getNum();
QueryWrapper<QyzxAttaFwjsb> queryWrapper = new QueryWrapper<>(); LambdaQueryWrapper<QyzxAttaFwjsb> queryWrapper = new QueryWrapper<QyzxAttaFwjsb>().lambda();
queryWrapper.eq("emp_num", userBean.getEmpNum()).eq("code", code); queryWrapper.eq(QyzxAttaFwjsb::getEmpNum, userBean.getEmpNum()).eq(QyzxAttaFwjsb::getCode, code);
Integer result = QyzxAttaFwjsb.builder().build().selectCount(queryWrapper); Integer result = QyzxAttaFwjsb.builder().build().selectCount(queryWrapper);
if (result != null && result > 0) { if (result != null && result > 0) {
QyzxAttaFwjsb fwjb = QyzxAttaFwjsb.builder().build().selectOne(queryWrapper); QyzxAttaFwjsb fwjb = QyzxAttaFwjsb.builder().build().selectOne(queryWrapper);
...@@ -465,7 +396,7 @@ public class QyzxController { ...@@ -465,7 +396,7 @@ public class QyzxController {
@ApiOperation(value = "查看服务计算", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "查看服务计算", httpMethod = "GET", notes = "接口发布说明")
public Result<List<QyzxAttaFwjsb>> fwjs(@CurrentUser UserBean userBean) { public Result<List<QyzxAttaFwjsb>> fwjs(@CurrentUser UserBean userBean) {
List<QyzxAttaFwjsb> qyzxAttaFpgl = QyzxAttaFwjsb.builder().build() 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, "获取服务计算成功"); return ResultUtil.data(qyzxAttaFpgl, "获取服务计算成功");
} }
...@@ -479,7 +410,7 @@ public class QyzxController { ...@@ -479,7 +410,7 @@ public class QyzxController {
@ApiOperation(value = "获取购买记录", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取购买记录", httpMethod = "GET", notes = "接口发布说明")
public Result<List<QyzxLogBuy>> selectgmjl(@CurrentUser UserBean userBean) { public Result<List<QyzxLogBuy>> selectgmjl(@CurrentUser UserBean userBean) {
List<QyzxLogBuy> qyzxLogBuy = QyzxLogBuy.builder().build() 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, "获取购买记录成功"); return ResultUtil.data(qyzxLogBuy, "获取购买记录成功");
} }
......
...@@ -47,6 +47,7 @@ import cn.timer.api.config.annotation.UserBean; ...@@ -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;
import cn.timer.api.config.enuminterface.SpmkEnumInterface.ApproveSummarySts; import cn.timer.api.config.enuminterface.SpmkEnumInterface.ApproveSummarySts;
import cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecutorSts; 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.exception.CustomException;
import cn.timer.api.config.validation.Ranks; import cn.timer.api.config.validation.Ranks;
import cn.timer.api.config.validation.ValidList; import cn.timer.api.config.validation.ValidList;
...@@ -88,6 +89,8 @@ produces = { "application/json","multipart/form-data" }) ...@@ -88,6 +89,8 @@ produces = { "application/json","multipart/form-data" })
public class SpmkController { public class SpmkController {
@Autowired @Autowired
SpmkServiceImpl spmkService;
@Autowired
private SpmkApprovalTemplateGMapper spmkApprovalTemplateGMapper; private SpmkApprovalTemplateGMapper spmkApprovalTemplateGMapper;
@Autowired @Autowired
private SpmkApprovalTemplateMapper spmkApprovalTemplateMapper; private SpmkApprovalTemplateMapper spmkApprovalTemplateMapper;
...@@ -375,8 +378,6 @@ public class SpmkController { ...@@ -375,8 +378,6 @@ public class SpmkController {
} }
// //
/** /**
* 注意: 为保证该api的原子性 要加 事务处理 回滚(方法注解-@Transactional(rollbackFor = Exception.class)) * 注意: 为保证该api的原子性 要加 事务处理 回滚(方法注解-@Transactional(rollbackFor = Exception.class))
...@@ -408,7 +409,6 @@ public class SpmkController { ...@@ -408,7 +409,6 @@ public class SpmkController {
} }
return ResultUtil.success("操作成功!"); return ResultUtil.success("操作成功!");
} }
/** /**
...@@ -462,7 +462,7 @@ public class SpmkController { ...@@ -462,7 +462,7 @@ public class SpmkController {
listRouter.add(spmkApproveSummaryDto.getRouter()); listRouter.add(spmkApproveSummaryDto.getRouter());
JSONObject jSONObject = spmkApproveSummaryDto.getRequestData() JSONObject jSONObject = spmkApproveSummaryDto.getRequestData()
.set("orgCode", FromData.builder().value(String.valueOf(userBean.getOrgCode())).build()) .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("headUrl", FromData.builder().value(ygglMainEmp.getHeadUrl()).build())
.set("id", FromData.builder().value(StrUtil.toString(userBean.getEmpNum())).build()); .set("id", FromData.builder().value(StrUtil.toString(userBean.getEmpNum())).build());
RouterUtils.NextNode(listRouter, jSONObject, ISFIRST); RouterUtils.NextNode(listRouter, jSONObject, ISFIRST);
...@@ -555,18 +555,7 @@ public class SpmkController { ...@@ -555,18 +555,7 @@ public class SpmkController {
@Log(title = "审批-审批详情", businessType = BusinessType.OTHER) @Log(title = "审批-审批详情", businessType = BusinessType.OTHER)
public Result<Object> selectAd(@PathVariable(required = true) Integer id) { public Result<Object> selectAd(@PathVariable(required = true) Integer id) {
SpmkApproveDetail ad = spmkApproveDetailMapper.selectOne(new QueryWrapper<SpmkApproveDetail>().lambda().eq(SpmkApproveDetail::getApproveSummaryId, id)); SpmkApproveDetailDto adD = spmkService.selectApproveDetailByAsId(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);
return ResultUtil.data(adD, "操作成功!"); return ResultUtil.data(adD, "操作成功!");
} }
...@@ -620,6 +609,7 @@ public class SpmkController { ...@@ -620,6 +609,7 @@ public class SpmkController {
if (aSummary.getSts() == 0) { if (aSummary.getSts() == 0) {
List<FlowChildren> listFlowChildren = ObjectUtil.deserialize(ad.getFlowChildren()); List<FlowChildren> listFlowChildren = ObjectUtil.deserialize(ad.getFlowChildren());
// 审批逻辑
RouterUtils.approving( RouterUtils.approving(
listFlowChildren, listFlowChildren,
approvingDto.getAsId(), approvingDto.getAsId(),
...@@ -641,7 +631,7 @@ public class SpmkController { ...@@ -641,7 +631,7 @@ public class SpmkController {
.eq(SpmkApproveSummary::getId, approvingDto.getAsId())); .eq(SpmkApproveSummary::getId, approvingDto.getAsId()));
if (aSummary.getSts() != SpmkEnumInterface.ApproveSummarySts.REFUSE.ordinal()) { 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 jSONObject = ObjectUtil.deserialize(ad.getRequestData());
jSONObject.set("approveId", approvingDto.getAsId()); jSONObject.set("approveId", approvingDto.getAsId());
...@@ -754,16 +744,13 @@ public class SpmkController { ...@@ -754,16 +744,13 @@ public class SpmkController {
return ResultUtil.data(spmkIcons,"获取图标列表成功"); return ResultUtil.data(spmkIcons,"获取图标列表成功");
} }
@Autowired
SpmkServiceImpl SpmkService;
//TODO 测试-生成 审批组 和 自定义审批 //TODO 测试-生成 审批组 和 自定义审批
@GetMapping(value = "/test") @GetMapping(value = "/test")
@ApiOperation(value = "98.测试-生成 审批组 和 自定义审批", httpMethod = "GET", notes = "测试-生成 审批组 和 自定义审批") @ApiOperation(value = "98.测试-生成 审批组 和 自定义审批", httpMethod = "GET", notes = "测试-生成 审批组 和 自定义审批")
@ApiOperationSupport(order = 98) @ApiOperationSupport(order = 98)
public Result<List<SpmkIcon>> createCustomApproval(@RequestParam Integer orgCode){ public Result<List<SpmkIcon>> createCustomApproval(@RequestParam Integer orgCode){
SpmkService.createCustomApproval(orgCode); spmkService.createCustomApproval(orgCode);
List<SpmkIcon> spmkIcons = SpmkIcon.builder().build().selectAll(); List<SpmkIcon> spmkIcons = SpmkIcon.builder().build().selectAll();
......
package cn.timer.api.controller.spmk.service; package cn.timer.api.controller.spmk.service;
import cn.timer.api.dto.spmk.SpmkApproveDetailDto;
public interface SpmkService { public interface SpmkService {
boolean createCustomApproval(Integer orgCode); boolean createCustomApproval(Integer orgCode);
SpmkApproveDetailDto selectApproveDetailByAsId(Integer asId);
} }
...@@ -10,17 +10,29 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; ...@@ -10,17 +10,29 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.lang.Console; 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.SpmkApprovalG;
import cn.timer.api.bean.spmk.SpmkApprovalTemplate; import cn.timer.api.bean.spmk.SpmkApprovalTemplate;
import cn.timer.api.bean.spmk.SpmkApprovalTemplateG; 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.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.dao.spmk.SpmkCustomApprovalMapper;
import cn.timer.api.dto.spmk.SpmkApproveDetailDto;
@Service @Service
public class SpmkServiceImpl implements SpmkService{ public class SpmkServiceImpl implements SpmkService{
@Autowired @Autowired
SpmkCustomApprovalMapper spmkCustomApprovalMapper; private SpmkCustomApprovalMapper spmkCustomApprovalMapper;
@Autowired
private SpmkApproveDetailMapper spmkApproveDetailMapper;
@Autowired
private SpmkApproveExecuteRecordMapper spmkApproveExecuteRecordMapper;
/** /**
* 根据orgCode查数据库 审批模板 生成 自定义模板 * 根据orgCode查数据库 审批模板 生成 自定义模板
...@@ -62,4 +74,26 @@ public class SpmkServiceImpl implements SpmkService{ ...@@ -62,4 +74,26 @@ public class SpmkServiceImpl implements SpmkService{
return true; 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;
}
} }
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
...@@ -67,7 +67,6 @@ public class AddygdaDto extends Page implements Serializable{ ...@@ -67,7 +67,6 @@ public class AddygdaDto extends Page implements Serializable{
@ApiModelProperty(value="性别 0:男;1:女",example="0") @ApiModelProperty(value="性别 0:男;1:女",example="0")
private Integer sex; private Integer sex;
@NotNull(message = ValidationMsg.NOTNULL)
@ApiModelProperty(value="部门岗位id",example="0") @ApiModelProperty(value="部门岗位id",example="0")
private Integer bmgwId; private Integer bmgwId;
......
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;
}
...@@ -22,6 +22,7 @@ import cn.timer.api.bean.zzgl.ZzglBmgwM; ...@@ -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.ExecuteRecordSts;
import cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecutorSts; import cn.timer.api.config.enuminterface.SpmkEnumInterface.ExecutorSts;
import cn.timer.api.config.enuminterface.SpmkEnumInterface.ParticipatorType; 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.Condition;
import cn.timer.api.dto.spmk.FlowChildren; import cn.timer.api.dto.spmk.FlowChildren;
import cn.timer.api.dto.spmk.FromData; import cn.timer.api.dto.spmk.FromData;
...@@ -36,14 +37,37 @@ import cn.timer.api.dto.spmk.User; ...@@ -36,14 +37,37 @@ import cn.timer.api.dto.spmk.User;
* *
*/ */
public class RouterUtils { public class RouterUtils {
/**
* 0 未执行
*/
private final static String UNEXECUTED = "0"; private final static String UNEXECUTED = "0";
/**
* 1 执行中
*/
private final static String EXECUTING = "1"; private final static String EXECUTING = "1";
/**
* 2 已执行
*/
private final static String EXECUTED = "2"; private final static String EXECUTED = "2";
/**
* creator 抄送人
*/
private final static String CREATOR = "creator"; private final static String CREATOR = "creator";
/**
* audit 审批人
*/
private final static String AUDIT = "audit"; private final static String AUDIT = "audit";
/**
* copy 抄送人
*/
private final static String COPY = "copy"; private final static String COPY = "copy";
/**
* department 部门类型
*/
private final static String RELATION_TYPE_DEPARTMENT = "department"; private final static String RELATION_TYPE_DEPARTMENT = "department";
/**
* users 用户类型
*/
private final static String RELATION_TYPE_USERS = "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 { public static List<Router> NextNode(List<Router> listRouter,JSONObject obj, boolean isFirse) throws NumberFormatException, ConvertException, Exception {
...@@ -76,7 +100,7 @@ public class RouterUtils { ...@@ -76,7 +100,7 @@ public class RouterUtils {
.name(obj.get("initiator",FromData.class).getValue()) .name(obj.get("initiator",FromData.class).getValue())
.id(obj.get("id",FromData.class).getValue()) .id(obj.get("id",FromData.class).getValue())
.headUrl(obj.get("headUrl",FromData.class).getValue()) .headUrl(obj.get("headUrl",FromData.class).getValue())
.execute("0") .execute(UNEXECUTED)
.build(); .build();
users.add(userFirst); users.add(userFirst);
List<Relation> relations = new ArrayList<Relation>(); List<Relation> relations = new ArrayList<Relation>();
...@@ -238,9 +262,8 @@ public class RouterUtils { ...@@ -238,9 +262,8 @@ public class RouterUtils {
public static List<YgglMainEmp> selectOtherlistent(Integer orgCode, Integer id){ public static List<YgglMainEmp> selectOtherlistent(Integer orgCode, Integer id){
ArrayList<Integer> list = new ArrayList<Integer>(); ArrayList<Integer> list = new ArrayList<Integer>();
QueryWrapper<ZzglBmgwM> queryWrapper = new QueryWrapper<ZzglBmgwM>(); List<ZzglBmgwM> zzglBmgwMs = ZzglBmgwM.builder().build().selectList(new QueryWrapper<ZzglBmgwM>().lambda()
queryWrapper.eq("org_code", orgCode); .eq(ZzglBmgwM::getOrgCode, orgCode));
List<ZzglBmgwM> zzglBmgwMs = ZzglBmgwM.builder().build().selectList(queryWrapper);
list.add(id); list.add(id);
ZzglBmgwM.getDepts(list, id, zzglBmgwMs); ZzglBmgwM.getDepts(list, id, zzglBmgwMs);
...@@ -293,13 +316,14 @@ public class RouterUtils { ...@@ -293,13 +316,14 @@ public class RouterUtils {
continue; continue;
} }
// ClassName 区分参与审批流程人的角色 CREATOR(发起人)、AUDIT(审核人)、COPY(抄送人)
// 各个角色的逻辑不同
switch (listFlowChildren.get(i).getClassName()) { switch (listFlowChildren.get(i).getClassName()) {
case CREATOR: case CREATOR:
SpmkApproveExecuteRecord aer = SpmkApproveExecuteRecord SpmkApproveExecuteRecord aer = SpmkApproveExecuteRecord
.builder() .builder()
.approveSummaryId(asId) .approveSummaryId(asId)
.name("发起申请") .name(ParticipatorType.INITIATOR.getName())
.type(ParticipatorType.INITIATOR.ordinal()) .type(ParticipatorType.INITIATOR.ordinal())
.sts(ExecuteRecordSts.AGREE.ordinal()) .sts(ExecuteRecordSts.AGREE.ordinal())
.build(); .build();
...@@ -321,7 +345,7 @@ public class RouterUtils { ...@@ -321,7 +345,7 @@ public class RouterUtils {
SpmkApproveExecuteRecord aer2 = SpmkApproveExecuteRecord SpmkApproveExecuteRecord aer2 = SpmkApproveExecuteRecord
.builder() .builder()
.approveSummaryId(asId) .approveSummaryId(asId)
.name("审批人") .name(ParticipatorType.APPROVER.getName())
.type(ParticipatorType.APPROVER.ordinal()) .type(ParticipatorType.APPROVER.ordinal())
.sts(ExecuteRecordSts.IN_EXECUTION.ordinal()) .sts(ExecuteRecordSts.IN_EXECUTION.ordinal())
.build(); .build();
...@@ -354,7 +378,7 @@ public class RouterUtils { ...@@ -354,7 +378,7 @@ public class RouterUtils {
SpmkApproveExecuteRecord aer3 = SpmkApproveExecuteRecord SpmkApproveExecuteRecord aer3 = SpmkApproveExecuteRecord
.builder() .builder()
.approveSummaryId(asId) .approveSummaryId(asId)
.name("抄送人") .name(ParticipatorType.COPY.getName())
.type(ParticipatorType.COPY.ordinal()) .type(ParticipatorType.COPY.ordinal())
.sts(ExecuteRecordSts.AGREE.ordinal()) .sts(ExecuteRecordSts.AGREE.ordinal())
.build(); .build();
...@@ -423,7 +447,7 @@ public class RouterUtils { ...@@ -423,7 +447,7 @@ public class RouterUtils {
// 0未执行 1执行中 2同意 3拒绝 4 转派 // 0未执行 1执行中 2同意 3拒绝 4 转派
if (sts == ExecutorSts.REFUSE.ordinal()) { 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 SpmkApproveExecuteRecord
.builder() .builder()
.id(executeRecordId) .id(executeRecordId)
...@@ -434,6 +458,7 @@ public class RouterUtils { ...@@ -434,6 +458,7 @@ public class RouterUtils {
listFlowChildren.get(i_user).setExecute(EXECUTED); listFlowChildren.get(i_user).setExecute(EXECUTED);
return; return;
//转派 处理 //转派 处理
//在 原审批人 列表中 插入 一个被转派人(审批人)
}else if (sts == ExecutorSts.REDEPLOY.ordinal()) { }else if (sts == ExecutorSts.REDEPLOY.ordinal()) {
List<User> users1 = CollectionUtil.sub(listUser, 0, i_user+1); List<User> users1 = CollectionUtil.sub(listUser, 0, i_user+1);
users1.add(redeployUser); users1.add(redeployUser);
...@@ -480,8 +505,8 @@ public class RouterUtils { ...@@ -480,8 +505,8 @@ public class RouterUtils {
SpmkApproveExecuteRecord aer = SpmkApproveExecuteRecord SpmkApproveExecuteRecord aer = SpmkApproveExecuteRecord
.builder() .builder()
.approveSummaryId(asId) .approveSummaryId(asId)
.name("发起申请") .name(ParticipatorType.INITIATOR.getName())
.type(0) .type(ParticipatorType.INITIATOR.ordinal())
.sts(ExecuteRecordSts.AGREE.ordinal()) .sts(ExecuteRecordSts.AGREE.ordinal())
.build(); .build();
// 新增 审批执行记录 // 新增 审批执行记录
...@@ -504,7 +529,7 @@ public class RouterUtils { ...@@ -504,7 +529,7 @@ public class RouterUtils {
SpmkApproveExecuteRecord aer2 = SpmkApproveExecuteRecord SpmkApproveExecuteRecord aer2 = SpmkApproveExecuteRecord
.builder() .builder()
.approveSummaryId(asId) .approveSummaryId(asId)
.name("审批人") .name(ParticipatorType.APPROVER.getName())
.type(ParticipatorType.APPROVER.ordinal()) .type(ParticipatorType.APPROVER.ordinal())
.sts(ExecuteRecordSts.IN_EXECUTION.ordinal()) .sts(ExecuteRecordSts.IN_EXECUTION.ordinal())
.build(); .build();
...@@ -530,7 +555,7 @@ public class RouterUtils { ...@@ -530,7 +555,7 @@ public class RouterUtils {
SpmkApproveExecuteRecord aer3 = SpmkApproveExecuteRecord SpmkApproveExecuteRecord aer3 = SpmkApproveExecuteRecord
.builder() .builder()
.approveSummaryId(asId) .approveSummaryId(asId)
.name("抄送人") .name(ParticipatorType.COPY.getName())
.type(ParticipatorType.COPY.ordinal()) .type(ParticipatorType.COPY.ordinal())
.sts(ExecuteRecordSts.AGREE.ordinal()) .sts(ExecuteRecordSts.AGREE.ordinal())
.build(); .build();
......
...@@ -53,7 +53,7 @@ public class EvectionBusiness extends SpmkAssoBusiness { ...@@ -53,7 +53,7 @@ public class EvectionBusiness extends SpmkAssoBusiness {
.evectiontype(1) .evectiontype(1)
.starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm:ss")) .starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm:ss"))
.endtime(DateUtil.getStringTime(endTime, "yyyy-MM-dd HH:mm:ss")) .endtime(DateUtil.getStringTime(endTime, "yyyy-MM-dd HH:mm:ss"))
.duration(Convert.toDouble(longTime)*60D) .duration(Convert.toDouble(longTime))
.build(); .build();
// 调 考勤管理 业务-出差 // 调 考勤管理 业务-出差
......
...@@ -51,7 +51,7 @@ public class GoOutBusiness extends SpmkAssoBusiness { ...@@ -51,7 +51,7 @@ public class GoOutBusiness extends SpmkAssoBusiness {
.evectiontype(2) .evectiontype(2)
.starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm:ss")) .starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm:ss"))
.endtime(DateUtil.getStringTime(endTime, "yyyy-MM-dd HH:mm:ss")) .endtime(DateUtil.getStringTime(endTime, "yyyy-MM-dd HH:mm:ss"))
.duration(Convert.toDouble(longTime)*60D) .duration(Convert.toDouble(longTime))
.build(); .build();
// 调 考勤管理 业务-外出 // 调 考勤管理 业务-外出
......
...@@ -58,7 +58,7 @@ public class LeaveBusiness extends SpmkAssoBusiness { ...@@ -58,7 +58,7 @@ public class LeaveBusiness extends SpmkAssoBusiness {
.leavetype(Convert.toInt(LeaveType)) .leavetype(Convert.toInt(LeaveType))
.starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm:ss")) .starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm:ss"))
.endtime(DateUtil.getStringTime(endTime, "yyyy-MM-dd HH:mm:ss")) .endtime(DateUtil.getStringTime(endTime, "yyyy-MM-dd HH:mm:ss"))
.duration(Convert.toDouble(longTime)*60D) .duration(Convert.toDouble(longTime))
.build(); .build();
// 调 考勤管理 业务-请假 // 调 考勤管理 业务-请假
......
...@@ -42,7 +42,7 @@ public class ReissueACardBusiness extends SpmkAssoBusiness { ...@@ -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 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(); 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 { ...@@ -51,7 +51,7 @@ public class ReissueACardBusiness extends SpmkAssoBusiness {
.builder() .builder()
.repairid(Convert.toInt(approveId)) .repairid(Convert.toInt(approveId))
.cardrepltime(DateUtil.getStringTime(PatchCardTime, "yyyy-MM-dd HH:mm:ss")) .cardrepltime(DateUtil.getStringTime(PatchCardTime, "yyyy-MM-dd HH:mm:ss"))
// .cardreplperiod(Convert.toInt(cardreplperiod)) .cardreplperiod(Convert.toInt(cardreplperiod))
.build(); .build();
// 调 考勤管理 业务-补卡 // 调 考勤管理 业务-补卡
......
...@@ -58,7 +58,7 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness { ...@@ -58,7 +58,7 @@ public class WorkOvertimeBusiness extends SpmkAssoBusiness {
.overtimetype(Convert.toInt(overtimetype)) .overtimetype(Convert.toInt(overtimetype))
.starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm:ss")) .starttime(DateUtil.getStringTime(startTime, "yyyy-MM-dd HH:mm:ss"))
.endtime(DateUtil.getStringTime(endTime, "yyyy-MM-dd HH:mm:ss")) .endtime(DateUtil.getStringTime(endTime, "yyyy-MM-dd HH:mm:ss"))
.duration(Convert.toDouble(timeLong)*60D) .duration(Convert.toDouble(timeLong))
.compensate(Convert.toInt(compensate)) .compensate(Convert.toInt(compensate))
.build(); .build();
......
...@@ -167,6 +167,8 @@ config-8timer: ...@@ -167,6 +167,8 @@ config-8timer:
expirationTime: 3153600000000L expirationTime: 3153600000000L
expirationTime_pri: 600000L expirationTime_pri: 600000L
esign: # e签宝 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 # host: https://smlopenapi.esign.cn
# test: https://smlopenapi.esign.cn # test: https://smlopenapi.esign.cn
# pro: https://openapi.esign.cn # pro: https://openapi.esign.cn
......
...@@ -141,6 +141,8 @@ config-8timer: ...@@ -141,6 +141,8 @@ config-8timer:
expirationTime: 3153600000000L expirationTime: 3153600000000L
expirationTime_pri: 600000L expirationTime_pri: 600000L
esign: # e签宝 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 # host: https://openapi.esign.cn
# PROJECT_ID: 4438775940 # PROJECT_ID: 4438775940
# PROJECT_SECRET: 7b100813cca2746081c57837855ac5af # PROJECT_SECRET: 7b100813cca2746081c57837855ac5af
......
...@@ -141,6 +141,8 @@ config-8timer: ...@@ -141,6 +141,8 @@ config-8timer:
expirationTime: 3153600000000L expirationTime: 3153600000000L
expirationTime_pri: 600000L expirationTime_pri: 600000L
esign: # e签宝 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 # host: https://smlopenapi.esign.cn
# PROJECT_ID: 4438775940 # PROJECT_ID: 4438775940
# PROJECT_SECRET: 7b100813cca2746081c57837855ac5af # PROJECT_SECRET: 7b100813cca2746081c57837855ac5af
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment