Commit 15794355 authored by fangxinjiang's avatar fangxinjiang

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

parents 38b7e180 068395e4
...@@ -70,5 +70,7 @@ public interface TSocialFriendMapper extends BaseMapper<TSocialInfo> { ...@@ -70,5 +70,7 @@ public interface TSocialFriendMapper extends BaseMapper<TSocialInfo> {
, @Param("isAuto") Integer isAuto, @Param("userId") String userId); , @Param("isAuto") Integer isAuto, @Param("userId") String userId);
// 当前徽州区的户名配置表,后续可扩展类型,存其他对应表
List<String> getSpecialHuName();
} }
...@@ -137,6 +137,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -137,6 +137,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
Map<String, TSocialFriendReduceSet> reduceYgsMap = tSocialFriendReduceSetService.getFriendReduceMap(CommonConstants.ONE_STRING); Map<String, TSocialFriendReduceSet> reduceYgsMap = tSocialFriendReduceSetService.getFriendReduceMap(CommonConstants.ONE_STRING);
Map<String, TSocialFriendReduceSet> reduceYsdMap = tSocialFriendReduceSetService.getFriendReduceMap(CommonConstants.TWO_STRING); Map<String, TSocialFriendReduceSet> reduceYsdMap = tSocialFriendReduceSetService.getFriendReduceMap(CommonConstants.TWO_STRING);
Map<String, TSocialFriendReduceSet> reduceChiZhouMap = tSocialFriendReduceSetService.getFriendReduceMap(CommonConstants.THREE_STRING); Map<String, TSocialFriendReduceSet> reduceChiZhouMap = tSocialFriendReduceSetService.getFriendReduceMap(CommonConstants.THREE_STRING);
Map<String, Integer> huiZhouMap = this.getSpecialHuNameMap();
// 获取时间限制配置(获取 当月启用 的配置) // 获取时间限制配置(获取 当月启用 的配置)
Map<String, TSocialDeadlineInfo> socialSetMap = tSocialDeadlineInfoService.getSocialSetByAreaId(); Map<String, TSocialDeadlineInfo> socialSetMap = tSocialDeadlineInfoService.getSocialSetByAreaId();
...@@ -160,24 +161,24 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -160,24 +161,24 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
// 养工失新增列表 // 养工失新增列表
List<SociaFriendYgsAddVo> ygsAddlist = baseMapper.getSocialSoldierYgsAddVoList(dispatchIdList, pushDispatchIdList, isAuto, userId); List<SociaFriendYgsAddVo> ygsAddlist = baseMapper.getSocialSoldierYgsAddVoList(dispatchIdList, pushDispatchIdList, isAuto, userId);
if (ygsAddlist != null && !ygsAddlist.isEmpty()) { if (ygsAddlist != null && !ygsAddlist.isEmpty()) {
this.doPushSocialAndLogYgs(socialSetMap, ygsAddlist, 1, reduceYgsMap, zhangMap, templateUrl, templateSrcMap, reduceChiZhouMap); this.doPushSocialAndLogYgs(socialSetMap, ygsAddlist, 1, reduceYgsMap, zhangMap, templateUrl, templateSrcMap, reduceChiZhouMap, huiZhouMap);
} }
// 养工失减少列表 // 养工失减少列表
List<SociaFriendYgsAddVo> ygsReducelist = baseMapper.getSocialSoldierYgsReduceVoList(dispatchIdList, pushDispatchIdList, isAuto, userId); List<SociaFriendYgsAddVo> ygsReducelist = baseMapper.getSocialSoldierYgsReduceVoList(dispatchIdList, pushDispatchIdList, isAuto, userId);
if (ygsReducelist != null && !ygsReducelist.isEmpty()) { if (ygsReducelist != null && !ygsReducelist.isEmpty()) {
this.doPushSocialAndLogYgs(socialSetMap, ygsReducelist, 2, reduceYgsMap, zhangMap, templateUrl, templateSrcMap, reduceChiZhouMap); this.doPushSocialAndLogYgs(socialSetMap, ygsReducelist, 2, reduceYgsMap, zhangMap, templateUrl, templateSrcMap, reduceChiZhouMap, huiZhouMap);
} }
// 医生大新增列表 // 医生大新增列表
List<SociaFriendYgsAddVo> ysdAddlist = baseMapper.getSocialSoldierYsdAddVoList(dispatchIdList,pushDispatchIdList, isAuto, userId); List<SociaFriendYgsAddVo> ysdAddlist = baseMapper.getSocialSoldierYsdAddVoList(dispatchIdList,pushDispatchIdList, isAuto, userId);
if (ysdAddlist != null && !ysdAddlist.isEmpty()) { if (ysdAddlist != null && !ysdAddlist.isEmpty()) {
this.doPushSocialAndLogYsd(socialSetMap, ysdAddlist, 3, reduceYsdMap, zhangMap, templateUrl, templateSrcMap, reduceChiZhouMap); this.doPushSocialAndLogYsd(socialSetMap, ysdAddlist, 3, reduceYsdMap, zhangMap, templateUrl, templateSrcMap, reduceChiZhouMap, huiZhouMap);
} }
// 医生大减少列表 // 医生大减少列表
List<SociaFriendYgsAddVo> ysdReducelist = baseMapper.getSocialSoldierYsdReduceVoList(dispatchIdList, pushDispatchIdList, isAuto, userId); List<SociaFriendYgsAddVo> ysdReducelist = baseMapper.getSocialSoldierYsdReduceVoList(dispatchIdList, pushDispatchIdList, isAuto, userId);
if (ysdReducelist != null && !ysdReducelist.isEmpty()) { if (ysdReducelist != null && !ysdReducelist.isEmpty()) {
this.doPushSocialAndLogYsd(socialSetMap, ysdReducelist, 4, reduceYsdMap, zhangMap, templateUrl, templateSrcMap, reduceChiZhouMap); this.doPushSocialAndLogYsd(socialSetMap, ysdReducelist, 4, reduceYsdMap, zhangMap, templateUrl, templateSrcMap, reduceChiZhouMap, huiZhouMap);
} }
if ((ygsAddlist == null || ygsAddlist.isEmpty()) if ((ygsAddlist == null || ygsAddlist.isEmpty())
&& (ygsReducelist == null || ygsReducelist.isEmpty()) && (ygsReducelist == null || ygsReducelist.isEmpty())
...@@ -197,6 +198,18 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -197,6 +198,18 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
} }
} }
// 获取特殊的户名称,当前给 徽州区 使用,徽州区需要走不同的分支
private Map<String, Integer> getSpecialHuNameMap() {
Map<String, Integer> map = new HashMap<>();
List<String> list = baseMapper.getSpecialHuName();
if (list != null && !list.isEmpty()) {
for (String s : list) {
map.put(s, CommonConstants.ONE_INT);
}
}
return map;
}
/** /**
* @Description: 推送社保和记录日志 * @Description: 推送社保和记录日志
* @Author: hgw * @Author: hgw
...@@ -206,7 +219,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -206,7 +219,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
private R<String> doPushSocialAndLogYgs(Map<String, TSocialDeadlineInfo> socialSetMap private R<String> doPushSocialAndLogYgs(Map<String, TSocialDeadlineInfo> socialSetMap
, List<SociaFriendYgsAddVo> ygsAddlist, int type, Map<String, TSocialFriendReduceSet> reduceMap , List<SociaFriendYgsAddVo> ygsAddlist, int type, Map<String, TSocialFriendReduceSet> reduceMap
, Map<String, URL> zhangMap, URL templateUrl, Map<String, URL> templateSrcMap , Map<String, URL> zhangMap, URL templateUrl, Map<String, URL> templateSrcMap
, Map<String, TSocialFriendReduceSet> reduceChiZhouMap) { , Map<String, TSocialFriendReduceSet> reduceChiZhouMap, Map<String, Integer> huiZhouMap) {
int canPushType; int canPushType;
TSocialInfo socialInfo; TSocialInfo socialInfo;
String typeStr = "提交"; String typeStr = "提交";
...@@ -241,6 +254,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -241,6 +254,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
// 社保仅补缴生成材料 0否1是 // 社保仅补缴生成材料 0否1是
boolean dataFlagYgs; boolean dataFlagYgs;
int nowMonth = Integer.parseInt(DateUtil.getThisMonth()); int nowMonth = Integer.parseInt(DateUtil.getThisMonth());
// 如果是徽州区的社保,要单个推送,且走新分支
boolean isHuiZhou;
for (int index = 0 ; index < ygsAddlist.size(); index++) { for (int index = 0 ; index < ygsAddlist.size(); index++) {
vo = ygsAddlist.get(index); vo = ygsAddlist.get(index);
// 派减离职原因转化: // 派减离职原因转化:
...@@ -310,7 +325,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -310,7 +325,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
isSingle = Common.isNotNull(vo.getIsSingle()) && CommonConstants.ONE_STRING.equals(vo.getIsSingle()); isSingle = Common.isNotNull(vo.getIsSingle()) && CommonConstants.ONE_STRING.equals(vo.getIsSingle());
isAutoLeaveDoc = templateUrl != null && type == 2 && Common.isNotNull(vo.getIsAutoLeaveDoc()) isAutoLeaveDoc = templateUrl != null && type == 2 && Common.isNotNull(vo.getIsAutoLeaveDoc())
&& CommonConstants.ONE_STRING.equals(vo.getIsAutoLeaveDoc()); && CommonConstants.ONE_STRING.equals(vo.getIsAutoLeaveDoc());
if (isAutoLeaveDoc || isSingle || nextFlag || i % 10 == 0 || index >= ygsAddlist.size()-1) { isHuiZhou = huiZhouMap.get(vo.getSocialHouseholdName()) != null;
if (isHuiZhou || isAutoLeaveDoc || isSingle || nextFlag || i % 10 == 0 || index >= ygsAddlist.size()-1) {
rosterAutoFlagYgs = Common.isEmpty(vo.getRosterAutoFlagYgs()) || CommonConstants.ONE_STRING.equals(vo.getRosterAutoFlagYgs()); rosterAutoFlagYgs = Common.isEmpty(vo.getRosterAutoFlagYgs()) || CommonConstants.ONE_STRING.equals(vo.getRosterAutoFlagYgs());
if (rosterAutoFlagYgs && !huaListVo.isEmpty()) { if (rosterAutoFlagYgs && !huaListVo.isEmpty()) {
...@@ -338,7 +354,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -338,7 +354,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
// 针对部分传参bizNo却无requestId返回的情况,需要改进代码: // 针对部分传参bizNo却无requestId返回的情况,需要改进代码:
bizNo = vo.getSocialId() + type + thisTime; bizNo = vo.getSocialId() + type + thisTime;
requestId = socialFriendConfig.pushFriendByInfo(restTemplate, vo, listVo, type, bizNo, backLogList, tSocialFriendBackLogService); requestId = socialFriendConfig.pushFriendByInfo(restTemplate, vo, listVo, type, bizNo, backLogList
, tSocialFriendBackLogService, isHuiZhou);
ygsHandleStatus = CommonConstants.TWO_STRING; ygsHandleStatus = CommonConstants.TWO_STRING;
remark = "已推送提交任务!"; remark = "已推送提交任务!";
if (Common.isEmpty(requestId)) { if (Common.isEmpty(requestId)) {
...@@ -506,7 +523,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -506,7 +523,7 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
private void doPushSocialAndLogYsd(Map<String, TSocialDeadlineInfo> socialSetMap private void doPushSocialAndLogYsd(Map<String, TSocialDeadlineInfo> socialSetMap
, List<SociaFriendYgsAddVo> ysdAddlist, int type, Map<String, TSocialFriendReduceSet> reduceMap , List<SociaFriendYgsAddVo> ysdAddlist, int type, Map<String, TSocialFriendReduceSet> reduceMap
, Map<String, URL> zhangMap, URL templateUrl, Map<String, URL> templateSrcMap , Map<String, URL> zhangMap, URL templateUrl, Map<String, URL> templateSrcMap
, Map<String, TSocialFriendReduceSet> reduceChiZhouMap) { , Map<String, TSocialFriendReduceSet> reduceChiZhouMap, Map<String, Integer> huiZhouMap) {
int canPushType; int canPushType;
TSocialInfo socialInfo; TSocialInfo socialInfo;
String typeStr = "提交"; String typeStr = "提交";
...@@ -542,6 +559,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -542,6 +559,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
// 社保仅补缴生成材料 0否1是 // 社保仅补缴生成材料 0否1是
boolean dataFlagYsd; boolean dataFlagYsd;
int nowMonth = Integer.parseInt(DateUtil.getThisMonth()); int nowMonth = Integer.parseInt(DateUtil.getThisMonth());
// 如果是徽州区的医保,可以批量推送,且走新分支
boolean isHuiZhou;
for (int index = 0 ; index < ysdAddlist.size(); index++) { for (int index = 0 ; index < ysdAddlist.size(); index++) {
vo = ysdAddlist.get(index); vo = ysdAddlist.get(index);
...@@ -624,6 +643,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -624,6 +643,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
isAutoLeaveDoc = templateUrl != null && type == 4 && Common.isNotNull(vo.getIsAutoLeaveDoc()) isAutoLeaveDoc = templateUrl != null && type == 4 && Common.isNotNull(vo.getIsAutoLeaveDoc())
&& CommonConstants.ONE_STRING.equals(vo.getIsAutoLeaveDoc()); && CommonConstants.ONE_STRING.equals(vo.getIsAutoLeaveDoc());
// 徽州区的医保可以批量
isHuiZhou = huiZhouMap.get(vo.getSocialHouseholdName()) != null;
if (isAutoLeaveDoc || isSingle || nextFlag || i % 10 == 0 || index >= ysdAddlist.size()-1) { if (isAutoLeaveDoc || isSingle || nextFlag || i % 10 == 0 || index >= ysdAddlist.size()-1) {
rosterAutoFlagYsd = Common.isEmpty(vo.getRosterAutoFlagYsd()) || CommonConstants.ONE_STRING.equals(vo.getRosterAutoFlagYsd()); rosterAutoFlagYsd = Common.isEmpty(vo.getRosterAutoFlagYsd()) || CommonConstants.ONE_STRING.equals(vo.getRosterAutoFlagYsd());
...@@ -649,7 +670,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe ...@@ -649,7 +670,8 @@ public class TSocialFriendPushServiceImpl extends ServiceImpl<TSocialFriendMappe
nextFlag = false; nextFlag = false;
// 针对部分无requestId返回的情况,优化代码 // 针对部分无requestId返回的情况,优化代码
bizNo = vo.getSocialId() + type + thisTime; bizNo = vo.getSocialId() + type + thisTime;
requestId = socialFriendConfig.pushFriendByInfo(restTemplate, vo, listVo, type, bizNo, backLogList, tSocialFriendBackLogService); requestId = socialFriendConfig.pushFriendByInfo(restTemplate, vo, listVo, type, bizNo, backLogList
, tSocialFriendBackLogService, isHuiZhou);
ysdHandleStatus = CommonConstants.TWO_STRING; ysdHandleStatus = CommonConstants.TWO_STRING;
remark = "已推送提交任务!"; remark = "已推送提交任务!";
if (Common.isEmpty(requestId)) { if (Common.isEmpty(requestId)) {
......
...@@ -377,4 +377,9 @@ ...@@ -377,4 +377,9 @@
order by a.SOCIAL_HOUSEHOLD_NAME asc order by a.SOCIAL_HOUSEHOLD_NAME asc
</select> </select>
<!-- 查找特殊的户名关系表,当前为 徽州区 的户名称 使用 -->
<select id="getSpecialHuName" resultType="java.lang.String">
select a.hu_name from t_social_friend_special_hu a where a.type ='1'
</select>
</mapper> </mapper>
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