Commit d8c5fbe0 authored by fangxinjiang's avatar fangxinjiang

查询优化

parent 5e5bafd8
...@@ -128,7 +128,7 @@ public class TCustomerInfo extends BaseEntity { ...@@ -128,7 +128,7 @@ public class TCustomerInfo extends BaseEntity {
* 原ID(数据迁移) * 原ID(数据迁移)
*/ */
@Schema(description = "原ID(数据迁移)") @Schema(description = "原ID(数据迁移)")
private Integer oldId; private String oldId;
/** /**
* 客户标识 * 客户标识
......
...@@ -93,7 +93,7 @@ public class TSettleDomain extends BaseEntity { ...@@ -93,7 +93,7 @@ public class TSettleDomain extends BaseEntity {
* 原ID * 原ID
*/ */
@Schema(description = "原ID") @Schema(description = "原ID")
private Integer oldId; private String oldId;
/** /**
* 合同主体 * 合同主体
......
...@@ -574,6 +574,23 @@ public class TDispatchInfo extends BaseEntity { ...@@ -574,6 +574,23 @@ public class TDispatchInfo extends BaseEntity {
@ExcelProperty("申请编码" ) @ExcelProperty("申请编码" )
private String applyNo; private String applyNo;
/**
* 社保户名称
*/
@ExcelAttribute(name = "社保户名称", maxLength = 50)
@Schema(description = "社保户名称" )
@ExcelProperty("社保户名称" )
private String socialHouseholdName;
/**
* 公积金户名称
*/
@ExcelAttribute(name = "公积金户名称", maxLength = 50)
@Schema(description = "公积金户名称" )
@ExcelProperty("公积金户名称" )
private String providentHouseholdName;
/** /**
* 首次购买时间(第一派单月份) * 首次购买时间(第一派单月份)
*/ */
......
...@@ -553,9 +553,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -553,9 +553,11 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(dispatch)){ if (Common.isNotNull(dispatch)){
if (Common.isNotNull(social)){ if (Common.isNotNull(social)){
dispatch.setSocialId(social.getId()); dispatch.setSocialId(social.getId());
dispatch.setSocialHouseholdName(social.getSocialHouseholdName());
} }
if (Common.isNotNull(fund)){ if (Common.isNotNull(fund)){
dispatch.setFundId(fund.getId()); dispatch.setFundId(fund.getId());
dispatch.setProvidentHouseholdName(fund.getProvidentHouseholdName());
} }
if (Common.isNotNull(contract)){ if (Common.isNotNull(contract)){
dispatch.setContractId(contract.getId()); dispatch.setContractId(contract.getId());
...@@ -2490,6 +2492,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2490,6 +2492,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
if (Common.isNotNull(excel.getSocialReduceDate())){ if (Common.isNotNull(excel.getSocialReduceDate())){
dispatch.setSocialHandleStatus(CommonConstants.ZERO_STRING); dispatch.setSocialHandleStatus(CommonConstants.ZERO_STRING);
dispatch.setSocialId(socialFund.getSocialId()); dispatch.setSocialId(socialFund.getSocialId());
dispatch.setProvidentHouseholdName(socialFund.getProvidentHouseholdName());
dispatch.setSocialProvince(socialFund.getSocialProvince()); dispatch.setSocialProvince(socialFund.getSocialProvince());
dispatch.setSocialCity(socialFund.getSocialCity()); dispatch.setSocialCity(socialFund.getSocialCity());
dispatch.setSocialTown(socialFund.getSocialTown()); dispatch.setSocialTown(socialFund.getSocialTown());
...@@ -2526,6 +2529,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T ...@@ -2526,6 +2529,7 @@ public class TDispatchInfoServiceImpl extends ServiceImpl<TDispatchInfoMapper, T
} }
dispatch.setFundHandleStatus(CommonConstants.ZERO_STRING); dispatch.setFundHandleStatus(CommonConstants.ZERO_STRING);
dispatch.setFundId(socialFund.getFundId()); dispatch.setFundId(socialFund.getFundId());
dispatch.setFundId(socialFund.getProvidentHouseholdName());
dispatch.setFundProvince(socialFund.getFundProvince()); dispatch.setFundProvince(socialFund.getFundProvince());
dispatch.setFundCity(socialFund.getFundCity()); dispatch.setFundCity(socialFund.getFundCity());
dispatch.setFundTown(socialFund.getFundTown()); dispatch.setFundTown(socialFund.getFundTown());
......
...@@ -406,10 +406,10 @@ ...@@ -406,10 +406,10 @@
</if> </if>
<if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''"> <if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''">
AND s.SOCIAL_HOUSEHOLD_NAME like CONCAT(CONCAT(#{tDispatchInfo.socialHouseholdName}), '%') AND a.SOCIAL_HOUSEHOLD_NAME like CONCAT(CONCAT(#{tDispatchInfo.socialHouseholdName}), '%')
</if> </if>
<if test="tDispatchInfo.providentHouseholdName != null and tDispatchInfo.providentHouseholdName.trim() != ''"> <if test="tDispatchInfo.providentHouseholdName != null and tDispatchInfo.providentHouseholdName.trim() != ''">
AND f.PROVIDENT_HOUSEHOLD_NAME like CONCAT(CONCAT(#{tDispatchInfo.providentHouseholdName}), '%') AND a.PROVIDENT_HOUSEHOLD_NAME like CONCAT(CONCAT(#{tDispatchInfo.providentHouseholdName}), '%')
</if> </if>
<if test="tDispatchInfo.createTimeStart != null"> <if test="tDispatchInfo.createTimeStart != null">
AND a.CREATE_TIME <![CDATA[ >= ]]> #{tDispatchInfo.createTimeStart} AND a.CREATE_TIME <![CDATA[ >= ]]> #{tDispatchInfo.createTimeStart}
...@@ -426,14 +426,14 @@ ...@@ -426,14 +426,14 @@
<select id="getTDispatchInfoPage" resultMap="dispatchPageMap"> <select id="getTDispatchInfoPage" resultMap="dispatchPageMap">
SELECT SELECT
<include refid="Base_Column_List"/>, <include refid="Base_Column_List"/>,
s.SOCIAL_HOUSEHOLD_NAME, a.SOCIAL_HOUSEHOLD_NAME,
f.PROVIDENT_HOUSEHOLD_NAME a.PROVIDENT_HOUSEHOLD_NAME
FROM t_dispatch_info a FROM t_dispatch_info a
<if test="tDispatchInfo.authSql != null and tDispatchInfo.authSql.trim() != ''"> <if test="tDispatchInfo.authSql != null and tDispatchInfo.authSql.trim() != ''">
left join t_socialfund_house_res p on p.USER_ID = #{tDispatchInfo.createBy} left join t_socialfund_house_res p on p.USER_ID = #{tDispatchInfo.createBy}
</if> </if>
left join t_social_info s on s.id=a.SOCIAL_ID <!--left join t_social_info s on s.id=a.SOCIAL_ID
left join t_provident_fund f on f.id=a.FUND_ID left join t_provident_fund f on f.id=a.FUND_ID-->
<where> <where>
1=1 1=1
<include refid="tDispatchInfo_where"/> <include refid="tDispatchInfo_where"/>
...@@ -457,8 +457,8 @@ ...@@ -457,8 +457,8 @@
a.SETTLE_DOMAIN_CODE, a.SETTLE_DOMAIN_CODE,
a.TYPE, a.TYPE,
a.DISPATCH_ITEM, a.DISPATCH_ITEM,
s.SOCIAL_HOUSEHOLD_NAME, a.SOCIAL_HOUSEHOLD_NAME,
f.PROVIDENT_HOUSEHOLD_NAME, a.PROVIDENT_HOUSEHOLD_NAME,
a.STATUS, a.STATUS,
a.SOCIAL_HANDLE_STATUS, a.SOCIAL_HANDLE_STATUS,
s.PENSION_HANDLE, s.PENSION_HANDLE,
...@@ -583,7 +583,7 @@ ...@@ -583,7 +583,7 @@
a.CREATE_NAME, a.CREATE_NAME,
s.RECORD_BASE, s.RECORD_BASE,
s.PAYMENT_TYPE, s.PAYMENT_TYPE,
s.SOCIAL_HOUSEHOLD_NAME, a.SOCIAL_HOUSEHOLD_NAME,
s.SOCIAL_PROVINCE, s.SOCIAL_PROVINCE,
s.SOCIAL_CITY, s.SOCIAL_CITY,
s.SOCIAL_TOWN, s.SOCIAL_TOWN,
...@@ -620,14 +620,14 @@ ...@@ -620,14 +620,14 @@
<select id="getTDispatchSocialHandlePage" resultMap="dispatchPageMap"> <select id="getTDispatchSocialHandlePage" resultMap="dispatchPageMap">
SELECT SELECT
<include refid="Base_Column_List"/>, <include refid="Base_Column_List"/>,
s.SOCIAL_HOUSEHOLD_NAME a.SOCIAL_HOUSEHOLD_NAME
<include refid="where_getSocialRecordRoster"/> <include refid="where_getSocialRecordRoster"/>
</select> </select>
<!--tDispatchInfo 公积金办理数据查询--> <!--tDispatchInfo 公积金办理数据查询-->
<select id="getTDispatchFundHandlePage" resultMap="dispatchPageMap"> <select id="getTDispatchFundHandlePage" resultMap="dispatchPageMap">
SELECT SELECT
<include refid="Base_Column_List"/>, <include refid="Base_Column_List"/>,
f.PROVIDENT_HOUSEHOLD_NAME a.PROVIDENT_HOUSEHOLD_NAME
<include refid="where_getFundRecord"/> <include refid="where_getFundRecord"/>
</select> </select>
...@@ -650,7 +650,7 @@ ...@@ -650,7 +650,7 @@
a.EMP_MOBILE, a.EMP_MOBILE,
a.CREATE_NAME, a.CREATE_NAME,
f.PROVIDENT_HOUSEHOLD_NAME, a.PROVIDENT_HOUSEHOLD_NAME,
f.PROVIDENT_START, f.PROVIDENT_START,
f.UNIT_PROVIDENG_CARDINAL, f.UNIT_PROVIDENG_CARDINAL,
f.PERSONAL_PROVIDENT_CARDINAL, f.PERSONAL_PROVIDENT_CARDINAL,
...@@ -771,7 +771,7 @@ ...@@ -771,7 +771,7 @@
AND a.CREATE_TIME <![CDATA[>=]]> #{tDispatchInfo.createTimeStart} AND a.CREATE_TIME <![CDATA[>=]]> #{tDispatchInfo.createTimeStart}
</if> </if>
<if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''"> <if test="tDispatchInfo.socialHouseholdName != null and tDispatchInfo.socialHouseholdName.trim() != ''">
AND s.SOCIAL_HOUSEHOLD_NAME like CONCAT(CONCAT(#{tDispatchInfo.socialHouseholdName}), '%') AND a.SOCIAL_HOUSEHOLD_NAME like CONCAT(CONCAT(#{tDispatchInfo.socialHouseholdName}), '%')
</if> </if>
<if test="tDispatchInfo.authSql != null and tDispatchInfo.authSql.trim() != ''"> <if test="tDispatchInfo.authSql != null and tDispatchInfo.authSql.trim() != ''">
${tDispatchInfo.authSql} ${tDispatchInfo.authSql}
...@@ -875,7 +875,7 @@ ...@@ -875,7 +875,7 @@
AND a.CREATE_TIME <![CDATA[>=]]> #{tDispatchInfo.createTimeStart} AND a.CREATE_TIME <![CDATA[>=]]> #{tDispatchInfo.createTimeStart}
</if> </if>
<if test="tDispatchInfo.providentHouseholdName != null and tDispatchInfo.providentHouseholdName.trim() != ''"> <if test="tDispatchInfo.providentHouseholdName != null and tDispatchInfo.providentHouseholdName.trim() != ''">
AND f.PROVIDENT_HOUSEHOLD_NAME like CONCAT(CONCAT(#{tDispatchInfo.providentHouseholdName}), '%') AND a.PROVIDENT_HOUSEHOLD_NAME like CONCAT(CONCAT(#{tDispatchInfo.providentHouseholdName}), '%')
</if> </if>
<if test="tDispatchInfo.authSql != null and tDispatchInfo.authSql.trim() != ''"> <if test="tDispatchInfo.authSql != null and tDispatchInfo.authSql.trim() != ''">
${tDispatchInfo.authSql} ${tDispatchInfo.authSql}
......
...@@ -889,7 +889,7 @@ ...@@ -889,7 +889,7 @@
1=1 1=1
<include refid="tSocialFundInfo_where"/> <include refid="tSocialFundInfo_where"/>
</where> </where>
group by a.id <!--group by a.id-->
order by a.CREATE_TIME desc order by a.CREATE_TIME desc
</select> </select>
......
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