Commit 8b41f5fc authored by hezhuozhi's avatar hezhuozhi

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

parents a9809a82 e3915ce3
...@@ -94,5 +94,7 @@ public class JpCollectorDto extends BaseDto { ...@@ -94,5 +94,7 @@ public class JpCollectorDto extends BaseDto {
@ApiModelProperty(value = "流量到期时间", example = "2036-12-31 23:59:59") @ApiModelProperty(value = "流量到期时间", example = "2036-12-31 23:59:59")
private String contractTimeStr; private String contractTimeStr;
@ApiModelProperty(value = "项目公司")
private String regionalCompaniesCode;
} }
...@@ -125,5 +125,7 @@ public class JpInverterDto extends BaseDto { ...@@ -125,5 +125,7 @@ public class JpInverterDto extends BaseDto {
@ApiModelProperty(value = "投运时间") @ApiModelProperty(value = "投运时间")
private String fisTimeStr; private String fisTimeStr;
@ApiModelProperty(value = "项目公司")
private String regionalCompaniesCode;
} }
...@@ -104,19 +104,23 @@ ...@@ -104,19 +104,23 @@
icbc.medium_id, icbc.medium_id,
ph.rec_date ph.rec_date
FROM FROM
(SELECT amos_user_id, is_delete, developer_code,regional_companies_code, developer_user_id, MAX( sequence_nbr ), owners_name, telephone, id_card,regional_companies_name,project_address, rec_date FROM hygf_peasant_household GROUP BY amos_user_id) ph (
SELECT
amos_user_id,
MAX(developer_code) AS developer_code,
MAX(regional_companies_code ) AS regional_companies_code ,
MAX(is_delete) AS is_delete,
MAX(owners_name) AS owners_name,
MAX(telephone) AS telephone,
MAX(id_card) AS id_card,
MAX(regional_companies_name) AS regional_companies_name,
MAX(project_address) AS project_address,
MAX(rec_date) AS rec_date
FROM hygf_peasant_household GROUP BY amos_user_id
) ph
LEFT JOIN hygf_icbc_record icbc ON ph.amos_user_id = icbc.amos_user_id LEFT JOIN hygf_icbc_record icbc ON ph.amos_user_id = icbc.amos_user_id
<where> <where>
ph.is_delete = 0 ph.is_delete = 0
<if test="param != null">
<if test="param.openAccountStatus != null and param.openAccountStatus != ''">
<if test="param.openAccountStatus != '00'">
AND icbc.open_account_status = #{param.openAccountStatus}
</if>
<if test="param.openAccountStatus == '00'">
AND (icbc.open_account_status = #{param.openAccountStatus} OR icbc.open_account_status is null)
</if>
</if>
<if test="param.custName != null and param.custName != ''"> <if test="param.custName != null and param.custName != ''">
AND (ph.owners_name LIKE CONCAT('%', #{param.custName}, '%') OR icbc.cust_name LIKE CONCAT('%', #{param.custName}, '%')) AND (ph.owners_name LIKE CONCAT('%', #{param.custName}, '%') OR icbc.cust_name LIKE CONCAT('%', #{param.custName}, '%'))
</if> </if>
...@@ -132,6 +136,16 @@ ...@@ -132,6 +136,16 @@
<if test="param.addressName != null and param.addressName != ''"> <if test="param.addressName != null and param.addressName != ''">
AND ph.project_address LIKE CONCAT('%', #{param.addressName}, '%') AND ph.project_address LIKE CONCAT('%', #{param.addressName}, '%')
</if> </if>
<if test="param != null">
<if test="param.openAccountStatus != null and param.openAccountStatus != ''">
<if test="param.openAccountStatus != '00'">
AND icbc.open_account_status = #{param.openAccountStatus}
</if>
<if test="param.openAccountStatus == '00'">
AND (icbc.open_account_status = #{param.openAccountStatus} OR icbc.open_account_status is null)
</if>
</if>
</if> </if>
</where> </where>
<if test="param.offset != null and param.limit != null"> <if test="param.offset != null and param.limit != null">
......
...@@ -70,6 +70,9 @@ ...@@ -70,6 +70,9 @@
<if test="dto.stationName != null and dto.stationName !=''"> <if test="dto.stationName != null and dto.stationName !=''">
AND hjc.station_name like concat('%',#{dto.stationName},'%') AND hjc.station_name like concat('%',#{dto.stationName},'%')
</if> </if>
<if test="dto.regionalCompaniesCode!=null and dto.regionalCompaniesCode != ''">
and sta.regional_companies_code = #{dto.regionalCompaniesCode}
</if>
</where> </where>
ORDER BY CASE ORDER BY CASE
WHEN hjc.state = '报警' THEN 1 WHEN hjc.state = '报警' THEN 1
...@@ -97,6 +100,12 @@ ...@@ -97,6 +100,12 @@
<if test="dto.state != null and dto.state !=''"> <if test="dto.state != null and dto.state !=''">
hjc.state = #{dto.state} hjc.state = #{dto.state}
</if> </if>
<if test="dto.stationName != null and dto.stationName !=''">
AND hjc.station_name like concat('%',#{dto.stationName},'%')
</if>
<if test="dto.regionalCompaniesCode!=null and dto.regionalCompaniesCode != ''">
and sta.regional_companies_code = #{dto.regionalCompaniesCode}
</if>
</where> </where>
</select> </select>
<select id="selectInverterState" resultType="java.util.Map"> <select id="selectInverterState" resultType="java.util.Map">
......
...@@ -92,6 +92,9 @@ ...@@ -92,6 +92,9 @@
<if test="dto.stationName != null and dto.stationName !=''"> <if test="dto.stationName != null and dto.stationName !=''">
AND hjc.station_name like concat('%',#{dto.stationName},'%') AND hjc.station_name like concat('%',#{dto.stationName},'%')
</if> </if>
<if test="dto.regionalCompaniesCode!=null and dto.regionalCompaniesCode != ''">
and sta.regional_companies_code = #{dto.regionalCompaniesCode}
</if>
</where> </where>
ORDER BY CASE ORDER BY CASE
WHEN hjc.state = '报警' THEN 1 WHEN hjc.state = '报警' THEN 1
...@@ -122,6 +125,12 @@ ...@@ -122,6 +125,12 @@
<if test="dto.maxValue != null and dto.maxValue !=''"> <if test="dto.maxValue != null and dto.maxValue !=''">
AND hjc.capacity <![CDATA[<=]]> #{dto.maxValue} AND hjc.capacity <![CDATA[<=]]> #{dto.maxValue}
</if> </if>
<if test="dto.stationName != null and dto.stationName !=''">
AND hjc.station_name like concat('%',#{dto.stationName},'%')
</if>
<if test="dto.regionalCompaniesCode!=null and dto.regionalCompaniesCode != ''">
and sta.regional_companies_code = #{dto.regionalCompaniesCode}
</if>
</where> </where>
</select> </select>
<select id="selectInverterState" resultType="java.util.Map"> <select id="selectInverterState" resultType="java.util.Map">
......
...@@ -35,7 +35,8 @@ ...@@ -35,7 +35,8 @@
SUBSTRING_INDEX(ph.project_address_name, '/', 1) AS province, SUBSTRING_INDEX(ph.project_address_name, '/', 1) AS province,
lc.stamp_status, lc.stamp_status,
lc.status, lc.status,
ps.kc_create_time AS firstSubmitDate ps.kc_create_time AS firstSubmitDate,
ps.rec_date
FROM FROM
hygf_power_station ps hygf_power_station ps
LEFT JOIN ( LEFT JOIN (
......
...@@ -543,8 +543,7 @@ ...@@ -543,8 +543,7 @@
SELECT SELECT
sum( CASE WHEN repay_state = '1' THEN rent ELSE 0 END ) yhk, sum( CASE WHEN repay_state = '1' THEN rent ELSE 0 END ) yhk,
sum( CASE WHEN repay_state = '0' THEN rent ELSE 0 END ) sywhk, sum( CASE WHEN repay_state = '0' THEN rent ELSE 0 END ) sywhk,
sum( CASE WHEN repay_state = '0' AND ( YEAR ( repay_date ) = YEAR ( CURDATE())) THEN rent ELSE 0 END ) jnwhk, SUM(CASE WHEN repay_state = '0' AND EXTRACT(YEAR FROM repay_date) = EXTRACT(YEAR FROM CURRENT_DATE) THEN rent ELSE 0 END) AS jnwhk, max(regional_companies_code) regionalCompaniesCode,
max(regional_companies_code) regionalCompaniesCode,
max(hygf_repayment.company_name) regionalCompaniesName, max(hygf_repayment.company_name) regionalCompaniesName,
max(pc.REGION_SEQ) regionSeq max(pc.REGION_SEQ) regionSeq
FROM FROM
......
...@@ -122,10 +122,10 @@ ...@@ -122,10 +122,10 @@
and newHcr.firstConstructionDate &lt;= #{dto.endTime} and newHcr.firstConstructionDate &lt;= #{dto.endTime}
</if> </if>
<if test=' dto.type!=null and dto.type == "1"'> <if test=' dto.type!=null and dto.type == "1"'>
and hygf_work_order_power_station.power_station_construction_status in ('待登记','未通过','已完工','经销商工程待审核') and hygf_work_order_power_station.power_station_construction_status in ('待登记','未通过','已完工','经销商工程待审核','片区运营待审核','设计待审核','工程待审核')
</if> </if>
<if test=' dto.type !=null and dto.type == "2"'> <if test=' dto.type !=null and dto.type == "2"'>
and hygf_work_order_power_station.power_station_construction_status IN ( '未通过', '已完工','经销商工程待审核', '待整改', '整改中','整改待审核' ) and hygf_work_order_power_station.power_station_construction_status IN ( '未通过', '已完工','经销商工程待审核', '待整改', '整改中','整改待审核','片区运营待审核','设计待审核','工程待审核' )
</if> </if>
<if test=' dto.type !=null and dto.type == "3" and dto.workOrderPowerStationNodes !=null'> <if test=' dto.type !=null and dto.type == "3" and dto.workOrderPowerStationNodes !=null'>
and ( hygf_work_order_power_station.work_order_power_station_node is not null and ( hygf_work_order_power_station.work_order_power_station_node is not null
......
...@@ -209,10 +209,11 @@ public class StatisticsHomepageServiceImpl { ...@@ -209,10 +209,11 @@ public class StatisticsHomepageServiceImpl {
while (iterator.hasNext()) { while (iterator.hasNext()) {
Map<String, Object> map = iterator.next(); Map<String, Object> map = iterator.next();
workNum += (long) map.get("total"); workNum += (long) map.get("total");
stationRealScale += (double) map.get("realScale"); BigDecimal realScale1 = new BigDecimal(String.valueOf(map.get("realScale")));
stationRealScale += realScale1.doubleValue();
if ("施工资料上传".equals(map.get("statusText"))) { if ("施工资料上传".equals(map.get("statusText"))) {
sgtotal += (long) map.get("total"); sgtotal += (long) map.get("total");
sgrealScale += (double) map.get("realScale"); sgrealScale += new BigDecimal(String.valueOf(map.get("realScale"))).doubleValue();
iterator.remove(); iterator.remove();
} }
} }
...@@ -235,7 +236,7 @@ public class StatisticsHomepageServiceImpl { ...@@ -235,7 +236,7 @@ public class StatisticsHomepageServiceImpl {
gridNum += (long) map.get("total"); gridNum += (long) map.get("total");
if ("审核中".equals(map.get("statusText"))) { if ("审核中".equals(map.get("statusText"))) {
total += (long) map.get("total"); total += (long) map.get("total");
realScale += (double) map.get("realScale"); realScale += new BigDecimal(String.valueOf(map.get("realScale"))).doubleValue();
iterator1.remove(); iterator1.remove();
} }
} }
...@@ -256,7 +257,7 @@ public class StatisticsHomepageServiceImpl { ...@@ -256,7 +257,7 @@ public class StatisticsHomepageServiceImpl {
acceptanceNum += (long) map.get("total"); acceptanceNum += (long) map.get("total");
if ("审核中".equals(map.get("statusText"))) { if ("审核中".equals(map.get("statusText"))) {
total += (long) map.get("total"); total += (long) map.get("total");
realScale += (double) map.get("realScale"); realScale += new BigDecimal(String.valueOf(map.get("realScale"))).doubleValue();
iterator2.remove(); iterator2.remove();
} }
} }
...@@ -277,11 +278,11 @@ public class StatisticsHomepageServiceImpl { ...@@ -277,11 +278,11 @@ public class StatisticsHomepageServiceImpl {
Map<String, Object> map = iterator2.next(); Map<String, Object> map = iterator2.next();
financingNum += (long) map.get("total"); financingNum += (long) map.get("total");
if ("放款完成".equals(map.get("statusText"))) { if ("放款完成".equals(map.get("statusText"))) {
disbursementMoney += (double)map.get("disbursementMoney"); disbursementMoney += new BigDecimal(String.valueOf(map.get("realScale"))).doubleValue();
} }
if ("未通过".equals(map.get("statusText"))) { if ("未通过".equals(map.get("statusText"))) {
trtotal += (long) map.get("total"); trtotal += (long) map.get("total");
trrealScale += (double) map.get("realScale"); trrealScale += new BigDecimal(String.valueOf(map.get("realScale"))).doubleValue();
iterator2.remove(); iterator2.remove();
} }
} }
......
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