Commit 7a5df0b4 authored by 朱晨阳's avatar 朱晨阳

修改接口

parent 2729f501
......@@ -27,6 +27,8 @@ public class HouseholdContractPageDto extends Page<HouseholdContract> {
*/
private String status;
private String projectAddress;
/**
* 农户id
*/
......
......@@ -56,8 +56,11 @@
<if test="map.formType != null and map.formType!=''">
AND hbga.acceptance_check_status IN ('2', '3', '4')
</if>
<if test="map.projectAddress != null and map.projectAddress!=''">
AND hph.project_address_name LIKE concat(concat('%', #{map.projectAddress}), '%')
<if test="map.projectAddress != null and map.projectAddress != '' and map.projectAddress.contains('/'.toString())">
AND hph.project_address_name LIKE CONCAT('%', #{map.projectAddress}, '%')
</if>
<if test="map.projectAddress != null and map.projectAddress != '' and !map.projectAddress.contains('/'.toString())">
AND REPLACE(hph.project_address_name, '/', '') LIKE CONCAT('%', #{map.projectAddress}, '%')
</if>
<if test="map.type != null">
and ( (hbga.basic_grid_node is not null AND hbga.basic_grid_node != 'jxsAdmin')
......
......@@ -64,8 +64,11 @@
<if test="map.formType != null and map.formType!=''">
AND hbga.grid_status IN ('2', '3', '4')
</if>
<if test="map.projectAddress != null and map.projectAddress!=''">
AND hph.project_address_name LIKE concat(concat('%', #{map.projectAddress}), '%')
<if test="map.projectAddress != null and map.projectAddress != '' and map.projectAddress.contains('/'.toString())">
AND hph.project_address_name LIKE CONCAT('%', #{map.projectAddress}, '%')
</if>
<if test="map.projectAddress != null and map.projectAddress != '' and !map.projectAddress.contains('/'.toString())">
AND REPLACE(hph.project_address_name, '/', '') LIKE CONCAT('%', #{map.projectAddress}, '%')
</if>
<if test="map.type != null">
AND ( (hbga.basic_grid_node IS NOT NULL AND hbga.basic_grid_node != 'jxsAdmin' )
......
......@@ -50,7 +50,12 @@
<if test="params.peasantHouseholdNo != null and params.peasantHouseholdNo !='' ">
and hph.peasant_household_no = #{params.peasantHouseholdNo}
</if>
<if test="params.projectAddress != null and params.projectAddress != '' and params.projectAddress.contains('/'.toString())">
AND concat(hph.project_address_name,hph.project_address_detail) LIKE CONCAT('%', #{params.projectAddress}, '%')
</if>
<if test="params.projectAddress != null and params.projectAddress != '' and !params.projectAddress.contains('/'.toString())">
AND REPLACE(concat(hph.project_address_name,hph.project_address_detail), '/', '') LIKE CONCAT('%', #{params.projectAddress}, '%')
</if>
</where>
ORDER BY
info.rec_date DESC ,hph.sequence_nbr DESC ) as sta
......
......@@ -18,6 +18,12 @@
<if test="dto.status != null and dto.status !=''">
and hygf_household_contract.status = #{dto.status}
</if>
<if test="dto.projectAddress != null and dto.projectAddress != '' and dto.projectAddress.contains('/'.toString())">
AND hygf_household_contract.project_address_name LIKE CONCAT('%', #{dto.projectAddress}, '%')
</if>
<if test="dto.projectAddress != null and dto.projectAddress != '' and !dto.projectAddress.contains('/'.toString())">
AND REPLACE(hygf_household_contract.project_address_name, '/', '') LIKE CONCAT('%', #{dto.projectAddress}, '%')
</if>
<if test="dto.name != null and dto.name !='' ">
and hygf_household_contract.name like concat('%',#{dto.name},'%')
</if>
......
......@@ -117,8 +117,11 @@
or hygf_work_order_power_station.power_station_engineering_status is not null
)
</if>
<if test="dto.projectAddressName!=null and dto.projectAddressName!=''">
and hygf_peasant_household.project_address_name like concat(concat('%',#{dto.projectAddressName}),'%')
<if test="dto.projectAddressName != null and dto.projectAddressName != '' and dto.projectAddressName.contains('/'.toString())">
AND hygf_peasant_household.project_address_name LIKE CONCAT('%', #{dto.projectAddressName}, '%')
</if>
<if test="dto.projectAddressName != null and dto.projectAddressName != '' and !dto.projectAddressName.contains('/'.toString())">
AND REPLACE(hygf_peasant_household.project_address_name, '/', '') LIKE CONCAT('%', #{dto.projectAddressName}, '%')
</if>
<if test="dto.peasantHouseholdNo!=null and dto.peasantHouseholdNo!=''">
and hygf_peasant_household.peasant_household_no like concat(concat('%',#{dto.peasantHouseholdNo}),'%')
......
......@@ -166,11 +166,12 @@ public class FinancingInfoController extends BaseController {
@RequestParam(value = "region" ,required = false) String region ,
@RequestParam(value = "batchNo" ,required = false) String batchNo ,
@RequestParam(value = "isHistory" ,required = false) String isHistory ,
@RequestParam(value = "ownersName",required = false) String ownersName){
@RequestParam(value = "ownersName",required = false) String ownersName,
@RequestParam(value = "projectAddress",required = false) String projectAddress){
Page<Map<String, Object>> page = new Page<Map<String, Object>>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(financingInfoServiceImpl.queryForFinancingInfoPage(page,type,status,regionalCompaniesCode,ownersName, region,batchNo,isHistory));
return ResponseHelper.buildResponse(financingInfoServiceImpl.queryForFinancingInfoPage(page,type,status,regionalCompaniesCode,ownersName, region,batchNo,isHistory, projectAddress));
}
/**
......
......@@ -87,7 +87,7 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
private RedisLockUtil redisLockUtil;
@UserLimits
public Page<Map<String, Object>> queryForFinancingInfoPage(Page<Map<String, Object>> page, String type, String status, String regionalCompaniesCode, String ownersName, String region,String batchNo,String isHistory) {
public Page<Map<String, Object>> queryForFinancingInfoPage(Page<Map<String, Object>> page, String type, String status, String regionalCompaniesCode, String ownersName, String region,String batchNo,String isHistory, String projectAddress) {
StdUserEmpower orgCode = (StdUserEmpower) redisUtils.get("Emp_" + RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken()));
ReginParams reginParams = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
List<String> amosOrgCodes = orgCode.getAmosOrgCode();
......@@ -101,6 +101,7 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
params.put("batchNo", batchNo);
params.put("isHistory", isHistory);
params.put("region", region);
params.put("projectAddress", projectAddress);
// 1 投融人员 2.融资 3经销商管理员
switch (type) {
case "1":
......
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