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 {
@ApiModelProperty(value = "流量到期时间", example = "2036-12-31 23:59:59")
private String contractTimeStr;
@ApiModelProperty(value = "项目公司")
private String regionalCompaniesCode;
}
......@@ -125,5 +125,7 @@ public class JpInverterDto extends BaseDto {
@ApiModelProperty(value = "投运时间")
private String fisTimeStr;
@ApiModelProperty(value = "项目公司")
private String regionalCompaniesCode;
}
......@@ -104,10 +104,38 @@
icbc.medium_id,
ph.rec_date
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
<where>
ph.is_delete = 0
ph.is_delete = 0
<if test="param.custName != null and param.custName != ''">
AND (ph.owners_name LIKE CONCAT('%', #{param.custName}, '%') OR icbc.cust_name LIKE CONCAT('%', #{param.custName}, '%'))
</if>
<if test="param.idCard != null and param.idCard != ''">
AND (ph.id_card LIKE CONCAT('%', #{param.idCard}, '%') OR icbc.id_card LIKE CONCAT('%', #{param.idCard}, '%'))
</if>
<if test="param.phone != null and param.phone != ''">
AND (ph.telephone LIKE CONCAT('%', #{param.phone}, '%') OR icbc.phone LIKE CONCAT('%', #{param.phone}, '%'))
</if>
<if test="param.regionalCompaniesName != null and param.regionalCompaniesName != ''">
AND ph.regional_companies_name LIKE CONCAT('%', #{param.regionalCompaniesName}, '%')
</if>
<if test="param.addressName != null and param.addressName != ''">
AND ph.project_address LIKE CONCAT('%', #{param.addressName}, '%')
</if>
<if test="param != null">
<if test="param.openAccountStatus != null and param.openAccountStatus != ''">
<if test="param.openAccountStatus != '00'">
......@@ -117,21 +145,7 @@
AND (icbc.open_account_status = #{param.openAccountStatus} OR icbc.open_account_status is null)
</if>
</if>
<if test="param.custName != null and param.custName != ''">
AND (ph.owners_name LIKE CONCAT('%', #{param.custName}, '%') OR icbc.cust_name LIKE CONCAT('%', #{param.custName}, '%'))
</if>
<if test="param.idCard != null and param.idCard != ''">
AND (ph.id_card LIKE CONCAT('%', #{param.idCard}, '%') OR icbc.id_card LIKE CONCAT('%', #{param.idCard}, '%'))
</if>
<if test="param.phone != null and param.phone != ''">
AND (ph.telephone LIKE CONCAT('%', #{param.phone}, '%') OR icbc.phone LIKE CONCAT('%', #{param.phone}, '%'))
</if>
<if test="param.regionalCompaniesName != null and param.regionalCompaniesName != ''">
AND ph.regional_companies_name LIKE CONCAT('%', #{param.regionalCompaniesName}, '%')
</if>
<if test="param.addressName != null and param.addressName != ''">
AND ph.project_address LIKE CONCAT('%', #{param.addressName}, '%')
</if>
</if>
</where>
<if test="param.offset != null and param.limit != null">
......
......@@ -70,6 +70,9 @@
<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>
ORDER BY CASE
WHEN hjc.state = '报警' THEN 1
......@@ -97,6 +100,12 @@
<if test="dto.state != null and dto.state !=''">
hjc.state = #{dto.state}
</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>
</select>
<select id="selectInverterState" resultType="java.util.Map">
......
......@@ -92,6 +92,9 @@
<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>
ORDER BY CASE
WHEN hjc.state = '报警' THEN 1
......@@ -122,6 +125,12 @@
<if test="dto.maxValue != null and dto.maxValue !=''">
AND hjc.capacity <![CDATA[<=]]> #{dto.maxValue}
</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>
</select>
<select id="selectInverterState" resultType="java.util.Map">
......
......@@ -35,7 +35,8 @@
SUBSTRING_INDEX(ph.project_address_name, '/', 1) AS province,
lc.stamp_status,
lc.status,
ps.kc_create_time AS firstSubmitDate
ps.kc_create_time AS firstSubmitDate,
ps.rec_date
FROM
hygf_power_station ps
LEFT JOIN (
......
......@@ -543,8 +543,7 @@
SELECT
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' AND ( YEAR ( repay_date ) = YEAR ( CURDATE())) THEN rent ELSE 0 END ) jnwhk,
max(regional_companies_code) regionalCompaniesCode,
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(hygf_repayment.company_name) regionalCompaniesName,
max(pc.REGION_SEQ) regionSeq
FROM
......
......@@ -122,10 +122,10 @@
and newHcr.firstConstructionDate &lt;= #{dto.endTime}
</if>
<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 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 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
......
......@@ -209,10 +209,11 @@ public class StatisticsHomepageServiceImpl {
while (iterator.hasNext()) {
Map<String, Object> map = iterator.next();
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"))) {
sgtotal += (long) map.get("total");
sgrealScale += (double) map.get("realScale");
sgrealScale += new BigDecimal(String.valueOf(map.get("realScale"))).doubleValue();
iterator.remove();
}
}
......@@ -235,7 +236,7 @@ public class StatisticsHomepageServiceImpl {
gridNum += (long) map.get("total");
if ("审核中".equals(map.get("statusText"))) {
total += (long) map.get("total");
realScale += (double) map.get("realScale");
realScale += new BigDecimal(String.valueOf(map.get("realScale"))).doubleValue();
iterator1.remove();
}
}
......@@ -256,7 +257,7 @@ public class StatisticsHomepageServiceImpl {
acceptanceNum += (long) map.get("total");
if ("审核中".equals(map.get("statusText"))) {
total += (long) map.get("total");
realScale += (double) map.get("realScale");
realScale += new BigDecimal(String.valueOf(map.get("realScale"))).doubleValue();
iterator2.remove();
}
}
......@@ -277,11 +278,11 @@ public class StatisticsHomepageServiceImpl {
Map<String, Object> map = iterator2.next();
financingNum += (long) map.get("total");
if ("放款完成".equals(map.get("statusText"))) {
disbursementMoney += (double)map.get("disbursementMoney");
disbursementMoney += new BigDecimal(String.valueOf(map.get("realScale"))).doubleValue();
}
if ("未通过".equals(map.get("statusText"))) {
trtotal += (long) map.get("total");
trrealScale += (double) map.get("realScale");
trrealScale += new BigDecimal(String.valueOf(map.get("realScale"))).doubleValue();
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