Commit fe0ce735 authored by lilongyang's avatar lilongyang

Merge branch 'developer' of http://36.40.66.175:5000/moa/jxdj_zx/amos-boot-zx-biz into developer

parents 579c077f c91baf41
......@@ -1525,7 +1525,7 @@
and update_date >=
#{startTime} and #{endTime} >= update_date
<if test="orgCode != null and orgCode != ''">
and wes.biz_org_code like concat(#{orgCode}, "%")
and wes.biz_org_code like concat(#{orgCode}, '%')
</if>
) as allNum,
(
......@@ -1539,7 +1539,7 @@
where
wed.code like '92010800%'
<if test="orgCode != null and orgCode != ''">
and wes.biz_org_code like concat(#{orgCode}, "%")
and wes.biz_org_code like concat(#{orgCode}, '%')
</if>
) as allEqu) as allEqu,
(
......@@ -1558,7 +1558,7 @@
and wesi.update_date >=
#{startTime} and #{endTime} >= update_date
<if test="orgCode != null and orgCode != ''">
and wes.biz_org_code like concat(#{orgCode}, "%")
and wes.biz_org_code like concat(#{orgCode}, '%')
</if>
) as startNum) as startNum
</select>
......
......@@ -65,7 +65,7 @@ public class IcbcEnum {
@Getter
@NoArgsConstructor
@AllArgsConstructor
enum ProtocolStatus {
public static enum ProtocolStatus {
NOT_EFFECTIVE("未生效", "0"),
......@@ -86,5 +86,17 @@ public class IcbcEnum {
*/
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,10 +32,10 @@ public class HygfIcbcRecordQueryDTO {
private String phone;
@ApiModelProperty (value = "区域公司")
private String regionalCompaniesSeq;
private String regionalCompaniesName;
@ApiModelProperty (value = "所属地址")
private String address;
private String addressName;
private Integer current;
......
......@@ -15,7 +15,6 @@ import java.util.List;
*/
public interface RegionalCompaniesMapper extends BaseMapper<RegionalCompanies> {
List<RegionalCompanies> selectListData(@Param("regionalCompaniesName") String regionalCompaniesName,@Param("unitId")Long unitId,@Param("sequenceNbr")Long sequenceNbr);
RegionalCompanies selectByid(@Param("sequenceNbr")Long sequenceNbr);
RegionalCompanies selectRegionName(@Param("sequenceNbr")Long sequenceNbr);
......
......@@ -44,7 +44,7 @@
</if>
</where>
ORDER BY u.audit_status ,u.rec_date DESC
ORDER BY u.audit_status ,u.rec_date DESC,u.sequence_nbr DESC
</select>
......
......@@ -10,7 +10,8 @@
</sql>
<select id="listObjectCount" resultType="integer">
SELECT count(1)
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>
......@@ -28,21 +29,22 @@
<if test="param.phone != null and param.phone != ''">
AND ph.telephone LIKE CONCAT('%', #{param.phone}, '%')
</if>
<if test="param.regionalCompaniesSeq != null and param.regionalCompaniesSeq != ''">
AND ph.regional_companies_seq = #{param.regionalCompaniesSeq}
<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>
GROUP BY
ph.amos_user_id
</select>
<select id="listObject" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.HygfIcbcRecordDTO">
SELECT DISTINCT
icbc.sequence_nbr,
ph.owners_name as custName,
ph.telephone as phone,
ph.id_card,
ifnull(icbc.cust_name, ph.owners_name) as custName,
ifnull(icbc.phone, ph.telephone) as phone,
ifnull(icbc.id_card, ph.id_card) as idCard,
ph.amos_user_id,
icbc.open_account_status,
icbc.protocol_status
......@@ -63,8 +65,11 @@
<if test="param.phone != null and param.phone != ''">
AND ph.telephone LIKE CONCAT('%', #{param.phone}, '%')
</if>
<if test="param.regionalCompaniesSeq != null and param.regionalCompaniesSeq != ''">
AND ph.regional_companies_seq = #{param.regionalCompaniesSeq}
<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>
......
......@@ -39,7 +39,7 @@
and std_user_biz.amos_user_name like concat(concat('%',#{dto.amosUserName}),'%')
</if>
<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>
......
......@@ -2,7 +2,7 @@
<!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">
<select id="queryPage" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.PowerStationDto">
select * from (select
select * from (select DISTINCT
hygf_power_station.*,
b.initiate_status,
b.contract_lock_id,
......@@ -33,7 +33,7 @@
<if test="processStatus != null and processStatus != ''">
and hygf_power_station.process_status = #{processStatus}
</if>
GROUP BY hygf_peasant_household.sequence_nbr
<!-- GROUP BY hygf_peasant_household.sequence_nbr-->
ORDER BY hygf_power_station.rec_date desc
) a
</select>
......
......@@ -41,7 +41,7 @@ LEFT JOIN hygf_document_station on hygf_document_station.station_id=hygf_peasan
</select>
<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.owners_name as ownersName,
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
and hygf_peasant_household.preparation_money_state not in ('待发货','待补货','暂存发货') and preparation_money_state is not null and preparation_money_state != ''
</if>
</where>
GROUP BY hygf_peasant_household.sequence_nbr
<!-- GROUP BY hygf_peasant_household.sequence_nbr-->
<if test=" preparationMoneyState == 1 ">
order by hygf_preparation_money.delivery_time DESC
</if>
......
......@@ -3,32 +3,60 @@
<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 * 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
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
hygf_regional_companies.*,(
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 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>
......@@ -42,20 +70,18 @@
select
(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
(
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 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 and hygf_regional_companies.sequence_nbr=#{sequenceNbr}
......@@ -65,24 +91,42 @@
</select>
<select id="selectRegionName" resultType="com.yeejoin.amos.boot.module.hygf.api.entity.RegionalCompanies">
<!-- select-->
<!-- privilege_company.COMPANY_CODE companyCode,-->
<!-- privilege_company.COMPANY_NAME regionalCompaniesName,-->
<!-- privilege_company.ORG_CODE regionalCompaniesCode,-->
<!-- (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 privilege_company where privilege_company.SEQUENCE_NBR=#{sequenceNbr}-->
select
privilege_company.COMPANY_CODE companyCode,
privilege_company.COMPANY_NAME regionalCompaniesName,
privilege_company.ORG_CODE regionalCompaniesCode,
(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
(
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}
</select>
......
......@@ -17,7 +17,7 @@
and privilege_user_org_role.ROLE_SEQ=#{roleId}
<if test="orgCode!=null">
and privilege_company.ORG_CODE like concat(#{orgCode},"%")
and privilege_company.ORG_CODE like concat(#{orgCode},'%')
</if>
ORDER BY privilege_agency_user.USER_ID DESC
</select>
......
......@@ -26,7 +26,7 @@ from privilege_company where IS_DELETED=0 and AGENCY_CODE='JXIOP'
and privilege_company.COMPANY_TYPE=#{dto.companyType}
</if>
<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 test="dto.comid!=null">
and privilege_company.SEQUENCE_NBR !=#{dto.comid}
......
......@@ -4,7 +4,7 @@
<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">
and ORG_CODE not in
......
......@@ -85,14 +85,14 @@ public class HygfIcbcController extends BaseController {
return hygfIcbcService.registerWalletCallback(request, response);
}
@TycloudOperation (ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping (value = "/{sequenceNbr}")
@ApiOperation (httpMethod = "GET", value = "根据sequenceNbr查询注册电子钱包", notes = "注册电子钱包")
public ResponseModel<HygfIcbcRecordDTO> getObject(@PathVariable String sequenceNbr) {
return ResponseHelper.buildResponse(hygfIcbcService.getObject(Long.valueOf(sequenceNbr)));
@TycloudOperation (ApiLevel = UserType.AGENCY)
@GetMapping (value = "/{userId}")
@ApiOperation (httpMethod = "GET", value = "根据农户userId查询注册电子钱包", notes = "注册电子钱包")
public ResponseModel<HygfIcbcRecordDTO> getObject(@PathVariable String userId) {
return ResponseHelper.buildResponse(hygfIcbcService.getObject(userId));
}
@TycloudOperation (ApiLevel = UserType.AGENCY, needAuth = false)
@TycloudOperation (ApiLevel = UserType.AGENCY)
@GetMapping (value = "/list")
@ApiOperation (httpMethod = "GET", value = "聚富通电子钱包列表查询", notes = "聚富通电子钱包列表查询")
@UserLimits
......
......@@ -248,4 +248,4 @@ spring.elasticsearch.rest.password=123456
spring.elasticsearch.rest.read-timeout=30000
## 聚富通 配置
hygf.icbc.callbackUrl=http://47.92.234.253:8088/hygf/icbc/notify
\ No newline at end of file
hygf.icbc.callbackUrl=https://yth.yunqingtech.com/hygf/icbc/notify
\ No newline at end of file
......@@ -160,7 +160,7 @@
</if>
</where>
ORDER BY
log.CREATE_DATE DESC
log.REC_DATE DESC
LIMIT #{start}, #{size}
</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