Commit dedb2d67 authored by huyuchen's avatar huyuchen

Merge remote-tracking branch 'origin/MVP-1.7.3-shuiyou' into MVP-1.7.3-shuiyou

# Conflicts:
#	yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TDispatchInfoServiceImpl.java
parents c1d9620f d7099d83
...@@ -83,9 +83,7 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -83,9 +83,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.servlet.ServletOutputStream; import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.FileOutputStream; import java.io.*;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.net.URL; import java.net.URL;
import java.net.URLEncoder; import java.net.URLEncoder;
...@@ -148,6 +146,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -148,6 +146,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Autowired @Autowired
private OSSUtil ossUtil; private OSSUtil ossUtil;
@Autowired
private SysHouseHoldInfoMapper houseHoldInfoMapper;
/** /**
* 派单信息记录表简单分页查询 * 派单信息记录表简单分页查询
* *
...@@ -504,8 +505,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -504,8 +505,8 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(empVoMap)) { if (Common.isNotNull(empVoMap)) {
empVo = empVoMap.get(excel.getEmpIdcard()); empVo = empVoMap.get(excel.getEmpIdcard());
} }
if (Common.isNotNull(socialFund) if (Common.isNotNull(socialFund)
&& Common.isNotNull(socialFund.getSocialId()) && Common.isNotNull(socialFund.getSocialId())
&& (CommonConstants.FOUR_STRING.equals(socialFund.getSocialStatus()) && (CommonConstants.FOUR_STRING.equals(socialFund.getSocialStatus())
|| CommonConstants.TWELVE_STRING.equals(socialFund.getSocialStatus()))){ || CommonConstants.TWELVE_STRING.equals(socialFund.getSocialStatus()))){
// 部分失败 // 部分失败
...@@ -570,7 +571,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -570,7 +571,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
} else { } else {
if (Common.isNotNull(excel.getProvidentStart()) || Common.isNotNull(excel.getProvidentCardinal()) || if (Common.isNotNull(excel.getProvidentStart()) || Common.isNotNull(excel.getProvidentCardinal()) ||
Common.isNotNull(excel.getProvidentPer())) { Common.isNotNull(excel.getProvidentPer())) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.FUND_HOLD_IS_EMPTY))); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.FUND_HOLD_IS_EMPTY)));
excelVOTemp.put(excel.getRowIndex().toString(),excel.getEmpIdcard()); excelVOTemp.put(excel.getRowIndex().toString(),excel.getEmpIdcard());
continue; continue;
...@@ -750,7 +751,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -750,7 +751,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(socialFund) && Common.isNotNull(dispatch)){ if (Common.isNotNull(socialFund) && Common.isNotNull(dispatch)){
socialFund.setDispatchId(dispatch.getId()); socialFund.setDispatchId(dispatch.getId());
} }
initSocialFundAndInsert(emp, social, fund, socialFund,project,dispatchPart,injury); initSocialFundAndInsert(emp, social, fund, socialFund,project,dispatchPart,injury);
} }
// 生成预付数据 // 生成预付数据
if (Common.isNotNull(socialFund) && Common.isNotNull(socialFund.getId())){ if (Common.isNotNull(socialFund) && Common.isNotNull(socialFund.getId())){
...@@ -1114,7 +1115,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1114,7 +1115,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @Date 14:12 2022/8/17 * @Date 14:12 2022/8/17
* @Param * @Param
* @return * @return
**/ **/
private Date getFirstBuyMonthSocial(TSocialInfo social) { private Date getFirstBuyMonthSocial(TSocialInfo social) {
if (Common.isEmpty(social) || Common.isEmpty(social.getSocialStartDate())){ if (Common.isEmpty(social) || Common.isEmpty(social.getSocialStartDate())){
return null; return null;
...@@ -1281,13 +1282,13 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1281,13 +1282,13 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return zeroArr[num] + nowNums; return zeroArr[num] + nowNums;
} }
private boolean initDispatchAddInfo(YifuUser user, private boolean initDispatchAddInfo(YifuUser user,
Map<String, TDispatchInfo> dispatchMap, Map<String, TDispatchInfo> dispatchMap,
DispatchEmpVo empVo, DispatchEmpVo empVo,
SysBaseSetInfo socialSet, SysBaseSetInfo socialSet,
SysBaseSetInfo fundSet, SysBaseSetInfo fundSet,
TDispatchImportVo excel, TDispatchImportVo excel,
TSocialFundInfo socialFund, TSocialFundInfo socialFund,
boolean injury) { boolean injury) {
// 是否SSC:SSC派单组-1659015946137583618L SSC审核组-1659016108176130049L // 是否SSC:SSC派单组-1659015946137583618L SSC审核组-1659016108176130049L
long roleId = 1659015946137583618L; long roleId = 1659015946137583618L;
boolean isSsc = haveRole(user, roleId); boolean isSsc = haveRole(user, roleId);
...@@ -1908,7 +1909,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -1908,7 +1909,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
&& Common.isEmpty(social.getUnemployStart()) && Common.isEmpty(social.getUnemployStart())
&& Common.isEmpty(social.getBigailmentStart()) && Common.isEmpty(social.getBigailmentStart())
&& Common.isNotNull(social.getWorkInjuryStart()) && Common.isNotNull(social.getWorkInjuryStart())
)){ )){
social.setBigailmentHandle(null); social.setBigailmentHandle(null);
social.setPersonalBigailmentCardinal(null); social.setPersonalBigailmentCardinal(null);
social.setPersonalBigailmentPer(null); social.setPersonalBigailmentPer(null);
...@@ -2486,7 +2487,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2486,7 +2487,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
if ((Common.isEmpty(empVo) || Common.isEmpty(empVo.getContractStart())) if ((Common.isEmpty(empVo) || Common.isEmpty(empVo.getContractStart()))
&& Common.isNotNull(excel.getContractName()) && ( && Common.isNotNull(excel.getContractName()) && (
Common.isEmpty(excel.getContractType()) Common.isEmpty(excel.getContractType())
|| Common.isEmpty(excel.getContractStart()) || Common.isEmpty(excel.getContractStart())
)) { )) {
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_CONTRACT_NOT_EMPTY))); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_CONTRACT_NOT_EMPTY)));
...@@ -2502,21 +2503,21 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2502,21 +2503,21 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
return true; return true;
} }
if (CommonConstants.ONE_STRING.equals(excel.getPaymentType()) if (CommonConstants.ONE_STRING.equals(excel.getPaymentType())
&& (Common.isNullOrZero(excel.getPensionCardinal()) || Common.isEmpty(excel.getPensionStart())) && (Common.isNullOrZero(excel.getPensionCardinal()) || Common.isEmpty(excel.getPensionStart()))
&& !( && !(
Common.isEmpty(excel.getPensionStart()) Common.isEmpty(excel.getPensionStart())
&& Common.isNotNull(excel.getWorkInjuryStart()) && Common.isNotNull(excel.getWorkInjuryStart())
&& Common.isEmpty(excel.getMedicalStart()) && Common.isEmpty(excel.getMedicalStart())
&& Common.isEmpty(excel.getBirthStart()) && Common.isEmpty(excel.getBirthStart())
&& Common.isEmpty(excel.getUnemployStart()) && Common.isEmpty(excel.getUnemployStart())
&& Common.isEmpty(excel.getBigailmentStart()) && Common.isEmpty(excel.getBigailmentStart())
&& Common.isNullOrZero(excel.getPensionCardinal()) && Common.isNullOrZero(excel.getPensionCardinal())
&& Common.isNullOrZero(excel.getMedicalCardinal()) && Common.isNullOrZero(excel.getMedicalCardinal())
&& Common.isNullOrZero(excel.getBirthCardinal()) && Common.isNullOrZero(excel.getBirthCardinal())
&& Common.isNullOrZero(excel.getUnemploymentCardinal()) && Common.isNullOrZero(excel.getUnemploymentCardinal())
&& !Common.isNullOrZero(excel.getWorkInjuryCardinal()) && !Common.isNullOrZero(excel.getWorkInjuryCardinal())
&& Common.isNullOrZero(excel.getBigailmentCardinal()) && Common.isNullOrZero(excel.getBigailmentCardinal())
) )
){ ){
//养老基数为空 兼职工伤除外 //养老基数为空 兼职工伤除外
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_DIY_MEDICAL_NOT_EMPTY))); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_DIY_MEDICAL_NOT_EMPTY)));
...@@ -2565,7 +2566,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2565,7 +2566,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
|| CommonConstants.THREE_STRING.equals(socialFund.getSocialStatus()) || CommonConstants.THREE_STRING.equals(socialFund.getSocialStatus())
|| CommonConstants.TWO_STRING.equals(socialFund.getSocialStatus()) || CommonConstants.TWO_STRING.equals(socialFund.getSocialStatus())
|| CommonConstants.ELEVEN_STRING.equals(socialFund.getSocialStatus()) || CommonConstants.ELEVEN_STRING.equals(socialFund.getSocialStatus())
) )
){ ){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_EXISTING))); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_EXISTING)));
return true; return true;
...@@ -2772,9 +2773,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2772,9 +2773,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
|| (Common.isNotNull(excel.getBirthCardinal()) || (Common.isNotNull(excel.getBirthCardinal())
&& excel.getBirthCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT) && excel.getBirthCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT)
|| (Common.isNotNull(excel.getBigailmentCardinal()) || (Common.isNotNull(excel.getBigailmentCardinal())
&& CommonConstants.ONE_STRING.equals(socialSet.getCollectType()) && CommonConstants.ONE_STRING.equals(socialSet.getCollectType())
&& CommonConstants.ONE_STRING.equals(socialSet.getValueType()) && CommonConstants.ONE_STRING.equals(socialSet.getValueType())
&& excel.getBigailmentCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT); && excel.getBigailmentCardinal().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT);
if (flag){ if (flag){
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_BASE_LIMIT_ERROR))); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), MsgUtils.getMessage(ErrorCodes.EMP_DISPATCH_SOCIAL_BASE_LIMIT_ERROR)));
return true; return true;
...@@ -2811,13 +2812,13 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2811,13 +2812,13 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
//最低最高时候去校验时候去校验 //最低最高时候去校验时候去校验
if (Common.isEmpty(excel.getTrustRemark()) && ((CommonConstants.ZERO_STRING.equals(excel.getPaymentType()) if (Common.isEmpty(excel.getTrustRemark()) && ((CommonConstants.ZERO_STRING.equals(excel.getPaymentType())
&& (socialSet.getLowerPersion().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT || && (socialSet.getLowerPersion().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT ||
socialSet.getLowerMedical().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT || socialSet.getLowerMedical().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT ||
socialSet.getLowerUnemployment().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT || socialSet.getLowerUnemployment().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT ||
socialSet.getLowerInjury().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT || socialSet.getLowerInjury().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT ||
socialSet.getLowerBirth().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT || ( socialSet.getLowerBirth().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT || (
CommonConstants.ONE_STRING.equals(socialSet.getCollectType()) CommonConstants.ONE_STRING.equals(socialSet.getCollectType())
&& CommonConstants.ONE_STRING.equals(socialSet.getValueType()) && && CommonConstants.ONE_STRING.equals(socialSet.getValueType()) &&
socialSet.getLowerBig().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT))) || socialSet.getLowerBig().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT))) ||
(CommonConstants.TWO_STRING.equals(excel.getPaymentType()) (CommonConstants.TWO_STRING.equals(excel.getPaymentType())
&& (socialSet.getUpPersion().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT || && (socialSet.getUpPersion().compareTo(excel.getRecordBase()) != CommonConstants.ZERO_INT ||
...@@ -2974,7 +2975,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2974,7 +2975,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
@Override @Override
public void batchReduceDispatch(List<TDispatchReduceVo> excelVOList, List<ErrorMessage> errorMessageList, public void batchReduceDispatch(List<TDispatchReduceVo> excelVOList, List<ErrorMessage> errorMessageList,
YifuUser user, String orderId, String flag) { YifuUser user, String orderId, String flag) {
if (!Common.isNotNull(excelVOList)){ if (!Common.isNotNull(excelVOList)){
return; return;
} }
...@@ -3068,7 +3069,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3068,7 +3069,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
continue; continue;
} }
// 自定义校验 // 自定义校验
if (validReduce(errorMessageList,excelVOTemp, socialFundMap,socialFund, excel)){ if (validReduce(errorMessageList,excelVOTemp, socialFundMap,socialFund, excel)){
continue; continue;
} }
if (Common.isNotNull(empVoMap)) { if (Common.isNotNull(empVoMap)) {
...@@ -3500,7 +3501,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3500,7 +3501,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
sf.setSocialAddStatus(CommonConstants.ONE_STRING); sf.setSocialAddStatus(CommonConstants.ONE_STRING);
sf.setSocialStatus(CommonConstants.ONE_STRING); sf.setSocialStatus(CommonConstants.ONE_STRING);
} }
//派增审核不通过 需要处理预估数据 //派增审核不通过 需要处理预估数据
} else if (CommonConstants.ONE_INT == flag) { } else if (CommonConstants.ONE_INT == flag) {
socialInfo.setDeleteFlag(CommonConstants.ONE_STRING); socialInfo.setDeleteFlag(CommonConstants.ONE_STRING);
// 作废更新:社保状态、同步预估数据 审核不通过直接作废 // 作废更新:社保状态、同步预估数据 审核不通过直接作废
...@@ -3966,7 +3967,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3966,7 +3967,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
**/ **/
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public List<ErrorMessage> addBatchApplyHandle(ConcurrentHashMap<String, String> socialMap,ConcurrentHashMap<String, String> fundMap, public List<ErrorMessage> addBatchApplyHandle(ConcurrentHashMap<String, String> socialMap,ConcurrentHashMap<String, String> fundMap,
List<String> idsList, String typeSub, YifuUser user List<String> idsList, String typeSub, YifuUser user
, int flag, String handleStatus, String handleRemark, String socialType, String remark, boolean isAutoHandle) { , int flag, String handleStatus, String handleRemark, String socialType, String remark, boolean isAutoHandle) {
List<ErrorMessage> errorList = new ArrayList<>(); List<ErrorMessage> errorList = new ArrayList<>();
if (!Common.isNotNull(idsList)) { if (!Common.isNotNull(idsList)) {
...@@ -4021,7 +4022,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4021,7 +4022,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
|| ((CommonConstants.ONE_STRING.equals(sf.getBigailmentHandle()) || ((CommonConstants.ONE_STRING.equals(sf.getBigailmentHandle())
|| CommonConstants.FOUR_STRING.equals(sf.getBigailmentHandle())) || CommonConstants.FOUR_STRING.equals(sf.getBigailmentHandle()))
&& CommonConstants.ZERO_STRING.equals(sf.getIsIllness())) && CommonConstants.ZERO_STRING.equals(sf.getIsIllness()))
)) ))
&& !((CommonConstants.ONE_STRING.equals(sf.getPensionHandle()) && !((CommonConstants.ONE_STRING.equals(sf.getPensionHandle())
|| CommonConstants.FOUR_STRING.equals(sf.getPensionHandle())) || CommonConstants.FOUR_STRING.equals(sf.getPensionHandle()))
&& (CommonConstants.ONE_STRING.equals(sf.getMedicalHandle()) && (CommonConstants.ONE_STRING.equals(sf.getMedicalHandle())
...@@ -4364,7 +4365,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4364,7 +4365,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
vo.setDepartNo(dis.getSettleDomainCode()); vo.setDepartNo(dis.getSettleDomainCode());
if (Common.isNotNull(dis.getChangeContractAndEmployee()) if (Common.isNotNull(dis.getChangeContractAndEmployee())
&& CommonConstants.ZERO_STRING.equals(dis.getChangeContractAndEmployee()) && CommonConstants.ZERO_STRING.equals(dis.getChangeContractAndEmployee())
&& (Common.isNotNull(vo.getSocialStatus()) || Common.isNotNull(vo.getFundStatus()))) { && (Common.isNotNull(vo.getSocialStatus()) || Common.isNotNull(vo.getFundStatus()))) {
vo.setChangeContractAndEmployee(dis.getChangeContractAndEmployee()); vo.setChangeContractAndEmployee(dis.getChangeContractAndEmployee());
vo.setUserId(user.getId()); vo.setUserId(user.getId());
vo.setUserName(user.getNickname()); vo.setUserName(user.getNickname());
...@@ -4446,7 +4447,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4446,7 +4447,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @Date 15:18 2022/8/9 * @Date 15:18 2022/8/9
* @Param * @Param
* @return * @return
**/ **/
private void initSocialFundStatus(TSocialInfo socialInfo, TProvidentFund providentFund, UpProjectSocialFundVo vo, TSocialFundInfo sf) { private void initSocialFundStatus(TSocialInfo socialInfo, TProvidentFund providentFund, UpProjectSocialFundVo vo, TSocialFundInfo sf) {
if (Common.isNotNull(socialInfo)){ if (Common.isNotNull(socialInfo)){
// 办理失败或审核不通过且无办理成功项 // 办理失败或审核不通过且无办理成功项
...@@ -4467,18 +4468,18 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4467,18 +4468,18 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
|| CommonConstants.TWELVE_STRING.equals(sf.getSocialStatus()) || CommonConstants.TWELVE_STRING.equals(sf.getSocialStatus())
|| ( || (
CommonConstants.TEN_STRING.equals(sf.getSocialStatus()) CommonConstants.TEN_STRING.equals(sf.getSocialStatus())
&& (CommonConstants.ONE_STRING.equals(sf.getPensionHandle()) && (CommonConstants.ONE_STRING.equals(sf.getPensionHandle())
|| CommonConstants.ONE_STRING.equals(sf.getMedicalHandle()) || CommonConstants.ONE_STRING.equals(sf.getMedicalHandle())
|| CommonConstants.ONE_STRING.equals(sf.getWorkInjuryHandle()) || CommonConstants.ONE_STRING.equals(sf.getWorkInjuryHandle())
|| CommonConstants.ONE_STRING.equals(sf.getBirthHandle()) || CommonConstants.ONE_STRING.equals(sf.getBirthHandle())
|| CommonConstants.ONE_STRING.equals(sf.getUnemployHandle())) || CommonConstants.ONE_STRING.equals(sf.getUnemployHandle()))
|| CommonConstants.FOUR_STRING.equals(sf.getPensionHandle()) || CommonConstants.FOUR_STRING.equals(sf.getPensionHandle())
|| CommonConstants.FOUR_STRING.equals(sf.getMedicalHandle()) || CommonConstants.FOUR_STRING.equals(sf.getMedicalHandle())
|| CommonConstants.FOUR_STRING.equals(sf.getWorkInjuryHandle()) || CommonConstants.FOUR_STRING.equals(sf.getWorkInjuryHandle())
|| CommonConstants.FOUR_STRING.equals(sf.getBirthHandle()) || CommonConstants.FOUR_STRING.equals(sf.getBirthHandle())
|| CommonConstants.FOUR_STRING.equals(sf.getUnemployHandle()) || CommonConstants.FOUR_STRING.equals(sf.getUnemployHandle())
|| CommonConstants.ONE_STRING.equals(sf.getBigailmentHandle()) || CommonConstants.ONE_STRING.equals(sf.getBigailmentHandle())
|| CommonConstants.FOUR_STRING.equals(sf.getBigailmentHandle())) || CommonConstants.FOUR_STRING.equals(sf.getBigailmentHandle()))
){ ){
vo.setSocialStatus(CommonConstants.TWO_STRING); vo.setSocialStatus(CommonConstants.TWO_STRING);
} }
...@@ -4531,7 +4532,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4531,7 +4532,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @Date 14:34 2023/1/31 * @Date 14:34 2023/1/31
* @Param socialType 派单项(1养老 2医疗 3失业 4工伤 5生育 6大病),socialInfo 社保信息 type 0 派增 1 派减 * @Param socialType 派单项(1养老 2医疗 3失业 4工伤 5生育 6大病),socialInfo 社保信息 type 0 派增 1 派减
* @return * @return
**/ **/
private StringBuilder getHandleRemark(String socialType, TSocialInfo socialInfo, String type, TSocialFundInfo sf) { private StringBuilder getHandleRemark(String socialType, TSocialInfo socialInfo, String type, TSocialFundInfo sf) {
StringBuilder socialTypeRemark; StringBuilder socialTypeRemark;
socialTypeRemark = new StringBuilder(); socialTypeRemark = new StringBuilder();
...@@ -4567,7 +4568,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4567,7 +4568,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
socialTypeRemark.append(CommonConstants.SOCIAL_HANDLE_TYPE[Integer.parseInt(st)]).append("、"); socialTypeRemark.append(CommonConstants.SOCIAL_HANDLE_TYPE[Integer.parseInt(st)]).append("、");
} }
} }
// 派减派单项处理 // 派减派单项处理
} else if (CommonConstants.ONE_STRING.equals(type)){ } else if (CommonConstants.ONE_STRING.equals(type)){
for (String st : stArr) { for (String st : stArr) {
// socialType (1养老 2医疗 3失业 4工伤 5生育 6大病) // socialType (1养老 2医疗 3失业 4工伤 5生育 6大病)
...@@ -4640,11 +4641,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4640,11 +4641,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 有部分办理失败的多次派单 优化,存在办理失败的 更新为 部分办理失败 // 有部分办理失败的多次派单 优化,存在办理失败的 更新为 部分办理失败
if (CommonConstants.EIGHT_STRING.equals(sf.getSocialStatus()) && if (CommonConstants.EIGHT_STRING.equals(sf.getSocialStatus()) &&
(CommonConstants.FOUR_STRING.equals(sf.getPensionHandle()) (CommonConstants.FOUR_STRING.equals(sf.getPensionHandle())
|| CommonConstants.FOUR_STRING.equals(sf.getMedicalHandle()) || CommonConstants.FOUR_STRING.equals(sf.getMedicalHandle())
|| CommonConstants.FOUR_STRING.equals(sf.getUnemployHandle()) || CommonConstants.FOUR_STRING.equals(sf.getUnemployHandle())
|| CommonConstants.FOUR_STRING.equals(sf.getWorkInjuryHandle()) || CommonConstants.FOUR_STRING.equals(sf.getWorkInjuryHandle())
|| CommonConstants.FOUR_STRING.equals(sf.getBirthHandle()) || CommonConstants.FOUR_STRING.equals(sf.getBirthHandle())
|| CommonConstants.FOUR_STRING.equals(sf.getBigailmentHandle()))){ || CommonConstants.FOUR_STRING.equals(sf.getBigailmentHandle()))){
sf.setSocialStatus(CommonConstants.TWELVE_STRING); sf.setSocialStatus(CommonConstants.TWELVE_STRING);
sf.setSocialReduceStatus(CommonConstants.SIX_STRING); sf.setSocialReduceStatus(CommonConstants.SIX_STRING);
sf.setSocialReduceDate(null); sf.setSocialReduceDate(null);
...@@ -4699,7 +4700,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4699,7 +4700,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
&& (Common.isEmpty(sf.getBigailmentHandle()) && (Common.isEmpty(sf.getBigailmentHandle())
|| CommonConstants.TWO_STRING.equals(sf.getBigailmentHandle()) || CommonConstants.TWO_STRING.equals(sf.getBigailmentHandle())
|| CommonConstants.THREE_STRING.equals(sf.getBigailmentHandle())) || CommonConstants.THREE_STRING.equals(sf.getBigailmentHandle()))
) { ) {
// 全部失败(或者为空):全部失败 // 全部失败(或者为空):全部失败
socialInfo.setHandleStatus(CommonConstants.TWO_STRING); socialInfo.setHandleStatus(CommonConstants.TWO_STRING);
socialInfo.setReduceCan(CommonConstants.dingleDigitStrArray[1]);//改成不可派减状态 socialInfo.setReduceCan(CommonConstants.dingleDigitStrArray[1]);//改成不可派减状态
...@@ -4712,7 +4713,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4712,7 +4713,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
|| (Common.isEmpty(sf.getWorkInjuryHandle()) || CommonConstants.ZERO_STRING.equals(sf.getWorkInjuryHandle())) || (Common.isEmpty(sf.getWorkInjuryHandle()) || CommonConstants.ZERO_STRING.equals(sf.getWorkInjuryHandle()))
|| (Common.isEmpty(sf.getBirthHandle()) || CommonConstants.ZERO_STRING.equals(sf.getBirthHandle())) || (Common.isEmpty(sf.getBirthHandle()) || CommonConstants.ZERO_STRING.equals(sf.getBirthHandle()))
|| (Common.isNotNull(sf.getBigailmentHandle()) && CommonConstants.ZERO_STRING.equals(sf.getBigailmentHandle()) || (Common.isNotNull(sf.getBigailmentHandle()) && CommonConstants.ZERO_STRING.equals(sf.getBigailmentHandle())
)) { )) {
// 含有办理中的:办理中 // 含有办理中的:办理中
socialInfo.setHandleStatus(CommonConstants.FOUR_STRING); socialInfo.setHandleStatus(CommonConstants.FOUR_STRING);
socialInfo.setReduceCan(CommonConstants.dingleDigitStrArray[1]);//改成不可派减状态 socialInfo.setReduceCan(CommonConstants.dingleDigitStrArray[1]);//改成不可派减状态
...@@ -4760,9 +4761,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4760,9 +4761,9 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
&& ( && (
((CommonConstants.FOUR_STRING.equals(socialInfo.getBigailmentHandle()) ((CommonConstants.FOUR_STRING.equals(socialInfo.getBigailmentHandle())
|| CommonConstants.TWO_STRING.equals(socialInfo.getBigailmentHandle())) || CommonConstants.TWO_STRING.equals(socialInfo.getBigailmentHandle()))
&& CommonConstants.ZERO_STRING.equals(socialInfo.getIsIllness()) && CommonConstants.ZERO_STRING.equals(socialInfo.getIsIllness())
) )
|| Common.isEmpty(socialInfo.getBigailmentHandle())) || Common.isEmpty(socialInfo.getBigailmentHandle()))
){ ){
if (partHandleStatus(socialInfo, sf, dis)) return; if (partHandleStatus(socialInfo, sf, dis)) return;
if (CommonConstants.TWO_STRING.equals(socialInfo.getPensionHandle()) if (CommonConstants.TWO_STRING.equals(socialInfo.getPensionHandle())
...@@ -4805,7 +4806,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -4805,7 +4806,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
&& ( ( && ( (
(CommonConstants.THREE_STRING.equals(socialInfo.getBigailmentHandle()) (CommonConstants.THREE_STRING.equals(socialInfo.getBigailmentHandle())
|| CommonConstants.TWO_STRING.equals(socialInfo.getBigailmentHandle())) || CommonConstants.TWO_STRING.equals(socialInfo.getBigailmentHandle()))
&& CommonConstants.ZERO_STRING.equals(socialInfo.getIsIllness())) && CommonConstants.ZERO_STRING.equals(socialInfo.getIsIllness()))
|| Common.isEmpty(socialInfo.getBigailmentHandle())) || Common.isEmpty(socialInfo.getBigailmentHandle()))
){ ){
// 针对增增减的情况 直接派减完成第二次派增后 无法继续办理第一次派单项的情况优化 2023-04-07 fxj // 针对增增减的情况 直接派减完成第二次派增后 无法继续办理第一次派单项的情况优化 2023-04-07 fxj
...@@ -5343,7 +5344,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -5343,7 +5344,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @Date 17:59 2022/7/27 * @Date 17:59 2022/7/27
* @Param * @Param
* @return * @return
**/ **/
private int getRecordRosterCount(SocialHandleSearchVo searchVo, String idStr) { private int getRecordRosterCount(SocialHandleSearchVo searchVo, String idStr) {
List<String> ids = new ArrayList<>(); List<String> ids = new ArrayList<>();
if (Common.isNotNull(idStr)){ if (Common.isNotNull(idStr)){
...@@ -5977,7 +5978,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -5977,7 +5978,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @Date 15:46 2023/5/8 * @Date 15:46 2023/5/8
* @Param * @Param
* @return * @return
**/ **/
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@ShardingTransactionType(TransactionType.BASE) @ShardingTransactionType(TransactionType.BASE)
@Override @Override
...@@ -6050,7 +6051,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -6050,7 +6051,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @Date 16:45 2023/5/8 * @Date 16:45 2023/5/8
* @Param * @Param
* @return * @return
**/ **/
public void fundImportHandle(List<FundImportHandleVo> excelVOList, List<ErrorMessage> errorMessageList, public void fundImportHandle(List<FundImportHandleVo> excelVOList, List<ErrorMessage> errorMessageList,
YifuUser user,TDispatchInfo dispatchInfo,ConcurrentHashMap<String, String> map, boolean isAutoFlag) { YifuUser user,TDispatchInfo dispatchInfo,ConcurrentHashMap<String, String> map, boolean isAutoFlag) {
if (!Common.isNotNull(excelVOList)) { if (!Common.isNotNull(excelVOList)) {
...@@ -7410,7 +7411,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -7410,7 +7411,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
//第三列 //第三列
//第四列 //第四列
int b=Double.valueOf(a).intValue(); int b=Double.valueOf(a).intValue();
String c=int2big(b); String c=int2big(b);
//第五列 //第五列
list.add(Lists.newArrayList(c, c)); list.add(Lists.newArrayList(c, c));
list.add(Lists.newArrayList(c, c)); list.add(Lists.newArrayList(c, c));
...@@ -7524,7 +7525,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -7524,7 +7525,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @Date 15:58 2024/12/10 * @Date 15:58 2024/12/10
* @Param socialId:社保明细ID type: 1 社保增 2社保减 3 医保增 4 医保减 * @Param socialId:社保明细ID type: 1 社保增 2社保减 3 医保增 4 医保减
* @return * @return
**/ **/
@Override @Override
public R<URL> doExportRoster(String socialId, String type,String unitCreditCode) { public R<URL> doExportRoster(String socialId, String type,String unitCreditCode) {
SocialHandleSearchVo searchVo = new SocialHandleSearchVo(); SocialHandleSearchVo searchVo = new SocialHandleSearchVo();
...@@ -7535,6 +7536,20 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -7535,6 +7536,20 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isEmpty(socialInfo)){ if (Common.isEmpty(socialInfo)){
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR); return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
} }
//查询户名称对应的户配置 以获取公章信息
SysHouseHoldInfo holdInfo = houseHoldInfoMapper.selectOne(Wrappers.<SysHouseHoldInfo>query().lambda()
.eq(SysHouseHoldInfo::getName,socialInfo.getSocialHouseholdName())
.eq(SysHouseHoldInfo::getType,0)
.eq(SysHouseHoldInfo::getDelFlag,0)
.last(CommonConstants.LAST_ONE_SQL));
if (Common.isEmpty(holdInfo)){
return R.failed(CommonConstants.RESULT_DATA_FAIL+":获取户配置失败");
}
SysBaseSetInfo socialBaseSet = baseSetMapper.selectById(socialInfo.getSocialHousehold());
if (Common.isEmpty(socialBaseSet)){
return R.failed(CommonConstants.PARAM_IS_NOT_ERROR);
}
searchVo.setSocialHouseholdName(socialInfo.getSocialHouseholdName()); searchVo.setSocialHouseholdName(socialInfo.getSocialHouseholdName());
//searchVo.setDisMonth(DateUtil.getThisMonth()); //searchVo.setDisMonth(DateUtil.getThisMonth());
searchVo.setDisMonth("202410"); searchVo.setDisMonth("202410");
...@@ -7558,7 +7573,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -7558,7 +7573,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @Date 16:29 2024/12/10 * @Date 16:29 2024/12/10
* @Param * @Param
* @return * @return
**/ **/
public R<URL> doExportRosterMedical(SocialHandleSearchVo searchVo,String type){ public R<URL> doExportRosterMedical(SocialHandleSearchVo searchVo,String type){
String fileName = DispatchConstants.SOCIAL_MEDICAL_EXPORT + searchVo.getSocialHouseholdName() + "_" + DateUtil.getThisMonth() + CommonConstants.XLSX; String fileName = DispatchConstants.SOCIAL_MEDICAL_EXPORT + searchVo.getSocialHouseholdName() + "_" + DateUtil.getThisMonth() + CommonConstants.XLSX;
//获取要导出的列表 //获取要导出的列表
...@@ -7708,7 +7723,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -7708,7 +7723,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
* @Date 16:28 2024/12/10 * @Date 16:28 2024/12/10
* @Param * @Param
* @return * @return
**/ **/
public R<URL> doExportRosterSocial(SocialHandleSearchVo searchVo,String type){ public R<URL> doExportRosterSocial(SocialHandleSearchVo searchVo,String type){
String fileName = DispatchConstants.SOCIAL_MEDICAL_EXPORT + searchVo.getSocialHouseholdName() + "_" + DateUtil.getThisMonth() + CommonConstants.XLS; String fileName = DispatchConstants.SOCIAL_MEDICAL_EXPORT + searchVo.getSocialHouseholdName() + "_" + DateUtil.getThisMonth() + CommonConstants.XLS;
String projectRoot = System.getProperty("user.dir"); String projectRoot = System.getProperty("user.dir");
...@@ -7875,6 +7890,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -7875,6 +7890,12 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
excelWriter.finish(); excelWriter.finish();
} }
//读取文件 生成电子章 //读取文件 生成电子章
FileInputStream inputStream = new FileInputStream(filePath);
String outPath = projectRoot+"//out_"+fileName;
FileOutputStream fileOUt = new FileOutputStream(outPath);
URL url =ossUtil.getObjectUrl(null,"");
InputStream inStream = url.openStream();
excelMergeImage.addPictureToExcel(inputStream,inStream,fileOUt,0);
}catch (Exception e){ }catch (Exception e){
log.error("执行异常" ,e); log.error("执行异常" ,e);
......
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