Commit c10d652b authored by wangzb's avatar wangzb

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

parents 106d99b4 9798cb7e
...@@ -26,6 +26,7 @@ import com.baomidou.mybatisplus.annotation.TableName; ...@@ -26,6 +26,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttributeConstants;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.social.vo.SocialImportHandleVo;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
...@@ -750,4 +751,14 @@ public class TDispatchInfo extends BaseEntity { ...@@ -750,4 +751,14 @@ public class TDispatchInfo extends BaseEntity {
@TableField(exist = false) @TableField(exist = false)
private String noCreateUser; private String noCreateUser;
@TableField(exist = false)
private SocialImportHandleVo excel;
@TableField(exist = false)
private String handlerRemaek;
@TableField(exist = false)
private String socialFailureType;
} }
...@@ -5288,6 +5288,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -5288,6 +5288,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
String handlerRemaek; String handlerRemaek;
List<TDispatchInfo> failueList = new ArrayList<>();
for (int i = 0; i < excelVOList.size(); i++) { for (int i = 0; i < excelVOList.size(); i++) {
StringBuilder socialSucessType = new StringBuilder(); StringBuilder socialSucessType = new StringBuilder();
StringBuilder socialFailureType = new StringBuilder(); StringBuilder socialFailureType = new StringBuilder();
...@@ -5375,27 +5376,38 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -5375,27 +5376,38 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
errorMessageList.add(errorMessage); errorMessageList.add(errorMessage);
} }
//办理失败处理 //办理失败处理
if (socialFailureType.length() > 1) { if (socialFailureType.length() > 1) {
if (!CommonConstants.TWO_STRING.equals(dispatch.getStatus())) { if (!CommonConstants.TWO_STRING.equals(dispatch.getStatus())) {
continue; continue;
} }
// 执行数据插入操作 组装 dispatch.setHandlerRemaek(handlerRemaek);
messageList = addBatchApplyHandle(Collections.singletonList(dispatch.getId()), CommonConstants.ZERO_STRING, user dispatch.setSocialFailureType(socialFailureType.toString());
, 1, CommonConstants.TWO_STRING, handlerRemaek + ServiceUtil.ifNullToEmpty(excel.getRemark()), socialFailureType.substring(0, socialFailureType.length() - 1), handlerRemaek + ServiceUtil.ifNullToEmpty(excel.getRemark())); dispatch.setExcel(excel);
if (Common.isNotNull(messageList)) { failueList.add(dispatch);
errorMessage = messageList.get(CommonConstants.ZERO_INT);
errorMessage.setData(excel);
} else {
errorMessage = new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_SUCCESS, CommonConstants.GREEN, excel);
}
errorMessageList.add(errorMessage);
} }
} catch (Exception e) { } catch (Exception e) {
log.error("批量导入办理异常:", e); log.error("批量导入办理异常:", e);
errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_FAILED, excel)); errorMessageList.add(new ErrorMessage(excel.getRowIndex(), CommonConstants.SAVE_FAILED, excel));
} }
} }
if (!Common.isEmpty(failueList)) {
SocialImportHandleVo vo;
for (TDispatchInfo dispatchInfo : failueList) {
vo = dispatchInfo.getExcel();
// 执行数据插入操作 组装
messageList = addBatchApplyHandle(Collections.singletonList(dispatchInfo.getId()), CommonConstants.ZERO_STRING, user
, 1, CommonConstants.TWO_STRING, dispatchInfo.getHandlerRemaek() + ServiceUtil.ifNullToEmpty(vo.getRemark()), dispatchInfo.getSocialFailureType().substring(0, dispatchInfo.getSocialFailureType().length() - 1), dispatchInfo.getHandlerRemaek() + ServiceUtil.ifNullToEmpty(vo.getRemark()));
if (Common.isNotNull(messageList)) {
errorMessage = messageList.get(CommonConstants.ZERO_INT);
errorMessage.setData(vo);
} else {
errorMessage = new ErrorMessage(vo.getRowIndex(), CommonConstants.SAVE_SUCCESS, CommonConstants.GREEN, vo);
}
errorMessageList.add(errorMessage);
}
}
} }
@Override @Override
......
...@@ -1864,13 +1864,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1864,13 +1864,11 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
//先删除然后重新生成 //先删除然后重新生成
boolean isSaveAndUpdate = false; boolean isSaveAndUpdate = false;
synchronized (this) { if (Common.isNotNull(librarySocialList)) {
if (Common.isNotNull(librarySocialList)) { baseMapper.deleteBatchIds(librarySocialList);
baseMapper.deleteBatchIds(librarySocialList); }
} if (Common.isNotNull(libraryFundList)) {
if (Common.isNotNull(libraryFundList)) { baseMapper.deleteBatchIds(libraryFundList);
baseMapper.deleteBatchIds(libraryFundList);
}
} }
// 新基数,老比例,存放Map // 新基数,老比例,存放Map
HashMap<String, TForecastLibrary> socialHistoryMap = new HashMap<>(); HashMap<String, TForecastLibrary> socialHistoryMap = new HashMap<>();
...@@ -1908,18 +1906,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1908,18 +1906,13 @@ 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) { library.setCreateBy(userId);
//判断是否有重复数据有则删除 library.setCreateName(userName);
baseMapper.deleteForecastSocial(library.getEmpIdcard(),library.getSocialPayMonth(),library.getSocialCreateMonth() library.setCreateTime(LocalDateTime.now());
,library.getProvidentPayMonth(),library.getProvidentCreateMonth()); baseMapper.insert(library);
library.setCreateBy(userId); isSaveAndUpdate = true;
library.setCreateName(userName);
library.setCreateTime(LocalDateTime.now());
baseMapper.insert(library);
isSaveAndUpdate = true;
}
} }
} }
} }
......
...@@ -679,8 +679,8 @@ ...@@ -679,8 +679,8 @@
</update> </update>
<delete id="deleteForecastSocial"> <delete id="deleteForecastSocial">
delete from t_forecast_library where (SOCIAL_PAY_MONTH = #{socialPayMonth} and SOCIAL_CREATE_MONTH = #{socialCreateMonth}) delete from t_forecast_library where ((SOCIAL_PAY_MONTH = #{socialPayMonth} and SOCIAL_CREATE_MONTH = #{socialCreateMonth})
or (PROVIDENT_PAY_MONTH = #{fundPayMonth} and PROVIDENT_CREATE_MONTH = #{fundCreateMonth}) or (PROVIDENT_PAY_MONTH = #{fundPayMonth} and PROVIDENT_CREATE_MONTH = #{fundCreateMonth}))
and EMP_IDCARD = #{idCard} and DATA_PUSH = 0 and EMP_IDCARD = #{idCard} and DATA_PUSH = 0
</delete> </delete>
......
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