Commit a7038b59 authored by zhaji's avatar zhaji

Merge branch 'develop' into feature-zhaji

parents 0f6a4098 f3ca4cb3
......@@ -45,5 +45,4 @@ public class PreDispatchConstants {
public static final String NO_SOCIAL_FUND_ADDRESS_REDUCE = "派减:养老城市和公积金城市不可同时为空,请确认表中有‘养老城市’和‘公积金城市’数据列及数据!";
public static final String GET_AREA_INFO = "获取区域数据失败!";
public static final String TEL_NOT_EMPTY = "联系电话2不可为空!";
public static final String TEL_INVALID = "联系电话2无效!";
}
......@@ -393,7 +393,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
library.setPersonalPensionFee(BigDecimalUtils.safeAdd(libraryOld.getPersonalPensionFee(), library.getPersonalPensionFee()));
library.setPersonalMedicalFee(BigDecimalUtils.safeAdd(libraryOld.getPersonalMedicalFee(), library.getPersonalMedicalFee()));
library.setPersonalUnemploymentFee(BigDecimalUtils.safeAdd(libraryOld.getPersonalUnemploymentFee(), library.getPersonalUnemploymentFee()));
library.setPersonalInterestFee(BigDecimalUtils.safeAdd(libraryOld.getPersonalUnemploymentFee(), library.getPersonalUnemploymentFee()));
library.setPersonalInterestFee(BigDecimalUtils.safeAdd(libraryOld.getPersonalInterestFee(), library.getPersonalInterestFee()));
library.setPersonalBigailmentFee(BigDecimalUtils.safeAdd(libraryOld.getPersonalBigailmentFee(), library.getPersonalBigailmentFee()));
library.setPersonalSocialSum(BigDecimalUtils.safeAdd(libraryOld.getPersonalSocialSum(), library.getPersonalSocialSum()));
// 单位公积金
......@@ -403,34 +403,36 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
}
/**
* @param socialFund
* @param libraryNew
* @param libraryOld
* @Description: 获取变更的部分
* @Author: hgw
* @Date: 2022/7/20 11:29
* @return: void
**/
private void getChangeReduceData(TSocialFundInfo socialFund, TForecastLibrary libraryOld) {
private void getChangeReduceData(TForecastLibrary libraryNew, TForecastLibrary libraryOld) {
//单位社保
libraryOld.setUnitPensionFee(BigDecimalUtils.safeSubtract(socialFund.getUnitPersionMoney(), libraryOld.getUnitPensionFee()));
libraryOld.setUnitMedicalFee(BigDecimalUtils.safeSubtract(socialFund.getUnitMedicalMoney(), libraryOld.getUnitMedicalFee()));
libraryOld.setUnitBirthFee(BigDecimalUtils.safeSubtract(socialFund.getUnitBirthMoney(), libraryOld.getUnitBirthFee()));
libraryOld.setUnitWorkInjuryFee(BigDecimalUtils.safeSubtract(socialFund.getUnitInjuryMoney(), libraryOld.getUnitWorkInjuryFee()));
libraryOld.setUnitUnemploymentFee(BigDecimalUtils.safeSubtract(socialFund.getUnitUnemploymentMoney(), libraryOld.getUnitUnemploymentFee()));
libraryOld.setUnitBitailmentFee(BigDecimalUtils.safeSubtract(socialFund.getUnitBigailmentMoney(), libraryOld.getUnitBitailmentFee()));
libraryOld.setUnitInterestFee(BigDecimalUtils.safeSubtract(socialFund.getUnitInterestFee(), libraryOld.getUnitInterestFee()));
libraryOld.setUnitSocialSum(BigDecimalUtils.safeSubtract(socialFund.getUnitSocialSum(), libraryOld.getUnitSocialSum()));
libraryNew.setUnitPensionFee(BigDecimalUtils.safeSubtract( false, libraryNew.getUnitPensionFee(), libraryOld.getUnitPensionFee()));
libraryNew.setUnitMedicalFee(BigDecimalUtils.safeSubtract( false, libraryNew.getUnitMedicalFee(), libraryOld.getUnitMedicalFee()));
libraryNew.setUnitBirthFee(BigDecimalUtils.safeSubtract( false, libraryNew.getUnitBirthFee(), libraryOld.getUnitBirthFee()));
libraryNew.setUnitWorkInjuryFee(BigDecimalUtils.safeSubtract( false, libraryNew.getUnitWorkInjuryFee(), libraryOld.getUnitWorkInjuryFee()));
libraryNew.setUnitUnemploymentFee(BigDecimalUtils.safeSubtract( false, libraryNew.getUnitUnemploymentFee(), libraryOld.getUnitUnemploymentFee()));
libraryNew.setUnitBitailmentFee(BigDecimalUtils.safeSubtract( false, libraryNew.getUnitBitailmentFee(), libraryOld.getUnitBitailmentFee()));
libraryNew.setUnitInterestFee(BigDecimalUtils.safeSubtract( false, libraryNew.getUnitInterestFee(), libraryOld.getUnitInterestFee()));
libraryNew.setUnitSocialSum(BigDecimalUtils.safeSubtract( false, libraryNew.getUnitSocialSum(), libraryOld.getUnitSocialSum()));
// 个人社保
libraryOld.setPersonalPensionFee(BigDecimalUtils.safeSubtract(socialFund.getPersonalPersionMoney(), libraryOld.getPersonalPensionFee()));
libraryOld.setPersonalMedicalFee(BigDecimalUtils.safeSubtract(socialFund.getPersonalMedicalMoney(), libraryOld.getPersonalMedicalFee()));
libraryOld.setPersonalUnemploymentFee(BigDecimalUtils.safeSubtract(socialFund.getPersonalUnemploymentMoney(), libraryOld.getPersonalUnemploymentFee()));
libraryOld.setPersonalInterestFee(BigDecimalUtils.safeSubtract(socialFund.getPersonalUnemploymentMoney(), libraryOld.getPersonalUnemploymentFee()));
libraryOld.setPersonalBigailmentFee(BigDecimalUtils.safeSubtract(socialFund.getPersonalBigailmentMoney(), libraryOld.getPersonalBigailmentFee()));
libraryOld.setPersonalSocialSum(BigDecimalUtils.safeSubtract(socialFund.getPersonalSocialSum(), libraryOld.getPersonalSocialSum()));
libraryNew.setPersonalPensionFee(BigDecimalUtils.safeSubtract( false, libraryNew.getPersonalPensionFee(), libraryOld.getPersonalPensionFee()));
libraryNew.setPersonalMedicalFee(BigDecimalUtils.safeSubtract( false, libraryNew.getPersonalMedicalFee(), libraryOld.getPersonalMedicalFee()));
libraryNew.setPersonalUnemploymentFee(BigDecimalUtils.safeSubtract( false, libraryNew.getPersonalUnemploymentFee(), libraryOld.getPersonalUnemploymentFee()));
libraryNew.setPersonalInterestFee(BigDecimalUtils.safeSubtract( false, libraryNew.getPersonalInterestFee(), libraryOld.getPersonalInterestFee()));
libraryNew.setPersonalBigailmentFee(BigDecimalUtils.safeSubtract( false, libraryNew.getPersonalBigailmentFee(), libraryOld.getPersonalBigailmentFee()));
libraryNew.setPersonalSocialSum(BigDecimalUtils.safeSubtract( false, libraryNew.getPersonalSocialSum(), libraryOld.getPersonalSocialSum()));
// 单位公积金
libraryOld.setUnitFundSum(BigDecimalUtils.safeSubtract(socialFund.getUnitFundSum(), libraryOld.getUnitFundSum()));
libraryNew.setUnitFundSum(BigDecimalUtils.safeSubtract( false, libraryNew.getUnitFundSum(), libraryOld.getUnitFundSum()));
// 个人公积金
libraryOld.setPersonalFundSum(BigDecimalUtils.safeSubtract(socialFund.getPersonalFundSum(), libraryOld.getPersonalFundSum()));
libraryNew.setPersonalFundSum(BigDecimalUtils.safeSubtract( false, libraryNew.getPersonalFundSum(), libraryOld.getPersonalFundSum()));
libraryNew.setSumAll(BigDecimalUtils.safeSubtract( false, libraryNew.getSumAll(), libraryOld.getSumAll()));
}
......@@ -451,12 +453,8 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
private void initSocialLibary(String diffType, String payMonth, Map<String, TForecastLibrary> saveLibraryMap
, TSocialFundInfo tSocialInfo, boolean isReduceFund, HashMap<String, TAgentConfig> agentConfigMap
, TForecastLibrary lib, String sfMapKey, TForecastLibrary historyLibrary) {
if (null == lib) {
lib = new TForecastLibrary();
} else if (Common.isNotNull(lib.getId())) {
lib.setId(null);
}
, String sfMapKey, TForecastLibrary historyLibrary) {
TForecastLibrary lib = new TForecastLibrary();
lib.setDataPush(CommonConstants.ZERO_INT);
lib.setSocialHousehold(tSocialInfo.getSocialHousehold());
lib.setSocialHouseholdName(tSocialInfo.getSocialHouseholdName());
......@@ -1250,13 +1248,9 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
* @Date 2020-07-21
**/
private void initFundLibary(String diffType, String payMonth, Map<String, TForecastLibrary> saveLibraryMap
, TSocialFundInfo providentFund, boolean isReduceSocial, TForecastLibrary lib, String mapKeyStr
, TSocialFundInfo providentFund, boolean isReduceSocial, String mapKeyStr
, TForecastLibrary historyLibrary) {
if (lib == null) {
lib = new TForecastLibrary();
} else if (Common.isNotNull(lib.getId())) {
lib.setId(null);
}
TForecastLibrary lib = new TForecastLibrary();
lib.setDataPush(CommonConstants.ZERO_INT);
lib.setProvidentHousehold(providentFund.getProvidentHousehold());
lib.setProvidentHouseholdName(providentFund.getProvidentHouseholdName());
......@@ -1489,38 +1483,50 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
@Override
public R<String> updateForecastLibaryByDispatchReduce(TSocialFundInfo socialFundInfo) {
String empIdCard = socialFundInfo.getEmpIdcard();
Date socialReduceDate = socialFundInfo.getSocialReduceDate();
Date fundReduceDate = socialFundInfo.getFundReduceDate();
if (socialReduceDate == null && fundReduceDate == null) {
return R.failed("社保、公积金减少日期不能都为空!");
}
// 查询已经生成的预估数据
List<TForecastLibrary> socialLibraryList = null;
List<TForecastLibrary> fundLibraryList = null;
if (Common.isNotNull(empIdCard)) {
Date minStartDate = this.getMinSocialDate(socialFundInfo);
BigDecimal zero = BigDecimal.ZERO;
if (socialReduceDate != null) {
socialLibraryList = baseMapper.selectList(Wrappers.<TForecastLibrary>query().lambda()
// 查询已经生成的预估数据
List<TForecastLibrary> socialLibraryList = baseMapper.selectList(Wrappers.<TForecastLibrary>query().lambda()
.eq(TForecastLibrary::getEmpIdcard, empIdCard)
.eq(TForecastLibrary::getDataType, CommonConstants.ZERO_INT));
if (Common.isNotNull(socialLibraryList)) {
// 社保
Date socialReduceDate = socialFundInfo.getSocialReduceDate();
for (TForecastLibrary library : socialLibraryList) {
if (Common.isNotNull(library.getSocialPayMonth())) {
if (socialReduceDate != null) {
// 存在社保派减且处于派减期间内,未被预估结算,工资结算引用则清空相关数据
if (Common.isNotNull(library.getSocialPayMonth()) && DateUtil.formatDateInt(socialReduceDate) < Integer.parseInt(library.getSocialPayMonth())) {
this.calculateType(zero, library);
if (DateUtil.formatDateInt(socialReduceDate) < Integer.parseInt(library.getSocialPayMonth())) {
this.calculateSocialType(zero, library);
}
} else {
if (DateUtil.formatDateInt(minStartDate) <= Integer.parseInt(library.getSocialPayMonth())) {
this.calculateSocialType(zero, library);
}
}
}
}
if (socialReduceDate != null) {
fundLibraryList = baseMapper.selectList(Wrappers.<TForecastLibrary>query().lambda()
}
// 公积金
List<TForecastLibrary> fundLibraryList = baseMapper.selectList(Wrappers.<TForecastLibrary>query().lambda()
.eq(TForecastLibrary::getEmpIdcard, empIdCard)
.eq(TForecastLibrary::getDataType, CommonConstants.ONE_INT));
if (Common.isNotNull(fundLibraryList)) {
minStartDate = socialFundInfo.getProvidentStart();
Date fundReduceDate = socialFundInfo.getFundReduceDate();
for (TForecastLibrary library : fundLibraryList) {
if (Common.isNotNull(library.getProvidentPayMonth())) {
if (fundReduceDate != null) {
// 存在社保派减且处于派减期间内,未被预估结算,工资结算引用则清空相关数据
if (Common.isNotNull(library.getProvidentPayMonth()) && DateUtil.formatDateInt(fundReduceDate) < Integer.parseInt(library.getProvidentPayMonth())) {
this.calculateType(zero, library);
if (DateUtil.formatDateInt(fundReduceDate) < Integer.parseInt(library.getProvidentPayMonth())) {
this.calculateFundType(zero, library);
}
} else {
if (DateUtil.formatDateInt(minStartDate) <= Integer.parseInt(library.getProvidentPayMonth())) {
this.calculateFundType(zero, library);
}
}
}
}
......@@ -1529,31 +1535,45 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
return R.ok();
}
private void calculateType(BigDecimal zero, TForecastLibrary library) {
private void calculateSocialType(BigDecimal zero, TForecastLibrary library) {
if (library.getDataPush() == CommonConstants.ONE_INT) {
// 加负数
TForecastLibrary negateLib = new TForecastLibrary();
BeanUtil.copyProperties(library, negateLib);
negateLib.setUnitPensionFee(BigDecimalUtils.safeSubtract(zero, library.getUnitPensionFee()));
negateLib.setUnitMedicalFee(BigDecimalUtils.safeSubtract(zero, library.getUnitMedicalFee()));
negateLib.setUnitBirthFee(BigDecimalUtils.safeSubtract(zero, library.getUnitBirthFee()));
negateLib.setUnitWorkInjuryFee(BigDecimalUtils.safeSubtract(zero, library.getUnitWorkInjuryFee()));
negateLib.setUnitUnemploymentFee(BigDecimalUtils.safeSubtract(zero, library.getUnitUnemploymentFee()));
negateLib.setUnitBitailmentFee(BigDecimalUtils.safeSubtract(zero, library.getUnitBitailmentFee()));
negateLib.setUnitInterestFee(BigDecimalUtils.safeSubtract(zero, library.getUnitInterestFee()));
negateLib.setUnitSocialSum(BigDecimalUtils.safeSubtract(zero, library.getUnitSocialSum()));
negateLib.setUnitPensionFee(BigDecimalUtils.safeSubtract( false, zero, library.getUnitPensionFee()));
negateLib.setUnitMedicalFee(BigDecimalUtils.safeSubtract( false, zero, library.getUnitMedicalFee()));
negateLib.setUnitBirthFee(BigDecimalUtils.safeSubtract( false, zero, library.getUnitBirthFee()));
negateLib.setUnitWorkInjuryFee(BigDecimalUtils.safeSubtract( false, zero, library.getUnitWorkInjuryFee()));
negateLib.setUnitUnemploymentFee(BigDecimalUtils.safeSubtract( false, zero, library.getUnitUnemploymentFee()));
negateLib.setUnitBitailmentFee(BigDecimalUtils.safeSubtract( false, zero, library.getUnitBitailmentFee()));
negateLib.setUnitInterestFee(BigDecimalUtils.safeSubtract( false, zero, library.getUnitInterestFee()));
negateLib.setUnitSocialSum(BigDecimalUtils.safeSubtract( false, zero, library.getUnitSocialSum()));
// 个人社保
negateLib.setPersonalPensionFee(BigDecimalUtils.safeSubtract(zero, library.getPersonalPensionFee()));
negateLib.setPersonalMedicalFee(BigDecimalUtils.safeSubtract(zero, library.getPersonalMedicalFee()));
negateLib.setPersonalUnemploymentFee(BigDecimalUtils.safeSubtract(zero, library.getPersonalUnemploymentFee()));
negateLib.setPersonalInterestFee(BigDecimalUtils.safeSubtract(zero, library.getPersonalUnemploymentFee()));
negateLib.setPersonalBigailmentFee(BigDecimalUtils.safeSubtract(zero, library.getPersonalBigailmentFee()));
negateLib.setPersonalSocialSum(BigDecimalUtils.safeSubtract(zero, library.getPersonalSocialSum()));
negateLib.setPersonalPensionFee(BigDecimalUtils.safeSubtract( false, zero, library.getPersonalPensionFee()));
negateLib.setPersonalMedicalFee(BigDecimalUtils.safeSubtract( false, zero, library.getPersonalMedicalFee()));
negateLib.setPersonalUnemploymentFee(BigDecimalUtils.safeSubtract( false, zero, library.getPersonalUnemploymentFee()));
negateLib.setPersonalInterestFee(BigDecimalUtils.safeSubtract( false, zero, library.getPersonalInterestFee()));
negateLib.setPersonalBigailmentFee(BigDecimalUtils.safeSubtract( false, zero, library.getPersonalBigailmentFee()));
negateLib.setPersonalSocialSum(BigDecimalUtils.safeSubtract( false, zero, library.getPersonalSocialSum()));
negateLib.setSumAll(BigDecimalUtils.safeSubtract( false, zero, library.getSumAll()));
negateLib.setDiffType(SocialConstants.DIFF_TYPE_TWO);
baseMapper.insert(negateLib);
} else {
// 删除
baseMapper.deleteById(library.getId());
}
}
private void calculateFundType(BigDecimal zero, TForecastLibrary library) {
if (library.getDataPush() == CommonConstants.ONE_INT) {
// 加负数
TForecastLibrary negateLib = new TForecastLibrary();
BeanUtil.copyProperties(library, negateLib);
// 单位公积金
negateLib.setUnitFundSum(BigDecimalUtils.safeSubtract(zero, library.getUnitFundSum()));
negateLib.setUnitFundSum(BigDecimalUtils.safeSubtract(false, zero, library.getUnitFundSum()));
// 个人公积金
negateLib.setPersonalFundSum(BigDecimalUtils.safeSubtract(zero, library.getPersonalFundSum()));
negateLib.setSumAll(BigDecimalUtils.safeSubtract(zero, library.getSumAll()));
negateLib.setPersonalFundSum(BigDecimalUtils.safeSubtract(false, zero, library.getPersonalFundSum()));
negateLib.setSumAll(BigDecimalUtils.safeSubtract(false, zero, library.getSumAll()));
negateLib.setDiffType(SocialConstants.DIFF_TYPE_TWO);
baseMapper.insert(negateLib);
} else {
......@@ -1721,6 +1741,32 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
return minStartDate;
}
private Date getMinSocialDate(TSocialFundInfo socialFundInfo) {
Date minStartDate = null;
if (socialFundInfo.getSocialStartDate() != null) {
minStartDate = socialFundInfo.getSocialStartDate();
if (socialFundInfo.getUnitPersionMoney() != null && socialFundInfo.getPensionStart() != null && socialFundInfo.getPensionStart().before(minStartDate)) {
minStartDate = socialFundInfo.getPensionStart();
}
if (socialFundInfo.getUnitMedicalMoney() != null && socialFundInfo.getMedicalStart() != null && socialFundInfo.getMedicalStart().before(minStartDate)) {
minStartDate = socialFundInfo.getMedicalStart();
}
if (socialFundInfo.getUnitUnemploymentMoney() != null && socialFundInfo.getUnemployStart() != null && socialFundInfo.getUnemployStart().before(minStartDate)) {
minStartDate = socialFundInfo.getUnemployStart();
}
if (socialFundInfo.getUnitInjuryMoney() != null && socialFundInfo.getWorkInjuryStart() != null && socialFundInfo.getWorkInjuryStart().before(minStartDate)) {
minStartDate = socialFundInfo.getWorkInjuryStart();
}
if (socialFundInfo.getUnitBirthMoney() != null && socialFundInfo.getBirthStart() != null && socialFundInfo.getBirthStart().before(minStartDate)) {
minStartDate = socialFundInfo.getBirthStart();
}
}
if (null == minStartDate) {
minStartDate = new Date();
}
return minStartDate;
}
/**
* @Description: 核心刷新
* @Author: hgw
......@@ -1738,6 +1784,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
String createMonth;
String sfMapKey;
TForecastLibrary tForecastLibrary;
TForecastLibrary newForecastLibrary;
String diffType;
Date minStartDate;
for (String payMonth : payMonthList) {
......@@ -1753,7 +1800,6 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
diffType = SocialConstants.DIFF_TYPE_ONE;
if (null != tForecastLibrary) {
diffType = SocialConstants.DIFF_TYPE_TWO;
this.getChangeReduceData(tSocialInfo, tForecastLibrary);
} else if (CommonConstants.dingleDigitStrArray[5].equals(tSocialInfo.getSocialStatus())
|| CommonConstants.dingleDigitStrArray[10].equals(tSocialInfo.getSocialStatus())) {
// 5 办理失败 10 审核不通过,且无推送数据,不新增
......@@ -1771,7 +1817,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
} else {
historyLibrary = socialHistoryMap.get(sfMapKey);
// 初始化社保
initSocialLibary(diffType, payMonth, saveLibraryMap, tSocialInfo, isReduceFund, agentConfigHashMap, tForecastLibrary, sfMapKey, historyLibrary);
initSocialLibary(diffType, payMonth, saveLibraryMap, tSocialInfo, isReduceFund, agentConfigHashMap, sfMapKey, historyLibrary);
if (null != tForecastLibrary) {
newForecastLibrary = saveLibraryMap.get(sfMapKey);
if (null != newForecastLibrary) {
this.getChangeReduceData(newForecastLibrary, tForecastLibrary);
}
}
}
}
}
......@@ -1785,7 +1837,6 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
diffType = SocialConstants.DIFF_TYPE_ONE;
if (null != tForecastLibrary) {
diffType = SocialConstants.DIFF_TYPE_TWO;
this.getChangeReduceData(providentFund, tForecastLibrary);
} else if (CommonConstants.dingleDigitStrArray[4].equals(providentFund.getFundStatus())
|| CommonConstants.dingleDigitStrArray[9].equals(providentFund.getFundStatus())) {
// 4办理失败9 审核不通过,且无推送数据,不新增
......@@ -1803,7 +1854,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
} else {
historyLibrary = fundHistoryMap.get(sfMapKey);
// 初始化公积金
initFundLibary(diffType, payMonth, saveLibraryMap, providentFund, isReduceSocial, tForecastLibrary, sfMapKey, historyLibrary);
initFundLibary(diffType, payMonth, saveLibraryMap, providentFund, isReduceSocial, sfMapKey, historyLibrary);
if (null != tForecastLibrary) {
newForecastLibrary = saveLibraryMap.get(sfMapKey);
if (null != newForecastLibrary) {
this.getChangeReduceData(newForecastLibrary, tForecastLibrary);
}
}
}
}
......
......@@ -552,9 +552,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
if (Common.isEmpty(tPreDispatchInfo.getTelTwo())){
return R.failed(PreDispatchConstants.TEL_NOT_EMPTY);
}
if (ValidityUtil.checkInvalidEmpPhone(tPreDispatchInfo.getTelTwo())){
return R.failed(PreDispatchConstants.TEL_INVALID);
}
}
if (CommonConstants.ONE_STRING.equals(tPreDispatchInfo.getType())) {
initLeaveReason(tPreDispatchInfo);
......@@ -600,8 +597,8 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
int i = 1;
for (TPreDispatchInfo info : listInfo) {
i++;
if (!CommonConstants.IS_TRUE.equals(info.getTelNotice()) &&
!CommonConstants.IS_FALSE.equals(info.getTelNotice())) {
if (Common.isNotNull(info.getTelNotice()) && (!CommonConstants.IS_TRUE.equals(info.getTelNotice()) &&
!CommonConstants.IS_FALSE.equals(info.getTelNotice()))) {
errorList.add(new ErrorMessage(i,"是否电话通知不允许导入【是】和【否】之外的内容"));
continue;
}
......@@ -749,8 +746,8 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
String str = null;
for (TPreDispatchInfo info:listInfo){
i++;
if (!CommonConstants.IS_TRUE.equals(info.getTelNotice()) &&
!CommonConstants.IS_FALSE.equals(info.getTelNotice())) {
if (Common.isNotNull(info.getTelNotice()) && (!CommonConstants.IS_TRUE.equals(info.getTelNotice()) &&
!CommonConstants.IS_FALSE.equals(info.getTelNotice()))) {
errorList.add(new ErrorMessage(i,"是否电话通知不允许导入【是】和【否】之外的内容"));
continue;
}
......@@ -857,7 +854,7 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
TPreDispatchInfo preInfo = new TPreDispatchInfo();
if (Common.isNotNull(list)){
for (TPreDispatchReduceVo info:list){
BeanUtils.copyProperties(preInfo,info);
BeanUtils.copyProperties(info,preInfo);
listInfo.add(preInfo);
}
}
......@@ -1174,9 +1171,6 @@ public class TPreDispatchInfoServiceImpl extends ServiceImpl<TPreDispatchInfoMap
if (Common.isEmpty(tPreDispatchInfo.getTelTwo())){
return PreDispatchConstants.TEL_NOT_EMPTY;
}
if (ValidityUtil.checkInvalidEmpPhone(tPreDispatchInfo.getTelTwo())){
return PreDispatchConstants.TEL_INVALID;
}
if (Common.isEmpty(tPreDispatchInfo.getPensionAddress()) &&
Common.isEmpty(tPreDispatchInfo.getFundAddress())) {
return PreDispatchConstants.NO_SOCIAL_FUND_ADDRESS_ADD;
......
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