Commit a106eb90 authored by zhenbin wang's avatar zhenbin wang

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

parents 5c5dc71b 4d8b5b1d
...@@ -69,6 +69,8 @@ public interface TForecastLibraryMapper extends BaseMapper<TForecastLibrary> { ...@@ -69,6 +69,8 @@ public interface TForecastLibraryMapper extends BaseMapper<TForecastLibrary> {
int updateForecastFundStatusByIdList(@Param("idList")List<String> idList, @Param("status") String status); int updateForecastFundStatusByIdList(@Param("idList")List<String> idList, @Param("status") String status);
int deleteForecastSocial(@Param("idCard") String idCard, @Param("socialPayMonth") String socialPayMonth, @Param("socialCreateMonth") String socialCreateMonth);
void updateForSocialAndFound(@Param("infoVo") UpdateSocialFoundVo infoVo); void updateForSocialAndFound(@Param("infoVo") UpdateSocialFoundVo infoVo);
/** /**
......
...@@ -3872,22 +3872,20 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3872,22 +3872,20 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
// 全部办理失败 社保和公积金派增办理失败 减少预估 // 全部办理失败 社保和公积金派增办理失败 减少预估
if (CommonConstants.ONE_INT == flag if (CommonConstants.ONE_INT == flag
&& (CommonConstants.FIVE_STRING.equals(sf.getSocialStatus()) && (CommonConstants.FIVE_STRING.equals(sf.getSocialStatus())
|| CommonConstants.FOUR_STRING.equals(sf.getFundStatus()))){ || CommonConstants.FOUR_STRING.equals(sf.getFundStatus()))) {
// 派增办理,全部失败 同步预估库数据 // 派增办理,全部失败 同步预估库数据
socialTask.asynchronousDisPatchHandle(sf, forecastFlag,null,null,CommonConstants.ZERO_INT); socialTask.asynchronousDisPatchHandle(sf, forecastFlag, null, null, CommonConstants.ZERO_INT);
} }
// 社保办理只要办理成功就刷新预估数据 公积金办理不用处理(前面公积金办理成功的时候处理过了) // 社保办理只要办理成功就刷新预估数据 公积金办理不用处理(前面公积金办理成功的时候处理过了)
if (CommonConstants.ZERO_STRING.equals(typeSub) if (CommonConstants.ZERO_STRING.equals(typeSub)
&& (Common.isNotNull(dis.getSocialId()) && (Common.isNotNull(dis.getSocialId())
&& CommonConstants.FOUR_STRING.equals(sf.getSocialStatus()) && CommonConstants.FOUR_STRING.equals(sf.getSocialStatus())
|| CommonConstants.TWO_STRING.equals(sf.getSocialStatus()) || CommonConstants.TWO_STRING.equals(sf.getSocialStatus())
|| CommonConstants.THREE_STRING.equals(sf.getSocialStatus()))){ || CommonConstants.THREE_STRING.equals(sf.getSocialStatus()))) {
if (partSuccess){ if (partSuccess) {
forecastLibraryService.updateForecastLibaryByDispatch(sf); forecastLibraryService.updateForecastLibaryByDispatch(sf);
}else { } else {
synchronized (this) { socialTask.asynchronousDisPatchHandle(sf, 0, null, null, CommonConstants.ONE_INT);
socialTask.asynchronousDisPatchHandle(sf, 0, null, null, CommonConstants.ONE_INT);
}
} }
} }
} }
......
...@@ -1862,6 +1862,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1862,6 +1862,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
return R.failed("无需要重新生成的数据(无数据或数据已结算不可重新生成!)"); return R.failed("无需要重新生成的数据(无数据或数据已结算不可重新生成!)");
} }
//先删除然后重新生成 //先删除然后重新生成
boolean isSaveAndUpdate = false;
synchronized (this) { synchronized (this) {
if (Common.isNotNull(librarySocialList)) { if (Common.isNotNull(librarySocialList)) {
baseMapper.deleteBatchIds(librarySocialList); baseMapper.deleteBatchIds(librarySocialList);
...@@ -1879,14 +1881,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1879,14 +1881,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
// 组建基础Map // 组建基础Map
this.getBaseMap(librarySocialList, librarySocialListTemp, libraryFundList, libraryFundListTemp this.getBaseMap(librarySocialList, librarySocialListTemp, libraryFundList, libraryFundListTemp
, socialHistoryMap, fundHistoryMap, socialPushMap, fundPushMap); , socialHistoryMap, fundHistoryMap, socialPushMap, fundPushMap);
Map<String, TForecastLibrary> saveLibraryMap = new HashMap<>();
boolean isReduceSocial = false; boolean isReduceSocial = false;
boolean isReduceFund = false; boolean isReduceFund = false;
Map<String, TForecastLibrary> saveLibraryMap = new HashMap<>();
// 核心刷新 // 核心刷新
R<String> coreR = this.doCore(payMonthList, socialInfoList, fundList, agentConfigHashMap, socialHistoryMap R<String> coreR = this.doCore(payMonthList, socialInfoList, fundList, agentConfigHashMap, socialHistoryMap
, fundHistoryMap, socialPushMap, fundPushMap, saveLibraryMap, isReduceSocial, isReduceFund, isOnly); , fundHistoryMap, socialPushMap, fundPushMap, saveLibraryMap, isReduceSocial, isReduceFund, isOnly);
if (coreR != null) return coreR; if (coreR != null) return coreR;
boolean isSaveAndUpdate = false;
YifuUser user = SecurityUtils.getUser(); YifuUser user = SecurityUtils.getUser();
String userId = "305"; String userId = "305";
String userName = "系统"; String userName = "系统";
...@@ -1894,6 +1895,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1894,6 +1895,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
userId = user.getId(); userId = user.getId();
userName = user.getNickname(); userName = user.getNickname();
} }
TForecastLibrary library1;
for (TForecastLibrary library : saveLibraryMap.values()) { for (TForecastLibrary library : saveLibraryMap.values()) {
if (Common.isEmpty(library.getSocialId()) && Common.isEmpty(library.getProvidentId())) { if (Common.isEmpty(library.getSocialId()) && Common.isEmpty(library.getProvidentId())) {
continue; continue;
...@@ -1906,16 +1908,21 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1906,16 +1908,21 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
log.error("更新一条预估耗时:" + times + "毫秒"); log.error("更新一条预估耗时:" + times + "毫秒");
isSaveAndUpdate = true; isSaveAndUpdate = true;
} else { } else {
if (BigDecimal.ZERO.compareTo(BigDecimalUtils.isNullToZero(library.getUnitSocialSum())) != CommonConstants.ZERO_INT synchronized (this) {
|| BigDecimal.ZERO.compareTo(BigDecimalUtils.isNullToZero(library.getUnitFundSum())) != CommonConstants.ZERO_INT) { if (BigDecimal.ZERO.compareTo(BigDecimalUtils.isNullToZero(library.getUnitSocialSum())) != CommonConstants.ZERO_INT
library.setCreateBy(userId); || BigDecimal.ZERO.compareTo(BigDecimalUtils.isNullToZero(library.getUnitFundSum())) != CommonConstants.ZERO_INT) {
library.setCreateName(userName); //判断是否有重复数据有则删除
library.setCreateTime(LocalDateTime.now()); baseMapper.deleteForecastSocial(library.getEmpIdcard(),library.getSocialPayMonth(),library.getSocialCreateMonth());
baseMapper.insert(library); library.setCreateBy(userId);
isSaveAndUpdate = true; library.setCreateName(userName);
library.setCreateTime(LocalDateTime.now());
baseMapper.insert(library);
isSaveAndUpdate = true;
}
} }
} }
} }
saveLibraryMap.clear();
if (Common.isNotNull(socialFundInfo.getSocialId()) && CommonConstants.FOUR_STRING.equals(socialFundInfo.getSocialStatus()) if (Common.isNotNull(socialFundInfo.getSocialId()) && CommonConstants.FOUR_STRING.equals(socialFundInfo.getSocialStatus())
|| CommonConstants.THREE_STRING.equals(socialFundInfo.getSocialStatus())) { || CommonConstants.THREE_STRING.equals(socialFundInfo.getSocialStatus())) {
......
...@@ -678,6 +678,11 @@ ...@@ -678,6 +678,11 @@
</foreach> </foreach>
</update> </update>
<delete id="deleteForecastSocial">
delete from t_forecast_library where SOCIAL_PAY_MONTH = #{socialPayMonth} and SOCIAL_CREATE_MONTH = #{socialCreateMonth}
and EMP_IDCARD = #{idCard} and DATA_PUSH = 0
</delete>
<!-- 更改薪资公积金结算状态 --> <!-- 更改薪资公积金结算状态 -->
<update id="updateForSocialAndFound"> <update id="updateForSocialAndFound">
update t_forecast_library update t_forecast_library
......
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