Commit 540dafa2 authored by chenzhao's avatar chenzhao

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

parents e016f793 fe0ce735
...@@ -1525,7 +1525,7 @@ ...@@ -1525,7 +1525,7 @@
and update_date >= and update_date >=
#{startTime} and #{endTime} >= update_date #{startTime} and #{endTime} >= update_date
<if test="orgCode != null and orgCode != ''"> <if test="orgCode != null and orgCode != ''">
and wes.biz_org_code like concat(#{orgCode}, "%") and wes.biz_org_code like concat(#{orgCode}, '%')
</if> </if>
) as allNum, ) as allNum,
( (
...@@ -1539,7 +1539,7 @@ ...@@ -1539,7 +1539,7 @@
where where
wed.code like '92010800%' wed.code like '92010800%'
<if test="orgCode != null and orgCode != ''"> <if test="orgCode != null and orgCode != ''">
and wes.biz_org_code like concat(#{orgCode}, "%") and wes.biz_org_code like concat(#{orgCode}, '%')
</if> </if>
) as allEqu) as allEqu, ) as allEqu) as allEqu,
( (
...@@ -1558,7 +1558,7 @@ ...@@ -1558,7 +1558,7 @@
and wesi.update_date >= and wesi.update_date >=
#{startTime} and #{endTime} >= update_date #{startTime} and #{endTime} >= update_date
<if test="orgCode != null and orgCode != ''"> <if test="orgCode != null and orgCode != ''">
and wes.biz_org_code like concat(#{orgCode}, "%") and wes.biz_org_code like concat(#{orgCode}, '%')
</if> </if>
) as startNum) as startNum ) as startNum) as startNum
</select> </select>
......
...@@ -28,7 +28,7 @@ public class IcbcEnum { ...@@ -28,7 +28,7 @@ public class IcbcEnum {
@AllArgsConstructor @AllArgsConstructor
public static enum OpenAccountState { public static enum OpenAccountState {
INITIAL("初始", "00"), INITIAL("未开户", "00"),
OPENING("开户中", "01"), OPENING("开户中", "01"),
...@@ -65,7 +65,7 @@ public class IcbcEnum { ...@@ -65,7 +65,7 @@ public class IcbcEnum {
@Getter @Getter
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
enum ProtocolStatus { public static enum ProtocolStatus {
NOT_EFFECTIVE("未生效", "0"), NOT_EFFECTIVE("未生效", "0"),
...@@ -86,5 +86,17 @@ public class IcbcEnum { ...@@ -86,5 +86,17 @@ public class IcbcEnum {
*/ */
private String code; private String code;
public static String getNameByCode(String code, String defaultName) {
for (ProtocolStatus state : ProtocolStatus.values()) {
if (state.getCode().equals(code)) {
return state.getName();
}
}
if (StringUtils.isNotEmpty(defaultName)) {
return defaultName;
}
return null;
}
} }
} }
...@@ -32,8 +32,16 @@ public class HygfIcbcRecordQueryDTO { ...@@ -32,8 +32,16 @@ public class HygfIcbcRecordQueryDTO {
private String phone; private String phone;
@ApiModelProperty (value = "区域公司") @ApiModelProperty (value = "区域公司")
private String regionalCompaniesSeq; private String regionalCompaniesName;
@ApiModelProperty (value = "所属地址") @ApiModelProperty (value = "所属地址")
private String address; private String addressName;
private Integer current;
private Integer size;
private Integer limit;
private Integer offset;
} }
...@@ -21,5 +21,8 @@ import java.util.List; ...@@ -21,5 +21,8 @@ import java.util.List;
public interface HygfIcbcRecordMapper extends BaseMapper<HygfIcbcRecord> { public interface HygfIcbcRecordMapper extends BaseMapper<HygfIcbcRecord> {
@UserEmpower (field = {"ph.regional_companies_code"}, dealerField = {"ph.developer_code", "ph.regional_companies_code", "ph.developer_user_id"}, fieldConditions = {"in", "in", "in"}, relationship = "and") @UserEmpower (field = {"ph.regional_companies_code"}, dealerField = {"ph.developer_code", "ph.regional_companies_code", "ph.developer_user_id"}, fieldConditions = {"in", "in", "in"}, relationship = "and")
Integer listObjectCount(@Param ("param") HygfIcbcRecordQueryDTO hygfIcbcRecordQueryDTO);
@UserEmpower (field = {"ph.regional_companies_code"}, dealerField = {"ph.developer_code", "ph.regional_companies_code", "ph.developer_user_id"}, fieldConditions = {"in", "in", "in"}, relationship = "and")
List<HygfIcbcRecordDTO> listObject(@Param ("param") HygfIcbcRecordQueryDTO hygfIcbcRecordQueryDTO); List<HygfIcbcRecordDTO> listObject(@Param ("param") HygfIcbcRecordQueryDTO hygfIcbcRecordQueryDTO);
} }
...@@ -15,7 +15,6 @@ import java.util.List; ...@@ -15,7 +15,6 @@ import java.util.List;
*/ */
public interface RegionalCompaniesMapper extends BaseMapper<RegionalCompanies> { public interface RegionalCompaniesMapper extends BaseMapper<RegionalCompanies> {
List<RegionalCompanies> selectListData(@Param("regionalCompaniesName") String regionalCompaniesName,@Param("unitId")Long unitId,@Param("sequenceNbr")Long sequenceNbr); List<RegionalCompanies> selectListData(@Param("regionalCompaniesName") String regionalCompaniesName,@Param("unitId")Long unitId,@Param("sequenceNbr")Long sequenceNbr);
RegionalCompanies selectByid(@Param("sequenceNbr")Long sequenceNbr); RegionalCompanies selectByid(@Param("sequenceNbr")Long sequenceNbr);
RegionalCompanies selectRegionName(@Param("sequenceNbr")Long sequenceNbr); RegionalCompanies selectRegionName(@Param("sequenceNbr")Long sequenceNbr);
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
</if> </if>
</where> </where>
ORDER BY u.audit_status ,u.rec_date DESC ORDER BY u.audit_status ,u.rec_date DESC,u.sequence_nbr DESC
</select> </select>
......
...@@ -9,12 +9,42 @@ ...@@ -9,12 +9,42 @@
sequence_nbr,cust_name,id_card,phone,medium_id,project_id,open_account_state,protocol_status,protocol_start_time,protocol_end_time,trx_limit_amount,day_limit_amount,protocol_limit_amount,app_id,out_user_id,out_vendor_id,sign_entrsut_prtl_status sequence_nbr,cust_name,id_card,phone,medium_id,project_id,open_account_state,protocol_status,protocol_start_time,protocol_end_time,trx_limit_amount,day_limit_amount,protocol_limit_amount,app_id,out_user_id,out_vendor_id,sign_entrsut_prtl_status
</sql> </sql>
<select id="listObjectCount" resultType="integer">
SELECT
count( DISTINCT ph.amos_user_id )
FROM
hygf_peasant_household ph LEFT JOIN hygf_icbc_record icbc ON ph.amos_user_id = icbc.amos_user_id
<where>
ph.is_delete = 0
<if test="param != null">
<if test="param.openAccountStatus != null and param.openAccountStatus != ''">
AND icbc.protocol_status = #{param.openAccountStatus}
</if>
<if test="param.custName != null and param.custName != ''">
AND ph.owners_name LIKE CONCAT('%', #{param.custName}, '%')
</if>
<if test="param.idCard != null and param.idCard != ''">
AND ph.id_card LIKE CONCAT('%', #{param.idCard}, '%')
</if>
<if test="param.phone != null and param.phone != ''">
AND ph.telephone 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>
</select>
<select id="listObject" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.HygfIcbcRecordDTO"> <select id="listObject" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.HygfIcbcRecordDTO">
SELECT DISTINCT SELECT DISTINCT
icbc.sequence_nbr, icbc.sequence_nbr,
ph.owners_name as custName, ifnull(icbc.cust_name, ph.owners_name) as custName,
ph.telephone as phone, ifnull(icbc.phone, ph.telephone) as phone,
ph.id_card, ifnull(icbc.id_card, ph.id_card) as idCard,
ph.amos_user_id, ph.amos_user_id,
icbc.open_account_status, icbc.open_account_status,
icbc.protocol_status icbc.protocol_status
...@@ -35,11 +65,17 @@ ...@@ -35,11 +65,17 @@
<if test="param.phone != null and param.phone != ''"> <if test="param.phone != null and param.phone != ''">
AND ph.telephone LIKE CONCAT('%', #{param.phone}, '%') AND ph.telephone LIKE CONCAT('%', #{param.phone}, '%')
</if> </if>
<if test="param.regionalCompaniesSeq != null and param.regionalCompaniesSeq != ''"> <if test="param.regionalCompaniesName != null and param.regionalCompaniesName != ''">
AND ph.regional_companies_seq = #{param.regionalCompaniesSeq} 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>
</if> </if>
</where> </where>
<if test="param.offset != null and param.offset != '' and param.limit != null and param.limit != ''">
LIMIT ${param.offset}, ${param.limit}
</if>
GROUP BY GROUP BY
ph.amos_user_id ph.amos_user_id
ORDER BY ORDER BY
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
and std_user_biz.amos_user_name like concat(concat('%',#{dto.amosUserName}),'%') and std_user_biz.amos_user_name like concat(concat('%',#{dto.amosUserName}),'%')
</if> </if>
<if test="dto.amosUnitOrgCode!=null"> <if test="dto.amosUnitOrgCode!=null">
and hygf_personnel_business.amos_unit_org_code like concat(concat(#{dto.amosUnitOrgCode}),"%") and hygf_personnel_business.amos_unit_org_code like concat(concat(#{dto.amosUnitOrgCode}),'%')
</if> </if>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<!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.PowerStationMapper"> <mapper namespace="com.yeejoin.amos.boot.module.hygf.api.mapper.PowerStationMapper">
<select id="queryPage" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationDto"> <select id="queryPage" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationDto">
select * from (select select * from (select DISTINCT
hygf_power_station.*, hygf_power_station.*,
b.initiate_status, b.initiate_status,
b.contract_lock_id, b.contract_lock_id,
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<if test="processStatus != null and processStatus != ''"> <if test="processStatus != null and processStatus != ''">
and hygf_power_station.process_status = #{processStatus} and hygf_power_station.process_status = #{processStatus}
</if> </if>
GROUP BY hygf_peasant_household.sequence_nbr <!-- GROUP BY hygf_peasant_household.sequence_nbr-->
ORDER BY hygf_power_station.rec_date desc ORDER BY hygf_power_station.rec_date desc
) a ) a
</select> </select>
......
...@@ -41,7 +41,7 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan ...@@ -41,7 +41,7 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan
</select> </select>
<select id="preparationStation" resultType="java.util.Map"> <select id="preparationStation" resultType="java.util.Map">
select b.* from ( select select b.* from ( select DISTINCT
hygf_peasant_household.peasant_household_no as peasantHouseholdNo, hygf_peasant_household.peasant_household_no as peasantHouseholdNo,
hygf_peasant_household.owners_name as ownersName, hygf_peasant_household.owners_name as ownersName,
hygf_peasant_household.regional_companies_name as regionalCompaniesName, hygf_peasant_household.regional_companies_name as regionalCompaniesName,
...@@ -81,7 +81,7 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan ...@@ -81,7 +81,7 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan
and hygf_peasant_household.preparation_money_state not in ('待发货','待补货','暂存发货') and preparation_money_state is not null and preparation_money_state != '' and hygf_peasant_household.preparation_money_state not in ('待发货','待补货','暂存发货') and preparation_money_state is not null and preparation_money_state != ''
</if> </if>
</where> </where>
GROUP BY hygf_peasant_household.sequence_nbr <!-- GROUP BY hygf_peasant_household.sequence_nbr-->
<if test=" preparationMoneyState == 1 "> <if test=" preparationMoneyState == 1 ">
order by hygf_preparation_money.delivery_time DESC order by hygf_preparation_money.delivery_time DESC
</if> </if>
......
...@@ -3,37 +3,65 @@ ...@@ -3,37 +3,65 @@
<mapper namespace="com.yeejoin.amos.boot.module.hygf.api.mapper.RegionalCompaniesMapper"> <mapper namespace="com.yeejoin.amos.boot.module.hygf.api.mapper.RegionalCompaniesMapper">
<select id="selectListData" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.RegionalCompanies"> <select id="selectListData" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.RegionalCompanies">
<!-- select * from (-->
<!-- select-->
<!-- hygf_regional_companies.*,-->
<!-- (SELECT GROUP_CONCAT(REGION_NAME) from-->
<!-- (SELECT T2.REGION_NAME-->
<!-- FROM (-->
<!-- SELECT-->
<!-- @r AS _id,-->
<!-- (SELECT @r := parent_id FROM systemctl_region WHERE sequence_nbr = _id) AS parent_id,-->
<!-- @l := @l + 1 AS lvl-->
<!-- FROM-->
<!-- (SELECT @r := privilege_company.REGION_SEQ, @l := 0) vars,-->
<!-- systemctl_region h-->
<!-- WHERE @r != 0) T1-->
<!-- JOIN systemctl_region T2-->
<!-- ON T1._id = T2.sequence_nbr-->
<!-- ORDER BY T1.lvl DESC) s) regionalAddress-->
<!-- from hygf_regional_companies LEFT JOIN privilege_company on-->
<!-- hygf_regional_companies.regional_companies_seq=privilege_company.SEQUENCE_NBR-->
<!-- where hygf_regional_companies.is_delete=0-->
<!-- <if test="regionalCompaniesName!=null and regionalCompaniesName!=''">-->
<!-- and hygf_regional_companies.regional_companies_name like concat(concat('%',#{regionalCompaniesName}),'%')-->
<!-- </if>-->
<!-- <if test="unitId!=null and unitId!=''">-->
<!-- and hygf_regional_companies.unit_id=#{unitId}-->
<!-- </if>-->
<!-- <if test="sequenceNbr!=null and sequenceNbr!=''">-->
<!-- and hygf_regional_companies.unit_info_id=#{sequenceNbr}-->
<!-- </if>-->
<!-- ) a-->
select * from ( select * from (
select select
hygf_regional_companies.*, hygf_regional_companies.*,(
(SELECT GROUP_CONCAT(REGION_NAME) from WITH RECURSIVE tree_path AS (
(SELECT T2.REGION_NAME SELECT SEQUENCE_NBR, parent_id, REGION_NAME,`level`
FROM ( FROM systemctl_region
SELECT WHERE SEQUENCE_NBR = privilege_company.REGION_SEQ
@r AS _id, UNION ALL
(SELECT @r := parent_id FROM systemctl_region WHERE sequence_nbr = _id) AS parent_id, SELECT tn.SEQUENCE_NBR, tn.parent_id, tn.REGION_NAME,tn.`level`
@l := @l + 1 AS lvl FROM systemctl_region tn
FROM JOIN tree_path tp ON tn.SEQUENCE_NBR = tp.parent_id
(SELECT @r := privilege_company.REGION_SEQ, @l := 0) vars, )
systemctl_region h SELECT GROUP_CONCAT(REGION_NAME ORDER BY `level` asc) FROM tree_path
WHERE @r != 0) T1 ) regionalAddress
JOIN systemctl_region T2
ON T1._id = T2.sequence_nbr
ORDER BY T1.lvl DESC) s) regionalAddress
from hygf_regional_companies LEFT JOIN privilege_company on from hygf_regional_companies LEFT JOIN privilege_company on
hygf_regional_companies.regional_companies_seq=privilege_company.SEQUENCE_NBR hygf_regional_companies.regional_companies_seq=privilege_company.SEQUENCE_NBR
where hygf_regional_companies.is_delete=0 where hygf_regional_companies.is_delete=0
<if test="regionalCompaniesName!=null and regionalCompaniesName!=''"> <if test="regionalCompaniesName!=null and regionalCompaniesName!=''">
and hygf_regional_companies.regional_companies_name like concat(concat('%',#{regionalCompaniesName}),'%') and hygf_regional_companies.regional_companies_name like concat(concat('%',#{regionalCompaniesName}),'%')
</if> </if>
<if test="unitId!=null and unitId!=''"> <if test="unitId!=null and unitId!=''">
and hygf_regional_companies.unit_id=#{unitId} and hygf_regional_companies.unit_id=#{unitId}
</if> </if>
<if test="sequenceNbr!=null and sequenceNbr!=''"> <if test="sequenceNbr!=null and sequenceNbr!=''">
and hygf_regional_companies.unit_info_id=#{sequenceNbr} and hygf_regional_companies.unit_info_id=#{sequenceNbr}
</if> </if>
) a ) a
</select> </select>
...@@ -42,20 +70,18 @@ ...@@ -42,20 +70,18 @@
select select
(SELECT GROUP_CONCAT(REGION_NAME) from (
(SELECT T2.REGION_NAME WITH RECURSIVE tree_path AS (
FROM ( SELECT SEQUENCE_NBR, parent_id, REGION_NAME,`level`
SELECT FROM systemctl_region
@r AS _id, WHERE SEQUENCE_NBR = privilege_company.REGION_SEQ
(SELECT @r := parent_id FROM systemctl_region WHERE sequence_nbr = _id) AS parent_id, UNION ALL
@l := @l + 1 AS lvl SELECT tn.SEQUENCE_NBR, tn.parent_id, tn.REGION_NAME,tn.`level`
FROM FROM systemctl_region tn
(SELECT @r := privilege_company.REGION_SEQ, @l := 0) vars, JOIN tree_path tp ON tn.SEQUENCE_NBR = tp.parent_id
systemctl_region h )
WHERE @r != 0) T1 SELECT GROUP_CONCAT(REGION_NAME ORDER BY `level` asc) FROM tree_path
JOIN systemctl_region T2 ) regionalAddress
ON T1._id = T2.sequence_nbr
ORDER BY T1.lvl DESC) s) regionalAddress
from hygf_regional_companies LEFT JOIN privilege_company on from hygf_regional_companies LEFT JOIN privilege_company on
hygf_regional_companies.regional_companies_seq=privilege_company.SEQUENCE_NBR hygf_regional_companies.regional_companies_seq=privilege_company.SEQUENCE_NBR
where hygf_regional_companies.is_delete=0 and hygf_regional_companies.sequence_nbr=#{sequenceNbr} where hygf_regional_companies.is_delete=0 and hygf_regional_companies.sequence_nbr=#{sequenceNbr}
...@@ -65,24 +91,42 @@ ...@@ -65,24 +91,42 @@
</select> </select>
<select id="selectRegionName" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.RegionalCompanies"> <select id="selectRegionName" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.RegionalCompanies">
select <!-- select-->
privilege_company.COMPANY_CODE companyCode, <!-- privilege_company.COMPANY_CODE companyCode,-->
privilege_company.COMPANY_NAME regionalCompaniesName, <!-- privilege_company.COMPANY_NAME regionalCompaniesName,-->
privilege_company.ORG_CODE regionalCompaniesCode, <!-- privilege_company.ORG_CODE regionalCompaniesCode,-->
(SELECT GROUP_CONCAT(REGION_NAME) from <!-- (SELECT GROUP_CONCAT(REGION_NAME) from-->
(SELECT T2.REGION_NAME <!-- (SELECT T2.REGION_NAME-->
FROM ( <!-- FROM (-->
SELECT <!-- SELECT-->
@r AS _id, <!-- @r AS _id,-->
(SELECT @r := parent_id FROM systemctl_region WHERE sequence_nbr = _id) AS parent_id, <!-- (SELECT @r := parent_id FROM systemctl_region WHERE sequence_nbr = _id) AS parent_id,-->
@l := @l + 1 AS lvl <!-- @l := @l + 1 AS lvl-->
FROM <!-- FROM-->
(SELECT @r := privilege_company.REGION_SEQ, @l := 0) vars, <!-- (SELECT @r := privilege_company.REGION_SEQ, @l := 0) vars,-->
systemctl_region h <!-- systemctl_region h-->
WHERE @r != 0) T1 <!-- WHERE @r != 0) T1-->
JOIN systemctl_region T2 <!-- JOIN systemctl_region T2-->
ON T1._id = T2.sequence_nbr <!-- ON T1._id = T2.sequence_nbr-->
ORDER BY T1.lvl DESC) s) regionalAddress <!-- ORDER BY T1.lvl DESC) s) regionalAddress-->
<!-- from privilege_company where privilege_company.SEQUENCE_NBR=#{sequenceNbr}-->
select
privilege_company.COMPANY_CODE companyCode,
privilege_company.COMPANY_NAME regionalCompaniesName,
privilege_company.ORG_CODE regionalCompaniesCode,
(
WITH RECURSIVE tree_path AS (
SELECT SEQUENCE_NBR, parent_id, REGION_NAME,`level`
FROM systemctl_region
WHERE SEQUENCE_NBR = privilege_company.REGION_SEQ
UNION ALL
SELECT tn.SEQUENCE_NBR, tn.parent_id, tn.REGION_NAME,tn.`level`
FROM systemctl_region tn
JOIN tree_path tp ON tn.SEQUENCE_NBR = tp.parent_id
)
SELECT GROUP_CONCAT(REGION_NAME ORDER BY `level` asc) FROM tree_path
) regionalAddress
from privilege_company where privilege_company.SEQUENCE_NBR=#{sequenceNbr} from privilege_company where privilege_company.SEQUENCE_NBR=#{sequenceNbr}
</select> </select>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
and privilege_user_org_role.ROLE_SEQ=#{roleId} and privilege_user_org_role.ROLE_SEQ=#{roleId}
<if test="orgCode!=null"> <if test="orgCode!=null">
and privilege_company.ORG_CODE like concat(#{orgCode},"%") and privilege_company.ORG_CODE like concat(#{orgCode},'%')
</if> </if>
ORDER BY privilege_agency_user.USER_ID DESC ORDER BY privilege_agency_user.USER_ID DESC
</select> </select>
......
...@@ -26,7 +26,7 @@ from privilege_company where IS_DELETED=0 and AGENCY_CODE='JXIOP' ...@@ -26,7 +26,7 @@ from privilege_company where IS_DELETED=0 and AGENCY_CODE='JXIOP'
and privilege_company.COMPANY_TYPE=#{dto.companyType} and privilege_company.COMPANY_TYPE=#{dto.companyType}
</if> </if>
<if test="dto.orgCode!=null"> <if test="dto.orgCode!=null">
and privilege_company.ORG_CODE like concat(concat(#{dto.orgCode}),"%") and privilege_company.ORG_CODE like concat(concat(#{dto.orgCode}),'%')
</if> </if>
<if test="dto.comid!=null"> <if test="dto.comid!=null">
and privilege_company.SEQUENCE_NBR !=#{dto.comid} and privilege_company.SEQUENCE_NBR !=#{dto.comid}
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<select id="georgcodelist" resultType="Map"> <select id="georgcodelist" resultType="Map">
select ORG_CODE orgCode from privilege_company where COMPANY_TYPE='region' and LEVEL='outer_company' select ORG_CODE orgCode from privilege_company where COMPANY_TYPE='region' and `LEVEL`='outer_company'
<if test="orgs != null and orgs.size() >0"> <if test="orgs != null and orgs.size() >0">
and ORG_CODE not in and ORG_CODE not in
......
...@@ -85,14 +85,14 @@ public class HygfIcbcController extends BaseController { ...@@ -85,14 +85,14 @@ public class HygfIcbcController extends BaseController {
return hygfIcbcService.registerWalletCallback(request, response); return hygfIcbcService.registerWalletCallback(request, response);
} }
@TycloudOperation (ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation (ApiLevel = UserType.AGENCY)
@GetMapping (value = "/{sequenceNbr}") @GetMapping (value = "/{userId}")
@ApiOperation (httpMethod = "GET", value = "根据sequenceNbr查询注册电子钱包", notes = "注册电子钱包") @ApiOperation (httpMethod = "GET", value = "根据农户userId查询注册电子钱包", notes = "注册电子钱包")
public ResponseModel<HygfIcbcRecordDTO> getObject(@PathVariable String sequenceNbr) { public ResponseModel<HygfIcbcRecordDTO> getObject(@PathVariable String userId) {
return ResponseHelper.buildResponse(hygfIcbcService.getObject(Long.valueOf(sequenceNbr))); return ResponseHelper.buildResponse(hygfIcbcService.getObject(userId));
} }
@TycloudOperation (ApiLevel = UserType.AGENCY, needAuth = false) @TycloudOperation (ApiLevel = UserType.AGENCY)
@GetMapping (value = "/list") @GetMapping (value = "/list")
@ApiOperation (httpMethod = "GET", value = "聚富通电子钱包列表查询", notes = "聚富通电子钱包列表查询") @ApiOperation (httpMethod = "GET", value = "聚富通电子钱包列表查询", notes = "聚富通电子钱包列表查询")
@UserLimits @UserLimits
...@@ -104,11 +104,9 @@ public class HygfIcbcController extends BaseController { ...@@ -104,11 +104,9 @@ public class HygfIcbcController extends BaseController {
@GetMapping (value = "/page") @GetMapping (value = "/page")
@ApiOperation (httpMethod = "GET", value = "聚富通电子钱包分页查询", notes = "聚富通电子钱包分页查询") @ApiOperation (httpMethod = "GET", value = "聚富通电子钱包分页查询", notes = "聚富通电子钱包分页查询")
@UserLimits @UserLimits
public ResponseModel<Page<HygfIcbcRecordDTO>> queryForPage(@RequestParam (value = "current") int current, public ResponseModel<Page<HygfIcbcRecordDTO>> queryForPage(@ApiParam HygfIcbcRecordQueryDTO hygfIcbcRecordQueryDTO) {
@RequestParam(value = "size") int size,
@ApiParam @RequestParam HygfIcbcRecordQueryDTO hygfIcbcRecordQueryDTO) {
return ResponseHelper.buildResponse(hygfIcbcService.queryForPage(current, size, hygfIcbcRecordQueryDTO)); return ResponseHelper.buildResponse(hygfIcbcService.queryForPage(hygfIcbcRecordQueryDTO.getCurrent(), hygfIcbcRecordQueryDTO.getSize(), hygfIcbcRecordQueryDTO));
} }
} }
package com.yeejoin.amos.boot.module.hygf.biz.service.impl; package com.yeejoin.amos.boot.module.hygf.biz.service.impl;
import cn.hutool.core.codec.Base64; import cn.hutool.core.codec.Base64;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.icbc.api.DefaultIcbcClient; import com.icbc.api.DefaultIcbcClient;
import com.icbc.api.IcbcApiException; import com.icbc.api.IcbcApiException;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.icbc.api.IcbcConstants; import com.icbc.api.IcbcConstants;
import com.icbc.api.UiIcbcClient; import com.icbc.api.UiIcbcClient;
import com.icbc.api.request.JftApiUserEntrustopenacctQueryRequestV1; import com.icbc.api.request.JftApiUserEntrustopenacctQueryRequestV1;
...@@ -22,11 +22,9 @@ import com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold; ...@@ -22,11 +22,9 @@ import com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold;
import com.yeejoin.amos.boot.module.hygf.api.mapper.HygfIcbcRecordMapper; import com.yeejoin.amos.boot.module.hygf.api.mapper.HygfIcbcRecordMapper;
import com.yeejoin.amos.boot.module.hygf.api.service.IHygfIcbcService; import com.yeejoin.amos.boot.module.hygf.api.service.IHygfIcbcService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.RequestBody;
import org.typroject.tyboot.core.foundation.utils.Bean; import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest; import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
...@@ -40,6 +38,7 @@ import java.net.URLDecoder; ...@@ -40,6 +38,7 @@ import java.net.URLDecoder;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.Arrays;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
...@@ -48,6 +47,9 @@ import java.util.Collections; ...@@ -48,6 +47,9 @@ import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.UUID; import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -85,14 +87,29 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc ...@@ -85,14 +87,29 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
private static final String APIGW_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwFgHD4kzEVPdOj03ctKM7KV+16bWZ5BMNgvEeuEQwfQYkRVwI9HFOGkwNTMn5hiJXHnlXYCX+zp5r6R52MY0O7BsTCLT7aHaxsANsvI9ABGx3OaTVlPB59M6GPbJh0uXvio0m1r/lTW3Z60RU6Q3oid/rNhP3CiNgg0W6O3AGqwIDAQAB"; private static final String APIGW_PUBLIC_KEY = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwFgHD4kzEVPdOj03ctKM7KV+16bWZ5BMNgvEeuEQwfQYkRVwI9HFOGkwNTMn5hiJXHnlXYCX+zp5r6R52MY0O7BsTCLT7aHaxsANsvI9ABGx3OaTVlPB59M6GPbJh0uXvio0m1r/lTW3Z60RU6Q3oid/rNhP3CiNgg0W6O3AGqwIDAQAB";
private static final String OUT_VENDOR_ID = "071301"; private static final String OUT_VENDOR_ID = "071301";
private static final String PROJECT_ID = "PJ14001401B000160171"; private static final String PROJECT_ID = "PJ14001401B000160171";
@Value ("${hygf.icbc.trxLmtAmt:200000}") /**
* 协议总限额
*/
@Value ("${hygf.icbc.protocolLimitAmount:2500000000}")
private String protocolLimitAmount;
/**
* 单笔限额
*/
@Value ("${hygf.icbc.trxLmtAmt:10000000}")
private String trxLmtAmt; private String trxLmtAmt;
@Value ("${hygf.icbc.dayLmtAmt:200000}") /**
* 日累计限额
*/
@Value ("${hygf.icbc.dayLmtAmt:20000000}")
private String dayLmtAmt; private String dayLmtAmt;
@Value ("${hygf.icbc.loanTotalAmt:200000}")
@Value ("${hygf.icbc.loanTotalAmt:0}")
private String loanTotalAmt; private String loanTotalAmt;
@Value ("${hygf.icbc.notifyUrl:}") /**
private String notifyUrl; * 合作方接收结果通知 URL
*/
@Value ("${hygf.icbc.callbackUrl:}")
private String callbackUrl;
@Resource (type = PeasantHouseholdServiceImpl.class) @Resource (type = PeasantHouseholdServiceImpl.class)
...@@ -133,14 +150,14 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc ...@@ -133,14 +150,14 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
String formattedDate = formatter.format(newDate); String formattedDate = formatter.format(newDate);
bizContent.setProtocolEndDate(formattedDate); // 协议到期日 bizContent.setProtocolEndDate(formattedDate); // 协议到期日
bizContent.setProtocolLimitAmount("99999999999999999"); // 协议累计额 bizContent.setProtocolLimitAmount(protocolLimitAmount); // 协议累计额
JSONObject templateParams = new JSONObject(); JSONObject templateParams = new JSONObject();
templateParams.put("prtl_enddate", formattedDate); templateParams.put("prtl_enddate", formattedDate);// 协议到期日
templateParams.put("loan_total_amt", loanTotalAmt); templateParams.put("loan_total_amt", loanTotalAmt);// 贷款限额(单位:分)
templateParams.put("trx_lmt_amt", trxLmtAmt); templateParams.put("trx_lmt_amt", trxLmtAmt);// 单笔限额(单位:分)
templateParams.put("day_lmt_amt", dayLmtAmt); templateParams.put("day_lmt_amt", dayLmtAmt);// 日累计限额(单位:分)
bizContent.setTemplateParams(templateParams.toJSONString()); bizContent.setTemplateParams(templateParams.toJSONString());
bizContent.setCallbackUrl(notifyUrl); bizContent.setCallbackUrl(callbackUrl);
bizContent.setCamsPublicKey(CAMS_PUBLIC_KEY); bizContent.setCamsPublicKey(CAMS_PUBLIC_KEY);
request.setBizContent(bizContent); request.setBizContent(bizContent);
...@@ -186,11 +203,16 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc ...@@ -186,11 +203,16 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
request.setBizContent(bizContent); request.setBizContent(bizContent);
JftApiUserEntrustopenacctQueryResponseV1 response; JftApiUserEntrustopenacctQueryResponseV1 response;
try { try {
log.info("户用光伏开户签约同步开户结果查询数据接口, => 入参: {}", JSON.toJSONString(request));
response = client.execute(request, System.currentTimeMillis() + ""); response = client.execute(request, System.currentTimeMillis() + "");
log.info("户用光伏开户签约同步开户结果查询数据接口, => 响应: {}", JSON.toJSONString(response));
return response; return response;
} catch (IcbcApiException e) { } catch (IcbcApiException e) {
e.printStackTrace(); e.printStackTrace();
log.error("聚富通委托代扣签约同步开户结果查询数据接口error: ", e); log.error("户用光伏开户签约同步开户结果查询数据接口 error: ", e);
return null;
} catch (Exception e) {
log.error("户用光伏开户签约同步开户结果查询数据接口 error: ", e);
return null; return null;
} }
} }
...@@ -207,67 +229,93 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc ...@@ -207,67 +229,93 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
*/ */
public Object registerWalletCallback(HttpServletRequest request, HttpServletResponse response) throws Exception { public Object registerWalletCallback(HttpServletRequest request, HttpServletResponse response) throws Exception {
log.info("户用光伏开户签约异步通知, => 验签"); log.info("户用光伏开户签约异步通知, => 验签");
boolean verifyFlag = verifySignData(request, notifyUrl); String returnJson = null;
String returnJson; try {
// 获取其他参数略... boolean verifyFlag = verifySignData(request, "/hygf/icbc/notify");
if (verifyFlag) { if (verifyFlag) {
// 验签成功 // 验签成功
String biz_content = request.getParameter("biz_content"); String biz_content = request.getParameter("biz_content");
String decode = URLDecoder.decode(biz_content, "utf-8"); String decode = URLDecoder.decode(biz_content, "utf-8");
Map<String, String> data = JSONObject.parseObject(decode, Map.class); Map<String, String> data = JSONObject.parseObject(decode, Map.class);
log.info("解密后参数:{}", data);// 进行自己的处理,此处默认处理成功,返回通知方成功,return_code=0 log.info("解密后参数:{}", data);// 进行自己的处理,此处默认处理成功,返回通知方成功,return_code=0
// 其中certNo、custName、newPayAcc字段进行了base64编码,可以调用示例代码中的base64Decode进行解码 // 其中certNo、custName、newPayAcc字段进行了base64编码,可以调用示例代码中的base64Decode进行解码
String custName = base64Decode(data.get("custName")); String custName = base64Decode(data.get("custName"));
String certNo = base64Decode(data.get("certNo")); String certNo = base64Decode(data.get("certNo"));
String newPayAcc = base64Decode(data.get("newPayAcc")); String newPayAcc = base64Decode(data.get("newPayAcc"));
String outUserId = data.get("outUserId"); String outUserId = data.get("outUserId");
String projectId = data.get("projectId"); String projectId = data.get("projectId");
String openAccoutSucceedFlag = data.get("openAccoutSucceedFlag"); String openAccoutSucceedFlag = data.get("openAccoutSucceedFlag");
String signEntrsutPrtlSucceedFlag = data.get("signEntrsutPrtlSucceedFlag"); String signEntrsutPrtlSucceedFlag = data.get("signEntrsutPrtlSucceedFlag");
JftApiUserEntrustopenacctQueryResponseV1 jftApiUserEntrustopenacctQueryResponse = this.getHygfIcbcWalletInfo(outUserId); JftApiUserEntrustopenacctQueryResponseV1 hygfIcbcWalletInfo = this.getHygfIcbcWalletInfo(outUserId);
System.out.println(jftApiUserEntrustopenacctQueryResponse); // region 保存数据
// region 保存数据 HygfIcbcRecord hygfIcbcRecord = this.lambdaQuery().eq(HygfIcbcRecord::getAmosUserId, outUserId).last(" limit 1").one();
HygfIcbcRecord hygfIcbcRecord = this.lambdaQuery().eq(HygfIcbcRecord::getAmosUserId, outUserId).last(" limit 1").one(); if (hygfIcbcRecord == null) {
if (hygfIcbcRecord == null) { hygfIcbcRecord = new HygfIcbcRecord();
hygfIcbcRecord = new HygfIcbcRecord(); }
hygfIcbcRecord.setCustName(custName);
hygfIcbcRecord.setIdCard(certNo);
PeasantHousehold peasantHousehold = peasantHouseholdService.lambdaQuery().select(PeasantHousehold::getTelephone).eq(PeasantHousehold::getAmosUserId, outUserId).last("limit 1").one();
hygfIcbcRecord.setPhone(peasantHousehold != null ? peasantHousehold.getTelephone() : "");
hygfIcbcRecord.setMediumId(newPayAcc);
hygfIcbcRecord.setProjectId(projectId);
hygfIcbcRecord.setOpenAccountStatus(openAccoutSucceedFlag);
hygfIcbcRecord.setSignEntrsutPrtlStatus(signEntrsutPrtlSucceedFlag);
if (hygfIcbcWalletInfo != null) {
hygfIcbcRecord.setProtocolStatus(hygfIcbcWalletInfo.getProtocolStatus());
hygfIcbcRecord.setProtocolStartTime(hygfIcbcWalletInfo.getProtocolStartDate());
hygfIcbcRecord.setProtocolEndTime(hygfIcbcWalletInfo.getProtocolEndDate());
hygfIcbcRecord.setTrxLimitAmount(hygfIcbcWalletInfo.getTrxLimitAmount());
hygfIcbcRecord.setDayLimitAmount(hygfIcbcWalletInfo.getDayLimitAmount());
hygfIcbcRecord.setProtocolLimitAmount(hygfIcbcWalletInfo.getProtocolLimitAmount());
hygfIcbcRecord.setAppId(hygfIcbcWalletInfo.getAppId());
hygfIcbcRecord.setOutUserId(hygfIcbcWalletInfo.getOutUserId());
hygfIcbcRecord.setOutVendorId(hygfIcbcWalletInfo.getOutVendorId());
}
// hygfIcbcRecord.setDiscardStatus();
hygfIcbcRecord.setAmosUserId(outUserId);
hygfIcbcRecord.setRecDate(new Date());
this.saveOrUpdate(hygfIcbcRecord);
// endregion
String copReturnCode = "0";// 通知合作方接收成功的返回码,固定
String copReturnMsg = "success";// 合作方的返回信息,固定
returnJson = sign(request, copReturnCode, copReturnMsg);
log.info("通知响应json结果:{}", returnJson);
return returnJson;
} else {// 验签失败
String copReturnCode = "‐12345";
String copReturnMsg = "icbc jft sign not pass.";
returnJson = sign(request, copReturnCode, copReturnMsg);
log.error("通知响应json结果:{}", returnJson);
} }
hygfIcbcRecord.setCustName(custName); } catch (Exception e) {
hygfIcbcRecord.setIdCard(certNo); log.error("户用光伏开户签约异步通知, => error:", e);
// hygfIcbcRecord.setPhone();
hygfIcbcRecord.setMediumId(newPayAcc);
hygfIcbcRecord.setProjectId(projectId);
hygfIcbcRecord.setOpenAccountStatus(openAccoutSucceedFlag);
hygfIcbcRecord.setProtocolStatus(jftApiUserEntrustopenacctQueryResponse.getProtocolStatus());
hygfIcbcRecord.setProtocolStartTime(jftApiUserEntrustopenacctQueryResponse.getProtocolStartDate());
hygfIcbcRecord.setProtocolEndTime(jftApiUserEntrustopenacctQueryResponse.getProtocolEndDate());
hygfIcbcRecord.setTrxLimitAmount(jftApiUserEntrustopenacctQueryResponse.getTrxLimitAmount());
hygfIcbcRecord.setDayLimitAmount(jftApiUserEntrustopenacctQueryResponse.getDayLimitAmount());
hygfIcbcRecord.setProtocolLimitAmount(jftApiUserEntrustopenacctQueryResponse.getProtocolLimitAmount());
hygfIcbcRecord.setAppId(jftApiUserEntrustopenacctQueryResponse.getAppId());
hygfIcbcRecord.setOutUserId(jftApiUserEntrustopenacctQueryResponse.getOutUserId());
hygfIcbcRecord.setOutVendorId(jftApiUserEntrustopenacctQueryResponse.getOutVendorId());
hygfIcbcRecord.setSignEntrsutPrtlStatus(signEntrsutPrtlSucceedFlag);
// hygfIcbcRecord.setDiscardStatus();
hygfIcbcRecord.setAmosUserId(outUserId);
hygfIcbcRecord.setRecDate(new Date());
this.saveOrUpdate(hygfIcbcRecord);
// endregion
String copReturnCode = "0";// 通知合作方接收成功的返回码,固定
String copReturnMsg = "success";// 合作方的返回信息,固定
returnJson = sign(request, copReturnCode, copReturnMsg);
log.error("通知响应json结果:{}", returnJson);
return returnJson;
} else {// 验签失败
String copReturnCode = "‐12345";
String copReturnMsg = "icbc jft sign not pass.";
returnJson = sign(request, copReturnCode, copReturnMsg);
log.error("通知响应json结果:{}", returnJson);
} }
return returnJson; return returnJson;
} }
public HygfIcbcRecordDTO getObject(Long sequenceNbr) { public HygfIcbcRecordDTO getObject(String amosUserId) {
HygfIcbcRecordDTO hygfIcbcRecordDTO = this.queryBySeq(sequenceNbr); HygfIcbcRecord hygfIcbcRecord = this.lambdaQuery().eq(HygfIcbcRecord::getAmosUserId, amosUserId).last("limit 1").one();
HygfIcbcRecordDTO hygfIcbcRecordDTO = new HygfIcbcRecordDTO();
if (hygfIcbcRecord == null) {
PeasantHousehold peasantHousehold = peasantHouseholdService.lambdaQuery()
.select(PeasantHousehold::getTelephone, PeasantHousehold::getOwnersName, PeasantHousehold::getIdCard)
.eq(PeasantHousehold::getAmosUserId, amosUserId).last("limit 1").one();
hygfIcbcRecordDTO.setCustName(peasantHousehold.getOwnersName());
hygfIcbcRecordDTO.setIdCard(peasantHousehold.getIdCard());
hygfIcbcRecordDTO.setPhone(peasantHousehold.getTelephone());
hygfIcbcRecordDTO.setOpenAccountStatus(IcbcEnum.OpenAccountState.INITIAL.getCode());
hygfIcbcRecordDTO.setOpenAccountStatusName(IcbcEnum.OpenAccountState.getNameByCode(IcbcEnum.OpenAccountState.INITIAL.getCode(), IcbcEnum.OpenAccountState.INITIAL.getName()));
} else {
Bean.toModel(hygfIcbcRecord, hygfIcbcRecordDTO);
List<String> amosUserIds = Arrays.asList(hygfIcbcRecordDTO.getAmosUserId());
List<PeasantHousehold> peasantHouseholds = peasantHouseholdService.lambdaQuery().in(PeasantHousehold::getAmosUserId, amosUserIds).list();
Map<String, List<PeasantHousehold>> PeasantHouseholdMap = peasantHouseholds.stream().collect(Collectors.groupingBy(PeasantHousehold::getAmosUserId));// 根据农户 ID 分组
hygfIcbcRecordDTO.setOpenAccountStatusName(IcbcEnum.OpenAccountState.getNameByCode(hygfIcbcRecordDTO.getOpenAccountStatus(), IcbcEnum.OpenAccountState.INITIAL.getName()));
hygfIcbcRecordDTO.setProtocolStatusName(IcbcEnum.ProtocolStatus.getNameByCode(hygfIcbcRecordDTO.getProtocolStatus(), ""));
List<PeasantHousehold> peasantHouseholdList = PeasantHouseholdMap.get(hygfIcbcRecordDTO.getAmosUserId());
hygfIcbcRecordDTO.setPeasantHouseholds(Bean.toModels(peasantHouseholdList, HygfIcbcRecordDTO.IcbcPeasantHousehold.class));
}
return hygfIcbcRecordDTO; return hygfIcbcRecordDTO;
} }
...@@ -277,16 +325,21 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc ...@@ -277,16 +325,21 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
} }
public Page<HygfIcbcRecordDTO> queryForPage(int current, int size, HygfIcbcRecordQueryDTO hygfIcbcRecordQueryDTO) { public Page<HygfIcbcRecordDTO> queryForPage(int current, int size, HygfIcbcRecordQueryDTO hygfIcbcRecordQueryDTO) {
PageHelper.startPage(current, size); // PageHelper.startPage(current, size);
// List<HygfIcbcRecord> hygfIcbcRecords = this.lambdaQuery().eq(StringUtils.isNotEmpty(hygfIcbcRecordQueryDTO.getOpenAccountState()), HygfIcbcRecord::getOpenAccountState, hygfIcbcRecordQueryDTO.getOpenAccountState()).like(StringUtils.isNotEmpty(hygfIcbcRecordQueryDTO.getCustName()), HygfIcbcRecord::getCustName, hygfIcbcRecordQueryDTO.getCustName()).like(StringUtils.isNotEmpty(hygfIcbcRecordQueryDTO.getIdCard()), HygfIcbcRecord::getIdCard, hygfIcbcRecordQueryDTO.getIdCard()).eq(StringUtils.isNotEmpty(hygfIcbcRecordQueryDTO.getPhone()), HygfIcbcRecord::getPhone, hygfIcbcRecordQueryDTO.getPhone()).list(); Integer total = hygfIcbcRecordMapper.listObjectCount(hygfIcbcRecordQueryDTO);
hygfIcbcRecordQueryDTO.setLimit(size);
if (current == 0) {
hygfIcbcRecordQueryDTO.setOffset(0);
} else {
// int offset = (current - 1) * size > total ? : (current - 1) * size;
hygfIcbcRecordQueryDTO.setOffset((current - 1) * size);
}
List<HygfIcbcRecordDTO> list = hygfIcbcRecordMapper.listObject(hygfIcbcRecordQueryDTO); List<HygfIcbcRecordDTO> list = hygfIcbcRecordMapper.listObject(hygfIcbcRecordQueryDTO);
toModels(list);
PageInfo<HygfIcbcRecordDTO> pageInfo = new PageInfo<>(list);
Page<HygfIcbcRecordDTO> page = new Page<>(); Page<HygfIcbcRecordDTO> page = new Page<>();
page.setSize(pageInfo.getSize()); page.setSize(size);
page.setCurrent(pageInfo.getPageNum()); page.setCurrent(current);
page.setTotal(pageInfo.getTotal()); page.setTotal(total);
page.setRecords(list); page.setRecords(toModels(list));
return page; return page;
} }
...@@ -295,12 +348,17 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc ...@@ -295,12 +348,17 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
return Collections.emptyList(); return Collections.emptyList();
} }
List<String> amosUserIds = hygfIcbcRecords.stream().map(HygfIcbcRecordDTO::getAmosUserId).collect(Collectors.toList()); List<String> amosUserIds = hygfIcbcRecords.stream().map(HygfIcbcRecordDTO::getAmosUserId).collect(Collectors.toList());
List<PeasantHousehold> peasantHouseholds = peasantHouseholdService.lambdaQuery().in(PeasantHousehold::getAmosUserId, amosUserIds).list(); List<PeasantHousehold> peasantHouseholds = peasantHouseholdService.lambdaQuery().select(PeasantHousehold::getAmosUserId, PeasantHousehold::getRegionalCompaniesName).in(PeasantHousehold::getAmosUserId, amosUserIds).list();
Map<String, List<PeasantHousehold>> PeasantHouseholdMap = peasantHouseholds.stream().collect(Collectors.groupingBy(PeasantHousehold::getAmosUserId));// 根据农户 ID 分组 Map<String, List<PeasantHousehold>> PeasantHouseholdMap = peasantHouseholds.stream().collect(Collectors.groupingBy(PeasantHousehold::getAmosUserId));// 根据农户 ID 分组
return hygfIcbcRecords.stream().map(hygfIcbcRecordDTO -> { return hygfIcbcRecords.stream().map(hygfIcbcRecordDTO -> {
hygfIcbcRecordDTO.setOpenAccountStatusName(IcbcEnum.OpenAccountState.getNameByCode(hygfIcbcRecordDTO.getOpenAccountStatus(), IcbcEnum.OpenAccountState.INITIAL.getName())); hygfIcbcRecordDTO.setOpenAccountStatusName(IcbcEnum.OpenAccountState.getNameByCode(hygfIcbcRecordDTO.getOpenAccountStatus(), IcbcEnum.OpenAccountState.INITIAL.getName()));
hygfIcbcRecordDTO.setProtocolStatusName(IcbcEnum.ProtocolStatus.getNameByCode(hygfIcbcRecordDTO.getProtocolStatus(), ""));
List<PeasantHousehold> peasantHouseholdList = PeasantHouseholdMap.get(hygfIcbcRecordDTO.getAmosUserId()); List<PeasantHousehold> peasantHouseholdList = PeasantHouseholdMap.get(hygfIcbcRecordDTO.getAmosUserId());
hygfIcbcRecordDTO.setPeasantHouseholds(Bean.toModels(peasantHouseholdList, HygfIcbcRecordDTO.IcbcPeasantHousehold.class)); if (!CollectionUtils.isEmpty(peasantHouseholdList)) {
// 根据区域经销商名称去重
List<HygfIcbcRecordDTO.IcbcPeasantHousehold> icbcPeasantHouseholds = Bean.toModels(peasantHouseholdList, HygfIcbcRecordDTO.IcbcPeasantHousehold.class);
hygfIcbcRecordDTO.setPeasantHouseholds(icbcPeasantHouseholds.stream().filter(distinctByKey(HygfIcbcRecordDTO.IcbcPeasantHousehold::getRegionalCompaniesName)).collect(Collectors.toList()));
}
return hygfIcbcRecordDTO; return hygfIcbcRecordDTO;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }
...@@ -326,6 +384,7 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc ...@@ -326,6 +384,7 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
String biz_content = request.getParameter("biz_content"); String biz_content = request.getParameter("biz_content");
String sign_type = request.getParameter("sign_type"); String sign_type = request.getParameter("sign_type");
String sign = request.getParameter("sign"); String sign = request.getParameter("sign");
log.info("verifySignData入参,from:[[{}]], api:[[{}]], app_id:[[{}]], charset:[[{}]], format:[[{}]], encrypt_type:[[{}]], timestamp:[[{}]], biz_content:[[{}]], sign_type:[[{}]], sign:[[{}]]", from, api, app_id, charset, format, encrypt_type);
params.put("from", from); params.put("from", from);
params.put("api", api); params.put("api", api);
params.put("app_id", app_id); params.put("app_id", app_id);
...@@ -337,9 +396,9 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc ...@@ -337,9 +396,9 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
params.put("sign_type", sign_type);// 目前上行网关签名暂时仅支持RSA params.put("sign_type", sign_type);// 目前上行网关签名暂时仅支持RSA
/**********验证工行上行网关RSA签名**********/ /**********验证工行上行网关RSA签名**********/
String signStr = WebUtils.buildOrderedSignStr(path, params); String signStr = WebUtils.buildOrderedSignStr(path, params);
log.error("验签入参,signStr:[[{}]], sign_type:[[{}]], APIGW_PUBLIC_KEY: [[{}]],charset:[[{}]],sign:[[{}]]", signStr, sign_type, APIGW_PUBLIC_KEY, charset, sign); log.info("验签入参,signStr:[[{}]], sign_type:[[{}]], APIGW_PUBLIC_KEY: [[{}]],charset:[[{}]],sign:[[{}]]", signStr, sign_type, APIGW_PUBLIC_KEY, charset, sign);
boolean flag = IcbcSignature.verify(signStr, sign_type, APIGW_PUBLIC_KEY, charset, sign); boolean flag = IcbcSignature.verify(signStr, sign_type, APIGW_PUBLIC_KEY, charset, sign);
log.error("验签结果:[[{}]]", flag); log.info("验签结果:[[{}]]", flag);
return flag; return flag;
} }
...@@ -357,7 +416,8 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc ...@@ -357,7 +416,8 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
String responseBizContent = "{\"return_code\":\"" + copReturnCode + "\",\"return_msg\":\"" + copReturnMsg + "\"" + ",\"msg_id\":\"" + msg_id + "\"}"; String responseBizContent = "{\"return_code\":\"" + copReturnCode + "\",\"return_msg\":\"" + copReturnMsg + "\"" + ",\"msg_id\":\"" + msg_id + "\"}";
String charset = request.getParameter("charset");// 调用过程使用的编码格式 String charset = request.getParameter("charset");// 调用过程使用的编码格式
/**********商户对消息返回响应进行签名,签名方式需与在API平台登记APP的sign_type保持一致(目前基本都是RSA2)**********/ /**********商户对消息返回响应进行签名,签名方式需与在API平台登记APP的sign_type保持一致(目前基本都是RSA2)**********/
String signType = IcbcConstants.SIGN_TYPE_RSA2; // String signType = IcbcConstants.SIGN_TYPE_RSA2;
String signType = IcbcConstants.SIGN_TYPE_RSA;
String signStr = "\"response_biz_content\":" + responseBizContent + "," + "\"sign_type\":" + "\"" + signType + "\""; String signStr = "\"response_biz_content\":" + responseBizContent + "," + "\"sign_type\":" + "\"" + signType + "\"";
String signParam = IcbcSignature.sign(signStr, signType, MY_PRIVATE_KEY, charset); String signParam = IcbcSignature.sign(signStr, signType, MY_PRIVATE_KEY, charset);
String returnJson = "{\"response_biz_content\":" + responseBizContent + ",\"sign_type\":\"" + signType + "\"" + ",\"sign\":\"" + signParam + "\"}"; String returnJson = "{\"response_biz_content\":" + responseBizContent + ",\"sign_type\":\"" + signType + "\"" + ",\"sign\":\"" + signParam + "\"}";
...@@ -379,4 +439,9 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc ...@@ -379,4 +439,9 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
byte[] bt = Base64.decode(String.valueOf(ch)); byte[] bt = Base64.decode(String.valueOf(ch));
return new String(bt, "UTF-8"); return new String(bt, "UTF-8");
} }
public static <T> Predicate<T> distinctByKey(Function<? super T, Object> distinctField) {
Map<Object, Boolean> distinctMap = new ConcurrentHashMap<>();
return object -> distinctMap.putIfAbsent(distinctField.apply(object), Boolean.TRUE) == null;
}
} }
\ No newline at end of file
...@@ -248,4 +248,4 @@ spring.elasticsearch.rest.password=123456 ...@@ -248,4 +248,4 @@ spring.elasticsearch.rest.password=123456
spring.elasticsearch.rest.read-timeout=30000 spring.elasticsearch.rest.read-timeout=30000
## 聚富通 配置 ## 聚富通 配置
hygf.icbc.notifyUrl=http://47.92.234.253:8088/hygf/icbc/notify hygf.icbc.callbackUrl=https://yth.yunqingtech.com/hygf/icbc/notify
\ No newline at end of file \ No newline at end of file
package com.yeejoin.amos.boot.module.jxiop.biz.controller; package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import cn.hutool.core.bean.BeanUtil; import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanWarningRecordDto; import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizFanWarningRecordDto;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointProcessVariableClassification; import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointProcessVariableClassification;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRecord;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRuleSet; import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanWarningRuleSet;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRuleSet; import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWarningRuleSet;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanPointProcessVariableClassificationMapper; import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizFanPointProcessVariableClassificationMapper;
...@@ -18,21 +42,10 @@ import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanWarningRuleS ...@@ -18,21 +42,10 @@ import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizFanWarningRuleS
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizPvWarningRuleSetServiceImpl; import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizPvWarningRuleSetServiceImpl;
import com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.FanWaringRecordMapper; import com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.FanWaringRecordMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord; import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
import java.util.stream.Collectors;
/** /**
* @author system_generator * @author system_generator
...@@ -43,396 +56,467 @@ import java.util.stream.Collectors; ...@@ -43,396 +56,467 @@ import java.util.stream.Collectors;
@RequestMapping(value = "/idx-biz-fan-warning-record") @RequestMapping(value = "/idx-biz-fan-warning-record")
public class IdxBizFanWarningRecordController extends BaseController { public class IdxBizFanWarningRecordController extends BaseController {
@Autowired @Autowired
IdxBizFanWarningRecordServiceImpl idxBizFanWarningRecordServiceImpl; IdxBizFanWarningRecordServiceImpl idxBizFanWarningRecordServiceImpl;
@Autowired @Autowired
IdxBizFanWarningRuleSetServiceImpl idxBizFanWarningRuleSetService; IdxBizFanWarningRuleSetServiceImpl idxBizFanWarningRuleSetService;
@Autowired @Autowired
IdxBizPvWarningRuleSetServiceImpl idxBizPvWarningRuleSetService; IdxBizPvWarningRuleSetServiceImpl idxBizPvWarningRuleSetService;
@Autowired @Autowired
FanWaringRecordMapper fanWaringRecordMapper; FanWaringRecordMapper fanWaringRecordMapper;
@Autowired @Autowired
private IPermissionService permissionService; private IPermissionService permissionService;
@Autowired @Autowired
IdxBizFanPointProcessVariableClassificationMapper idxBizFanPointProcessVariableClassificationMapper; IdxBizFanPointProcessVariableClassificationMapper idxBizFanPointProcessVariableClassificationMapper;
/** /**
* 新增 * 新增
* *
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/save") @PostMapping(value = "/save")
@ApiOperation(httpMethod = "POST", value = "新增", notes = "新增") @ApiOperation(httpMethod = "POST", value = "新增", notes = "新增")
public ResponseModel<IdxBizFanWarningRecordDto> save(@RequestBody IdxBizFanWarningRecordDto model) { public ResponseModel<IdxBizFanWarningRecordDto> save(@RequestBody IdxBizFanWarningRecordDto model) {
model = idxBizFanWarningRecordServiceImpl.createWithModel(model); model = idxBizFanWarningRecordServiceImpl.createWithModel(model);
return ResponseHelper.buildResponse(model); return ResponseHelper.buildResponse(model);
} }
/** /**
* 根据sequenceNbr更新 * 根据sequenceNbr更新
* *
* @param sequenceNbr 主键 * @param sequenceNbr 主键
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PutMapping(value = "/{sequenceNbr}") @PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新", notes = "根据sequenceNbr更新") @ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新", notes = "根据sequenceNbr更新")
public ResponseModel<IdxBizFanWarningRecordDto> updateBySequenceNbrIdxBizFanWarningRecord(@RequestBody IdxBizFanWarningRecordDto model, @PathVariable(value = "sequenceNbr") String sequenceNbr) { public ResponseModel<IdxBizFanWarningRecordDto> updateBySequenceNbrIdxBizFanWarningRecord(
model.setSequenceNbr(sequenceNbr); @RequestBody IdxBizFanWarningRecordDto model, @PathVariable(value = "sequenceNbr") String sequenceNbr) {
return ResponseHelper.buildResponse(idxBizFanWarningRecordServiceImpl.updateWithModel(model)); model.setSequenceNbr(sequenceNbr);
} return ResponseHelper.buildResponse(idxBizFanWarningRecordServiceImpl.updateWithModel(model));
}
/**
* 根据sequenceNbr删除 /**
* * 根据sequenceNbr删除
* @param sequenceNbr 主键 *
* @return * @param sequenceNbr 主键
*/ * @return
@TycloudOperation(ApiLevel = UserType.AGENCY) */
@DeleteMapping(value = "/{sequenceNbr}") @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除", notes = "根据sequenceNbr删除") @DeleteMapping(value = "/{sequenceNbr}")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr) { @ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除", notes = "根据sequenceNbr删除")
return ResponseHelper.buildResponse(idxBizFanWarningRecordServiceImpl.removeById(sequenceNbr)); public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request,
} @PathVariable(value = "sequenceNbr") Long sequenceNbr) {
return ResponseHelper.buildResponse(idxBizFanWarningRecordServiceImpl.removeById(sequenceNbr));
/** }
* 根据sequenceNbr查询
* /**
* @param sequenceNbr 主键 * 根据sequenceNbr查询
* @return *
*/ * @param sequenceNbr 主键
@TycloudOperation(ApiLevel = UserType.AGENCY) * @return
@GetMapping(value = "/{sequenceNbr}") */
@ApiOperation(httpMethod = "GET", value = "根据sequenceNbr查询单个", notes = "根据sequenceNbr查询单个") @TycloudOperation(ApiLevel = UserType.AGENCY)
public ResponseModel<IdxBizFanWarningRecordDto> selectOne(@PathVariable Long sequenceNbr) { @GetMapping(value = "/{sequenceNbr}")
return ResponseHelper.buildResponse(idxBizFanWarningRecordServiceImpl.queryBySeq(sequenceNbr)); @ApiOperation(httpMethod = "GET", value = "根据sequenceNbr查询单个", notes = "根据sequenceNbr查询单个")
} public ResponseModel<IdxBizFanWarningRecordDto> selectOne(@PathVariable Long sequenceNbr) {
return ResponseHelper.buildResponse(idxBizFanWarningRecordServiceImpl.queryBySeq(sequenceNbr));
/** }
* 列表分页查询
* /**
* @param current 当前页 * 列表分页查询
* @param current 每页大小 *
* @return * @param current 当前页
*/ * @param current 每页大小
@TycloudOperation(ApiLevel = UserType.AGENCY) * @return
@GetMapping(value = "/page") */
@ApiOperation(httpMethod = "GET", value = "分页查询", notes = "分页查询") @TycloudOperation(ApiLevel = UserType.AGENCY)
public ResponseModel<Page<IdxBizFanWarningRecordDto>> queryForPage(@RequestParam(value = "current") int current, @RequestParam @GetMapping(value = "/page")
(value = "size") int size) { @ApiOperation(httpMethod = "GET", value = "分页查询", notes = "分页查询")
Page<IdxBizFanWarningRecordDto> page = new Page<IdxBizFanWarningRecordDto>(); public ResponseModel<Page<IdxBizFanWarningRecordDto>> queryForPage(@RequestParam(value = "current") int current,
page.setCurrent(current); @RequestParam(value = "size") int size) {
page.setSize(size); Page<IdxBizFanWarningRecordDto> page = new Page<IdxBizFanWarningRecordDto>();
return ResponseHelper.buildResponse(idxBizFanWarningRecordServiceImpl.queryForIdxBizFanWarningRecordPage(page)); page.setCurrent(current);
} page.setSize(size);
return ResponseHelper.buildResponse(idxBizFanWarningRecordServiceImpl.queryForIdxBizFanWarningRecordPage(page));
/** }
* 列表全部数据查询
* /**
* @return * 列表全部数据查询
*/ *
@TycloudOperation(ApiLevel = UserType.AGENCY) * @return
@ApiOperation(httpMethod = "GET", value = "列表全部数据查询", notes = "列表全部数据查询") */
@GetMapping(value = "/list") @TycloudOperation(ApiLevel = UserType.AGENCY)
public ResponseModel<List<IdxBizFanWarningRecordDto>> selectForList() { @ApiOperation(httpMethod = "GET", value = "列表全部数据查询", notes = "列表全部数据查询")
return ResponseHelper.buildResponse(idxBizFanWarningRecordServiceImpl.queryForIdxBizFanWarningRecordList()); @GetMapping(value = "/list")
} public ResponseModel<List<IdxBizFanWarningRecordDto>> selectForList() {
return ResponseHelper.buildResponse(idxBizFanWarningRecordServiceImpl.queryForIdxBizFanWarningRecordList());
}
/**
* 根据sequenceNbr查询 /**
* * 根据sequenceNbr查询
* @param ANALYSISPOINTID 主键 *
* @return * @param ANALYSISPOINTID 主键
*/ * @return
@TycloudOperation(ApiLevel = UserType.AGENCY) */
@GetMapping(value = "/getInfoByPointId") @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "根据ANALYSIS_POINT_ID查询单个", notes = "根据ANALYSIS_POINT_ID查询单个") @GetMapping(value = "/getInfoByPointId")
public ResponseModel<Map<String, Object>> getInfoByPointId(@RequestParam String ANALYSISPOINTID) { @ApiOperation(httpMethod = "GET", value = "根据ANALYSIS_POINT_ID查询单个", notes = "根据ANALYSIS_POINT_ID查询单个")
public ResponseModel<Map<String, Object>> getInfoByPointId(@RequestParam String ANALYSISPOINTID) {
LambdaQueryWrapper<IdxBizFanWarningRuleSet> query = new LambdaQueryWrapper<>();
query.eq(IdxBizFanWarningRuleSet::getAnalysisPointId, ANALYSISPOINTID); LambdaQueryWrapper<IdxBizFanWarningRuleSet> query = new LambdaQueryWrapper<>();
List<IdxBizFanWarningRuleSet> idxBizFanWarningRecordList = idxBizFanWarningRuleSetService.getBaseMapper().selectList(query); query.eq(IdxBizFanWarningRuleSet::getAnalysisPointId, ANALYSISPOINTID);
Map<String, Object> map = new HashMap<>(); List<IdxBizFanWarningRuleSet> idxBizFanWarningRecordList = idxBizFanWarningRuleSetService.getBaseMapper()
for (int i = 0; i < idxBizFanWarningRecordList.size(); i++) { .selectList(query);
IdxBizFanWarningRuleSet idxBizFanWarningRecord = idxBizFanWarningRecordList.get(i); Map<String, Object> map = new HashMap<>();
if (idxBizFanWarningRecord.getWarningName().equals("注意")) { for (int i = 0; i < idxBizFanWarningRecordList.size(); i++) {
map.putAll(BeanUtil.beanToMap(idxBizFanWarningRecord)); IdxBizFanWarningRuleSet idxBizFanWarningRecord = idxBizFanWarningRecordList.get(i);
} else if (idxBizFanWarningRecord.getWarningName().equals("警告")) { if (idxBizFanWarningRecord.getWarningName().equals("注意")) {
//警告周期 map.putAll(BeanUtil.beanToMap(idxBizFanWarningRecord));
map.put("jgWarningCycle", idxBizFanWarningRecord.getWarningCycle()); } else if (idxBizFanWarningRecord.getWarningName().equals("警告")) {
map.put("jgWarningIf", idxBizFanWarningRecord.getWarningIf()); // 警告周期
} else if (idxBizFanWarningRecord.getWarningName().equals("危险")) { map.put("jgWarningCycle", idxBizFanWarningRecord.getWarningCycle());
//警告周期 map.put("jgWarningIf", idxBizFanWarningRecord.getWarningIf());
map.put("wxWarningCycle", idxBizFanWarningRecord.getWarningCycle()); } else if (idxBizFanWarningRecord.getWarningName().equals("危险")) {
map.put("wxWarningIf", idxBizFanWarningRecord.getWarningIf()); // 警告周期
} map.put("wxWarningCycle", idxBizFanWarningRecord.getWarningCycle());
} map.put("wxWarningIf", idxBizFanWarningRecord.getWarningIf());
return ResponseHelper.buildResponse(map); }
} }
return ResponseHelper.buildResponse(map);
}
/**
* 根据pointId修改信息 /**
* * 根据pointId修改信息
* @param analysisInfo 主键 *
* @return * @param analysisInfo 主键
*/ * @return
@TycloudOperation(ApiLevel = UserType.AGENCY) */
@PostMapping(value = "/updateByPointInfo") @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "根据pointId修改信息", notes = "根据pointId修改信息") @PostMapping(value = "/updateByPointInfo")
public ResponseModel<Boolean> updateByPointInfo(@RequestBody JSONObject analysisInfo) { @ApiOperation(httpMethod = "POST", value = "根据pointId修改信息", notes = "根据pointId修改信息")
LambdaQueryWrapper<IdxBizFanWarningRuleSet> query = new LambdaQueryWrapper<>(); public ResponseModel<Boolean> updateByPointInfo(@RequestBody JSONObject analysisInfo) {
query.eq(IdxBizFanWarningRuleSet::getAnalysisPointId, analysisInfo.get("analysisPointId")); LambdaQueryWrapper<IdxBizFanWarningRuleSet> query = new LambdaQueryWrapper<>();
List<IdxBizFanWarningRuleSet> idxBizFanWarningRecordList = idxBizFanWarningRuleSetService.getBaseMapper().selectList(query); query.eq(IdxBizFanWarningRuleSet::getAnalysisPointId, analysisInfo.get("analysisPointId"));
for (IdxBizFanWarningRuleSet idxBizFanWarningRuleSet : idxBizFanWarningRecordList) { List<IdxBizFanWarningRuleSet> idxBizFanWarningRecordList = idxBizFanWarningRuleSetService.getBaseMapper()
BeanUtil.copyProperties(analysisInfo, idxBizFanWarningRuleSet, "sequenceNbr", "warningName"); .selectList(query);
if (idxBizFanWarningRuleSet.getWarningName().equals("警告")) { for (IdxBizFanWarningRuleSet idxBizFanWarningRuleSet : idxBizFanWarningRecordList) {
//警告周期 BeanUtil.copyProperties(analysisInfo, idxBizFanWarningRuleSet, "sequenceNbr", "warningName");
idxBizFanWarningRuleSet.setWarningIf(analysisInfo.get("jgWarningIf").toString()); if (idxBizFanWarningRuleSet.getWarningName().equals("警告")) {
idxBizFanWarningRuleSet.setWarningCycle(analysisInfo.get("jgWarningCycle").toString()); // 警告周期
} else if (idxBizFanWarningRuleSet.getWarningName().equals("危险")) { idxBizFanWarningRuleSet.setWarningIf(analysisInfo.get("jgWarningIf").toString());
//警告周期 idxBizFanWarningRuleSet.setWarningCycle(analysisInfo.get("jgWarningCycle").toString());
idxBizFanWarningRuleSet.setWarningIf(analysisInfo.get("wxWarningIf").toString()); } else if (idxBizFanWarningRuleSet.getWarningName().equals("危险")) {
idxBizFanWarningRuleSet.setWarningCycle(analysisInfo.get("wxWarningCycle").toString()); // 警告周期
} idxBizFanWarningRuleSet.setWarningIf(analysisInfo.get("wxWarningIf").toString());
} idxBizFanWarningRuleSet.setWarningCycle(analysisInfo.get("wxWarningCycle").toString());
boolean b = idxBizFanWarningRuleSetService.updateBatchById(idxBizFanWarningRecordList); }
return ResponseHelper.buildResponse(b); }
} boolean b = idxBizFanWarningRuleSetService.updateBatchById(idxBizFanWarningRecordList);
return ResponseHelper.buildResponse(b);
}
/**
* 根据sequenceNbr查询 /**
* * 根据sequenceNbr查询
* @param ANALYSISPOINTID 主键 *
* @return * @param ANALYSISPOINTID 主键
*/ * @return
@TycloudOperation(ApiLevel = UserType.AGENCY) */
@GetMapping(value = "/getInfoByPointIdPv") @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "根据ANALYSIS_POINT_ID查询单个", notes = "根据ANALYSIS_POINT_ID查询单个") @GetMapping(value = "/getInfoByPointIdPv")
public ResponseModel<Map<String, Object>> getInfoByPointIdPv(@RequestParam String ANALYSISPOINTID) { @ApiOperation(httpMethod = "GET", value = "根据ANALYSIS_POINT_ID查询单个", notes = "根据ANALYSIS_POINT_ID查询单个")
public ResponseModel<Map<String, Object>> getInfoByPointIdPv(@RequestParam String ANALYSISPOINTID) {
LambdaQueryWrapper<IdxBizPvWarningRuleSet> query = new LambdaQueryWrapper<>();
query.eq(IdxBizPvWarningRuleSet::getAnalysisPointId, ANALYSISPOINTID); LambdaQueryWrapper<IdxBizPvWarningRuleSet> query = new LambdaQueryWrapper<>();
List<IdxBizPvWarningRuleSet> idxBizPvWarningRecordList = idxBizPvWarningRuleSetService.getBaseMapper().selectList(query); query.eq(IdxBizPvWarningRuleSet::getAnalysisPointId, ANALYSISPOINTID);
Map<String, Object> map = new HashMap<>(); List<IdxBizPvWarningRuleSet> idxBizPvWarningRecordList = idxBizPvWarningRuleSetService.getBaseMapper()
for (int i = 0; i < idxBizPvWarningRecordList.size(); i++) { .selectList(query);
IdxBizPvWarningRuleSet idxBizPvWarningRecord = idxBizPvWarningRecordList.get(i); Map<String, Object> map = new HashMap<>();
if (idxBizPvWarningRecord.getWarningName().equals("注意")) { for (int i = 0; i < idxBizPvWarningRecordList.size(); i++) {
map.putAll(BeanUtil.beanToMap(idxBizPvWarningRecord)); IdxBizPvWarningRuleSet idxBizPvWarningRecord = idxBizPvWarningRecordList.get(i);
} else if (idxBizPvWarningRecord.getWarningName().equals("警告")) { if (idxBizPvWarningRecord.getWarningName().equals("注意")) {
//警告周期 map.putAll(BeanUtil.beanToMap(idxBizPvWarningRecord));
map.put("jgWarningCycle", idxBizPvWarningRecord.getWarningCycle()); } else if (idxBizPvWarningRecord.getWarningName().equals("警告")) {
map.put("jgWarningIf", idxBizPvWarningRecord.getWarningIf()); // 警告周期
} else if (idxBizPvWarningRecord.getWarningName().equals("危险")) { map.put("jgWarningCycle", idxBizPvWarningRecord.getWarningCycle());
//警告周期 map.put("jgWarningIf", idxBizPvWarningRecord.getWarningIf());
map.put("wxWarningCycle", idxBizPvWarningRecord.getWarningCycle()); } else if (idxBizPvWarningRecord.getWarningName().equals("危险")) {
map.put("wxWarningIf", idxBizPvWarningRecord.getWarningIf()); // 警告周期
} map.put("wxWarningCycle", idxBizPvWarningRecord.getWarningCycle());
} map.put("wxWarningIf", idxBizPvWarningRecord.getWarningIf());
return ResponseHelper.buildResponse(map); }
} }
return ResponseHelper.buildResponse(map);
}
/**
* 根据pointId修改信息 /**
* * 根据pointId修改信息
* @param analysisInfo 主键 *
* @return * @param analysisInfo 主键
*/ * @return
@TycloudOperation(ApiLevel = UserType.AGENCY) */
@PostMapping(value = "/updateByPointInfoPv") @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "根据pointId修改信息", notes = "根据pointId修改信息") @PostMapping(value = "/updateByPointInfoPv")
public ResponseModel<Boolean> updateByPointInfoPv(@RequestBody JSONObject analysisInfo) { @ApiOperation(httpMethod = "POST", value = "根据pointId修改信息", notes = "根据pointId修改信息")
LambdaQueryWrapper<IdxBizPvWarningRuleSet> query = new LambdaQueryWrapper<>(); public ResponseModel<Boolean> updateByPointInfoPv(@RequestBody JSONObject analysisInfo) {
query.eq(IdxBizPvWarningRuleSet::getAnalysisPointId, analysisInfo.get("analysisPointId")); LambdaQueryWrapper<IdxBizPvWarningRuleSet> query = new LambdaQueryWrapper<>();
List<IdxBizPvWarningRuleSet> idxBizFanWarningRecordList = idxBizPvWarningRuleSetService.getBaseMapper().selectList(query); query.eq(IdxBizPvWarningRuleSet::getAnalysisPointId, analysisInfo.get("analysisPointId"));
for (IdxBizPvWarningRuleSet idxBizPvWarningRuleSet : idxBizFanWarningRecordList) { List<IdxBizPvWarningRuleSet> idxBizFanWarningRecordList = idxBizPvWarningRuleSetService.getBaseMapper()
BeanUtil.copyProperties(analysisInfo, idxBizPvWarningRuleSet, "sequenceNbr", "warningName"); .selectList(query);
if (idxBizPvWarningRuleSet.getWarningName().equals("警告")) { for (IdxBizPvWarningRuleSet idxBizPvWarningRuleSet : idxBizFanWarningRecordList) {
//警告周期 BeanUtil.copyProperties(analysisInfo, idxBizPvWarningRuleSet, "sequenceNbr", "warningName");
idxBizPvWarningRuleSet.setWarningIf(analysisInfo.get("jgWarningIf").toString()); if (idxBizPvWarningRuleSet.getWarningName().equals("警告")) {
idxBizPvWarningRuleSet.setWarningCycle(analysisInfo.get("jgWarningCycle").toString()); // 警告周期
} else if (idxBizPvWarningRuleSet.getWarningName().equals("危险")) { idxBizPvWarningRuleSet.setWarningIf(analysisInfo.get("jgWarningIf").toString());
//警告周期 idxBizPvWarningRuleSet.setWarningCycle(analysisInfo.get("jgWarningCycle").toString());
idxBizPvWarningRuleSet.setWarningIf(analysisInfo.get("wxWarningIf").toString()); } else if (idxBizPvWarningRuleSet.getWarningName().equals("危险")) {
idxBizPvWarningRuleSet.setWarningCycle(analysisInfo.get("wxWarningCycle").toString()); // 警告周期
} idxBizPvWarningRuleSet.setWarningIf(analysisInfo.get("wxWarningIf").toString());
} idxBizPvWarningRuleSet.setWarningCycle(analysisInfo.get("wxWarningCycle").toString());
boolean b = idxBizPvWarningRuleSetService.updateBatchById(idxBizFanWarningRecordList); }
return ResponseHelper.buildResponse(b); }
} boolean b = idxBizPvWarningRuleSetService.updateBatchById(idxBizFanWarningRecordList);
return ResponseHelper.buildResponse(b);
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/stringToMap") @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "get", value = "字符串转为对象格式", notes = "字符串转为对象格式") @GetMapping(value = "/stringToMap")
public ResponseModel<Map<String, Object>> list(@RequestParam("analysisPointIds") String ids) { @ApiOperation(httpMethod = "get", value = "字符串转为对象格式", notes = "字符串转为对象格式")
Map<String, Object> data = new HashMap<>(); public ResponseModel<Map<String, Object>> list(@RequestParam("analysisPointIds") String ids) {
data.put("analysisPointIds", ids); Map<String, Object> data = new HashMap<>();
return ResponseHelper.buildResponse(data); data.put("analysisPointIds", ids);
} return ResponseHelper.buildResponse(data);
}
/**
* 根据pointId修改信息 /**
* * 根据pointId修改信息
* @param analysisInfo 主键 *
* @return * @param analysisInfo 主键
*/ * @return
@TycloudOperation(ApiLevel = UserType.AGENCY) */
@PostMapping(value = "/updateByPointInfoBatchPv") @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "根据pointId修改信息", notes = "根据pointId修改信息") @PostMapping(value = "/updateByPointInfoBatchPv")
public ResponseModel<Boolean> updateByPointInfoBatchPv(@RequestBody JSONObject analysisInfo) { @ApiOperation(httpMethod = "POST", value = "根据pointId修改信息", notes = "根据pointId修改信息")
LambdaQueryWrapper<IdxBizPvWarningRuleSet> query = new LambdaQueryWrapper<>(); public ResponseModel<Boolean> updateByPointInfoBatchPv(@RequestBody JSONObject analysisInfo) {
List<String> analysisPointIds = Arrays.asList(analysisInfo.get("analysisPointIds").toString().split(",")); LambdaQueryWrapper<IdxBizPvWarningRuleSet> query = new LambdaQueryWrapper<>();
query.in(IdxBizPvWarningRuleSet::getAnalysisPointId, analysisPointIds); List<String> analysisPointIds = Arrays.asList(analysisInfo.get("analysisPointIds").toString().split(","));
List<IdxBizPvWarningRuleSet> idxBizFanWarningRecordList = idxBizPvWarningRuleSetService.getBaseMapper().selectList(query); query.in(IdxBizPvWarningRuleSet::getAnalysisPointId, analysisPointIds);
for (IdxBizPvWarningRuleSet idxBizPvWarningRuleSet : idxBizFanWarningRecordList) { List<IdxBizPvWarningRuleSet> idxBizFanWarningRecordList = idxBizPvWarningRuleSetService.getBaseMapper()
BeanUtil.copyProperties(analysisInfo, idxBizPvWarningRuleSet, "analysisPointIds"); .selectList(query);
if (idxBizPvWarningRuleSet.getWarningName().equals("警告")) { for (IdxBizPvWarningRuleSet idxBizPvWarningRuleSet : idxBizFanWarningRecordList) {
//警告周期 BeanUtil.copyProperties(analysisInfo, idxBizPvWarningRuleSet, "analysisPointIds");
if (StringUtils.isNotBlank(analysisInfo.getString("jgWarningCycle"))) { if (idxBizPvWarningRuleSet.getWarningName().equals("警告")) {
idxBizPvWarningRuleSet.setWarningCycle(analysisInfo.get("jgWarningCycle").toString()); // 警告周期
} if (StringUtils.isNotBlank(analysisInfo.getString("jgWarningCycle"))) {
} else if (idxBizPvWarningRuleSet.getWarningName().equals("危险")) { idxBizPvWarningRuleSet.setWarningCycle(analysisInfo.get("jgWarningCycle").toString());
//警告周期 }
if (StringUtils.isNotBlank(analysisInfo.getString("wxWarningCycle"))) { } else if (idxBizPvWarningRuleSet.getWarningName().equals("危险")) {
idxBizPvWarningRuleSet.setWarningCycle(analysisInfo.get("wxWarningCycle").toString()); // 警告周期
} if (StringUtils.isNotBlank(analysisInfo.getString("wxWarningCycle"))) {
} idxBizPvWarningRuleSet.setWarningCycle(analysisInfo.get("wxWarningCycle").toString());
} }
boolean b = idxBizPvWarningRuleSetService.updateBatchById(idxBizFanWarningRecordList); }
return ResponseHelper.buildResponse(b); }
} boolean b = idxBizPvWarningRuleSetService.updateBatchById(idxBizFanWarningRecordList);
return ResponseHelper.buildResponse(b);
}
/**
* 根据pointId修改信息 /**
* * 根据pointId修改信息
* @param analysisInfo 主键 *
* @return * @param analysisInfo 主键
*/ * @return
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) */
@PostMapping(value = "/updateByPointInfoBatchFan") @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "POST", value = "根据pointId修改信息", notes = "根据pointId修改信息") @PostMapping(value = "/updateByPointInfoBatchFan")
public ResponseModel<Boolean> updateByPointInfoBatchFan(@RequestBody JSONObject analysisInfo) { @ApiOperation(httpMethod = "POST", value = "根据pointId修改信息", notes = "根据pointId修改信息")
LambdaQueryWrapper<IdxBizFanWarningRuleSet> query = new LambdaQueryWrapper<>(); public ResponseModel<Boolean> updateByPointInfoBatchFan(@RequestBody JSONObject analysisInfo) {
List<String> analysisPointIds = Arrays.asList(analysisInfo.get("analysisPointIds").toString().split(",")); LambdaQueryWrapper<IdxBizFanWarningRuleSet> query = new LambdaQueryWrapper<>();
query.in(IdxBizFanWarningRuleSet::getAnalysisPointId, analysisPointIds); List<String> analysisPointIds = Arrays.asList(analysisInfo.get("analysisPointIds").toString().split(","));
List<IdxBizFanWarningRuleSet> idxBizFanWarningRecordList = idxBizFanWarningRuleSetService.getBaseMapper().selectList(query); query.in(IdxBizFanWarningRuleSet::getAnalysisPointId, analysisPointIds);
for (IdxBizFanWarningRuleSet idxBizFanWarningRuleSet : idxBizFanWarningRecordList) { List<IdxBizFanWarningRuleSet> idxBizFanWarningRecordList = idxBizFanWarningRuleSetService.getBaseMapper()
BeanUtil.copyProperties(analysisInfo, idxBizFanWarningRuleSet, "analysisPointIds"); .selectList(query);
if (idxBizFanWarningRuleSet.getWarningName().equals("警告")) { for (IdxBizFanWarningRuleSet idxBizFanWarningRuleSet : idxBizFanWarningRecordList) {
//警告周期 BeanUtil.copyProperties(analysisInfo, idxBizFanWarningRuleSet, "analysisPointIds");
if (StringUtils.isNotBlank(analysisInfo.getString("jgWarningCycle"))) { if (idxBizFanWarningRuleSet.getWarningName().equals("警告")) {
idxBizFanWarningRuleSet.setWarningCycle(analysisInfo.get("jgWarningCycle").toString()); // 警告周期
} if (StringUtils.isNotBlank(analysisInfo.getString("jgWarningCycle"))) {
} else if (idxBizFanWarningRuleSet.getWarningName().equals("危险")) { idxBizFanWarningRuleSet.setWarningCycle(analysisInfo.get("jgWarningCycle").toString());
//警告周期 }
if (StringUtils.isNotBlank(analysisInfo.getString("wxWarningCycle"))) { } else if (idxBizFanWarningRuleSet.getWarningName().equals("危险")) {
idxBizFanWarningRuleSet.setWarningCycle(analysisInfo.get("wxWarningCycle").toString()); // 警告周期
} if (StringUtils.isNotBlank(analysisInfo.getString("wxWarningCycle"))) {
} idxBizFanWarningRuleSet.setWarningCycle(analysisInfo.get("wxWarningCycle").toString());
} }
boolean b = idxBizFanWarningRuleSetService.updateBatchById(idxBizFanWarningRecordList); }
return ResponseHelper.buildResponse(b); }
} boolean b = idxBizFanWarningRuleSetService.updateBatchById(idxBizFanWarningRecordList);
return ResponseHelper.buildResponse(b);
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) }
@GetMapping(value = "/selectFanWarningNum")
@ApiOperation(httpMethod = "GET", value = "查询各风机预警状况", notes = "查询各风机预警状况") @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
public ResponseModel<Map<String, Object>> selectFanWarningNum(@RequestParam String station) { @GetMapping(value = "/selectFanWarningNum")
@ApiOperation(httpMethod = "GET", value = "查询各风机预警状况", notes = "查询各风机预警状况")
public ResponseModel<Map<String, Object>> selectFanWarningNum(@RequestParam String station) {
LambdaQueryWrapper<IdxBizFanPointProcessVariableClassification> wrapper = new LambdaQueryWrapper<>();
wrapper.select(IdxBizFanPointProcessVariableClassification::getEquipmentName); LambdaQueryWrapper<IdxBizFanPointProcessVariableClassification> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(IdxBizFanPointProcessVariableClassification::getStation, station); wrapper.select(IdxBizFanPointProcessVariableClassification::getEquipmentName);
wrapper.groupBy(IdxBizFanPointProcessVariableClassification::getEquipmentName); wrapper.eq(IdxBizFanPointProcessVariableClassification::getStation, station);
wrapper.last(" ORDER BY RIGHT(EQUIPMENT_NAME,6) desc"); wrapper.groupBy(IdxBizFanPointProcessVariableClassification::getEquipmentName);
List<IdxBizFanPointProcessVariableClassification> variableClassificationList = idxBizFanPointProcessVariableClassificationMapper.selectList(wrapper); wrapper.last(" ORDER BY RIGHT(EQUIPMENT_NAME,6) desc");
List<IdxBizFanPointProcessVariableClassification> variableClassificationList = idxBizFanPointProcessVariableClassificationMapper
.selectList(wrapper);
Map<String, Object> resultMap = new HashMap<>();
List<String> gatewayIds = this.getGatewayIds(); QueryWrapper<FanWarningRecord> lambdaQw = new QueryWrapper<>();
List<Map<String, Object>> maps = fanWaringRecordMapper.selectFanWarningNum(station, gatewayIds); lambdaQw.select("COUNT(1) AS c,equipment_name AS equipmentname,warning_name AS warningname");
Map<String, Map<String, Object>> equipmentNameInfoMap = maps.stream().collect(Collectors.toMap(t -> t.get("EQUIPMENT_NAME").toString(), t -> t)); lambdaQw.lambda().eq(FanWarningRecord::getStation, station);
lambdaQw.lambda().eq(FanWarningRecord::getDisposotionState, "待确认");
List<Integer> wxList = new ArrayList<>(); lambdaQw.lambda().groupBy(FanWarningRecord::getEquipmentName);
List<Integer> zyList = new ArrayList<>(); lambdaQw.lambda().groupBy(FanWarningRecord::getWarningName);
List<Integer> jgList = new ArrayList<>(); List<Map<String, Object>> lists = fanWaringRecordMapper.selectMaps(lambdaQw);
List<String> list = new ArrayList<>();
for (Map<String, Object> map : maps) { // Map<String, Object> resultMap = new HashMap<>();
wxList.add(Integer.valueOf(map.get("危险").toString())); // List<String> gatewayIds = this.getGatewayIds();
zyList.add(Integer.valueOf(map.get("注意").toString())); // List<Map<String, Object>> maps = fanWaringRecordMapper.selectFanWarningNum(station, gatewayIds);
jgList.add(Integer.valueOf(map.get("警告").toString())); // Map<String, Map<String, Object>> equipmentNameInfoMap = maps.stream()
list.add(map.get("EQUIPMENT_NAME").toString()); // .collect(Collectors.toMap(t -> t.get("EQUIPMENT_NAME").toString(), t -> t));
} List<Integer> wxList = new ArrayList<>();
variableClassificationList.forEach(item -> { List<Integer> zyList = new ArrayList<>();
if (!equipmentNameInfoMap.containsKey(item.getEquipmentName())) { List<Integer> jgList = new ArrayList<>();
wxList.add(0); List<String> list = new ArrayList<>();
zyList.add(0);
jgList.add(0); Map<String, Map<String, Integer>> countMap = new HashMap<>();
list.add(item.getEquipmentName()); for (Map<String, Object> map : lists) {
} String equipmentName = String.valueOf(map.get("equipmentname"));
}); int count = Integer.valueOf(String.valueOf(map.get("c")));
String warningName = String.valueOf(map.get("warningname"));
Map<String, Integer> equipMap = countMap.get(equipmentName);
HashMap<String, Object> wxMapResult = new HashMap<>(); if (equipMap == null) {
wxMapResult.put("data", wxList); equipMap = new HashMap<>();
wxMapResult.put("name", "危险"); }
HashMap<String, Object> zyMapResult = new HashMap<>(); equipMap.put(warningName, count);
zyMapResult.put("data", zyList); countMap.put(equipmentName, equipMap);
zyMapResult.put("name", "注意"); }
HashMap<String, Object> jgMapResult = new HashMap<>();
jgMapResult.put("data", jgList); variableClassificationList.forEach(item -> {
jgMapResult.put("name", "警告"); Map<String, Integer> equipMap = countMap.get(item.getEquipmentName());
if (equipMap != null) {
List<Map<String, Object>> hashMaps = Arrays.asList(wxMapResult, zyMapResult, jgMapResult); wxList.add(equipMap.get("危险") != null ? equipMap.get("危险") : 0);
resultMap.put("axisData", list); zyList.add(equipMap.get("注意") != null ? equipMap.get("注意") : 0);
resultMap.put("seriesData", hashMaps); jgList.add(equipMap.get("警告") != null ? equipMap.get("警告") : 0);
return ResponseHelper.buildResponse(resultMap); } else {
wxList.add(0);
} zyList.add(0);
jgList.add(0);
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) list.add(item.getEquipmentName());
@GetMapping(value = "/selectEquipWarningTotal") });
@ApiOperation(httpMethod = "GET", value = "预警信息统计富文本", notes = "预警信息统计富文本")
public ResponseModel<Map<String, Object>> selectEquipWarningTotal(@RequestParam String STATION, @RequestParam String EQUIPMENTNAME) { // for (Map<String, Object> map : maps) {
List<String> gatewayIds = this.getGatewayIds(); // wxList.add(Integer.valueOf(map.get("危险").toString()));
Map<String, Object> maps = fanWaringRecordMapper.selectEquipWarningTotal(STATION, EQUIPMENTNAME, gatewayIds); // zyList.add(Integer.valueOf(map.get("注意").toString()));
return ResponseHelper.buildResponse(maps); // jgList.add(Integer.valueOf(map.get("警告").toString()));
} // list.add(map.get("EQUIPMENT_NAME").toString());
//
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false) // }
@GetMapping(value = "/selectWarningPoint")
@ApiOperation(httpMethod = "GET", value = "预警监测设备右侧预警重复列表", notes = "预警监测设备右侧预警重复列表") HashMap<String, Object> wxMapResult = new HashMap<>();
public ResponseModel<Page<FanWarningRecord>> selectFanWarningNum(@RequestParam String STATION, @RequestParam String EQUIPMENTNAME, @RequestParam Integer current, @RequestParam Integer size) { wxMapResult.put("data", wxList);
Page<FanWarningRecord> page = new Page<>(); wxMapResult.put("name", "危险");
page.setCurrent(current); HashMap<String, Object> zyMapResult = new HashMap<>();
page.setSize(size); zyMapResult.put("data", zyList);
List<String> gatewayIds = this.getGatewayIds(); zyMapResult.put("name", "注意");
List<FanWarningRecord> maps = fanWaringRecordMapper.selectWarningPoint(STATION, EQUIPMENTNAME, (current - 1) * size, size, gatewayIds); HashMap<String, Object> jgMapResult = new HashMap<>();
page.setRecords(maps); jgMapResult.put("data", jgList);
int total = fanWaringRecordMapper.selectWarningPointTotal(STATION, EQUIPMENTNAME); jgMapResult.put("name", "警告");
page.setTotal(total);
return ResponseHelper.buildResponse(page); Map<String, Object> resultMap = new HashMap<String, Object>();
} List<Map<String, Object>> hashMaps = Arrays.asList(wxMapResult, zyMapResult, jgMapResult);
resultMap.put("axisData", list);
private List<String> getGatewayIds() { resultMap.put("seriesData", hashMaps);
List<String> permissions = permissionService.getCurrentUserPermissions(); return ResponseHelper.buildResponse(resultMap);
if (Objects.isNull(permissions)) {
permissions = Collections.emptyList(); }
}
return permissions; @TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
} @GetMapping(value = "/selectEquipWarningTotal")
@ApiOperation(httpMethod = "GET", value = "预警信息统计富文本", notes = "预警信息统计富文本")
public ResponseModel<Map<String, Object>> selectEquipWarningTotal(@RequestParam String STATION,
@RequestParam String EQUIPMENTNAME) {
// List<String> gatewayIds = this.getGatewayIds();
// Map<String, Object> maps = fanWaringRecordMapper.selectEquipWarningTotal(STATION, EQUIPMENTNAME, gatewayIds);
QueryWrapper<FanWarningRecord> lambdaQw = new QueryWrapper<>();
lambdaQw.select("COUNT(1) AS c,warning_name AS warningname");
lambdaQw.lambda().eq(FanWarningRecord::getStation, STATION);
lambdaQw.lambda().eq(FanWarningRecord::getDisposotionState, "待确认");
lambdaQw.lambda().eq(FanWarningRecord::getEquipmentName, EQUIPMENTNAME);
lambdaQw.lambda().groupBy(FanWarningRecord::getEquipmentName);
lambdaQw.lambda().groupBy(FanWarningRecord::getWarningName);
List<Map<String, Object>> lists = fanWaringRecordMapper.selectMaps(lambdaQw);
Map<String, Object> maps = new HashMap<>();
maps.put("zhuyi", 0);
maps.put("weixian", 0);
maps.put("jinggao", 0);
int total = 0;
for (Map<String, Object> map : lists) {
if ("注意".equals(String.valueOf(map.get("warningname")))) {
maps.put("zhuyi", map.get("c"));
total+=Integer.valueOf(String.valueOf(map.get("c")));
} else if ("危险".equals(String.valueOf(map.get("warningname")))) {
maps.put("weixian", map.get("c"));
total+=Integer.valueOf(String.valueOf(map.get("c")));
} else if ("警告".equals(String.valueOf(map.get("warningname")))) {
maps.put("jinggao", map.get("c"));
total+=Integer.valueOf(String.valueOf(map.get("c")));
}
}
maps.put("total", total);
return ResponseHelper.buildResponse(maps);
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/selectWarningPoint")
@ApiOperation(httpMethod = "GET", value = "预警监测设备右侧预警重复列表", notes = "预警监测设备右侧预警重复列表")
public ResponseModel<Page<FanWarningRecord>> selectWarningPoint(@RequestParam String STATION,
@RequestParam String EQUIPMENTNAME, @RequestParam Integer current, @RequestParam Integer size) {
Page<FanWarningRecord> page = new Page<>();
page.setCurrent(current);
page.setSize(size);
// List<String> gatewayIds = this.getGatewayIds();
LambdaQueryWrapper<FanWarningRecord> lambdaQw = new LambdaQueryWrapper<>();
lambdaQw.eq(FanWarningRecord::getStation, STATION);
lambdaQw.eq(FanWarningRecord::getEquipmentName, EQUIPMENTNAME);
lambdaQw.eq(FanWarningRecord::getDisposotionState, "待确认");
int total = fanWaringRecordMapper.selectCount(lambdaQw);
page.setTotal(total);
lambdaQw.orderByDesc(FanWarningRecord::getTs);
String limit = "LIMIT " + (current - 1) * size + "," + size;
lambdaQw.last(limit);
List<FanWarningRecord> list = fanWaringRecordMapper.selectList(lambdaQw);
// List<FanWarningRecord> maps =
// fanWaringRecordMapper.selectWarningPoint(STATION, EQUIPMENTNAME, (current -
// 1) * size, size, gatewayIds);
page.setRecords(list);
return ResponseHelper.buildResponse(page);
}
private List<String> getGatewayIds() {
List<String> permissions = permissionService.getCurrentUserPermissions();
if (Objects.isNull(permissions)) {
permissions = Collections.emptyList();
}
return permissions;
}
} }
package com.yeejoin.amos.boot.module.jxiop.biz.controller; package com.yeejoin.amos.boot.module.jxiop.biz.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import java.util.ArrayList;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import java.util.Arrays;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvWarningRecordDto; import java.util.HashMap;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizPvWarningRecordServiceImpl; import java.util.List;
import io.swagger.annotations.Api; import java.util.Map;
import io.swagger.annotations.ApiOperation;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
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;
import javax.servlet.http.HttpServletRequest; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import java.util.List; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jxiop.biz.dto.IdxBizPvWarningRecordDto;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizFanPointProcessVariableClassification;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvPointProcessVariableClassification;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvPointProcessVariableClassificationMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.service.impl.IdxBizPvWarningRecordServiceImpl;
import com.yeejoin.amos.boot.module.jxiop.biz.tdMapper2.PvWaringRecordMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.FanWarningRecord;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvWarningRecord;
import com.yeejoin.amos.boot.module.jxiop.biz.tdengine.PvWarningRecord;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/** /**
* *
...@@ -30,6 +54,14 @@ public class IdxBizPvWarningRecordController extends BaseController { ...@@ -30,6 +54,14 @@ public class IdxBizPvWarningRecordController extends BaseController {
@Autowired @Autowired
IdxBizPvWarningRecordServiceImpl idxBizPvWarningRecordServiceImpl; IdxBizPvWarningRecordServiceImpl idxBizPvWarningRecordServiceImpl;
@Autowired
PvWaringRecordMapper pvWaringRecordMapper;
@Autowired
IdxBizPvPointProcessVariableClassificationMapper idxBizPvPointProcessVariableClassificationMapper;
/** /**
* 新增 * 新增
* *
...@@ -112,4 +144,161 @@ public class IdxBizPvWarningRecordController extends BaseController { ...@@ -112,4 +144,161 @@ public class IdxBizPvWarningRecordController extends BaseController {
public ResponseModel<List<IdxBizPvWarningRecordDto>> selectForList() { public ResponseModel<List<IdxBizPvWarningRecordDto>> selectForList() {
return ResponseHelper.buildResponse(idxBizPvWarningRecordServiceImpl.queryForIdxBizPvWarningRecordList()); return ResponseHelper.buildResponse(idxBizPvWarningRecordServiceImpl.queryForIdxBizPvWarningRecordList());
} }
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/selectFanWarningNum")
@ApiOperation(httpMethod = "GET", value = "查询各风机预警状况", notes = "查询各风机预警状况")
public ResponseModel<Map<String, Object>> selectFanWarningNum(@RequestParam String station) {
LambdaQueryWrapper<IdxBizPvPointProcessVariableClassification> wrapper = new LambdaQueryWrapper<>();
wrapper.select(IdxBizPvPointProcessVariableClassification::getSubarray);
wrapper.eq(IdxBizPvPointProcessVariableClassification::getStation, station);
wrapper.groupBy(IdxBizPvPointProcessVariableClassification::getSubarray);
wrapper.last(" ORDER BY RIGHT(SUBARRAY,6) desc");
List<IdxBizPvPointProcessVariableClassification> variableClassificationList = idxBizPvPointProcessVariableClassificationMapper
.selectList(wrapper);
QueryWrapper<PvWarningRecord> lambdaQw = new QueryWrapper<>();
lambdaQw.select("COUNT(1) AS c,subarray AS subarray,warning_name AS warningname");
lambdaQw.lambda().eq(PvWarningRecord::getStation, station);
lambdaQw.lambda().eq(PvWarningRecord::getDisposotionState, "待确认");
lambdaQw.lambda().groupBy(PvWarningRecord::getSubarray);
lambdaQw.lambda().groupBy(PvWarningRecord::getWarningName);
List<Map<String, Object>> lists = pvWaringRecordMapper.selectMaps(lambdaQw);
// Map<String, Object> resultMap = new HashMap<>();
// List<String> gatewayIds = this.getGatewayIds();
// List<Map<String, Object>> maps = fanWaringRecordMapper.selectFanWarningNum(station, gatewayIds);
// Map<String, Map<String, Object>> equipmentNameInfoMap = maps.stream()
// .collect(Collectors.toMap(t -> t.get("EQUIPMENT_NAME").toString(), t -> t));
List<Integer> wxList = new ArrayList<>();
List<Integer> zyList = new ArrayList<>();
List<Integer> jgList = new ArrayList<>();
List<String> list = new ArrayList<>();
Map<String, Map<String, Integer>> countMap = new HashMap<>();
for (Map<String, Object> map : lists) {
String subarray = String.valueOf(map.get("subarray"));
int count = Integer.valueOf(String.valueOf(map.get("c")));
String warningName = String.valueOf(map.get("warningname"));
Map<String, Integer> equipMap = countMap.get(subarray);
if (equipMap == null) {
equipMap = new HashMap<>();
}
equipMap.put(warningName, count);
countMap.put(subarray, equipMap);
}
variableClassificationList.forEach(item -> {
Map<String, Integer> equipMap = countMap.get(item.getSubarray());
if(equipMap!=null)
{
wxList.add(equipMap.get("危险") != null ? equipMap.get("危险") : 0);
zyList.add(equipMap.get("注意") != null ? equipMap.get("注意") : 0);
jgList.add(equipMap.get("警告") != null ? equipMap.get("警告") : 0);
}else
{
wxList.add(0);
zyList.add(0);
jgList.add(0);
}
list.add(item.getSubarray());
});
// for (Map<String, Object> map : maps) {
// wxList.add(Integer.valueOf(map.get("危险").toString()));
// zyList.add(Integer.valueOf(map.get("注意").toString()));
// jgList.add(Integer.valueOf(map.get("警告").toString()));
// list.add(map.get("EQUIPMENT_NAME").toString());
//
// }
HashMap<String, Object> wxMapResult = new HashMap<>();
wxMapResult.put("data", wxList);
wxMapResult.put("name", "危险");
HashMap<String, Object> zyMapResult = new HashMap<>();
zyMapResult.put("data", zyList);
zyMapResult.put("name", "注意");
HashMap<String, Object> jgMapResult = new HashMap<>();
jgMapResult.put("data", jgList);
jgMapResult.put("name", "警告");
Map<String, Object> resultMap = new HashMap<String, Object>();
List<Map<String, Object>> hashMaps = Arrays.asList(wxMapResult, zyMapResult, jgMapResult);
resultMap.put("axisData", list);
resultMap.put("seriesData", hashMaps);
return ResponseHelper.buildResponse(resultMap);
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/selectEquipWarningTotal")
@ApiOperation(httpMethod = "GET", value = "预警信息统计富文本", notes = "预警信息统计富文本")
public ResponseModel<Map<String, Object>> selectEquipWarningTotal(@RequestParam String STATION,
@RequestParam String EQUIPMENTNAME) {
// List<String> gatewayIds = this.getGatewayIds();
// Map<String, Object> maps = fanWaringRecordMapper.selectEquipWarningTotal(STATION, EQUIPMENTNAME, gatewayIds);
QueryWrapper<PvWarningRecord> lambdaQw = new QueryWrapper<>();
lambdaQw.select("COUNT(1) AS c,warning_name AS warningname");
lambdaQw.lambda().eq(PvWarningRecord::getStation, STATION);
lambdaQw.lambda().eq(PvWarningRecord::getDisposotionState, "待确认");
lambdaQw.lambda().eq(PvWarningRecord::getEquipmentName, EQUIPMENTNAME);
lambdaQw.lambda().groupBy(PvWarningRecord::getEquipmentName);
lambdaQw.lambda().groupBy(PvWarningRecord::getWarningName);
List<Map<String, Object>> lists = pvWaringRecordMapper.selectMaps(lambdaQw);
Map<String, Object> maps = new HashMap<>();
maps.put("zhuyi", 0);
maps.put("weixian", 0);
maps.put("jinggao", 0);
int total = 0;
for (Map<String, Object> map : lists) {
if ("注意".equals(String.valueOf(map.get("warningname")))) {
maps.put("zhuyi", map.get("c"));
total+=Integer.valueOf(String.valueOf(map.get("c")));
} else if ("危险".equals(String.valueOf(map.get("warningname")))) {
maps.put("weixian", map.get("c"));
total+=Integer.valueOf(String.valueOf(map.get("c")));
} else if ("警告".equals(String.valueOf(map.get("warningname")))) {
maps.put("jinggao", map.get("c"));
total+=Integer.valueOf(String.valueOf(map.get("c")));
}
}
maps.put("total", total);
return ResponseHelper.buildResponse(maps);
}
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping(value = "/selectWarningPoint")
@ApiOperation(httpMethod = "GET", value = "预警监测设备右侧预警重复列表", notes = "预警监测设备右侧预警重复列表")
public ResponseModel<Page<PvWarningRecord>> selectWarningPoint(@RequestParam String STATION,
@RequestParam String EQUIPMENTNAME, @RequestParam Integer current, @RequestParam Integer size) {
Page<PvWarningRecord> page = new Page<>();
page.setCurrent(current);
page.setSize(size);
// List<String> gatewayIds = this.getGatewayIds();
LambdaQueryWrapper<PvWarningRecord> lambdaQw = new LambdaQueryWrapper<>();
lambdaQw.eq(PvWarningRecord::getStation, STATION);
lambdaQw.eq(PvWarningRecord::getEquipmentName, EQUIPMENTNAME);
lambdaQw.eq(PvWarningRecord::getDisposotionState, "待确认");
int total = pvWaringRecordMapper.selectCount(lambdaQw);
page.setTotal(total);
lambdaQw.orderByDesc(PvWarningRecord::getTs);
String limit = "LIMIT " + (current - 1) * size + "," + size;
lambdaQw.last(limit);
List<PvWarningRecord> list = pvWaringRecordMapper.selectList(lambdaQw);
// List<PvWarningRecord> maps =
// fanWaringRecordMapper.selectWarningPoint(STATION, EQUIPMENTNAME, (current -
// 1) * size, size, gatewayIds);
page.setRecords(list);
return ResponseHelper.buildResponse(page);
}
} }
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
</if> </if>
</where> </where>
ORDER BY ORDER BY
log.CREATE_DATE DESC log.REC_DATE DESC
LIMIT #{start}, #{size} LIMIT #{start}, #{size}
</select> </select>
......
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