Commit 11cc3941 authored by hongguangwu's avatar hongguangwu

MVP1.6.4-优化

parent 0ea6a843
...@@ -101,11 +101,12 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -101,11 +101,12 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
for (TSocialInfo socialInfo : socialList) { for (TSocialInfo socialInfo : socialList) {
if (Common.isNotNull(socialInfo.getYgsAddId())) { if (Common.isNotNull(socialInfo.getYgsAddId())) {
addIdSet.add(socialInfo.getYgsAddId()); addIdSet.add(socialInfo.getYgsAddId());
idCardMap.put(socialInfo.getYgsAddId() + CommonConstants.DOWN_LINE_STRING + socialInfo.getEmpIdcard(), socialInfo);
} }
if (Common.isNotNull(socialInfo.getYsdAddId())) { if (Common.isNotNull(socialInfo.getYsdAddId())) {
addIdSet.add(socialInfo.getYsdAddId()); addIdSet.add(socialInfo.getYsdAddId());
idCardMap.put(socialInfo.getYsdAddId() + CommonConstants.DOWN_LINE_STRING + socialInfo.getEmpIdcard(), socialInfo);
} }
idCardMap.put(socialInfo.getEmpIdcard(), socialInfo);
} }
HttpURLConnection conn; HttpURLConnection conn;
InputStream in = null; InputStream in = null;
...@@ -133,7 +134,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -133,7 +134,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
conn.setConnectTimeout(30 * 1000); conn.setConnectTimeout(30 * 1000);
in = conn.getInputStream(); in = conn.getInputStream();
// 实际读取文件内容 // 实际读取文件内容
this.readXls(in, idCardMap, errorMap); this.readXls(in, idCardMap, errorMap, doAddId);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
...@@ -153,7 +154,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -153,7 +154,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} }
public R<List<TSocialSoldierReturnErrorVo>> readXls(InputStream inputStream, Map<String, TSocialInfo> idCardMap public R<List<TSocialSoldierReturnErrorVo>> readXls(InputStream inputStream, Map<String, TSocialInfo> idCardMap
, Map<String, FailReasonConfig> errorMap) { , Map<String, FailReasonConfig> errorMap, String doAddId) {
TSocialSoldierReturnErrorVo vo; TSocialSoldierReturnErrorVo vo;
List<TSocialSoldierReturnErrorVo> voList = new ArrayList<>(); List<TSocialSoldierReturnErrorVo> voList = new ArrayList<>();
HSSFWorkbook sheets = null; HSSFWorkbook sheets = null;
...@@ -290,7 +291,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -290,7 +291,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
} }
} }
if (!voList.isEmpty()) { if (!voList.isEmpty()) {
importTSocialInfo(voList, idCardMap, errorMap); importTSocialInfo(voList, idCardMap, errorMap, doAddId);
} }
return R.ok(voList); return R.ok(voList);
} }
...@@ -380,7 +381,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -380,7 +381,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
}*/ }*/
private void importTSocialInfo(List<TSocialSoldierReturnErrorVo> excelVOList, Map<String, TSocialInfo> idCardMap private void importTSocialInfo(List<TSocialSoldierReturnErrorVo> excelVOList, Map<String, TSocialInfo> idCardMap
, Map<String, FailReasonConfig> errorMap) { , Map<String, FailReasonConfig> errorMap, String doAddId) {
// 个性化校验逻辑 // 个性化校验逻辑
// 执行数据插入操作 组装 // 执行数据插入操作 组装
TSocialSoldierReturnErrorVo excel; TSocialSoldierReturnErrorVo excel;
...@@ -416,7 +417,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper, ...@@ -416,7 +417,7 @@ public class TSocialSoldierServiceImpl extends ServiceImpl<TSocialSoldierMapper,
// 初始化继续办理 // 初始化继续办理
ygsHandleStatus = CommonConstants.THREE_STRING; ygsHandleStatus = CommonConstants.THREE_STRING;
ysdHandleStatus = CommonConstants.THREE_STRING; ysdHandleStatus = CommonConstants.THREE_STRING;
socialInfo = idCardMap.get(empIdCard); socialInfo = idCardMap.get(doAddId + CommonConstants.DOWN_LINE_STRING + empIdCard);
if (socialInfo != null) { if (socialInfo != null) {
if (typeFlag && if (typeFlag &&
......
...@@ -593,11 +593,8 @@ ...@@ -593,11 +593,8 @@
d.id as DISPATCH_ID d.id as DISPATCH_ID
FROM t_social_info a FROM t_social_info a
left join t_dispatch_info d on d.SOCIAL_ID = a.id left join t_dispatch_info d on d.SOCIAL_ID = a.id
left join t_social_deadline_info sd on sd.MONTH = DATE_FORMAT(d.AUDIT_TIME,'%Y%m') and sd.STATUS = '0' where a.YGS_ADD_ID is not null and d.AUTO_FLAG='0' and DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m')
and sd.PROVINCE=a.SOCIAL_PROVINCE and sd.CITY=a.SOCIAL_CITY and ( (a.SOCIAL_TOWN is null and sd.TOWN is null) or (sd.TOWN=a.SOCIAL_TOWN))
where a.YGS_ADD_ID is not null and DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m')
and a.YGS_HANDLE_STATUS in ('1','2','3') and a.YGS_HANDLE_STATUS in ('1','2','3')
and (sd.id is null or NOW() <![CDATA[ <= ]]> sd.SOCIAL_END_DATE)
group by a.id group by a.id
</select> </select>
...@@ -612,11 +609,8 @@ ...@@ -612,11 +609,8 @@
d.id as DISPATCH_ID d.id as DISPATCH_ID
FROM t_social_info a FROM t_social_info a
left join t_dispatch_info d on d.SOCIAL_ID = a.id left join t_dispatch_info d on d.SOCIAL_ID = a.id
left join t_social_deadline_info sd on sd.MONTH = DATE_FORMAT(d.AUDIT_TIME,'%Y%m') and sd.STATUS = '0' where a.YSD_ADD_ID is not null and d.AUTO_FLAG='0' and DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m')
and sd.PROVINCE=a.SOCIAL_PROVINCE and sd.CITY=a.SOCIAL_CITY and ( (a.SOCIAL_TOWN is null and sd.TOWN is null) or (sd.TOWN=a.SOCIAL_TOWN))
where a.YSD_ADD_ID is not null and DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m')
and a.YSD_HANDLE_STATUS in ('1','2','3') and a.YSD_HANDLE_STATUS in ('1','2','3')
and (sd.id is null or NOW() <![CDATA[ <= ]]> sd.MEDICAL_END_DATE)
group by a.id group by a.id
</select> </select>
......
...@@ -93,7 +93,11 @@ ...@@ -93,7 +93,11 @@
left join sys_area sc2 on sc2.id = s.SOCIAL_CITY left join sys_area sc2 on sc2.id = s.SOCIAL_CITY
left join sys_area st1 on st1.id = h.SOCIAL_TOWN left join sys_area st1 on st1.id = h.SOCIAL_TOWN
left join sys_area st2 on st2.id = s.SOCIAL_TOWN left join sys_area st2 on st2.id = s.SOCIAL_TOWN
left join t_social_deadline_info sd on sd.MONTH = DATE_FORMAT(a.AUDIT_TIME,'%Y%m') and sd.STATUS = '0'
and sd.PROVINCE=s.SOCIAL_PROVINCE and sd.CITY=a.SOCIAL_CITY and ( (s.SOCIAL_TOWN is null and sd.TOWN is null) or (sd.TOWN=s.SOCIAL_TOWN))
<include refid="where_getSocialSoldier_base_handler"/> <include refid="where_getSocialSoldier_base_handler"/>
and DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(now(),'%Y%m')
and (sd.id is null or NOW() <![CDATA[ <= ]]> sd.SOCIAL_END_DATE)
</sql> </sql>
<!-- 社保士兵养工失增加模板--> <!-- 社保士兵养工失增加模板-->
...@@ -105,6 +109,7 @@ ...@@ -105,6 +109,7 @@
if(ifnull(h.id,0) != '0',h.WORK_INJURY_HANDLE,s.WORK_INJURY_HANDLE) = '0' or if(ifnull(h.id,0) != '0',h.WORK_INJURY_HANDLE,s.WORK_INJURY_HANDLE) = '0' or
if(ifnull(h.id,0) != '0',h.UNEMPLOY_HANDLE,s.UNEMPLOY_HANDLE) = '0' if(ifnull(h.id,0) != '0',h.UNEMPLOY_HANDLE,s.UNEMPLOY_HANDLE) = '0'
) )
group by a.id
</select> </select>
<sql id="where_getSocialSoldier_base_handler"> <sql id="where_getSocialSoldier_base_handler">
...@@ -135,6 +140,7 @@ ...@@ -135,6 +140,7 @@
if(ifnull(h.id,0) != '0',h.WORK_INJURY_HANDLE,s.WORK_INJURY_HANDLE) = '5' or if(ifnull(h.id,0) != '0',h.WORK_INJURY_HANDLE,s.WORK_INJURY_HANDLE) = '5' or
if(ifnull(h.id,0) != '0',h.UNEMPLOY_HANDLE,s.UNEMPLOY_HANDLE) = '5' if(ifnull(h.id,0) != '0',h.UNEMPLOY_HANDLE,s.UNEMPLOY_HANDLE) = '5'
) )
group by a.id
</select> </select>
<!-- 社保士兵医生大增加模板--> <!-- 社保士兵医生大增加模板-->
...@@ -146,6 +152,7 @@ ...@@ -146,6 +152,7 @@
if(ifnull(h.id,0) != '0',h.BIRTH_HANDLE,s.BIRTH_HANDLE) = '0' or if(ifnull(h.id,0) != '0',h.BIRTH_HANDLE,s.BIRTH_HANDLE) = '0' or
if(ifnull(h.id,0) != '0',h.BIGAILMENT_HANDLE,s.BIGAILMENT_HANDLE) = '0' if(ifnull(h.id,0) != '0',h.BIGAILMENT_HANDLE,s.BIGAILMENT_HANDLE) = '0'
) )
group by a.id
</select> </select>
<!-- 社保士兵医生大减少模板--> <!-- 社保士兵医生大减少模板-->
...@@ -157,6 +164,7 @@ ...@@ -157,6 +164,7 @@
if(ifnull(h.id,0) != '0',h.BIRTH_HANDLE,s.BIRTH_HANDLE) = '5' or if(ifnull(h.id,0) != '0',h.BIRTH_HANDLE,s.BIRTH_HANDLE) = '5' or
if(ifnull(h.id,0) != '0',h.BIGAILMENT_HANDLE,s.BIGAILMENT_HANDLE) = '5' if(ifnull(h.id,0) != '0',h.BIGAILMENT_HANDLE,s.BIGAILMENT_HANDLE) = '5'
) )
group by a.id
</select> </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