Commit 4a83504f authored by hongguangwu's avatar hongguangwu

1.7.22-撤销取消电子签

parent 061332bf
...@@ -235,12 +235,15 @@ public class TSocialInfoController { ...@@ -235,12 +235,15 @@ public class TSocialInfoController {
@Operation(summary = "转自动化", description = "转自动化") @Operation(summary = "转自动化", description = "转自动化")
@GetMapping("/doAuto" ) @GetMapping("/doAuto" )
public R<String> doAuto(@RequestParam String id, @RequestParam String isSocial public R<String> doAuto(@RequestParam String id, @RequestParam String isSocial
, @RequestParam(required = false) String ybsfqzcb) { , @RequestParam(required = false) String ybsfqzcb,
@RequestParam(name = "isAutoYgsHmc", required = false) String isAutoYgsHmc,
@RequestParam(name = "isAutoYsdHmc", required = false) String isAutoYsdHmc,
@RequestParam(name = "isAutoLeaveDoc", required = false) String isAutoLeaveDoc) {
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
if (user == null || Common.isEmpty(user.getId())) { if (user == null || Common.isEmpty(user.getId())) {
return R.failed("请登录!"); return R.failed("请登录!");
} }
return tSocialInfoService.doAuto(id, isSocial, ybsfqzcb, user); return tSocialInfoService.doAuto(id, isSocial, ybsfqzcb, user,isAutoYgsHmc,isAutoYsdHmc,isAutoLeaveDoc);
} }
/** /**
......
...@@ -135,6 +135,6 @@ public interface TSocialInfoService extends IService<TSocialInfo> { ...@@ -135,6 +135,6 @@ public interface TSocialInfoService extends IService<TSocialInfo> {
* @Date: 2025/4/25 17:24 * @Date: 2025/4/25 17:24
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String> * @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/ **/
R<String> doAuto(String id, String isSocial, String ybsfqzcb, YifuUser user); R<String> doAuto(String id, String isSocial, String ybsfqzcb, YifuUser user, String isAutoYgsHmc, String isAutoYsdHmc , String isAutoLeaveDoc);
} }
...@@ -4103,9 +4103,15 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4103,9 +4103,15 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//记录处理意见到派单 最新的意见会覆盖之前的,详情 到流程中查询 //记录处理意见到派单 最新的意见会覆盖之前的,详情 到流程中查询
dis.setHandleRemark(ServiceUtil.ifNullToEmpty(auditRemark)); dis.setHandleRemark(ServiceUtil.ifNullToEmpty(auditRemark));
dis.setAuditRemark(ServiceUtil.ifNullToEmpty(auditRemark)); dis.setAuditRemark(ServiceUtil.ifNullToEmpty(auditRemark));
dis.setIsAutoYgsHmc(isAutoYgsHmc); if (Common.isNotNull(isAutoYgsHmc)) {
dis.setIsAutoYsdHmc(isAutoYsdHmc); dis.setIsAutoYgsHmc(isAutoYgsHmc);
dis.setIsAutoLeaveDoc(isAutoLeaveDoc); }
if (Common.isNotNull(isAutoYsdHmc)) {
dis.setIsAutoYsdHmc(isAutoYsdHmc);
}
if (Common.isNotNull(isAutoLeaveDoc)) {
dis.setIsAutoLeaveDoc(isAutoLeaveDoc);
}
auditInfo.setDispatchInfoId(dis.getId()); auditInfo.setDispatchInfoId(dis.getId());
//更新派单状态 //更新派单状态
......
...@@ -609,7 +609,7 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci ...@@ -609,7 +609,7 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci
@Override @Override
public R<String> doAutoBatch(List<String> idList, String isSocial, String ybsfqzcb, YifuUser user) { public R<String> doAutoBatch(List<String> idList, String isSocial, String ybsfqzcb, YifuUser user) {
for (String id : idList) { for (String id : idList) {
doAuto(id, isSocial, ybsfqzcb, user); doAuto(id, isSocial, ybsfqzcb, user, null, null, null);
} }
return R.ok("成功!"); return R.ok("成功!");
} }
...@@ -625,7 +625,7 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci ...@@ -625,7 +625,7 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String> * @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/ **/
@Override @Override
public R<String> doAuto(String id, String isSocial, String ybsfqzcb, YifuUser user) { public R<String> doAuto(String id, String isSocial, String ybsfqzcb, YifuUser user, String isAutoYgsHmc, String isAutoYsdHmc , String isAutoLeaveDoc) {
TSocialInfo socialInfo = this.getById(id); TSocialInfo socialInfo = this.getById(id);
if (socialInfo == null || Common.isEmpty(socialInfo.getId())) { if (socialInfo == null || Common.isEmpty(socialInfo.getId())) {
return R.failed("未找到社保"); return R.failed("未找到社保");
...@@ -634,96 +634,110 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci ...@@ -634,96 +634,110 @@ public class TSocialInfoServiceImpl extends ServiceImpl<TSocialInfoMapper, TSoci
.eq(TDispatchInfo::getSocialId, id) .eq(TDispatchInfo::getSocialId, id)
.eq(TDispatchInfo::getStatus, CommonConstants.TWO_STRING) .eq(TDispatchInfo::getStatus, CommonConstants.TWO_STRING)
.orderByDesc(TDispatchInfo::getCreateTime).last(CommonConstants.LAST_ONE_SQL)); .orderByDesc(TDispatchInfo::getCreateTime).last(CommonConstants.LAST_ONE_SQL));
String handleRemark = "派增"; if (disExist != null) {
// 有可以转的项目,则可以转 String handleRemark = "派增";
boolean canUpdate = false; // 有可以转的项目,则可以转
if (disExist != null && CommonConstants.ONE_STRING.equals(disExist.getType())) { boolean canUpdate = false;
handleRemark = "派减"; if (CommonConstants.ONE_STRING.equals(disExist.getType())) {
} handleRemark = "派减";
// 判断养工失转自动化
if ((CommonConstants.ONE_STRING.equals(isSocial) || CommonConstants.THREE_STRING.equals(isSocial))
&& Common.isNotNull(socialInfo.getYgsHandleStatus())
&& CommonConstants.FIVE_STRING.equals(socialInfo.getYgsHandleStatus())) {
// 养工失状态为待办理或派减待办理
if (CommonConstants.ZERO_STRING.equals(socialInfo.getPensionHandle())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getPensionHandle())
|| CommonConstants.ZERO_STRING.equals(socialInfo.getWorkInjuryHandle())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getWorkInjuryHandle())
|| CommonConstants.ZERO_STRING.equals(socialInfo.getUnemployHandle())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getUnemployHandle())) {
// 转人工时是2自动办理中,转自动化时,恢复为自动办理中,不会再次推送了
if (CommonConstants.TWO_STRING.equals(socialInfo.getYgsHandleStatusOld())) {
socialInfo.setYgsHandleStatus(CommonConstants.TWO_STRING);
handleRemark += "养老、工伤、失业手动转自动化,恢复为自动办理中;";
} else {
socialInfo.setYgsHandleStatus(CommonConstants.ONE_STRING);
handleRemark += "养老、工伤、失业手动转自动化;";
}
canUpdate = true;
} else if (!CommonConstants.THREE_STRING.equals(isSocial)) {
// 全部的,不反馈某一个失败
return R.failed("当前养老工伤失业-办理状态不可以转自动化!");
} }
} // 判断养工失转自动化
// 判断医生大转自动化 if ((CommonConstants.ONE_STRING.equals(isSocial) || CommonConstants.THREE_STRING.equals(isSocial))
if ((CommonConstants.TWO_STRING.equals(isSocial) || CommonConstants.THREE_STRING.equals(isSocial)) && Common.isNotNull(socialInfo.getYgsHandleStatus())
&& Common.isNotNull(socialInfo.getYsdHandleStatus()) && CommonConstants.FIVE_STRING.equals(socialInfo.getYgsHandleStatus())) {
&& CommonConstants.FIVE_STRING.equals(socialInfo.getYsdHandleStatus())) { // 养工失状态为待办理或派减待办理
// 医生大状态为待办理或派减待办理 if (CommonConstants.ZERO_STRING.equals(socialInfo.getPensionHandle())
if (CommonConstants.ZERO_STRING.equals(socialInfo.getMedicalHandle()) || CommonConstants.FIVE_STRING.equals(socialInfo.getPensionHandle())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getMedicalHandle())
|| CommonConstants.ZERO_STRING.equals(socialInfo.getBirthHandle())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getBirthHandle())
|| CommonConstants.ZERO_STRING.equals(socialInfo.getBigailmentHandle())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getBigailmentHandle())) {
// 转人工时是2自动办理中,转自动化时,恢复为自动办理中,不会再次推送了
if (CommonConstants.TWO_STRING.equals(socialInfo.getYsdHandleStatusOld())) {
socialInfo.setYsdHandleStatus(CommonConstants.TWO_STRING);
handleRemark += "医疗、生育、大病手动转自动化,恢复为自动办理中;";
} else {
socialInfo.setYsdHandleStatus(CommonConstants.ONE_STRING);
handleRemark += "医疗、生育、大病手动转自动化;";
}
canUpdate = true; || CommonConstants.ZERO_STRING.equals(socialInfo.getWorkInjuryHandle())
} else if (!CommonConstants.THREE_STRING.equals(isSocial)) { || CommonConstants.FIVE_STRING.equals(socialInfo.getWorkInjuryHandle())
// 全部的,不反馈某一个失败
return R.failed("当前医疗生育大病-办理状态不可以转自动化!"); || CommonConstants.ZERO_STRING.equals(socialInfo.getUnemployHandle())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getUnemployHandle())) {
// 转人工时是2自动办理中,转自动化时,恢复为自动办理中,不会再次推送了
if (CommonConstants.TWO_STRING.equals(socialInfo.getYgsHandleStatusOld())) {
socialInfo.setYgsHandleStatus(CommonConstants.TWO_STRING);
handleRemark += "养老、工伤、失业手动转自动化,恢复为自动办理中;";
} else {
socialInfo.setYgsHandleStatus(CommonConstants.ONE_STRING);
handleRemark += "养老、工伤、失业手动转自动化;";
}
canUpdate = true;
} else if (!CommonConstants.THREE_STRING.equals(isSocial)) {
// 全部的,不反馈某一个失败
return R.failed("当前养老工伤失业-办理状态不可以转自动化!");
}
} }
} // 判断医生大转自动化
// 医保强制参保: if ((CommonConstants.TWO_STRING.equals(isSocial) || CommonConstants.THREE_STRING.equals(isSocial))
//推送时,如果社保本身有值,用社保的,如果没有,用户的。 && Common.isNotNull(socialInfo.getYsdHandleStatus())
//转自动化时,可选: && CommonConstants.FIVE_STRING.equals(socialInfo.getYsdHandleStatus())) {
//空(非必填项)(不改变社保的值,社保是空(取户),否,是,都不产生变化,也不加这块的日志) // 医生大状态为待办理或派减待办理
//是(改社保为是)(若社保原先为 空或否,加日志) if (CommonConstants.ZERO_STRING.equals(socialInfo.getMedicalHandle())
//否(改社保为否)(若社保原先为 空或是,加日志) || CommonConstants.FIVE_STRING.equals(socialInfo.getMedicalHandle())
String oldYbsfqzcb = socialInfo.getYbsfqzcb();
if (Common.isNotNull(ybsfqzcb) && !ybsfqzcb.equals(oldYbsfqzcb)) { || CommonConstants.ZERO_STRING.equals(socialInfo.getBirthHandle())
socialInfo.setYbsfqzcb(ybsfqzcb); || CommonConstants.FIVE_STRING.equals(socialInfo.getBirthHandle())
if (Common.isNotNull(handleRemark)) {
handleRemark += ";"; || CommonConstants.ZERO_STRING.equals(socialInfo.getBigailmentHandle())
|| CommonConstants.FIVE_STRING.equals(socialInfo.getBigailmentHandle())) {
// 转人工时是2自动办理中,转自动化时,恢复为自动办理中,不会再次推送了
if (CommonConstants.TWO_STRING.equals(socialInfo.getYsdHandleStatusOld())) {
socialInfo.setYsdHandleStatus(CommonConstants.TWO_STRING);
handleRemark += "医疗、生育、大病手动转自动化,恢复为自动办理中;";
} else {
socialInfo.setYsdHandleStatus(CommonConstants.ONE_STRING);
handleRemark += "医疗、生育、大病手动转自动化;";
}
canUpdate = true;
} else if (!CommonConstants.THREE_STRING.equals(isSocial)) {
// 全部的,不反馈某一个失败
return R.failed("当前医疗生育大病-办理状态不可以转自动化!");
}
} }
handleRemark += "改变了医保强制参保的值:"; // 医保强制参保:
String oldYbsfqzcbValue = "“空”"; //推送时,如果社保本身有值,用社保的,如果没有,用户的。
if (Common.isNotNull(oldYbsfqzcb)) { //转自动化时,可选:
if (CommonConstants.ZERO_STRING.equals(oldYbsfqzcb)) { //空(非必填项)(不改变社保的值,社保是空(取户),否,是,都不产生变化,也不加这块的日志)
oldYbsfqzcbValue = "“否”"; //是(改社保为是)(若社保原先为 空或否,加日志)
} else if (CommonConstants.ONE_STRING.equals(oldYbsfqzcb)) { //否(改社保为否)(若社保原先为 空或是,加日志)
oldYbsfqzcbValue = "“是”"; String oldYbsfqzcb = socialInfo.getYbsfqzcb();
if (Common.isNotNull(ybsfqzcb) && !ybsfqzcb.equals(oldYbsfqzcb)) {
socialInfo.setYbsfqzcb(ybsfqzcb);
if (Common.isNotNull(handleRemark)) {
handleRemark += ";";
} }
handleRemark += "改变了医保强制参保的值:";
String oldYbsfqzcbValue = "“空”";
if (Common.isNotNull(oldYbsfqzcb)) {
if (CommonConstants.ZERO_STRING.equals(oldYbsfqzcb)) {
oldYbsfqzcbValue = "“否”";
} else if (CommonConstants.ONE_STRING.equals(oldYbsfqzcb)) {
oldYbsfqzcbValue = "“是”";
}
}
String newYbsfqzcbValue = "“否”";
if (CommonConstants.ONE_STRING.equals(ybsfqzcb)) {
newYbsfqzcbValue = "“是”";
}
handleRemark += oldYbsfqzcbValue + "→" + newYbsfqzcbValue;
}
if (Common.isNotNull(isAutoYgsHmc)) {
disExist.setIsAutoYgsHmc(isAutoYgsHmc);
} }
String newYbsfqzcbValue = "“否”"; if (Common.isNotNull(isAutoYsdHmc)) {
if (CommonConstants.ONE_STRING.equals(ybsfqzcb)) { disExist.setIsAutoYsdHmc(isAutoYsdHmc);
newYbsfqzcbValue = "“是”";
} }
handleRemark += oldYbsfqzcbValue+"→"+ newYbsfqzcbValue; if (Common.isNotNull(isAutoLeaveDoc)) {
disExist.setIsAutoLeaveDoc(isAutoLeaveDoc);
}
dispatchInfoMapper.updateById(disExist);
// 更新社保和加日志
return doUpdateCoreAndLog(user, socialInfo, handleRemark, canUpdate, disExist);
} }
// 更新社保和加日志 return R.failed("未找到派单");
return doUpdateCoreAndLog(user, socialInfo, handleRemark, canUpdate, disExist);
} }
} }
......
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