Commit 2a039a86 authored by chenzhao's avatar chenzhao

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

parents 64369b69 b37ab500
...@@ -79,4 +79,5 @@ public class AcceptanceCheckDto extends BaseDto { ...@@ -79,4 +79,5 @@ public class AcceptanceCheckDto extends BaseDto {
private String realScale; private String realScale;
private String province; private String province;
private String firstSubmitDate;
} }
...@@ -80,4 +80,5 @@ public class BasicGridRecordDto extends BaseDto { ...@@ -80,4 +80,5 @@ public class BasicGridRecordDto extends BaseDto {
private String realScale; private String realScale;
private String province; private String province;
private String firstSubmitDate;
} }
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
hph.owners_name AS ownersName, hph.owners_name AS ownersName,
hph.peasant_household_no peasantHouseholdNo, hph.peasant_household_no peasantHouseholdNo,
hph.project_address_name projectAddressName, hph.project_address_name projectAddressName,
newHcar.firstSubmitDate,
substring_index ( hph.project_address_name, '/', 1 ) AS province, substring_index ( hph.project_address_name, '/', 1 ) AS province,
DATE_FORMAT(hogaa.grid_connection_time, '%Y-%m-%d %H:%i:%S') AS gridConnectionTime, DATE_FORMAT(hogaa.grid_connection_time, '%Y-%m-%d %H:%i:%S') AS gridConnectionTime,
CASE WHEN hbga.acceptance_check_status = '15' THEN '待提交验收' CASE WHEN hbga.acceptance_check_status = '15' THEN '待提交验收'
...@@ -41,12 +42,23 @@ ...@@ -41,12 +42,23 @@
LEFT JOIN hygf_peasant_household hph ON hph.sequence_nbr = hbga.peasant_household_id LEFT JOIN hygf_peasant_household hph ON hph.sequence_nbr = hbga.peasant_household_id
LEFT JOIN hygf_on_grid_and_acceptance hogaa ON hogaa.work_order_power_station_id = hbga.work_order_power_station_id LEFT JOIN hygf_on_grid_and_acceptance hogaa ON hogaa.work_order_power_station_id = hbga.work_order_power_station_id
LEFT JOIN hygf_work_order ON hygf_work_order.sequence_nbr = hbga.work_order_id LEFT JOIN hygf_work_order ON hygf_work_order.sequence_nbr = hbga.work_order_id
left join
(select work_order_power_station_id, MIN( operation_time ) as firstSubmitDate from hygf_construction_acceptance_records where operation_content = '提交验收审核' GROUP BY work_order_power_station_id)
newHcar on newHcar.work_order_power_station_id = hbga.work_order_power_station_id
<where> <where>
hbga.is_delete = 0 hbga.is_delete = 0
<if test="map.amosDealerId!=null and map.amosDealerId!=''"> <if test="map.amosDealerId!=null and map.amosDealerId!=''">
and hygf_work_order.amos_dealer_id = #{map.amosDealerId} and hygf_work_order.amos_dealer_id = #{map.amosDealerId}
</if> </if>
<if test="map.startTime!=null and map.startTime!=''">
and newHcar.firstSubmitDate &gt;= #{map.startTime}
</if>
<if test="map.endTime!=null and map.endTime!=''">
and newHcar.firstSubmitDate &lt;= #{map.endTime}
</if>
<if test="map.developerName!=null and map.developerName!=''"> <if test="map.developerName!=null and map.developerName!=''">
and hph.developer_name like concat('%',#{map.developerName},'%') and hph.developer_name like concat('%',#{map.developerName},'%')
</if> </if>
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
hph.owners_name AS ownersName, hph.owners_name AS ownersName,
hph.peasant_household_no peasantHouseholdNo, hph.peasant_household_no peasantHouseholdNo,
hph.project_address_name projectAddressName, hph.project_address_name projectAddressName,
newHcgr.firstSubmitDate,
substring_index ( hph.project_address_name, '/', 1 ) AS province, substring_index ( hph.project_address_name, '/', 1 ) AS province,
DATE_FORMAT(hogaa.grid_connection_time, '%Y-%m-%d %H:%i:%S') AS gridConnectionTime, DATE_FORMAT(hogaa.grid_connection_time, '%Y-%m-%d %H:%i:%S') AS gridConnectionTime,
CASE WHEN hbga.grid_status = '1' THEN '待登记' CASE WHEN hbga.grid_status = '1' THEN '待登记'
...@@ -49,12 +50,21 @@ ...@@ -49,12 +50,21 @@
LEFT JOIN hygf_peasant_household hph ON hph.sequence_nbr = hbga.peasant_household_id LEFT JOIN hygf_peasant_household hph ON hph.sequence_nbr = hbga.peasant_household_id
LEFT JOIN hygf_on_grid_and_acceptance hogaa ON hogaa.work_order_power_station_id = hbga.work_order_power_station_id LEFT JOIN hygf_on_grid_and_acceptance hogaa ON hogaa.work_order_power_station_id = hbga.work_order_power_station_id
LEFT JOIN hygf_work_order ON hygf_work_order.sequence_nbr = hbga.work_order_id LEFT JOIN hygf_work_order ON hygf_work_order.sequence_nbr = hbga.work_order_id
left join
(select work_order_power_station_id, MIN( operation_time ) as firstSubmitDate from hygf_construction_gird_records hcgr where operation_content = '提交并网资料' GROUP BY work_order_power_station_id)
newHcgr on newHcgr.work_order_power_station_id = hbga.work_order_power_station_id
<where> <where>
hbga.is_delete = 0 hbga.is_delete = 0
<if test="map.amosDealerId!=null and map.amosDealerId!=''"> <if test="map.amosDealerId!=null and map.amosDealerId!=''">
and hygf_work_order.amos_dealer_id = #{map.amosDealerId} and hygf_work_order.amos_dealer_id = #{map.amosDealerId}
</if> </if>
<if test="map.startTime!=null and map.startTime!=''">
and newHcgr.firstSubmitDate &gt;= #{map.startTime}
</if>
<if test="map.endTime!=null and map.endTime!=''">
and newHcgr.firstSubmitDate &lt;= #{map.endTime}
</if>
<if test="map.regionCompanyId!=null and map.regionCompanyId!=''"> <if test="map.regionCompanyId!=null and map.regionCompanyId!=''">
and hygf_work_order.region_company_id =#{map.regionCompanyId} and hygf_work_order.region_company_id =#{map.regionCompanyId}
</if> </if>
......
...@@ -20,16 +20,24 @@ ...@@ -20,16 +20,24 @@
hph.developer_code, hph.developer_code,
hph.developer_name developerName, hph.developer_name developerName,
hph.is_history isHistory, hph.is_history isHistory,
info.financing_companies_name financingCompaniesName info.financing_companies_name financingCompaniesName,
hfi.tr_create_time trCreateTime
FROM FROM
`hygf_peasant_household` hph `hygf_peasant_household` hph
LEFT JOIN hygf_financing_info info ON info.peasant_household_id = hph.sequence_nbr LEFT JOIN hygf_financing_info info ON info.peasant_household_id = hph.sequence_nbr
LEFT JOIN hygf_unit_info on hph.developer_code = hygf_unit_info.amos_company_code LEFT JOIN hygf_unit_info on hph.developer_code = hygf_unit_info.amos_company_code
left join hygf_financing_info hfi on hfi.peasant_household_id = hph.sequence_nbr
<where> <where>
hph.construction_state = '验收完成' hph.construction_state = '验收完成'
<if test="params.ownersName != null and params.ownersName !=''"> <if test="params.ownersName != null and params.ownersName !=''">
and hph.owners_name like concat('%',#{params.ownersName},'%') and hph.owners_name like concat('%',#{params.ownersName},'%')
</if> </if>
<if test="params.startTime != null and params.startTime !=''">
and hfi.tr_create_time &gt;= #{params.startTime}
</if>
<if test="params.endTime != null and params.endTime !=''">
and hfi.tr_create_time &lt;= #{params.endTime}
</if>
<if test="params.peasantHouseholdNo != null and params.peasantHouseholdNo !=''"> <if test="params.peasantHouseholdNo != null and params.peasantHouseholdNo !=''">
and hph.peasant_household_no like concat('%',#{params.peasantHouseholdNo},'%') and hph.peasant_household_no like concat('%',#{params.peasantHouseholdNo},'%')
</if> </if>
......
...@@ -208,7 +208,9 @@ public class AcceptanceCheckController extends BaseController { ...@@ -208,7 +208,9 @@ public class AcceptanceCheckController extends BaseController {
@RequestParam(required = false,value = "acceptanceTime") String acceptanceTime, @RequestParam(required = false,value = "acceptanceTime") String acceptanceTime,
@RequestParam(required = false, value = "province") String province, @RequestParam(required = false, value = "province") String province,
@RequestParam(required = false, value = "developerName") String developerName, @RequestParam(required = false, value = "developerName") String developerName,
@RequestParam(required = false, value = "regionalCompaniesName") String regionalCompaniesName) throws Exception { @RequestParam(required = false, value = "regionalCompaniesName") String regionalCompaniesName,
@RequestParam(required = false, value = "startTime") String startTime,
@RequestParam(required = false, value = "endTime") String endTime) throws Exception {
//当前登录人所属场站 //当前登录人所属场站
// UserUnitInformationDto userUnitInformationDto=personnelBusinessMapper.getUserUnitInformationDto( getUserInfo().getUserId()); // UserUnitInformationDto userUnitInformationDto=personnelBusinessMapper.getUserUnitInformationDto( getUserInfo().getUserId());
...@@ -237,7 +239,7 @@ public class AcceptanceCheckController extends BaseController { ...@@ -237,7 +239,7 @@ public class AcceptanceCheckController extends BaseController {
basicGridNodes.add("ys-zichan"); basicGridNodes.add("ys-zichan");
} }
} }
Page<AcceptanceCheckDto> page = acceptanceCheckServiceImpl.selectPage(null,null,current, size, projectAddress, powerStationCode, ownersName, acceptanceCheckStatus, acceptanceTime, "",basicGridNodes,type,province, developerName, regionalCompaniesName); Page<AcceptanceCheckDto> page = acceptanceCheckServiceImpl.selectPage(null,null,current, size, projectAddress, powerStationCode, ownersName, acceptanceCheckStatus, acceptanceTime, "",basicGridNodes,type,province, developerName, regionalCompaniesName, startTime, endTime);
//根据角色及当前节点判断是否有操作权限 //根据角色及当前节点判断是否有操作权限
if (basicGridNodes != null){ if (basicGridNodes != null){
for (AcceptanceCheckDto e : page.getRecords()) { for (AcceptanceCheckDto e : page.getRecords()) {
......
...@@ -153,7 +153,9 @@ public class BasicGridAcceptanceController extends BaseController { ...@@ -153,7 +153,9 @@ public class BasicGridAcceptanceController extends BaseController {
@RequestParam(required = false, value = "gridConnectionTime") String gridConnectionTime, @RequestParam(required = false, value = "gridConnectionTime") String gridConnectionTime,
@RequestParam(required = false, value = "province") String province, @RequestParam(required = false, value = "province") String province,
@RequestParam(required = false, value = "developerName") String developerName, @RequestParam(required = false, value = "developerName") String developerName,
@RequestParam(required = false, value = "regionalCompaniesName") String regionalCompaniesName) throws Exception { @RequestParam(required = false, value = "regionalCompaniesName") String regionalCompaniesName,
@RequestParam(required = false, value = "startTime") String startTime,
@RequestParam(required = false, value = "endTime") String endTime) throws Exception {
// 当前登录人所属场站 // 当前登录人所属场站
// UserUnitInformationDto userUnitInformationDto=personnelBusinessMapper.getUserUnitInformationDto( getUserInfo().getUserId()); // UserUnitInformationDto userUnitInformationDto=personnelBusinessMapper.getUserUnitInformationDto( getUserInfo().getUserId());
...@@ -180,7 +182,7 @@ public class BasicGridAcceptanceController extends BaseController { ...@@ -180,7 +182,7 @@ public class BasicGridAcceptanceController extends BaseController {
} }
Page<BasicGridRecordDto> page = basicGridAcceptanceServiceImpl.selectPage(null, null, current, size, Page<BasicGridRecordDto> page = basicGridAcceptanceServiceImpl.selectPage(null, null, current, size,
projectAddress, powerStationCode, ownersName, gridStatus, gridConnectionTime, "", basicGridNodes, type, projectAddress, powerStationCode, ownersName, gridStatus, gridConnectionTime, "", basicGridNodes, type,
province, developerName, regionalCompaniesName); province, developerName, regionalCompaniesName, startTime, endTime);
// 根据角色及当前节点判断是否有操作权限 // 根据角色及当前节点判断是否有操作权限
if (basicGridNodes != null) { if (basicGridNodes != null) {
for (BasicGridRecordDto e : page.getRecords()) { for (BasicGridRecordDto e : page.getRecords()) {
...@@ -220,7 +222,7 @@ public class BasicGridAcceptanceController extends BaseController { ...@@ -220,7 +222,7 @@ public class BasicGridAcceptanceController extends BaseController {
// 当前登录人所属场站 // 当前登录人所属场站
Page<BasicGridRecordDto> page = basicGridAcceptanceServiceImpl.selectPage(null, null, current, size, Page<BasicGridRecordDto> page = basicGridAcceptanceServiceImpl.selectPage(null, null, current, size,
projectAddress, powerStationCode, ownersName, gridStatus, gridConnectionTime, "check", null, null,province, null, null); projectAddress, powerStationCode, ownersName, gridStatus, gridConnectionTime, "check", null, null,province, null, null, null, null);
return ResponseHelper.buildResponse(page); return ResponseHelper.buildResponse(page);
} }
......
...@@ -170,11 +170,13 @@ public class FinancingInfoController extends BaseController { ...@@ -170,11 +170,13 @@ public class FinancingInfoController extends BaseController {
@RequestParam(value = "projectAddress",required = false) String projectAddress, @RequestParam(value = "projectAddress",required = false) String projectAddress,
@RequestParam(value = "peasantHouseholdNo",required = false) String peasantHouseholdNo, @RequestParam(value = "peasantHouseholdNo",required = false) String peasantHouseholdNo,
@RequestParam(value = "developerName",required = false) String developerName, @RequestParam(value = "developerName",required = false) String developerName,
@RequestParam(value = "financingCompaniesName",required = false) String financingCompaniesName){ @RequestParam(value = "financingCompaniesName",required = false) String financingCompaniesName,
@RequestParam(value = "startTime",required = false) String startTime,
@RequestParam(value = "endTime",required = false) String endTime){
Page<Map<String, Object>> page = new Page<Map<String, Object>>(); Page<Map<String, Object>> page = new Page<Map<String, Object>>();
page.setCurrent(current); page.setCurrent(current);
page.setSize(size); page.setSize(size);
return ResponseHelper.buildResponse(financingInfoServiceImpl.queryForFinancingInfoPage(page,type,status,regionalCompaniesCode,ownersName, region,batchNo,isHistory, projectAddress, peasantHouseholdNo, developerName, financingCompaniesName)); return ResponseHelper.buildResponse(financingInfoServiceImpl.queryForFinancingInfoPage(page,type,status,regionalCompaniesCode,ownersName, region,batchNo,isHistory, projectAddress, peasantHouseholdNo, developerName, financingCompaniesName, startTime, endTime));
} }
/** /**
......
...@@ -70,7 +70,7 @@ public class AcceptanceCheckServiceImpl extends BaseService<AcceptanceCheckDto,A ...@@ -70,7 +70,7 @@ public class AcceptanceCheckServiceImpl extends BaseService<AcceptanceCheckDto,A
public Page<AcceptanceCheckDto> selectPage(Long regionCompanyId, Long amosDealerId, int current, int size, public Page<AcceptanceCheckDto> selectPage(Long regionCompanyId, Long amosDealerId, int current, int size,
String projectAddress, String powerStationCode, String ownersName, String acceptanceCheckStatus, String projectAddress, String powerStationCode, String ownersName, String acceptanceCheckStatus,
String gridConnectionTime, String formType, List<String> basicGridNodes, String type,String province, String developerName, String regionalCompaniesName) throws Exception { String gridConnectionTime, String formType, List<String> basicGridNodes, String type,String province, String developerName, String regionalCompaniesName, String startTime, String endTime) throws Exception {
PageHelper.startPage(current, size); PageHelper.startPage(current, size);
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
Date date = null; Date date = null;
...@@ -90,6 +90,8 @@ public class AcceptanceCheckServiceImpl extends BaseService<AcceptanceCheckDto,A ...@@ -90,6 +90,8 @@ public class AcceptanceCheckServiceImpl extends BaseService<AcceptanceCheckDto,A
map.put("province",province); map.put("province",province);
map.put("developerName", developerName); map.put("developerName", developerName);
map.put("regionalCompaniesName", regionalCompaniesName); map.put("regionalCompaniesName", regionalCompaniesName);
map.put("startTime", startTime);
map.put("endTime", endTime);
List<AcceptanceCheckDto> list = acceptanceCheckMapper.selectPageList(map); List<AcceptanceCheckDto> list = acceptanceCheckMapper.selectPageList(map);
if(list != null && list.size() > 0) { if(list != null && list.size() > 0) {
......
...@@ -100,7 +100,7 @@ public class BasicGridAcceptanceServiceImpl extends BaseService<BasicGridAccepta ...@@ -100,7 +100,7 @@ public class BasicGridAcceptanceServiceImpl extends BaseService<BasicGridAccepta
public Page<BasicGridRecordDto> selectPage(Long regionCompanyId, Long amosDealerId, int current, int size, public Page<BasicGridRecordDto> selectPage(Long regionCompanyId, Long amosDealerId, int current, int size,
String projectAddress, String powerStationCode, String ownersName, String gridStatus, String projectAddress, String powerStationCode, String ownersName, String gridStatus,
String gridConnectionTime, String formType, List<String> basicGridNodes, String type, String province, String developerName, String regionalCompaniesName) String gridConnectionTime, String formType, List<String> basicGridNodes, String type, String province, String developerName, String regionalCompaniesName, String startTime, String endTime)
throws Exception { throws Exception {
PageHelper.startPage(current, size); PageHelper.startPage(current, size);
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
...@@ -121,6 +121,8 @@ public class BasicGridAcceptanceServiceImpl extends BaseService<BasicGridAccepta ...@@ -121,6 +121,8 @@ public class BasicGridAcceptanceServiceImpl extends BaseService<BasicGridAccepta
map.put("province", province); map.put("province", province);
map.put("developerName", developerName); map.put("developerName", developerName);
map.put("regionalCompaniesName", regionalCompaniesName); map.put("regionalCompaniesName", regionalCompaniesName);
map.put("startTime", startTime);
map.put("endTime", endTime);
List<BasicGridRecordDto> list = basicGridAcceptanceMapper.selectPageList(map); List<BasicGridRecordDto> list = basicGridAcceptanceMapper.selectPageList(map);
PageInfo<BasicGridRecordDto> page = new PageInfo(list); PageInfo<BasicGridRecordDto> page = new PageInfo(list);
Page<BasicGridRecordDto> pageNew = new Page<>(); Page<BasicGridRecordDto> pageNew = new Page<>();
......
...@@ -14,6 +14,7 @@ import com.github.pagehelper.PageHelper; ...@@ -14,6 +14,7 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity; import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.hygf.api.Enum.*; import com.yeejoin.amos.boot.module.hygf.api.Enum.*;
...@@ -87,7 +88,7 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina ...@@ -87,7 +88,7 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
private RedisLockUtil redisLockUtil; private RedisLockUtil redisLockUtil;
@UserLimits @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, String projectAddress, String peasantHouseholdNo, String developerName, String financingCompaniesName) { 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, String peasantHouseholdNo, String developerName, String financingCompaniesName, String startTime, String endTime) {
StdUserEmpower orgCode = (StdUserEmpower) redisUtils.get("Emp_" + RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())); 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); ReginParams reginParams = JSON.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
List<String> amosOrgCodes = orgCode.getAmosOrgCode(); List<String> amosOrgCodes = orgCode.getAmosOrgCode();
...@@ -105,6 +106,8 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina ...@@ -105,6 +106,8 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
params.put("peasantHouseholdNo", peasantHouseholdNo); params.put("peasantHouseholdNo", peasantHouseholdNo);
params.put("developerName", developerName); params.put("developerName", developerName);
params.put("financingCompaniesName", financingCompaniesName); params.put("financingCompaniesName", financingCompaniesName);
params.put("startTime", startTime);
params.put("endTime", endTime);
// 1 投融人员 2.融资 3经销商管理员 // 1 投融人员 2.融资 3经销商管理员
switch (type) { switch (type) {
case "1": case "1":
...@@ -126,6 +129,7 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina ...@@ -126,6 +129,7 @@ public class FinancingInfoServiceImpl extends BaseService<FinancingInfoDto, Fina
e.put("realScale", powerStationEngineeringInfoMapper.getRealScaleByPeasantHouseholdNo((String) e.get("peasantHouseholdNo"))); e.put("realScale", powerStationEngineeringInfoMapper.getRealScaleByPeasantHouseholdNo((String) e.get("peasantHouseholdNo")));
} }
e.put("regionName",e.get("projectAddress").toString().split("/")[0]); e.put("regionName",e.get("projectAddress").toString().split("/")[0]);
e.put("trCreateTime", DateUtils.dateStringFormat(e.get("trCreateTime")));
if (null != e.get("instanceId") && e.get("instanceId").toString().contains(",")) { if (null != e.get("instanceId") && e.get("instanceId").toString().contains(",")) {
String[] instanceIds = e.get("instanceId").toString().split(","); String[] instanceIds = e.get("instanceId").toString().split(",");
e.put("instanceId", instanceIds[0]); e.put("instanceId", instanceIds[0]);
......
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