Commit 08f1dec6 authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/MVP1.7.16' into MVP1.7.16

parents 5e39085b a5fee1c2
...@@ -365,6 +365,115 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable { ...@@ -365,6 +365,115 @@ public class TDispatchInfoPreVo extends RowIndex implements Serializable {
@Schema(description = "工伤基数") @Schema(description = "工伤基数")
@ExcelProperty("工伤基数") @ExcelProperty("工伤基数")
private BigDecimal workInjuryCardinal; private BigDecimal workInjuryCardinal;
/**
* 养老基数上限
*/
@ExcelAttribute(name = "养老基数上限")
@Schema(description = "养老基数上限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养老基数上限")
private BigDecimal upPersion;
/**
* 医疗基数上限
*/
@ExcelAttribute(name = "医疗基数上限")
@Schema(description = "医疗基数上限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医疗基数上限")
private BigDecimal upMedical;
/**
* 失业基数上限
*/
@ExcelAttribute(name = "失业基数上限")
@Schema(description = "失业基数上限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("失业基数上限")
private BigDecimal upUnemployment;
/**
* 工伤基数上限
*/
@ExcelAttribute(name = "工伤基数上限")
@Schema(description = "工伤基数上限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("工伤基数上限")
private BigDecimal upInjury;
/**
* 生育基数上限
*/
@ExcelAttribute(name = "生育基数上限")
@Schema(description = "生育基数上限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("生育基数上限")
private BigDecimal upBirth;
/**
* 大病基数上限
*/
@ExcelAttribute(name = "大病基数上限")
@Schema(description = "大病基数上限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("大病基数上限")
private BigDecimal upBig;
/**
* 养老基数下限
*/
@ExcelAttribute(name = "养老基数下限")
@Schema(description = "养老基数下限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养老基数下限")
private BigDecimal lowerPersion;
/**
* 医疗基数下限
*/
@ExcelAttribute(name = "医疗基数下限")
@Schema(description = "医疗基数下限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医疗基数下限")
private BigDecimal lowerMedical;
/**
* 失业基数下限
*/
@ExcelAttribute(name = "失业基数下限")
@Schema(description = "失业基数下限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("失业基数下限")
private BigDecimal lowerUnemployment;
/**
* 工伤基数下限
*/
@ExcelAttribute(name = "工伤基数下限")
@Schema(description = "工伤基数下限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("工伤基数下限")
private BigDecimal lowerInjury;
/**
* 生育基数下限
*/
@ExcelAttribute(name = "生育基数下限")
@Schema(description = "生育基数下限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("生育基数下限")
private BigDecimal lowerBirth;
/**
* 大病基数下限
*/
@ExcelAttribute(name = "大病基数下限")
@Schema(description = "大病基数下限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("大病基数下限")
private BigDecimal lowerBig;
/** /**
* 生育基数 * 生育基数
*/ */
......
...@@ -2,23 +2,19 @@ package com.yifu.cloud.plus.v1.yifu.archives.controller; ...@@ -2,23 +2,19 @@ package com.yifu.cloud.plus.v1.yifu.archives.controller;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.fadada.api.utils.crypt.FddCryptUtil; import com.fadada.api.utils.crypt.FddCryptUtil;
import com.fasc.open.api.constants.RequestConstants; import com.fasc.open.api.constants.RequestConstants;
import com.fasc.open.api.exception.ApiException; import com.fasc.open.api.exception.ApiException;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysUser;
import com.yifu.cloud.plus.v1.yifu.archives.config.FascConfig; import com.yifu.cloud.plus.v1.yifu.archives.config.FascConfig;
import com.yifu.cloud.plus.v1.yifu.archives.config.WxConfig; import com.yifu.cloud.plus.v1.yifu.archives.entity.TFascPushLog;
import com.yifu.cloud.plus.v1.yifu.archives.entity.*; import com.yifu.cloud.plus.v1.yifu.archives.service.FascService;
import com.yifu.cloud.plus.v1.yifu.archives.service.*; import com.yifu.cloud.plus.v1.yifu.archives.service.TFascPushLogService;
import com.yifu.cloud.plus.v1.yifu.archives.utils.DoFascTask; import com.yifu.cloud.plus.v1.yifu.archives.utils.DoFascTask;
import com.yifu.cloud.plus.v1.yifu.archives.utils.DoJointTask;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser; import com.yifu.cloud.plus.v1.yifu.common.core.vo.YifuUser;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.UpmsDaprUtils;
import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner; import com.yifu.cloud.plus.v1.yifu.common.security.annotation.Inner;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
...@@ -29,7 +25,6 @@ import org.springframework.context.annotation.Lazy; ...@@ -29,7 +25,6 @@ import org.springframework.context.annotation.Lazy;
import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils; import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -50,26 +45,15 @@ public class FascController { ...@@ -50,26 +45,15 @@ public class FascController {
@Autowired @Autowired
private FascConfig fascConfig; private FascConfig fascConfig;
@Autowired
private WxConfig wxConfig;
@Autowired
private UpmsDaprUtils upmsDaprUtils;
@Autowired @Autowired
@Lazy @Lazy
private DoFascTask doFascTask; private DoFascTask doFascTask;
private final TFascPushLogService tFascPushLogService; private final TFascPushLogService tFascPushLogService;
private final TEmployeeContractPreService tEmployeeContractPreService;
private final TEmployeeContractInfoService tEmployeeContractInfoService;
private final TEmployeeContractAuditService tEmployeeContractAuditService;
private final TContractAutoLogService contractAutoLogService;
private static String FASC_EVENT = "X-FASC-Event"; private static String FASC_EVENT = "X-FASC-Event";
private static String FASC_BIZ_CONTENT = "bizContent"; private static String FASC_BIZ_CONTENT = "bizContent";
private static String FASC_SUCCESS = "success"; private static String FASC_SUCCESS = "success";
private static String FASC_BIZ_CONTENT_STR = ";fddBizContent:";
/** /**
* @Description: 获取模板 * @Description: 获取模板
...@@ -159,7 +143,7 @@ public class FascController { ...@@ -159,7 +143,7 @@ public class FascController {
@Operation(description = "获取附件") @Operation(description = "获取附件")
@GetMapping("/getFileByRequestId") @GetMapping("/getFileByRequestId")
public R<String> getFileByRequestId(@RequestParam String id) throws ApiException { public R<String> getFileByRequestId(@RequestParam String id) throws ApiException {
boolean flag = fascService.getFileByRequestId(id); fascService.getFileByRequestId(id);
return R.ok(); return R.ok();
} }
...@@ -173,7 +157,7 @@ public class FascController { ...@@ -173,7 +157,7 @@ public class FascController {
true, true,
"1", authorities, "1", "1", authorities, "1",
null, null, null, null,
null,null); null, null);
} }
@Operation(summary = "异步通知", description = "异步通知") @Operation(summary = "异步通知", description = "异步通知")
...@@ -202,159 +186,17 @@ public class FascController { ...@@ -202,159 +186,17 @@ public class FascController {
// 原因 // 原因
String terminationNote = jsonObject.getString("terminationNote"); String terminationNote = jsonObject.getString("terminationNote");
// 操作人 // 操作人
String userName = jsonObject.getString("userName"); //String userName = jsonObject.getString("userName")
// 异步执行: // 异步执行:
doFascTask.doFascOkCore(pushLog, fddEvent, fddBizContent, signTaskId, terminationNote); doFascTask.doFascOkCore(pushLog, fddEvent, fddBizContent, signTaskId, terminationNote);
/*YifuUser user = getNewYifuUser();
pushLog.setTypeKey("fddEvent:"+ fddEvent);
pushLog.setReturnData("初始无事件:fddEvent:" + fddEvent + "fddBizContent:" + fddBizContent);
if (Common.isNotNull(signTaskId)) {
// 根据requestId获取信息:
TEmployeeContractPre pre = tEmployeeContractPreService.getOne(Wrappers.<TEmployeeContractPre>query().lambda()
.eq(TEmployeeContractPre::getRequestId, signTaskId).last(CommonConstants.LAST_ONE_SQL));
if (pre != null && Common.isNotNull(pre.getProcessStatus()) && !pre.getProcessStatus().equals(CommonConstants.dingleDigitStrArray[9])) {
TEmployeeContractInfo contractInfo = null;
if (Common.isNotNull(pre.getContractId())) {
//如果存在合同申请审核数据,将状态更新成待提交
contractInfo = tEmployeeContractInfoService.getById(pre.getContractId());
}
if (contractInfo != null) {
if (fddEvent.equals("sign-task-finished")) {
// 1:签署任务完成事件
// 8电子待归档
pre.setProcessStatus(CommonConstants.dingleDigitStrArray[8]);
// 加日志
this.saveAuditLogSuccess(pre, "签署成功");
// 尝试获取归档文件
boolean flag = fascService.getFileByRequestId(pre.getId());
contractInfo.setAuditStatus(CommonConstants.TWO_INT);
// 传了false,就不要审核日志
tEmployeeContractInfoService.auditContract(contractInfo, user, false);
if (flag) {
// 加日志
this.saveAuditLogSuccess(pre, "归档成功");
pre.setProcessStatus(CommonConstants.dingleDigitStrArray[9]);
contractInfo.setIsFile(CommonConstants.ZERO_STRING);
contractInfo.setContractNo(pre.getRequestId());
tEmployeeContractInfoService.updateById(contractInfo);
//瓜子项目编码:皖A694302
if (CommonConstants.GZ_DEPT_NO.equals(contractInfo.getDeptNo())) {
//合同归档瓜子合同状态更新已归档
tEmployeeContractInfoService.updateGzOfferStatus(contractInfo,CommonConstants.EIGHT_STRING,CommonConstants.NINETY_NINE,user.getId(),user.getNickname());
}
}
tEmployeeContractPreService.updateById(pre);
pushLog.setReturnData("签署任务完成事件:fddEvent:" + fddEvent + FASC_BIZ_CONTENT_STR + fddBizContent);
} else if (fddEvent.equals("sign-task-canceled") || fddEvent.equals("sign-task-abolish")) {
// 2:签署任务撤销事件 || 4:签署任务作废事件
if (fddEvent.equals("sign-task-canceled")) {
// 4:签署任务作废事件
pushLog.setReturnData("签署任务撤销事件:fddEvent:" + fddEvent + FASC_BIZ_CONTENT_STR + fddBizContent);
} else {
// 4:签署任务作废事件
pushLog.setReturnData("签署任务作废事件:fddEvent:" + fddEvent + FASC_BIZ_CONTENT_STR + fddBizContent);
}
//电子待归档、线下签待归档、已完结的不能撤销签署
if (Common.isNotNull(pre) && !CommonConstants.NINE_STRING.equals(pre.getProcessStatus()) &&
!CommonConstants.FOUR_STRING.equals(pre.getProcessStatus()) &&
!CommonConstants.EIGHT_STRING.equals(pre.getProcessStatus())) {
//如果不是待确认和待发起,需要记录操作记录
if (!CommonConstants.ZERO_STRING.equals(pre.getProcessStatus()) &&
!CommonConstants.ONE_STRING.equals(pre.getProcessStatus()) &&
Common.isNotNull(pre.getContractId())) {
// 加日志
this.saveAuditLogFail(pre, "撤销签署", terminationNote);
}
pre.setProcessStatus(CommonConstants.TEN_STRING);
pre.setSignFlag(CommonConstants.ZERO_STRING);
pre.setRevokeReason(terminationNote);
tEmployeeContractPreService.updateById(pre);
}
//如果存在合同申请审核数据,将状态更新成待提交
contractInfo.setAuditStatus(CommonConstants.ZERO_INT);
contractInfo.setInUse(CommonConstants.ONE_STRING);
tEmployeeContractInfoService.updateById(contractInfo);
} else if (fddEvent.equals("sign-task-sign-failed")
|| fddEvent.equals("sign-task-sign-rejected")
|| fddEvent.equals("sign-task-ignore")
|| fddEvent.equals("sign-task-fill-rejected")) {
// 3:签署任务参与方签署失败事件
pre.setProcessStatus(CommonConstants.dingleDigitStrArray[7]);
pre.setRequestId("");
tEmployeeContractPreService.updateById(pre);
//如果存在合同申请审核数据,将状态更新成待提交
contractInfo.setAuditStatus(CommonConstants.ZERO_INT);
contractInfo.setInUse(CommonConstants.ONE_STRING);
tEmployeeContractInfoService.updateById(contractInfo);
UUID uuid = UUID.randomUUID();
//生成快照数据
TContractAutoLog contractAutoLog = new TContractAutoLog();
contractAutoLog.setContractId(uuid.toString());
contractAutoLog.setEmpName(pre.getEmployeeName());
contractAutoLog.setEmpIdcard(pre.getEmpIdcard());
contractAutoLog.setPhone(pre.getEmpPhone());
contractAutoLog.setMainId(pre.getId());
contractAutoLog.setErrorInfo(null== terminationNote ? "法大大签署失败" : terminationNote);
contractAutoLogService.save(contractAutoLog);
//签署失败发送企微消息
sendFddFalureInfoToWx(pre,contractAutoLog.getId());
// 加日志
this.saveAuditLogFail(pre, "签署失败", terminationNote);
pushLog.setReturnData("签署任务参与方签署失败事件:fddEvent:" + fddEvent + FASC_BIZ_CONTENT_STR + fddBizContent);
}
}
}
}
tFascPushLogService.updateById(pushLog);*/
return R.ok(null, FASC_SUCCESS); return R.ok(null, FASC_SUCCESS);
} }
return R.ok(null, FASC_SUCCESS); return R.ok(null, FASC_SUCCESS);
} }
// 加合同里的流程进展明细的日志——成功
public void saveAuditLogSuccess(TEmployeeContractPre tEmployeeContractPre, String rootName) {
// 加流程进展明细
if (tEmployeeContractPre != null && Common.isNotNull(tEmployeeContractPre.getContractId())) {
this.saveAuditLogInfo(tEmployeeContractPre.getContractId(), rootName, null);
}
}
// 加合同里的流程进展明细的日志——失败
public void saveAuditLogFail(TEmployeeContractPre tEmployeeContractPre, String rootName, String remark) {
// 加流程进展明细
if (tEmployeeContractPre != null && Common.isNotNull(tEmployeeContractPre.getContractId())) {
this.saveAuditLogInfo(tEmployeeContractPre.getContractId(), rootName, remark);
}
}
// 加合同里的流程进展明细的日志
public void saveAuditLogInfo(String contractId, String rootName, String remark) {
// 加流程进展明细
if (Common.isNotNull(contractId)) {
TEmployeeContractAudit audit = new TEmployeeContractAudit();
audit.setRootName(rootName);
audit.setLinkId(contractId);
audit.setLinkType(CommonConstants.ONE_INT);
if (Common.isNotNull(remark)) {
audit.setRemark(remark);
}
audit.setCreateBy("1");
audit.setCreateName("法大大电子签");
tEmployeeContractAuditService.save(audit);
}
}
//验证签名,返回true表示失败 //验证签名,返回true表示失败
public boolean checkSign(HttpServletRequest request, TFascPushLog pushLog) throws Exception { public boolean checkSign(HttpServletRequest request, TFascPushLog pushLog) throws Exception {
...@@ -382,48 +224,4 @@ public class FascController { ...@@ -382,48 +224,4 @@ public class FascController {
return true; return true;
} }
/**
* 发送法大大失败提醒通知到企微
* @param pre 合同待购买
*/
private void sendFddFalureInfoToWx(TEmployeeContractPre pre,String id) {
//获取前端客服
SysUser user;
if (Common.isEmpty(pre.getCustomerUserLoginname())) {
return;
}
R<SysUser> res = upmsDaprUtils.getSimpleUserByLoginName(pre.getCustomerUserLoginname());
if (Common.isNotNull(res) && Common.isNotNull(res.getData())) {
user = res.getData();
} else {
return;
}
StringBuilder sendUser = null;
if (Common.isNotKong(user.getWxMessage())) {
sendUser = new StringBuilder(user.getWxMessage());
}
if (sendUser != null) {
RestTemplate restTemplate = new RestTemplate();
Map<String, Object> requestMap = new HashMap<>();
Map<String, Object> textcard = new HashMap<>();
String authUrl = String.format(SecurityConstants.WX_GET_MESSAGE_AUTH_URL, wxConfig.getCorpid()
, wxConfig.getDomainName() + "/auth/oauth/wxLogin", "72" + id);
StringBuilder description = new StringBuilder();
String title = "作业自动化——电子合同签署失败提醒";
description.append(pre.getEmployeeName() + "-" + pre.getEmpIdcard()+ "-" + pre.getEmpPhone() +
",电子合同签署失败").append("<br>");
description.append("请及时处理,以免产生用工风险!").append("<br>");
textcard.put("title", title);
textcard.put("url", authUrl);
textcard.put("description", description.toString());
requestMap.put("touser", sendUser);
requestMap.put("agentid", wxConfig.getAgentid());
requestMap.put("msgtype", "textcard");
requestMap.put("textcard", textcard);
// 必须加上header说明
if (!wxConfig.sendTextCard(restTemplate, requestMap)) {
wxConfig.sendTextCard(restTemplate, requestMap);
}
}
}
} }
...@@ -1455,13 +1455,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr ...@@ -1455,13 +1455,8 @@ public class TEmployeeContractInfoServiceImpl extends ServiceImpl<TEmployeeContr
} else { } else {
insert.setEmpId(project.getEmpId()); insert.setEmpId(project.getEmpId());
insert.setSettleDomain(project.getDeptId()); insert.setSettleDomain(project.getDeptId());
//电子签更新为签署中
if (Common.isNotNull(insert.getSignType()) && "0".equals(insert.getSignType())) {
insert.setAuditStatus(CommonConstants.FOUR_INT);
} else {
// 批量直接待审核 // 批量直接待审核
insert.setAuditStatus(CommonConstants.ONE_INT); insert.setAuditStatus(CommonConstants.ONE_INT);
}
if (Common.isEmpty(insert.getContractTerm()) if (Common.isEmpty(insert.getContractTerm())
&& Common.isNotNull(insert.getContractStart()) && Common.isNotNull(insert.getContractStart())
&& Common.isNotNull(insert.getContractEnd())) { && Common.isNotNull(insert.getContractEnd())) {
......
...@@ -649,7 +649,7 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra ...@@ -649,7 +649,7 @@ public class TEmployeeContractPreServiceImpl extends ServiceImpl<TEmployeeContra
.eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT) .eq(TEmployeeContractInfo::getDeleteFlag, CommonConstants.ZERO_INT)
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
if (Common.isNotNull(contractInfo)) { if (Common.isNotNull(contractInfo)) {
contractInfo.setAuditStatus(CommonConstants.ZERO_INT); contractInfo.setAuditStatus(CommonConstants.FIVE_INT);
contractInfo.setInUse(CommonConstants.ONE_STRING); contractInfo.setInUse(CommonConstants.ONE_STRING);
contractInfoService.updateById(contractInfo); contractInfoService.updateById(contractInfo);
} }
......
...@@ -131,8 +131,8 @@ public class DoFascTask { ...@@ -131,8 +131,8 @@ public class DoFascTask {
pre.setRevokeReason(terminationNote); pre.setRevokeReason(terminationNote);
tEmployeeContractPreService.updateById(pre); tEmployeeContractPreService.updateById(pre);
} }
//如果存在合同申请审核数据,将状态更新成待提交 //如果存在合同申请审核数据,将状态更新成5撤销签署
contractInfo.setAuditStatus(CommonConstants.ZERO_INT); contractInfo.setAuditStatus(CommonConstants.FIVE_INT);
contractInfo.setInUse(CommonConstants.ONE_STRING); contractInfo.setInUse(CommonConstants.ONE_STRING);
tEmployeeContractInfoService.updateById(contractInfo); tEmployeeContractInfoService.updateById(contractInfo);
} else if (fddEvent.equals("sign-task-sign-failed") } else if (fddEvent.equals("sign-task-sign-failed")
...@@ -144,8 +144,8 @@ public class DoFascTask { ...@@ -144,8 +144,8 @@ public class DoFascTask {
pre.setRequestId(""); pre.setRequestId("");
tEmployeeContractPreService.updateById(pre); tEmployeeContractPreService.updateById(pre);
//如果存在合同申请审核数据,将状态更新成待提交 //如果存在合同申请审核数据,将状态更新成6签署失败
contractInfo.setAuditStatus(CommonConstants.ZERO_INT); contractInfo.setAuditStatus(CommonConstants.SIX_INT);
contractInfo.setInUse(CommonConstants.ONE_STRING); contractInfo.setInUse(CommonConstants.ONE_STRING);
tEmployeeContractInfoService.updateById(contractInfo); tEmployeeContractInfoService.updateById(contractInfo);
......
...@@ -383,7 +383,7 @@ ...@@ -383,7 +383,7 @@
null changeContractAndEmployee, null changeContractAndEmployee,
if(a.TRY_PERIOD = '' or a.TRY_PERIOD is null,'无',a.TRY_PERIOD) as tryPeriod, if(a.TRY_PERIOD = '' or a.TRY_PERIOD is null,'无',a.TRY_PERIOD) as tryPeriod,
a.id preId, a.id preId,
if(#{type} = '1',concat('手动签署-',a.customer_username),concat('自动化签署-',a.customer_username)) preName if(#{type} = '1',concat('自动化手动-',a.customer_username),concat('自动化自动-',a.customer_username)) preName
FROM t_employee_contract_pre a,(select @i:=0) as itable FROM t_employee_contract_pre a,(select @i:=0) as itable
<where> <where>
1=1 1=1
......
...@@ -1739,6 +1739,12 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr ...@@ -1739,6 +1739,12 @@ public class EmployeeRegistrationServiceImpl extends ServiceImpl<EmployeeRegistr
preVo.setDispatchItem("养老、医疗、生育、失业、工伤、大病"); preVo.setDispatchItem("养老、医疗、生育、失业、工伤、大病");
if (CommonConstants.ZERO_STRING.equals(preVo.getIsCreateDate()) && Common.isEmpty(preVo.getSocialStartDate())) { if (CommonConstants.ZERO_STRING.equals(preVo.getIsCreateDate()) && Common.isEmpty(preVo.getSocialStartDate())) {
preVo.setBigailmentStart(registration.getJoinLeaveDate());
preVo.setPensionStart(registration.getJoinLeaveDate());
preVo.setMedicalStart(registration.getJoinLeaveDate());
preVo.setBirthStart(registration.getJoinLeaveDate());
preVo.setWorkInjuryStart(registration.getJoinLeaveDate());
preVo.setUnemployStart(registration.getJoinLeaveDate());
preVo.setSocialStartDate(registration.getJoinLeaveDate()); preVo.setSocialStartDate(registration.getJoinLeaveDate());
} }
//如果自动触发派增为是,计算派单发起时间和派单确认时间 //如果自动触发派增为是,计算派单发起时间和派单确认时间
......
...@@ -383,6 +383,115 @@ public class TDispatchInfoPre extends BaseEntity { ...@@ -383,6 +383,115 @@ public class TDispatchInfoPre extends BaseEntity {
@ExcelProperty("生育基数") @ExcelProperty("生育基数")
@Schema(description = "生育基数") @Schema(description = "生育基数")
private BigDecimal birthCardinal; private BigDecimal birthCardinal;
/**
* 养老基数上限
*/
@ExcelAttribute(name = "养老基数上限")
@Schema(description = "养老基数上限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养老基数上限")
private BigDecimal upPersion;
/**
* 医疗基数上限
*/
@ExcelAttribute(name = "医疗基数上限")
@Schema(description = "医疗基数上限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医疗基数上限")
private BigDecimal upMedical;
/**
* 失业基数上限
*/
@ExcelAttribute(name = "失业基数上限")
@Schema(description = "失业基数上限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("失业基数上限")
private BigDecimal upUnemployment;
/**
* 工伤基数上限
*/
@ExcelAttribute(name = "工伤基数上限")
@Schema(description = "工伤基数上限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("工伤基数上限")
private BigDecimal upInjury;
/**
* 生育基数上限
*/
@ExcelAttribute(name = "生育基数上限")
@Schema(description = "生育基数上限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("生育基数上限")
private BigDecimal upBirth;
/**
* 大病基数上限
*/
@ExcelAttribute(name = "大病基数上限")
@Schema(description = "大病基数上限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("大病基数上限")
private BigDecimal upBig;
/**
* 养老基数下限
*/
@ExcelAttribute(name = "养老基数下限")
@Schema(description = "养老基数下限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("养老基数下限")
private BigDecimal lowerPersion;
/**
* 医疗基数下限
*/
@ExcelAttribute(name = "医疗基数下限")
@Schema(description = "医疗基数下限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("医疗基数下限")
private BigDecimal lowerMedical;
/**
* 失业基数下限
*/
@ExcelAttribute(name = "失业基数下限")
@Schema(description = "失业基数下限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("失业基数下限")
private BigDecimal lowerUnemployment;
/**
* 工伤基数下限
*/
@ExcelAttribute(name = "工伤基数下限")
@Schema(description = "工伤基数下限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("工伤基数下限")
private BigDecimal lowerInjury;
/**
* 生育基数下限
*/
@ExcelAttribute(name = "生育基数下限")
@Schema(description = "生育基数下限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("生育基数下限")
private BigDecimal lowerBirth;
/**
* 大病基数下限
*/
@ExcelAttribute(name = "大病基数下限")
@Schema(description = "大病基数下限")
@HeadFontStyle(fontHeightInPoints = 11)
@ExcelProperty("大病基数下限")
private BigDecimal lowerBig;
/** /**
* 缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳) * 缴纳类型(0最低缴纳、1自定义缴纳、2最高缴纳)
*/ */
......
...@@ -60,4 +60,7 @@ public class TDispatchInfoPreSearchVo extends TDispatchInfoPre { ...@@ -60,4 +60,7 @@ public class TDispatchInfoPreSearchVo extends TDispatchInfoPre {
@Schema(description = "自动标识 1不查询确认时间为空的数据") @Schema(description = "自动标识 1不查询确认时间为空的数据")
private String autoSendFlag; private String autoSendFlag;
@Schema(description = "自动标识 1查询派单时间为空或者当天之前的数据")
private String timeSendFlag;
} }
...@@ -175,34 +175,47 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -175,34 +175,47 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
.eq(TSocialPreDetail::getRegisterId, registrationPreVo.getExitSocialInfoList() .eq(TSocialPreDetail::getRegisterId, registrationPreVo.getExitSocialInfoList()
.get(0).getRegisterId())); .get(0).getRegisterId()));
//批量新增 //批量新增
for (TSocialPreDetailVo vo :registrationPreVo.getExitSocialInfoList()) { for (TSocialPreDetailVo vo : registrationPreVo.getExitSocialInfoList()) {
TSocialPreDetail preDetal = new TSocialPreDetail(); TSocialPreDetail preDetal = new TSocialPreDetail();
BeanUtils.copyProperties(vo, preDetal); BeanUtils.copyProperties(vo, preDetal);
socialPreDetailService.save(preDetal); socialPreDetailService.save(preDetal);
} }
//批量删除社保待购买列表中的待确认、待派单、派单失败、审核、办理失败的数据 //批量删除社保待购买列表中的待确认、待派单、派单失败、审核、办理失败的数据
baseMapper.delete(Wrappers.<TDispatchInfoPre>query().lambda().in( baseMapper.delete(Wrappers.<TDispatchInfoPre>query().lambda().in(
TDispatchInfoPre::getProcessStatus,Arrays.asList("0", "1", "2", "4","8")) TDispatchInfoPre::getProcessStatus, Arrays.asList("0", "1", "2", "4", "8"))
.eq(TDispatchInfoPre::getRegisterId,registrationPreVo.getExitSocialInfoList() .eq(TDispatchInfoPre::getRegisterId, registrationPreVo.getExitSocialInfoList()
.get(0).getRegisterId())); .get(0).getRegisterId()));
} else { } else {
//删除已存在的入职确认信息对应的社保明细 //删除已存在的入职确认信息对应的社保明细
TDispatchInfoPreVo preVo = registrationPreVo.getDispatchInfoPreVo(); TDispatchInfoPreVo preVo = registrationPreVo.getDispatchInfoPreVo();
socialPreDetailService.remove(Wrappers.<TSocialPreDetail>lambdaQuery() socialPreDetailService.remove(Wrappers.<TSocialPreDetail>lambdaQuery()
.eq(TSocialPreDetail::getRegisterId, preVo.getRegisterId())); .eq(TSocialPreDetail::getRegisterId, preVo.getRegisterId()));
if (Common.isNotNull(preVo) && Common.isNotNull(preVo.getId())) {
//更新逻辑
TDispatchInfoPre pre = new TDispatchInfoPre();
BeanUtils.copyProperties(preVo, pre);
baseMapper.updateById(pre);
}
if (Common.isNotNull(preVo) && Common.isEmpty(preVo.getId())) {
try { try {
// if (Common.isNotNull(preVo) && Common.isNotNull(preVo.getId())) {
// //更新逻辑
// TDispatchInfoPre pre = new TDispatchInfoPre();
// BeanUtils.copyProperties(preVo, pre);
// //时间格式转化
// if (Common.isNotNull(preVo.getExpectedCollectionTime())) {
// preVo.setExpectedCollectionTime(DateUtil.parseDate(DateUtil.dateToString(
// preVo.getExpectedCollectionTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT) + " 15:20", DateUtil.DATETIME_PATTERN_MINUTE));
// pre.setExpectedCollectionTime(LocalDateTimeUtils.dateToLocalDateTime(preVo.getExpectedCollectionTime()));
// }
// if (Common.isNotNull(preVo.getExpectedConfirmTime())) {
// preVo.setExpectedConfirmTime(DateUtil.parseDate(DateUtil.dateToString(
// preVo.getExpectedCollectionTime(), DateUtil.ISO_EXPANDED_DATE_FORMAT) + " 09:00", DateUtil.DATETIME_PATTERN_MINUTE));
// pre.setExpectedConfirmTime(LocalDateTimeUtils.dateToLocalDateTime(preVo.getExpectedConfirmTime()));
// }
// baseMapper.updateById(pre);
// }
if (Common.isNotNull(preVo)
// && Common.isEmpty(preVo.getId())
) {
//判断是否存在社保待购买信息 //判断是否存在社保待购买信息
TDispatchInfoPre preExit = baseMapper.selectOne(Wrappers.<TDispatchInfoPre>query().lambda() TDispatchInfoPre preExit = baseMapper.selectOne(Wrappers.<TDispatchInfoPre>query().lambda()
.eq(TDispatchInfoPre::getRegisterId, preVo.getRegisterId()) .eq(TDispatchInfoPre::getRegisterId, preVo.getRegisterId())
.eq(TDispatchInfoPre::getEmpIdcard, preVo.getEmpIdcard()) .eq(TDispatchInfoPre::getEmpIdcard, preVo.getEmpIdcard())
.in(TDispatchInfoPre::getProcessStatus, Arrays.asList("0", "1", "2", "4","8")) .in(TDispatchInfoPre::getProcessStatus, Arrays.asList("0", "1", "2", "4", "8"))
.last(CommonConstants.LAST_ONE_SQL)); .last(CommonConstants.LAST_ONE_SQL));
TDispatchInfoPre pre = new TDispatchInfoPre(); TDispatchInfoPre pre = new TDispatchInfoPre();
BeanUtils.copyProperties(preVo, pre); BeanUtils.copyProperties(preVo, pre);
...@@ -252,12 +265,12 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -252,12 +265,12 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
baseMapper.deleteById(preExit); baseMapper.deleteById(preExit);
} }
baseMapper.insert(pre); baseMapper.insert(pre);
}
} catch (Exception e) { } catch (Exception e) {
log.error("执行异常", e); log.error("执行异常", e);
return false; return false;
} }
} }
}
return true; return true;
} }
...@@ -575,6 +588,12 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -575,6 +588,12 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
.atZone(ZoneId.systemDefault()) .atZone(ZoneId.systemDefault())
.toLocalDate(); .toLocalDate();
// 添加年数和月数 // 添加年数和月数
if (vo.getMonthAfter() == 0 && vo.getYearAfter() == 0) {
// 转回Date类型
return Date.from(localDate.atStartOfDay()
.atZone(ZoneId.systemDefault())
.toInstant());
} else {
localDate = localDate localDate = localDate
.plusYears(vo.getYearAfter()) .plusYears(vo.getYearAfter())
.plusMonths(vo.getMonthAfter()) .plusMonths(vo.getMonthAfter())
...@@ -584,4 +603,5 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap ...@@ -584,4 +603,5 @@ public class TDispatchInfoPreServiceImpl extends ServiceImpl<TDispatchInfoPreMap
.atZone(ZoneId.systemDefault()) .atZone(ZoneId.systemDefault())
.toInstant()); .toInstant());
} }
}
} }
...@@ -70,6 +70,18 @@ ...@@ -70,6 +70,18 @@
<result property="errorTime" column="error_time"/> <result property="errorTime" column="error_time"/>
<result property="position" column="position"/> <result property="position" column="position"/>
<result property="phone" column="phone"/> <result property="phone" column="phone"/>
<result property="upPersion" column="UP_PERSION"/>
<result property="upMedical" column="UP_MEDICAL"/>
<result property="upUnemployment" column="UP_UNEMPLOYMENT"/>
<result property="upInjury" column="UP_INJURY"/>
<result property="upBirth" column="UP_BIRTH"/>
<result property="upBig" column="UP_BIG"/>
<result property="lowerPersion" column="LOWER_PERSION"/>
<result property="lowerMedical" column="LOWER_MEDICAL"/>
<result property="lowerUnemployment" column="LOWER_UNEMPLOYMENT"/>
<result property="lowerInjury" column="LOWER_INJURY"/>
<result property="lowerBirth" column="LOWER_BIRTH"/>
<result property="lowerBig" column="LOWER_BIG"/>
</resultMap> </resultMap>
<resultMap id="tDispatchInfoPreExportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreExportVo"> <resultMap id="tDispatchInfoPreExportMap" type="com.yifu.cloud.plus.v1.yifu.social.vo.TDispatchInfoPreExportVo">
...@@ -139,6 +151,18 @@ ...@@ -139,6 +151,18 @@
a.CREATE_TIME, a.CREATE_TIME,
a.DELETE_FLAG,error_info,error_time,a.DISPATCHER_ID,a.error_back_info,a.position,SOCIAL_FUND_ID,a.phone, a.DELETE_FLAG,error_info,error_time,a.DISPATCHER_ID,a.error_back_info,a.position,SOCIAL_FUND_ID,a.phone,
a.SOCIAL_PROVINCE_ID,a.SOCIAL_CITY_ID,a.SOCIAL_TOWN_ID a.SOCIAL_PROVINCE_ID,a.SOCIAL_CITY_ID,a.SOCIAL_TOWN_ID
,a.UP_PERSION,
a.UP_MEDICAL,
a.UP_UNEMPLOYMENT,
a.UP_INJURY,
a.UP_BIRTH,
a.UP_BIG,
a.LOWER_PERSION,
a.LOWER_MEDICAL,
a.LOWER_UNEMPLOYMENT,
a.LOWER_INJURY,
a.LOWER_BIRTH,
a.LOWER_BIG
</sql> </sql>
<sql id="tDispatchInfoPre_other_where"> <sql id="tDispatchInfoPre_other_where">
<if test="tDispatchInfoPre != null"> <if test="tDispatchInfoPre != null">
...@@ -216,6 +240,10 @@ ...@@ -216,6 +240,10 @@
<if test="tDispatchInfoPre.autoSendFlag != null and tDispatchInfoPre.autoSendFlag.trim() != ''"> <if test="tDispatchInfoPre.autoSendFlag != null and tDispatchInfoPre.autoSendFlag.trim() != ''">
AND a.EXPECTED_CONFIRM_TIME is not null and DATE_FORMAT(a.EXPECTED_CONFIRM_TIME,'%Y-%m-%d') <![CDATA[ <= ]]> CURDATE() AND a.EXPECTED_CONFIRM_TIME is not null and DATE_FORMAT(a.EXPECTED_CONFIRM_TIME,'%Y-%m-%d') <![CDATA[ <= ]]> CURDATE()
</if> </if>
<if test="tDispatchInfoPre.timeSendFlag != null and tDispatchInfoPre.timeSendFlag.trim() != ''">
AND (a.EXPECTED_COLLECTION_TIME is null or
DATE_FORMAT(a.EXPECTED_COLLECTION_TIME,'%Y-%m-%d') <![CDATA[ <= ]]> CURDATE() )
</if>
<if test="tDispatchInfoPre.authSql != null and tDispatchInfoPre.authSql.trim() != ''"> <if test="tDispatchInfoPre.authSql != null and tDispatchInfoPre.authSql.trim() != ''">
${tDispatchInfoPre.authSql} ${tDispatchInfoPre.authSql}
</if> </if>
......
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