Commit c64908f6 authored by hezhuozhi's avatar hezhuozhi

Merge remote-tracking branch 'origin/developer_bw' into developer_bw

parents bbb4140a 2729f501
...@@ -24,7 +24,7 @@ import java.util.Map; ...@@ -24,7 +24,7 @@ import java.util.Map;
public interface PreparationMoneyMapper extends BaseMapper<PreparationMoney> { public interface PreparationMoneyMapper extends BaseMapper<PreparationMoney> {
List<PeasantHousehold> getPeasantHouseholdData(@Param("sequenceNbr") Long sequenceNbr,@Param("ownersName") String ownersName); List<PeasantHousehold> getPeasantHouseholdData(@Param("sequenceNbr") Long sequenceNbr,@Param("ownersName") String ownersName, @Param("projectAddress") String projectAddress);
@UserEmpower(field ={"regional_companies_code"} ,dealerField={"amos_unit_org_code","regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and") @UserEmpower(field ={"regional_companies_code"} ,dealerField={"amos_unit_org_code","regional_companies_code"} ,fieldConditions ={"eq","in"} ,relationship="and")
List<PreparationMoney> selectPageList(@Param(value = "dto") PreparationDto preparationDto); List<PreparationMoney> selectPageList(@Param(value = "dto") PreparationDto preparationDto);
...@@ -35,6 +35,7 @@ public interface PreparationMoneyMapper extends BaseMapper<PreparationMoney> { ...@@ -35,6 +35,7 @@ public interface PreparationMoneyMapper extends BaseMapper<PreparationMoney> {
@Param(value = "regionalCompaniesSeq") String regionalCompaniesSeq, @Param(value = "regionalCompaniesSeq") String regionalCompaniesSeq,
@Param(value = "developerId") String developerId, @Param(value = "developerId") String developerId,
@Param(value = "state") String state, @Param(value = "state") String state,
@Param(value = "province") String province); @Param(value = "province") String province,
@Param(value = "projectAddress") String projectAddress);
} }
...@@ -9,7 +9,12 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan ...@@ -9,7 +9,12 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan
<if test="ownersName!=null and ownersName!=''"> <if test="ownersName!=null and ownersName!=''">
and hygf_peasant_household.owners_name like concat(concat('%',#{ownersName}),'%') and hygf_peasant_household.owners_name like concat(concat('%',#{ownersName}),'%')
</if> </if>
<if test="projectAddress != null and projectAddress != '' and projectAddress.contains('/'.toString())">
AND hygf_peasant_household.project_address_name LIKE CONCAT('%', #{projectAddress}, '%')
</if>
<if test="projectAddress != null and projectAddress != '' and !projectAddress.contains('/'.toString())">
AND REPLACE(hygf_peasant_household.project_address_name, '/', '') LIKE CONCAT('%', #{projectAddress}, '%')
</if>
</select> </select>
<select id="selectPageList" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.PreparationMoney"> <select id="selectPageList" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.PreparationMoney">
...@@ -84,6 +89,12 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan ...@@ -84,6 +89,12 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan
<if test="province != null and province != ''"> <if test="province != null and province != ''">
and hygf_peasant_household.project_address like concat(concat('%',#{province}),'%') and hygf_peasant_household.project_address like concat(concat('%',#{province}),'%')
</if> </if>
<if test="projectAddress != null and projectAddress != '' and projectAddress.contains('/'.toString())">
AND concat_ws('/',hygf_peasant_household.project_address_name,hygf_peasant_household.project_address_detail) LIKE CONCAT('%', #{projectAddress}, '%')
</if>
<if test="projectAddress != null and projectAddress != '' and !projectAddress.contains('/'.toString())">
AND REPLACE(concat(hygf_peasant_household.project_address_name,hygf_peasant_household.project_address_detail), '/', '') LIKE CONCAT('%', #{projectAddress}, '%')
</if>
</where> </where>
<!-- GROUP BY hygf_peasant_household.sequence_nbr--> <!-- GROUP BY hygf_peasant_household.sequence_nbr-->
<if test=" preparationMoneyState == 1 "> <if test=" preparationMoneyState == 1 ">
......
...@@ -224,9 +224,10 @@ public class PreparationMoneyController extends BaseController { ...@@ -224,9 +224,10 @@ public class PreparationMoneyController extends BaseController {
@GetMapping(value = "/getPeasantHouseholdData") @GetMapping(value = "/getPeasantHouseholdData")
public ResponseModel< Page<PeasantHousehold> > getPeasantHouseholdData( public ResponseModel< Page<PeasantHousehold> > getPeasantHouseholdData(
@RequestParam(required=false) Long sequenceNbr, @RequestParam(required=false) Long sequenceNbr,
@RequestParam(required=false) String ownersName @RequestParam(required=false) String ownersName,
@RequestParam(required=false) String projectAddress
) { ) {
List<PeasantHousehold> list=preparationMoneyMapper.getPeasantHouseholdData(sequenceNbr,ownersName); List<PeasantHousehold> list=preparationMoneyMapper.getPeasantHouseholdData(sequenceNbr,ownersName, projectAddress);
if(list != null && list.size() > 0) { if(list != null && list.size() > 0) {
list.forEach(e -> { list.forEach(e -> {
...@@ -344,9 +345,10 @@ public class PreparationMoneyController extends BaseController { ...@@ -344,9 +345,10 @@ public class PreparationMoneyController extends BaseController {
@RequestParam(value = "developerId",required = false) String developerId, @RequestParam(value = "developerId",required = false) String developerId,
@RequestParam(value = "state",required = false) String state, @RequestParam(value = "state",required = false) String state,
@RequestParam(value = "preparationMoneyState") String preparationMoneyState, @RequestParam(value = "preparationMoneyState") String preparationMoneyState,
@RequestParam(value = "province",required = false) String province){ @RequestParam(value = "province",required = false) String province,
@RequestParam(value = "projectAddress",required = false) String projectAddress){
return ResponseHelper.buildResponse(preparationMoneyServiceImpl.preparationStation(current,size,preparationMoneyState,ownersName,regionalcompaniesSeq,developerId,state,province)) ; return ResponseHelper.buildResponse(preparationMoneyServiceImpl.preparationStation(current,size,preparationMoneyState,ownersName,regionalcompaniesSeq,developerId,state,province, projectAddress)) ;
} }
......
...@@ -1208,11 +1208,11 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto ...@@ -1208,11 +1208,11 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
} }
public IPage<Map<String,Object>> preparationStation(Integer current, Integer size, String preparationMoneyState,String ownersName,String regionalcompaniesSeq,String developerId,String state,String province){ public IPage<Map<String,Object>> preparationStation(Integer current, Integer size, String preparationMoneyState,String ownersName,String regionalcompaniesSeq,String developerId,String state,String province, String projectAddress){
PageHelper.startPage(current, size); PageHelper.startPage(current, size);
List<Map<String, Object>> resultPage = preparationMoneyMapper.preparationStation(preparationMoneyState,ownersName,regionalcompaniesSeq,developerId,state,province); List<Map<String, Object>> resultPage = preparationMoneyMapper.preparationStation(preparationMoneyState,ownersName,regionalcompaniesSeq,developerId,state,province, projectAddress);
if(resultPage != null && resultPage.size() > 0) { if(resultPage != null && resultPage.size() > 0) {
resultPage.forEach(e -> { resultPage.forEach(e -> {
......
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