Commit 14360dcf authored by fangxinjiang's avatar fangxinjiang

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

parents 5bfe2bfc a106eb90
...@@ -398,9 +398,9 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal ...@@ -398,9 +398,9 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
salaryImportsSuccessList.stream().forEach(e -> { salaryImportsSuccessList.stream().forEach(e -> {
TMinSalary selectOne = new TMinSalary(); TMinSalary selectOne = new TMinSalary();
selectOne.setId(e.getId()); selectOne.setId(e.getId());
if (e.getLocation().contains("/")) {
String location[] = e.getLocation().split("/"); String location[] = e.getLocation().split("/");
if(location.length>1) { if (location.length > 1) {
for (int i = 0; i < location.length; i++) { for (int i = 0; i < location.length; i++) {
if (i == CommonConstants.ZERO_INT) { if (i == CommonConstants.ZERO_INT) {
int province = baseMapper.selectByAreaName(location[i]); int province = baseMapper.selectByAreaName(location[i]);
...@@ -426,7 +426,36 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal ...@@ -426,7 +426,36 @@ public class TMinSalaryServiceImpl extends ServiceImpl<TMinSalaryMapper, TMinSal
selectOne.setSalaryBase(e.getSalaryBase()); selectOne.setSalaryBase(e.getSalaryBase());
selectOne.setUpdateTime(LocalDateTime.now()); selectOne.setUpdateTime(LocalDateTime.now());
baseMapper.updateById(selectOne); baseMapper.updateById(selectOne);
}
if (e.getLocation().contains("-")) {
String location[] = e.getLocation().split("-");
if (location.length > 1) {
for (int i = 0; i < location.length; i++) {
if (i == CommonConstants.ZERO_INT) {
int province = baseMapper.selectByAreaName(location[i]);
selectOne.setProvince(province);
}
if (i == CommonConstants.ONE_INT) {
int city = baseMapper.selectByAreaName(location[i]);
selectOne.setCity(city);
}
if (i == CommonConstants.TWO_INT) {
int town = baseMapper.selectByAreaName(location[i]);
selectOne.setTown(town);
;
}
}
}
if (CommonConstants.START.equals(e.getStatus())) {
selectOne.setStatus(CommonConstants.ONE_INT);
}
if (CommonConstants.STOP.equals(e.getStatus())) {
selectOne.setStatus(CommonConstants.TWO_INT);
}
selectOne.setSalaryBase(e.getSalaryBase());
selectOne.setUpdateTime(LocalDateTime.now());
baseMapper.updateById(selectOne);
}
}); });
} }
} }
......
...@@ -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,25 +3872,23 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -3872,25 +3872,23 @@ 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);
} }
} }
} }
}
// 2.派减办理成功 处理预估 (不管社保还是公积金办理失败) // 2.派减办理成功 处理预估 (不管社保还是公积金办理失败)
if (CommonConstants.ONE_STRING.equals(dis.getType()) if (CommonConstants.ONE_STRING.equals(dis.getType())
&& CommonConstants.ZERO_INT == flag && CommonConstants.ZERO_INT == flag
......
...@@ -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,8 +1908,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1906,8 +1908,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
log.error("更新一条预估耗时:" + times + "毫秒"); log.error("更新一条预估耗时:" + times + "毫秒");
isSaveAndUpdate = true; isSaveAndUpdate = true;
} else { } else {
synchronized (this) {
if (BigDecimal.ZERO.compareTo(BigDecimalUtils.isNullToZero(library.getUnitSocialSum())) != CommonConstants.ZERO_INT if (BigDecimal.ZERO.compareTo(BigDecimalUtils.isNullToZero(library.getUnitSocialSum())) != CommonConstants.ZERO_INT
|| BigDecimal.ZERO.compareTo(BigDecimalUtils.isNullToZero(library.getUnitFundSum())) != CommonConstants.ZERO_INT) { || BigDecimal.ZERO.compareTo(BigDecimalUtils.isNullToZero(library.getUnitFundSum())) != CommonConstants.ZERO_INT) {
//判断是否有重复数据有则删除
baseMapper.deleteForecastSocial(library.getEmpIdcard(),library.getSocialPayMonth(),library.getSocialCreateMonth());
library.setCreateBy(userId); library.setCreateBy(userId);
library.setCreateName(userName); library.setCreateName(userName);
library.setCreateTime(LocalDateTime.now()); library.setCreateTime(LocalDateTime.now());
...@@ -1916,6 +1921,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1916,6 +1921,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
} }
} }
} }
}
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