Commit 4b467323 authored by yangyang's avatar yangyang

fixed bug 20942、20749

parent e9d326ee
......@@ -19,7 +19,8 @@ public interface PeasantHouseholdMapper extends BaseMapper<PeasantHousehold> {
@Param("regionalCompaniesSeq")Long regionalCompaniesSeq,
@Param("peasantHouseholdNo")String peasantHouseholdNo,
@Param("ownersName")String ownersName,
@Param("ids")String ids
@Param("ids")String ids,
@Param("orderBy") String orderBy
);
List<PeasantHousehold> selectPeasantHouseholdListsg(@Param("unitInfoCode") String unitInfoCode,
@Param("regionalCompaniesSeq")Long regionalCompaniesSeq,
......
......@@ -22,7 +22,9 @@ on hygf_document_station.preparation_money_id=hygf_preparation_money.sequence_nb
<if test="ownersName!=null and ownersName !='' ">
and hygf_peasant_household.owners_name like concat(concat("%",#{ownersName}),"%")
</if>
<if test="orderBy !=null and orderBy !='' ">
ORDER BY ${orderBy}
</if>
</select>
<select id="selectPeasantHouseholdListsg" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold">
......
......@@ -110,7 +110,7 @@
</if>
ORDER BY
hygf_power_station_engineering_info.completion_date DESC,
hygf_work_order.rec_date DESC,
FIELD(hygf_work_order_power_station.power_station_construction_status, '待施工', '施工中', '待登记', '登记中', '待审核', '审核中', '未通过', '已完工')
......
......@@ -775,7 +775,7 @@ public class UnitInfoController extends BaseController {
@RequestParam(required=false) Long regionalCompaniesSeq
) {
UnitInfo unitInfo=unitInfoMapper.selectById(unitInfoId);
List<PeasantHousehold> list=peasantHouseholdMapper.selectPeasantHouseholdList(unitInfo.getAmosCompanySeq(),regionalCompaniesSeq,null,null,null);
List<PeasantHousehold> list=peasantHouseholdMapper.selectPeasantHouseholdList(unitInfo.getAmosCompanySeq(),regionalCompaniesSeq,null,null,null,null);
List<Map<String,Object>> date=new ArrayList<>();
if(list!=null){
......@@ -806,6 +806,22 @@ public class UnitInfoController extends BaseController {
return ResponseHelper.buildResponse(unitInfoServiceImpl.getPeasantHouseholdData( unitInfoId,regionalCompaniesSeq, current,size,peasantHouseholdNo,ownersName,ids));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET",value = "列表全部数据查询", notes = "列表全部数据查询")
@GetMapping(value = "/getPeasantHouseholdDataNew")
public ResponseModel<Page<PeasantHousehold>> getPeasantHouseholdDataNew(
@RequestParam(required=false) Long unitInfoId,
@RequestParam(required=false) Long regionalCompaniesSeq,
@RequestParam(value = "current") int current,
@RequestParam (value = "size") int size,
@RequestParam (required=false) String peasantHouseholdNo,
@RequestParam (required=false) String ownersName,
@RequestParam (required=false) String ids
) {
return ResponseHelper.buildResponse(unitInfoServiceImpl.getPeasantHouseholdDataNew(unitInfoId, regionalCompaniesSeq, current, size, peasantHouseholdNo, ownersName, ids));
}
/**获取当前登录人区域公司*/
......
......@@ -1034,7 +1034,24 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
return jsonArray;
}
public Page<PeasantHousehold> getPeasantHouseholdDataNew( Long unitInfoId,
Long regionalCompaniesSeq,
int pageNum,
int pageSize,
String peasantHouseholdNo,
String ownersName,
String ids) {
UnitInfo unitInfo = unitInfoMapper.selectById(unitInfoId);
PageHelper.startPage(pageNum, pageSize);
List<PeasantHousehold> list=peasantHouseholdMapper.selectPeasantHouseholdList(unitInfo.getAmosCompanySeq(),regionalCompaniesSeq,peasantHouseholdNo,ownersName,ids, "hygf_peasant_household.rec_date DESC");
PageInfo<PeasantHousehold> page = new PageInfo(list);
Page<PeasantHousehold> pagenew = new Page<PeasantHousehold>();
pagenew.setCurrent(pageNum);
pagenew.setTotal(page.getTotal());
pagenew.setSize(pageSize);
pagenew.setRecords(page.getList());
return pagenew;
}
public Page<PeasantHousehold> getPeasantHouseholdData( Long unitInfoId,
Long regionalCompaniesSeq,
......@@ -1045,7 +1062,7 @@ public class UnitInfoServiceImpl extends BaseService<UnitInfoDto,UnitInfo,UnitIn
String ids){
UnitInfo unitInfo=unitInfoMapper.selectById(unitInfoId);
PageHelper.startPage(pageNum, pageSize);
List<PeasantHousehold> list=peasantHouseholdMapper.selectPeasantHouseholdList(unitInfo.getAmosCompanySeq(),regionalCompaniesSeq,peasantHouseholdNo,ownersName,ids);
List<PeasantHousehold> list=peasantHouseholdMapper.selectPeasantHouseholdList(unitInfo.getAmosCompanySeq(),regionalCompaniesSeq,peasantHouseholdNo,ownersName,ids, null);
PageInfo<PeasantHousehold> page = new PageInfo(list);
Page<PeasantHousehold> pagenew = new Page<PeasantHousehold>();
pagenew.setCurrent(pageNum);
......
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