Commit 59739efc authored by hongguangwu's avatar hongguangwu

预估库

parent 57f9fff6
...@@ -494,6 +494,12 @@ public class TForecastLibrary extends BaseEntity { ...@@ -494,6 +494,12 @@ public class TForecastLibrary extends BaseEntity {
@ExcelAttribute(name = "数据同步:0未同步;1已同步") @ExcelAttribute(name = "数据同步:0未同步;1已同步")
@ExcelProperty("数据同步:0未同步;1已同步") @ExcelProperty("数据同步:0未同步;1已同步")
private Integer dataPush; private Integer dataPush;
/**
* 类型:0社保;1公积金
*/
@ExcelAttribute(name = "类型:0社保;1公积金")
@ExcelProperty("类型:0社保;1公积金")
private Integer dataType;
@TableField(exist = false) @TableField(exist = false)
private List<String> idList; private List<String> idList;
......
...@@ -191,9 +191,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -191,9 +191,13 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
@Override @Override
public R<Boolean> createForecastlibary(String payMonths, String empIdCard, String settleDomainIds) { public R<Boolean> createForecastlibary(String payMonths, String empIdCard, String settleDomainIds) {
//定义未推送的按条件查询得到的预估数据 //定义未推送的按条件查询得到的预估数据
List<TForecastLibrary> libraryList = null; List<TForecastLibrary> librarySocialList = null;
//定义已推送的按条件查询得到的预估数据 //定义已推送的按条件查询得到的预估数据
List<TForecastLibrary> libraryListTemp = null; List<TForecastLibrary> librarySocialListTemp = null;
//定义未推送的按条件查询得到的预估数据
List<TForecastLibrary> libraryFundList = null;
//定义已推送的按条件查询得到的预估数据
List<TForecastLibrary> libraryFundListTemp = null;
List<String> settleDomainIdList = Common.initStrToList(settleDomainIds, CommonConstants.COMMA_STRING); List<String> settleDomainIdList = Common.initStrToList(settleDomainIds, CommonConstants.COMMA_STRING);
List<String> payMonthList = Common.initStrToList(payMonths, CommonConstants.COMMA_STRING); List<String> payMonthList = Common.initStrToList(payMonths, CommonConstants.COMMA_STRING);
if (Common.isEmpty(payMonths) || payMonthList == null) { if (Common.isEmpty(payMonths) || payMonthList == null) {
...@@ -211,29 +215,50 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -211,29 +215,50 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
} }
//查询出所有对应条件的预估数、社保数据、公积金数据据用于重新生成 //查询出所有对应条件的预估数、社保数据、公积金数据据用于重新生成
if (Common.isNotNull(empIdCard)) { if (Common.isNotNull(empIdCard)) {
libraryList = baseMapper.selectList(Wrappers.<TForecastLibrary>query().lambda() librarySocialList = baseMapper.selectList(Wrappers.<TForecastLibrary>query().lambda()
.eq(TForecastLibrary::getEmpIdcard, empIdCard)
.eq(TForecastLibrary::getDataType, CommonConstants.ZERO_INT)
.in(TForecastLibrary::getSocialPayMonth, payMonthList)
.eq(TForecastLibrary::getDataPush, CommonConstants.ZERO_INT));
librarySocialListTemp = baseMapper.selectList(Wrappers.<TForecastLibrary>query().lambda()
.eq(TForecastLibrary::getEmpIdcard, empIdCard)
.eq(TForecastLibrary::getDataType, CommonConstants.ZERO_INT)
.in(TForecastLibrary::getSocialPayMonth, payMonthList)
.eq(TForecastLibrary::getDataPush, CommonConstants.ONE_INT));
libraryFundList = baseMapper.selectList(Wrappers.<TForecastLibrary>query().lambda()
.eq(TForecastLibrary::getEmpIdcard, empIdCard) .eq(TForecastLibrary::getEmpIdcard, empIdCard)
.and(obj1 -> obj1.in(TForecastLibrary::getSocialPayMonth, payMonthList) .eq(TForecastLibrary::getDataType, CommonConstants.ONE_INT)
.or() .in(TForecastLibrary::getProvidentPayMonth, payMonthList)
.in(TForecastLibrary::getProvidentPayMonth, payMonthList))
.eq(TForecastLibrary::getDataPush, CommonConstants.ZERO_INT)); .eq(TForecastLibrary::getDataPush, CommonConstants.ZERO_INT));
libraryListTemp = baseMapper.selectList(Wrappers.<TForecastLibrary>query().lambda() libraryFundListTemp = baseMapper.selectList(Wrappers.<TForecastLibrary>query().lambda()
.eq(TForecastLibrary::getEmpIdcard, empIdCard) .eq(TForecastLibrary::getEmpIdcard, empIdCard)
.and(obj1 -> obj1.in(TForecastLibrary::getSocialPayMonth, payMonthList).or().in(TForecastLibrary::getProvidentPayMonth, payMonthList)) .eq(TForecastLibrary::getDataType, CommonConstants.ONE_INT)
.ne(TForecastLibrary::getDataPush, CommonConstants.ZERO_INT)); .in(TForecastLibrary::getProvidentPayMonth, payMonthList)
.eq(TForecastLibrary::getDataPush, CommonConstants.ONE_INT));
socialInfoList = socialFundInfoMapper.getSocialList(empIdCard, null); socialInfoList = socialFundInfoMapper.getSocialList(empIdCard, null);
fundList = socialFundInfoMapper.getFundList(empIdCard, null); fundList = socialFundInfoMapper.getFundList(empIdCard, null);
} else { } else {
libraryList = baseMapper.selectList(Wrappers.<TForecastLibrary>query().lambda() librarySocialList = baseMapper.selectList(Wrappers.<TForecastLibrary>query().lambda()
.in(TForecastLibrary::getSettleDomainId, settleDomainIdList) .in(TForecastLibrary::getSettleDomainId, settleDomainIdList)
.and(obj1 -> obj1.in(TForecastLibrary::getSocialPayMonth, payMonthList) .eq(TForecastLibrary::getDataType, CommonConstants.ZERO_INT)
.or() .in(TForecastLibrary::getSocialPayMonth, payMonthList)
.in(TForecastLibrary::getProvidentPayMonth, payMonthList))
.eq(TForecastLibrary::getDataPush, CommonConstants.ZERO_INT)); .eq(TForecastLibrary::getDataPush, CommonConstants.ZERO_INT));
libraryListTemp = baseMapper.selectList(Wrappers.<TForecastLibrary>query().lambda() librarySocialListTemp = baseMapper.selectList(Wrappers.<TForecastLibrary>query().lambda()
.in(TForecastLibrary::getSettleDomainId, settleDomainIdList) .in(TForecastLibrary::getSettleDomainId, settleDomainIdList)
.and(obj1 -> obj1.in(TForecastLibrary::getSocialPayMonth, payMonthList).or().in(TForecastLibrary::getProvidentPayMonth, payMonthList)) .eq(TForecastLibrary::getDataType, CommonConstants.ZERO_INT)
.ne(TForecastLibrary::getDataPush, CommonConstants.ZERO_INT)); .in(TForecastLibrary::getSocialPayMonth, payMonthList)
.eq(TForecastLibrary::getDataPush, CommonConstants.ONE_INT));
libraryFundList = baseMapper.selectList(Wrappers.<TForecastLibrary>query().lambda()
.in(TForecastLibrary::getSettleDomainId, settleDomainIdList)
.eq(TForecastLibrary::getDataType, CommonConstants.ONE_INT)
.in(TForecastLibrary::getProvidentPayMonth, payMonthList)
.eq(TForecastLibrary::getDataPush, CommonConstants.ZERO_INT));
libraryFundListTemp = baseMapper.selectList(Wrappers.<TForecastLibrary>query().lambda()
.in(TForecastLibrary::getSettleDomainId, settleDomainIdList)
.eq(TForecastLibrary::getDataType, CommonConstants.ONE_INT)
.in(TForecastLibrary::getProvidentPayMonth, payMonthList)
.eq(TForecastLibrary::getDataPush, CommonConstants.ONE_INT));
socialInfoList = socialFundInfoMapper.getSocialList(null, settleDomainIdList); socialInfoList = socialFundInfoMapper.getSocialList(null, settleDomainIdList);
fundList = socialFundInfoMapper.getFundList(null, settleDomainIdList); fundList = socialFundInfoMapper.getFundList(null, settleDomainIdList);
} }
...@@ -242,38 +267,42 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -242,38 +267,42 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
return R.failed("无需要重新生成的数据(无数据或数据已结算不可重新生成!)"); return R.failed("无需要重新生成的数据(无数据或数据已结算不可重新生成!)");
} }
//先删除然后重新生成 //先删除然后重新生成
if (Common.isNotNull(libraryList)) { if (Common.isNotNull(librarySocialList)) {
baseMapper.deleteBatchIds(libraryList); baseMapper.deleteBatchIds(librarySocialList);
}
if (Common.isNotNull(libraryFundList)) {
baseMapper.deleteBatchIds(libraryFundList);
} }
boolean flag; boolean flag;
// 已推送的预估明细Map // 已推送的预估明细Map
HashMap<String, TForecastLibrary> libraryHashMapTemp = new HashMap<>(); HashMap<String, TForecastLibrary> socialPushMap = new HashMap<>();
HashMap<String, TForecastLibrary> fundPushMap = new HashMap<>();
// Map的key // Map的key
StringBuilder sfMapKey; String sfMapKey;
StringBuilder initKey; if (Common.isNotNull(librarySocialListTemp)) {
if (Common.isNotNull(libraryListTemp)) {
TForecastLibrary libraryOld; TForecastLibrary libraryOld;
for (TForecastLibrary library : libraryListTemp) { for (TForecastLibrary library : librarySocialListTemp) {
sfMapKey = new StringBuilder(library.getEmpIdcard()); sfMapKey = this.getMapKey(library.getEmpIdcard(), library.getSettleDomainId(), library.getSocialPayMonth(), library.getSocialCreateMonth());
// 获取key libraryOld = socialPushMap.get(sfMapKey);
if (Common.isNotNull(library.getSocialProvince())) { if (libraryOld != null) {
this.getMapKey(sfMapKey, library.getSocialProvince(), library.getSocialCity(), library.getSocialTown()); this.getChangeAddData(libraryOld, library);
} else {
this.getMapKey(sfMapKey, library.getFundProvince(), library.getFundCity(), library.getFundTown());
} }
sfMapKey.append(CommonConstants.DOWN_LINE_STRING).append(library.getSocialPayMonth()); socialPushMap.put(sfMapKey, library);
sfMapKey.append(CommonConstants.DOWN_LINE_STRING).append(library.getSocialCreateMonth()); }
libraryOld = libraryHashMapTemp.get(sfMapKey.toString()); }
if (Common.isNotNull(libraryFundListTemp)) {
TForecastLibrary libraryOld;
for (TForecastLibrary library : libraryFundListTemp) {
sfMapKey = this.getMapKey(library.getEmpIdcard(), library.getSettleDomainId(), library.getProvidentPayMonth(), library.getProvidentCreateMonth());
libraryOld = fundPushMap.get(sfMapKey);
if (libraryOld != null) { if (libraryOld != null) {
this.getChangeAddData(libraryOld, library); this.getChangeAddData(libraryOld, library);
} }
libraryHashMapTemp.put(sfMapKey.toString(), library); fundPushMap.put(sfMapKey, library);
} }
} }
HashMap<String, TForecastLibrary> libraryHashMap = new HashMap<>(); Map<String, TForecastLibrary> saveLibraryMap = new HashMap<>();
TForecastLibrary tForecastLibrary; TForecastLibrary tForecastLibrary;
// Map的key转String
String mapKeyStr;
String createMonth; String createMonth;
boolean isReduceSocial = false; boolean isReduceSocial = false;
boolean isReduceFund = false; boolean isReduceFund = false;
...@@ -282,21 +311,12 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -282,21 +311,12 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
if (Common.isNotNull(socialInfoList)) { if (Common.isNotNull(socialInfoList)) {
for (TSocialFundInfo tSocialInfo : socialInfoList) { for (TSocialFundInfo tSocialInfo : socialInfoList) {
createMonth = ServiceUtil.initCreateMonth(tSocialInfo.getCreateTime(), payMonth); createMonth = ServiceUtil.initCreateMonth(tSocialInfo.getCreateTime(), payMonth);
sfMapKey = new StringBuilder(tSocialInfo.getEmpIdcard()); sfMapKey = this.getMapKey(tSocialInfo.getEmpIdcard(), tSocialInfo.getSettleDomain(), payMonth, createMonth);
// 获取key
this.getMapKey(sfMapKey, tSocialInfo.getSocialProvince(), tSocialInfo.getSocialCity(), tSocialInfo.getSocialTown());
sfMapKey.append(CommonConstants.DOWN_LINE_STRING).append(payMonth);
// 不可调换位置
initKey = new StringBuilder();
initKey.append(sfMapKey);
sfMapKey.append(CommonConstants.DOWN_LINE_STRING).append(createMonth);
mapKeyStr = sfMapKey.toString();
// 变更:已推送的,计算变更值 // 变更:已推送的,计算变更值
tForecastLibrary = libraryHashMapTemp.get(mapKeyStr); tForecastLibrary = socialPushMap.get(sfMapKey);
if (null != tForecastLibrary) { if (null != tForecastLibrary) {
this.getChangeReduceData(tSocialInfo, tForecastLibrary); this.getChangeReduceData(tSocialInfo, tForecastLibrary);
libraryHashMap.put(sfMapKey.toString(), tForecastLibrary);
} }
//起缴月份在要生成的月份前不处理 //起缴月份在要生成的月份前不处理
if (Integer.parseInt(payMonth) < DateUtil.formatDateInt(tSocialInfo.getSocialStartDate())) { if (Integer.parseInt(payMonth) < DateUtil.formatDateInt(tSocialInfo.getSocialStartDate())) {
...@@ -307,27 +327,18 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -307,27 +327,18 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
return R.failed("员工" + tSocialInfo.getEmpName() + ":" + tSocialInfo.getEmpIdcard() + SocialConstants.SOCIAL_SET_ERROR); return R.failed("员工" + tSocialInfo.getEmpName() + ":" + tSocialInfo.getEmpIdcard() + SocialConstants.SOCIAL_SET_ERROR);
} }
// 初始化社保 // 初始化社保
initSocialLibary(payMonth, libraryHashMap, tSocialInfo, isReduceFund, agentConfigHashMap, initKey); initSocialLibary(payMonth, saveLibraryMap, tSocialInfo, isReduceFund, agentConfigHashMap, tForecastLibrary, sfMapKey);
} }
} }
//封装公积金预估数据 //封装公积金预估数据
if (Common.isNotNull(fundList)) { if (Common.isNotNull(fundList)) {
for (TSocialFundInfo providentFund : fundList) { for (TSocialFundInfo providentFund : fundList) {
createMonth = ServiceUtil.initCreateMonth(providentFund.getCreateTime(), payMonth); createMonth = ServiceUtil.initCreateMonth(providentFund.getCreateTime(), payMonth);
sfMapKey = new StringBuilder(providentFund.getEmpIdcard()); sfMapKey = this.getMapKey(providentFund.getEmpIdcard(), providentFund.getSettleDomain(), payMonth, createMonth);
// 获取key
this.getMapKey(sfMapKey, providentFund.getFundProvince(), providentFund.getFundCity(), providentFund.getFundTown());
sfMapKey.append(CommonConstants.DOWN_LINE_STRING).append(payMonth);
// 不可调换位置
initKey = new StringBuilder();
initKey.append(sfMapKey);
sfMapKey.append(CommonConstants.DOWN_LINE_STRING).append(createMonth);
mapKeyStr = sfMapKey.toString();
// 变更:已推送的,计算变更值 // 变更:已推送的,计算变更值
tForecastLibrary = libraryHashMapTemp.get(mapKeyStr); tForecastLibrary = fundPushMap.get(sfMapKey);
if (null != tForecastLibrary) { if (null != tForecastLibrary) {
this.getChangeReduceData(providentFund, tForecastLibrary); this.getChangeReduceData(providentFund, tForecastLibrary);
libraryHashMap.put(sfMapKey.toString(), tForecastLibrary);
} }
//起缴月份在要生成的月份后不处理 //起缴月份在要生成的月份后不处理
if (Integer.parseInt(payMonth) < DateUtil.formatDateInt(providentFund.getProvidentStart())) { if (Integer.parseInt(payMonth) < DateUtil.formatDateInt(providentFund.getProvidentStart())) {
...@@ -338,12 +349,12 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -338,12 +349,12 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
return R.failed("员工" + providentFund.getEmpName() + ":" + providentFund.getEmpIdcard() + SocialConstants.SOCIAL_SET_ERROR); return R.failed("员工" + providentFund.getEmpName() + ":" + providentFund.getEmpIdcard() + SocialConstants.SOCIAL_SET_ERROR);
} }
// 初始化公积金 // 初始化公积金
initFundLibary(payMonth, libraryHashMap, providentFund, isReduceSocial, initKey); initFundLibary(payMonth, saveLibraryMap, providentFund, isReduceSocial, tForecastLibrary, sfMapKey);
} }
} }
} }
boolean isSaveAndUpdate = false; boolean isSaveAndUpdate = false;
for (TForecastLibrary library : libraryHashMap.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;
} }
...@@ -362,6 +373,17 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -362,6 +373,17 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
} }
} }
private String getMapKey(String empIdcard, String settleDomainId
, String socialPayMonth, String socialCreateMonth) {
StringBuilder sfMapKey;
sfMapKey = new StringBuilder(empIdcard);
// 获取key
sfMapKey.append(CommonConstants.DOWN_LINE_STRING).append(settleDomainId);
sfMapKey.append(CommonConstants.DOWN_LINE_STRING).append(socialPayMonth);
sfMapKey.append(CommonConstants.DOWN_LINE_STRING).append(socialCreateMonth);
return sfMapKey.toString();
}
/** /**
* @param libraryOld * @param libraryOld
* @param library * @param library
...@@ -460,19 +482,19 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -460,19 +482,19 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
} }
} }
private void initSocialLibary(String payMonth, HashMap<String, TForecastLibrary> libraryHashMap private void initSocialLibary(String payMonth, Map<String, TForecastLibrary> saveLibraryMap
, TSocialFundInfo tSocialInfo, boolean isReduceFund, HashMap<String, TAgentConfig> agentConfigMap, StringBuilder mapKeyStr) { , TSocialFundInfo tSocialInfo, boolean isReduceFund, HashMap<String, TAgentConfig> agentConfigMap
mapKeyStr.append(CommonConstants.DOWN_LINE_STRING).append(ServiceUtil.initCreateMonth(tSocialInfo.getCreateTime(), payMonth)); , TForecastLibrary lib, String sfMapKey) {
TForecastLibrary lib = libraryHashMap.get(mapKeyStr.toString());
if (null == lib) { if (null == lib) {
lib = new TForecastLibrary(); lib = new TForecastLibrary();
lib.setEmpId(tSocialInfo.getEmpId());
lib.setEmpIdcard(tSocialInfo.getEmpIdcard());
lib.setEmpName(tSocialInfo.getEmpName());
lib.setEmpNo(tSocialInfo.getEmpNo());
lib.setSocialCreateMonth(ServiceUtil.initCreateMonth(tSocialInfo.getCreateTime(), payMonth));
lib.setProvidentCreateMonth(lib.getSocialCreateMonth());
} }
lib.setDataType(CommonConstants.ZERO_INT);
lib.setEmpId(tSocialInfo.getEmpId());
lib.setEmpIdcard(tSocialInfo.getEmpIdcard());
lib.setEmpName(tSocialInfo.getEmpName());
lib.setEmpNo(tSocialInfo.getEmpNo());
lib.setSocialCreateMonth(ServiceUtil.initCreateMonth(tSocialInfo.getCreateTime(), payMonth));
lib.setProvidentCreateMonth(lib.getSocialCreateMonth());
lib.setSocialPayMonth(payMonth); lib.setSocialPayMonth(payMonth);
//同时处理公积金日期 //同时处理公积金日期
lib.setProvidentPayMonth(payMonth); lib.setProvidentPayMonth(payMonth);
...@@ -493,7 +515,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -493,7 +515,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
isReduceSocial = false; isReduceSocial = false;
} }
lib = initForecastLibrary(lib, tSocialInfo, null, monthT, isReduceFund, isReduceSocial, agentConfigMap); lib = initForecastLibrary(lib, tSocialInfo, null, monthT, isReduceFund, isReduceSocial, agentConfigMap);
libraryHashMap.put(mapKeyStr.toString(), lib); saveLibraryMap.put(sfMapKey, lib);
} }
/** /**
...@@ -1112,26 +1134,25 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1112,26 +1134,25 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
* 初始化公积金预估信息 * 初始化公积金预估信息
* *
* @param payMonth * @param payMonth
* @param libraryHashMap * @param saveLibraryMap
* @param providentFund * @param providentFund
* @param isReduceSocial * @param isReduceSocial
* @return * @return
* @Author fxj * @Author fxj
* @Date 2020-07-21 * @Date 2020-07-21
**/ **/
private void initFundLibary(String payMonth, HashMap<String, TForecastLibrary> libraryHashMap private void initFundLibary(String payMonth, Map<String, TForecastLibrary> saveLibraryMap
, TSocialFundInfo providentFund, boolean isReduceSocial, StringBuilder mapKeyStr) { , TSocialFundInfo providentFund, boolean isReduceSocial, TForecastLibrary lib, String mapKeyStr) {
mapKeyStr.append(CommonConstants.DOWN_LINE_STRING).append(ServiceUtil.initCreateMonth(providentFund.getCreateTime(), payMonth)); if (lib == null) {
TForecastLibrary lib = libraryHashMap.get(mapKeyStr.toString());
if (null == lib) {
lib = new TForecastLibrary(); lib = new TForecastLibrary();
lib.setEmpId(providentFund.getEmpId());
lib.setEmpIdcard(providentFund.getEmpIdcard());
lib.setEmpName(providentFund.getEmpName());
lib.setEmpNo(providentFund.getEmpNo());
lib.setProvidentCreateMonth(ServiceUtil.initCreateMonth(providentFund.getCreateTime(), payMonth));
lib.setSocialCreateMonth(lib.getProvidentCreateMonth());
} }
lib.setDataType(CommonConstants.ONE_INT);
lib.setEmpId(providentFund.getEmpId());
lib.setEmpIdcard(providentFund.getEmpIdcard());
lib.setEmpName(providentFund.getEmpName());
lib.setEmpNo(providentFund.getEmpNo());
lib.setProvidentCreateMonth(ServiceUtil.initCreateMonth(providentFund.getCreateTime(), payMonth));
lib.setSocialCreateMonth(lib.getProvidentCreateMonth());
//同时处理社保日期 //同时处理社保日期
lib.setSocialPayMonth(payMonth); lib.setSocialPayMonth(payMonth);
lib.setProvidentPayMonth(payMonth); lib.setProvidentPayMonth(payMonth);
...@@ -1161,7 +1182,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap ...@@ -1161,7 +1182,7 @@ public class TForecastLibraryServiceImpl extends ServiceImpl<TForecastLibraryMap
isReduceFund = false; isReduceFund = false;
} }
lib = initForecastLibrary(lib, null, providentFund, monthT, isReduceFund, isReduceSocial, null); lib = initForecastLibrary(lib, null, providentFund, monthT, isReduceFund, isReduceSocial, null);
libraryHashMap.put(mapKeyStr.toString(), lib); saveLibraryMap.put(mapKeyStr, lib);
} }
} }
...@@ -94,6 +94,7 @@ ...@@ -94,6 +94,7 @@
<result property="providentHouseholdName" column="PROVIDENT_HOUSEHOLD_NAME"/> <result property="providentHouseholdName" column="PROVIDENT_HOUSEHOLD_NAME"/>
<result property="providentNo" column="PROVIDENT_NO"/> <result property="providentNo" column="PROVIDENT_NO"/>
<result property="dataPush" column="DATA_PUSH"/> <result property="dataPush" column="DATA_PUSH"/>
<result property="dataType" column="DATA_TYPE"/>
<result property="createBy" column="CREATE_BY"/> <result property="createBy" column="CREATE_BY"/>
<result property="createName" column="CREATE_NAME"/> <result property="createName" column="CREATE_NAME"/>
<result property="createTime" column="CREATE_TIME"/> <result property="createTime" column="CREATE_TIME"/>
...@@ -101,84 +102,82 @@ ...@@ -101,84 +102,82 @@
<result property="updateTime" column="UPDATE_TIME"/> <result property="updateTime" column="UPDATE_TIME"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
a a.ID,
. a.EMP_ID,
ID a.EMP_NO,
, a.EMP_NAME,
a.EMP_ID, a.EMP_IDCARD,
a.EMP_NO, a.SOCIAL_ID,
a.EMP_NAME, a.SETTLE_DOMAIN_ID,
a.EMP_IDCARD, a.UNIT_ID,
a.SOCIAL_ID, a.PROVIDENT_ID,
a.SETTLE_DOMAIN_ID, a.UNIT_PENSION_FEE,
a.UNIT_ID, a.UNIT_MEDICAL_FEE,
a.PROVIDENT_ID, a.UNIT_UNEMPLOYMENT_FEE,
a.UNIT_PENSION_FEE, a.UNIT_WORK_INJURY_FEE,
a.UNIT_MEDICAL_FEE, a.UNIT_BIRTH_FEE,
a.UNIT_UNEMPLOYMENT_FEE, a.UNIT_BITAILMENT_FEE,
a.UNIT_WORK_INJURY_FEE, a.PERSONAL_PENSION_FEE,
a.UNIT_BIRTH_FEE, a.PERSONAL_MEDICAL_FEE,
a.UNIT_BITAILMENT_FEE, a.PERSONAL_UNEMPLOYMENT_FEE,
a.PERSONAL_PENSION_FEE, a.PERSONAL_BIGAILMENT_FEE,
a.PERSONAL_MEDICAL_FEE, a.SOCIAL_PAY_MONTH,
a.PERSONAL_UNEMPLOYMENT_FEE, a.SOCIAL_CREATE_MONTH,
a.PERSONAL_BIGAILMENT_FEE, a.PROVIDENT_PAY_MONTH,
a.SOCIAL_PAY_MONTH, a.PROVIDENT_CREATE_MONTH,
a.SOCIAL_CREATE_MONTH, a.UNIT_SOCIAL_SUM,
a.PROVIDENT_PAY_MONTH, a.UNIT_FUND_SUM,
a.PROVIDENT_CREATE_MONTH, a.PERSONAL_SOCIAL_SUM,
a.UNIT_SOCIAL_SUM, a.PERSONAL_FUND_SUM,
a.UNIT_FUND_SUM, a.FUND_PROVINCE,
a.PERSONAL_SOCIAL_SUM, a.FUND_CITY,
a.PERSONAL_FUND_SUM, a.FUND_TOWN,
a.FUND_PROVINCE, a.SOCIAL_PROVINCE,
a.FUND_CITY, a.SOCIAL_CITY,
a.FUND_TOWN, a.SOCIAL_TOWN,
a.SOCIAL_PROVINCE, a.UNIT_PENSION_BASE,
a.SOCIAL_CITY, a.UNIT_MEDICAL_BASE,
a.SOCIAL_TOWN, a.UNIT_UNEMPLOYMENT_BASE,
a.UNIT_PENSION_BASE, a.UNIT_INJURY_BASE,
a.UNIT_MEDICAL_BASE, a.UNIT_BIRTH_BASE,
a.UNIT_UNEMPLOYMENT_BASE, a.UNIT_BIGAILMENT_BASE,
a.UNIT_INJURY_BASE, a.PERSONAL_PENSION_BASE,
a.UNIT_BIRTH_BASE, a.PERSONAL_MEDICAL_BASE,
a.UNIT_BIGAILMENT_BASE, a.PERSONAL_UNEMPLOYMENT_BASE,
a.PERSONAL_PENSION_BASE, a.PERSONAL_BIGAILMENT_BASE,
a.PERSONAL_MEDICAL_BASE, a.UNIT_PERSION_PRO,
a.PERSONAL_UNEMPLOYMENT_BASE, a.UNIT_MEDICAL_PRO,
a.PERSONAL_BIGAILMENT_BASE, a.UNIT_UNEMPLOYMENT_PRO,
a.UNIT_PERSION_PRO, a.UNIT_INJURY_PRO,
a.UNIT_MEDICAL_PRO, a.UNIT_BIRTH_PRO,
a.UNIT_UNEMPLOYMENT_PRO, a.UNIT_BIGAILMENT_PRO,
a.UNIT_INJURY_PRO, a.PERSONAL_PERSION_PRO,
a.UNIT_BIRTH_PRO, a.PERSONAL_MEDICAL_PRO,
a.UNIT_BIGAILMENT_PRO, a.PERSONAL_UNEMPLOYMENT_PRO,
a.PERSONAL_PERSION_PRO, a.PERSONAL_BIGAILMENT_PRO,
a.PERSONAL_MEDICAL_PRO, a.UNIT_FUND_BASE,
a.PERSONAL_UNEMPLOYMENT_PRO, a.PERSONAL_FUND_BASE,
a.PERSONAL_BIGAILMENT_PRO, a.UNIT_FUND_PROP,
a.UNIT_FUND_BASE, a.PERSONAL_FUND_PROP,
a.PERSONAL_FUND_BASE, a.REMARK,
a.UNIT_FUND_PROP, a.PROJECT_ID,
a.PERSONAL_FUND_PROP, a.UNIT_NAME,
a.REMARK, a.DEPT_NAME,
a.PROJECT_ID, a.EMP_NATRUE,
a.UNIT_NAME, a.UNIT_INTEREST_FEE,
a.DEPT_NAME, a.PERSONAL_INTEREST_FEE,
a.EMP_NATRUE, a.SOCIAL_HOUSEHOLD,
a.UNIT_INTEREST_FEE, a.SOCIAL_HOUSEHOLD_NAME,
a.PERSONAL_INTEREST_FEE, a.PROVIDENT_HOUSEHOLD,
a.SOCIAL_HOUSEHOLD, a.PROVIDENT_HOUSEHOLD_NAME,
a.SOCIAL_HOUSEHOLD_NAME, a.PROVIDENT_NO,
a.PROVIDENT_HOUSEHOLD, a.DATA_PUSH,
a.PROVIDENT_HOUSEHOLD_NAME, a.DATA_TYPE,
a.PROVIDENT_NO, a.CREATE_BY,
a.DATA_PUSH, a.CREATE_NAME,
a.CREATE_BY, a.CREATE_TIME,
a.CREATE_NAME, a.UPDATE_BY,
a.CREATE_TIME, a.UPDATE_TIME
a.UPDATE_BY,
a.UPDATE_TIME
</sql> </sql>
<sql id="tForecastLibrary_where"> <sql id="tForecastLibrary_where">
<if test="tForecastLibrary != null"> <if test="tForecastLibrary != null">
...@@ -398,6 +397,9 @@ ...@@ -398,6 +397,9 @@
<if test="tForecastLibrary.dataPush != null"> <if test="tForecastLibrary.dataPush != null">
AND a.DATA_PUSH = #{tForecastLibrary.dataPush} AND a.DATA_PUSH = #{tForecastLibrary.dataPush}
</if> </if>
<if test="tForecastLibrary.dataType != null">
AND a.DATA_TYPE = #{tForecastLibrary.dataType}
</if>
<if test="tForecastLibrary.createBy != null and tForecastLibrary.createBy.trim() != ''"> <if test="tForecastLibrary.createBy != null and tForecastLibrary.createBy.trim() != ''">
AND a.CREATE_BY = #{tForecastLibrary.createBy} AND a.CREATE_BY = #{tForecastLibrary.createBy}
</if> </if>
......
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