Commit d8c5fbe0 authored by fangxinjiang's avatar fangxinjiang

查询优化

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