Commit 74670e82 authored by chenzhao's avatar chenzhao

存量合同2.0开发

parent 1bf8f515
...@@ -3,6 +3,9 @@ package com.yeejoin.amos.boot.module.hygf.api.mapper; ...@@ -3,6 +3,9 @@ package com.yeejoin.amos.boot.module.hygf.api.mapper;
import com.yeejoin.amos.boot.module.hygf.api.entity.FinancingInfoHistory; import com.yeejoin.amos.boot.module.hygf.api.entity.FinancingInfoHistory;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
/** /**
* 投融信息 Mapper 接口 * 投融信息 Mapper 接口
* *
...@@ -11,4 +14,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -11,4 +14,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/ */
public interface FinancingInfoHistoryMapper extends BaseMapper<FinancingInfoHistory> { public interface FinancingInfoHistoryMapper extends BaseMapper<FinancingInfoHistory> {
List<Map<String,Object>> getFinancingList(String ownersName , String status, String province);
} }
...@@ -2,4 +2,28 @@ ...@@ -2,4 +2,28 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.hygf.api.mapper.FinancingInfoHistoryMapper"> <mapper namespace="com.yeejoin.amos.boot.module.hygf.api.mapper.FinancingInfoHistoryMapper">
<select id="getFinancingList" resultType="java.util.Map">
select
hhpf.owners_name ownersName,
hhpf.peasant_household_no peasantHouseholdNo,
hhpf.province,
hhpf.house_address houseAddress,
hhpf.basic_grid_capacity basicGridCapacity,
IFNULL(hfih.status,'待推送') status,
hfih.disbursement_money disbursementMoney,
hfih.financing_companies_name financingCompaniesName,
hfih.regional_companies_seq regionalCompaniesSeq
from
hygf_history_peasant_household hhpf
LEFT JOIN hygf_financing_info_history hfih on hhpf.sequence_nbr = hfih.peasant_household_id
<if test="ownersName != null and ownersName != ''">
hhpf.owners_name like concat('',#{ownersName},'%')
</if>
<if test="status != null and status != ''">
hhpf.status =#{status}
</if>
<if test="province != null and province != ''">
hhpf.province =#{province}
</if>
</select>
</mapper> </mapper>
...@@ -9,6 +9,8 @@ import io.swagger.annotations.Api; ...@@ -9,6 +9,8 @@ import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List; import java.util.List;
import java.util.Map;
import com.yeejoin.amos.boot.module.hygf.biz.service.impl.FinancingInfoHistoryServiceImpl; import com.yeejoin.amos.boot.module.hygf.biz.service.impl.FinancingInfoHistoryServiceImpl;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
...@@ -97,12 +99,10 @@ public class FinancingInfoHistoryController extends BaseController { ...@@ -97,12 +99,10 @@ public class FinancingInfoHistoryController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/page") @GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "投融信息分页查询", notes = "投融信息分页查询") @ApiOperation(httpMethod = "GET",value = "投融信息分页查询", notes = "投融信息分页查询")
public ResponseModel<Page<FinancingInfoHistoryDto>> queryForPage(@RequestParam(value = "current") int current,@RequestParam public ResponseModel<Page<Map<String, Object>>> queryForPage(@RequestParam(value = "current") int current, @RequestParam
(value = "size") int size) { (value = "size") int size,@RequestParam(value = "ownersName",required = false) String ownersName , @RequestParam(value = "status",required = false) String status, @RequestParam(value = "province",required = false) String province) {
Page<FinancingInfoHistoryDto> page = new Page<FinancingInfoHistoryDto>();
page.setCurrent(current); return ResponseHelper.buildResponse(financingInfoHistoryServiceImpl.queryForFinancingInfoHistoryPage(current,size,ownersName,status,province));
page.setSize(size);
return ResponseHelper.buildResponse(financingInfoHistoryServiceImpl.queryForFinancingInfoHistoryPage(page));
} }
/** /**
......
...@@ -4,6 +4,8 @@ import cn.hutool.core.bean.BeanUtil; ...@@ -4,6 +4,8 @@ import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.module.hygf.api.dto.FinancingInfoDto; import com.yeejoin.amos.boot.module.hygf.api.dto.FinancingInfoDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.FinancingAuditing; import com.yeejoin.amos.boot.module.hygf.api.entity.FinancingAuditing;
...@@ -31,8 +33,16 @@ public class FinancingInfoHistoryServiceImpl extends BaseService<FinancingInfoHi ...@@ -31,8 +33,16 @@ public class FinancingInfoHistoryServiceImpl extends BaseService<FinancingInfoHi
/** /**
* 分页查询 * 分页查询
*/ */
public Page<FinancingInfoHistoryDto> queryForFinancingInfoHistoryPage(Page<FinancingInfoHistoryDto> page) { public Page<Map<String, Object>> queryForFinancingInfoHistoryPage(int current,int size,String ownersName , String status, String province) {
return this.queryForPage(page, null, false); Page<Map<String, Object>> page = new Page<>();
PageHelper.startPage(current,size);
List<Map<String, Object>> financingList = this.getBaseMapper().getFinancingList(ownersName, status, province);
PageInfo<Map<String, Object>> pages = new PageInfo(financingList);
page.setSize(pages.getSize());
page.setCurrent(pages.getPageNum());
page.setTotal(pages.getTotal());
page.setRecords(financingList);
return page;
} }
/** /**
......
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