Commit 3aa5da0e authored by chenzhao's avatar chenzhao

存量合同2.0开发 接口补充

parent d6b93305
......@@ -15,5 +15,5 @@ import java.util.Map;
public interface FinancingInfoHistoryMapper extends BaseMapper<FinancingInfoHistory> {
List<Map<String,Object>> getFinancingList(String ownersName , String status, String province);
List<Map<String,Object>> getFinancingList(String ownersName , List<String> status, String province);
}
......@@ -18,13 +18,16 @@
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},'%')
and hhpf.owners_name like concat('',#{ownersName},'%')
</if>
<if test="status != null and status != ''">
hhpf.status =#{status}
<if test="status != null and status.size() > 0">
and hfih.status in
<foreach collection="status" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="province != null and province != ''">
hhpf.province =#{province}
and hhpf.province =#{province}
</if>
</select>
</mapper>
......@@ -8,6 +8,9 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
......@@ -101,8 +104,11 @@ public class FinancingInfoHistoryController extends BaseController {
@ApiOperation(httpMethod = "GET",value = "投融信息分页查询", notes = "投融信息分页查询")
public ResponseModel<Page<Map<String, Object>>> queryForPage(@RequestParam(value = "current") int current, @RequestParam
(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) {
return ResponseHelper.buildResponse(financingInfoHistoryServiceImpl.queryForFinancingInfoHistoryPage(current,size,ownersName,status,province));
List<String> statusList = new ArrayList<>();
if (null != status ){
statusList = Arrays.asList(status.split(","));
}
return ResponseHelper.buildResponse(financingInfoHistoryServiceImpl.queryForFinancingInfoHistoryPage(current,size,ownersName,statusList,province));
}
/**
......
......@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.hygf.biz.controller;
import com.alibaba.fastjson.JSONArray;
import com.yeejoin.amos.boot.biz.common.excel.ExcelUtil;
import com.yeejoin.amos.boot.module.hygf.api.entity.HistoryPeasantHousehold;
import com.yeejoin.amos.boot.module.hygf.api.util.CommonResponseNewUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -136,7 +137,7 @@ public class HistoryPeasantHouseholdController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getByIds")
@ApiOperation(httpMethod = "GET",value = "存量合同电站分页查询", notes = "存量合同电站分页查询")
public ResponseModel<Page<HistoryPeasantHouseholdDto>> getByIds(@RequestParam(value = "ownersName",required = false) String ownersName , @RequestParam(value = "status",required = false) String status, @RequestParam(value = "province",required = false) String province, @RequestParam(value = "ids",required = false) String ids) {
public ResponseModel<Page<HistoryPeasantHouseholdDto>> getByIds( @RequestParam(value = "ids",required = false) String ids) {
Page<HistoryPeasantHouseholdDto> page = new Page<HistoryPeasantHouseholdDto>();
page.setCurrent(1);
page.setSize(Integer.MAX_VALUE);
......@@ -144,7 +145,7 @@ public class HistoryPeasantHouseholdController extends BaseController {
if (StringUtils.isNotEmpty(ids)){
strings= Arrays.asList(ids.split(","));
}
return ResponseHelper.buildResponse(historyPeasantHouseholdServiceImpl.queryForHistoryPeasantHouseholdPage(page,strings,ownersName,province,status));
return ResponseHelper.buildResponse(historyPeasantHouseholdServiceImpl.queryForHistoryPeasantHouseholdPage(page,strings,null,null,null));
}
/**
......@@ -195,9 +196,11 @@ public class HistoryPeasantHouseholdController extends BaseController {
@ApiOperation(httpMethod = "POST",value = "存量合同电站上传", notes = "存量合同电站上传")
@PostMapping(value = "/uploadData")
@Transactional
public void upload(MultipartFile multipartFile) throws Exception {
public ResponseModel upload(MultipartFile file) throws Exception {
historyPeasantHouseholdServiceImpl.uploadData(multipartFile);
historyPeasantHouseholdServiceImpl.uploadData(file);
return CommonResponseNewUtil.success();
}
}
......@@ -33,7 +33,7 @@ public class FinancingInfoHistoryServiceImpl extends BaseService<FinancingInfoHi
/**
* 分页查询
*/
public Page<Map<String, Object>> queryForFinancingInfoHistoryPage(int current,int size,String ownersName , String status, String province) {
public Page<Map<String, Object>> queryForFinancingInfoHistoryPage(int current,int size,String ownersName , List<String> status, String province) {
Page<Map<String, Object>> page = new Page<>();
PageHelper.startPage(current,size);
List<Map<String, Object>> financingList = this.getBaseMapper().getFinancingList(ownersName, status, province);
......
......@@ -300,24 +300,24 @@
<repository>
<id>Releases</id>
<name>Releases</name>
<url>http://113.142.68.105:8081/nexus/content/repositories/releases/</url>
<url>http://47.92.103.240:8081/nexus/content/repositories/releases/</url>
</repository>
<repository>
<id>com.e-iceblue</id>
<name>e-iceblue</name>
<url>http://113.142.68.105:8081/nexus/content/groups/public/</url>
<url>http://47.92.103.240:8081/nexus/content/groups/public/</url>
</repository>
<repository>
<id>Snapshots</id>
<name>Snapshots</name>
<url>http://113.142.68.105:8081/nexus/content/repositories/snapshots/</url>
<url>http://47.92.103.240:8081/nexus/content/repositories/snapshots/</url>
</repository>
<repository>
<id>thirdparty</id>
<name>thirdparty</name>
<url>http://113.142.68.105:8081/nexus/content/repositories/thirdparty/</url>
<url>http://47.92.103.240:8081/nexus/content/repositories/thirdparty/</url>
</repository>
</repositories>
......@@ -326,7 +326,7 @@
<repository>
<id>Releases</id>
<name>Releases</name>
<url>http://113.142.68.105:8081/nexus/content/repositories/releases/</url>
<url>http://47.92.103.240:8081/nexus/content/repositories/releases/</url>
</repository>
</distributionManagement>
......
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