Commit 817bb91e authored by hezhuozhi's avatar hezhuozhi

27467 人大金仓数据库适配 将所有的`去除

parent 0b52b1d4
...@@ -87,8 +87,6 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto ...@@ -87,8 +87,6 @@ public class PreparationMoneyServiceImpl extends BaseService<PreparationMoneyDto
@Autowired @Autowired
PeasantHouseholdMapper peasantHouseholdMapper; PeasantHouseholdMapper peasantHouseholdMapper;
@Autowired @Autowired
HygfReplenishmentMapper hygfReplenishmentMapper;
@Autowired
private WorkFlowService workFlowService; private WorkFlowService workFlowService;
@Autowired @Autowired
private HygfPreparationMoneyAuditingServiceImpl hygfPreparationMoneyAuditingService; private HygfPreparationMoneyAuditingServiceImpl hygfPreparationMoneyAuditingService;
......
...@@ -2,9 +2,7 @@ package com.yeejoin.amos.boot.module.jxiop.api.entity; ...@@ -2,9 +2,7 @@ package com.yeejoin.amos.boot.module.jxiop.api.entity;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors; import lombok.experimental.Accessors;
import java.util.Date; import java.util.Date;
...@@ -36,8 +34,8 @@ public class Region { ...@@ -36,8 +34,8 @@ public class Region {
/** /**
* 等级 * 等级
*/ */
@TableField("\"LEVEL\"") @TableField("LEVEL_")
private String level; private String level_;
/** /**
* 上级编码 * 上级编码
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
hp.sequence_nbr as id, hp.sequence_nbr as id,
hp.platform_company_id AS platformCompanyId, hp.platform_company_id AS platformCompanyId,
hp.number, hp.number,
hp.`name`, hp.name,
hp.sex, hp.sex,
hp.ID_number AS idNumber, hp.ID_number AS idNumber,
hp.expiry_time AS expiryTime, hp.expiry_time AS expiryTime,
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
resultType="com.yeejoin.amos.boot.module.jxiop.api.dto.EquipMessageExport"> resultType="com.yeejoin.amos.boot.module.jxiop.api.dto.EquipMessageExport">
SELECT SELECT
(@i:= @i+1) as numSort, (@i:= @i+1) as numSort,
hp.`name`, hp.name,
hp.ID_number AS idNumber, hp.ID_number AS idNumber,
hpd.type, hpd.type,
hpd.name as equipName, hpd.name as equipName,
......
...@@ -20,12 +20,12 @@ ...@@ -20,12 +20,12 @@
<select id="getBoosterStationInfo" resultType="java.util.Map"> <select id="getBoosterStationInfo" resultType="java.util.Map">
select select
`sequence_nbr` as id, sequence_nbr as id,
`gateway_id` as gatewayId, gateway_id as gatewayId,
`booster_name` as text, booster_name as text,
booster_name as boosterName, booster_name as boosterName,
`booster_code` as boosterCode, booster_code as boosterCode,
`sort` as value sort as value
from booster_station_info from booster_station_info
<where> <where>
<if test="gatewayId != null and gatewayId != ''"> <if test="gatewayId != null and gatewayId != ''">
...@@ -44,12 +44,12 @@ ...@@ -44,12 +44,12 @@
<select id="getBoosterStationInfo2" resultType="java.util.Map"> <select id="getBoosterStationInfo2" resultType="java.util.Map">
select * from select * from
((select ((select
`sequence_nbr` as id, sequence_nbr as id,
`gateway_id` as gatewayId, gateway_id as gatewayId,
`booster_name` as text, booster_name as text,
booster_name as boosterName, booster_name as boosterName,
`booster_code` as boosterCode, booster_code as boosterCode,
`sort` as value sort as value
from booster_station_info from booster_station_info
<where> <where>
sort != 2 sort != 2
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
union all union all
(select (select
'99999' as id, '99999' as id,
`gateway_id` as gatewayId, gateway_id as gatewayId,
'1主变' as text, '1主变' as text,
'1主变' as boosterName, '1主变' as boosterName,
'2' as boosterCode, '2' as boosterCode,
...@@ -84,12 +84,12 @@ ...@@ -84,12 +84,12 @@
<select id="getMajorBoosterStationInfo" resultType="java.util.Map"> <select id="getMajorBoosterStationInfo" resultType="java.util.Map">
select select
`sequence_nbr` as id, sequence_nbr as id,
`gateway_id` as gatewayId, gateway_id as gatewayId,
`booster_name` as text, booster_name as text,
booster_name as boosterName, booster_name as boosterName,
`booster_code` as boosterCode, booster_code as boosterCode,
`sort` as value sort as value
from booster_station_info from booster_station_info
<where> <where>
<if test="gatewayId != null and gatewayId != ''"> <if test="gatewayId != null and gatewayId != ''">
...@@ -103,12 +103,12 @@ ...@@ -103,12 +103,12 @@
<select id="getMajorBoosterStationInfoBySort" resultType="java.util.Map"> <select id="getMajorBoosterStationInfoBySort" resultType="java.util.Map">
select select
`sequence_nbr` as id, sequence_nbr as id,
`gateway_id` as gatewayId, gateway_id as gatewayId,
`booster_name` as text, booster_name as text,
booster_name as boosterName, booster_name as boosterName,
`booster_code` as boosterCode, booster_code as boosterCode,
`sort` as value sort as value
from booster_station_info from booster_station_info
where where
sort = #{sort} sort = #{sort}
...@@ -119,12 +119,12 @@ ...@@ -119,12 +119,12 @@
<select id="getBoosterStationInfoNormal" resultType="java.util.Map"> <select id="getBoosterStationInfoNormal" resultType="java.util.Map">
select select
`sequence_nbr` as id, sequence_nbr as id,
`gateway_id` as gatewayId, gateway_id as gatewayId,
`booster_name` as text, booster_name as text,
booster_name as boosterName, booster_name as boosterName,
`booster_code` as boosterCode, booster_code as boosterCode,
`sort` as value sort as value
from booster_station_info from booster_station_info
<where> <where>
<if test="gatewayId != null and gatewayId != ''"> <if test="gatewayId != null and gatewayId != ''">
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<select id="getEXPersonUser" resultType="com.yeejoin.amos.boot.module.jxiop.api.dto.EXPersonUser"> <select id="getEXPersonUser" resultType="com.yeejoin.amos.boot.module.jxiop.api.dto.EXPersonUser">
select select
person_account.`name` name, person_account.name name,
person_account.job_number jobNumber, person_account.job_number jobNumber,
person_account.project_name projectName, person_account.project_name projectName,
person_account.project_department_name departmentName, person_account.project_department_name departmentName,
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
<select id="getEXPersonUserAll" resultType="com.yeejoin.amos.boot.module.jxiop.api.dto.EXPersonUser"> <select id="getEXPersonUserAll" resultType="com.yeejoin.amos.boot.module.jxiop.api.dto.EXPersonUser">
select select
person_account.`name` name, person_account.name name,
person_account.job_number jobNumber, person_account.job_number jobNumber,
person_account.project_name projectName, person_account.project_name projectName,
person_account.project_department_name departmentName, person_account.project_department_name departmentName,
...@@ -296,7 +296,7 @@ ...@@ -296,7 +296,7 @@
<select id="getPersonStatistics" resultType="com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics"> <select id="getPersonStatistics" resultType="com.yeejoin.amos.boot.module.jxiop.api.entity.StationQrCodeStatistics">
SELECT SELECT
project_org_code AS `code`, project_org_code AS code,
count( qrcode_color = 'red' OR NULL ) AS redNum, count( qrcode_color = 'red' OR NULL ) AS redNum,
count( qrcode_color = 'yellow' OR NULL ) AS yellowNum, count( qrcode_color = 'yellow' OR NULL ) AS yellowNum,
count( qrcode_color = 'green' OR NULL ) AS greenNum, count( qrcode_color = 'green' OR NULL ) AS greenNum,
...@@ -310,7 +310,7 @@ ...@@ -310,7 +310,7 @@
<select id="getPersonDetailInfoByObjectId" resultType="java.util.Map"> <select id="getPersonDetailInfoByObjectId" resultType="java.util.Map">
SELECT SELECT
IFNULL(b.`name`, '') as `name`, IFNULL(b.name, '') as name,
IFNULL(a.phone, '') as phone, IFNULL(a.phone, '') as phone,
IFNULL(a.post_name, '') as postName, IFNULL(a.post_name, '') as postName,
IFNULL(b.project_name, '') as stationName, IFNULL(b.project_name, '') as stationName,
......
...@@ -173,9 +173,9 @@ ...@@ -173,9 +173,9 @@
<update id="updateYardByProjectOrgCode"> <update id="updateYardByProjectOrgCode">
<foreach collection="list" item="item" separator=";"> <foreach collection="list" item="item" separator=";">
update update
`station_basic` station_basic
set set
`qrcode_color` = #{item.qrcodeColor}, qrcode_color = #{item.qrcodeColor},
<if test="item.level != null and item.level != ''"> <if test="item.level != null and item.level != ''">
risk_Level = #{item.level}, risk_Level = #{item.level},
</if> </if>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
AND privilege_company.COMPANY_TYPE=#{companyType} AND privilege_company.COMPANY_TYPE=#{companyType}
</if> </if>
<if test="level != null and level != ''"> <if test="level != null and level != ''">
AND privilege_company.`LEVEL`=#{level} AND privilege_company.LEVEL_=#{level}
</if> </if>
<if test="companyOrgCode != null "> <if test="companyOrgCode != null ">
AND privilege_company.ORG_CODE IN AND privilege_company.ORG_CODE IN
......
...@@ -359,8 +359,8 @@ ...@@ -359,8 +359,8 @@
) )
SELECT SELECT
a.SEQUENCE_NBR AS sequenceNbr, a.SEQUENCE_NBR AS sequenceNbr,
COALESCE(a.NAME, '') AS `name`, COALESCE(a.NAME, '') AS name,
COALESCE(a.CODE, '') AS `code`, COALESCE(a.CODE, '') AS code,
COALESCE(a.PARENT_ID, '') AS parentId, COALESCE(a.PARENT_ID, '') AS parentId,
COALESCE(a.LONGITUDE, '') AS longitude, COALESCE(a.LONGITUDE, '') AS longitude,
COALESCE(a.LATITUDE, '') AS latitude, COALESCE(a.LATITUDE, '') AS latitude,
...@@ -391,7 +391,7 @@ ...@@ -391,7 +391,7 @@
count( 1 ) AS yearNum count( 1 ) AS yearNum
FROM FROM
amos_mcb.mcb_warning_warning_info amos_mcb.mcb_warning_warning_info
Left join mcb_warning_base_source_attribution mwbsa on mwbsa.`CODE` = mcb_warning_warning_info.SOURCE_ATTRIBUTION Left join mcb_warning_base_source_attribution mwbsa on mwbsa.CODE = mcb_warning_warning_info.SOURCE_ATTRIBUTION
WHERE WHERE
YEAR(CREATE_DATE) = YEAR(CURDATE()) YEAR(CREATE_DATE) = YEAR(CURDATE())
<if test="province != null and province != '' "> <if test="province != null and province != '' ">
...@@ -408,7 +408,7 @@ ...@@ -408,7 +408,7 @@
count( 1 ) AS monNum count( 1 ) AS monNum
FROM FROM
amos_mcb.mcb_warning_warning_info amos_mcb.mcb_warning_warning_info
Left join mcb_warning_base_source_attribution mwbsa on mwbsa.`CODE` = mcb_warning_warning_info.SOURCE_ATTRIBUTION Left join mcb_warning_base_source_attribution mwbsa on mwbsa.CODE = mcb_warning_warning_info.SOURCE_ATTRIBUTION
WHERE WHERE
MONTH(CREATE_DATE) = MONTH(CURDATE()) MONTH(CREATE_DATE) = MONTH(CURDATE())
<if test="province != null and province != '' "> <if test="province != null and province != '' ">
...@@ -425,7 +425,7 @@ ...@@ -425,7 +425,7 @@
mwbsa.PROVINCE mwbsa.PROVINCE
FROM FROM
amos_mcb.mcb_warning_warning_info amos_mcb.mcb_warning_warning_info
Left join mcb_warning_base_source_attribution mwbsa on mwbsa.`CODE` = mcb_warning_warning_info.SOURCE_ATTRIBUTION Left join mcb_warning_base_source_attribution mwbsa on mwbsa.CODE = mcb_warning_warning_info.SOURCE_ATTRIBUTION
WHERE WHERE
DATE_FORMAT(CREATE_DATE,'%Y-%m-%d') = CURDATE() DATE_FORMAT(CREATE_DATE,'%Y-%m-%d') = CURDATE()
<if test="province != null and province != '' "> <if test="province != null and province != '' ">
......
package com.yeejoin.amos.boot.module.jxiop.biz.service.impl; package com.yeejoin.amos.boot.module.jxiop.biz.service.impl;
import com.alibaba.fastjson.JSON;
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.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...@@ -19,13 +18,10 @@ import com.yeejoin.amos.boot.module.jxiop.biz.initdata.StationCacheDataInit; ...@@ -19,13 +18,10 @@ import com.yeejoin.amos.boot.module.jxiop.biz.initdata.StationCacheDataInit;
import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.SjglZsjZsbtzMapper; import com.yeejoin.amos.boot.module.jxiop.biz.mapper2.SjglZsjZsbtzMapper;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.elasticsearch.action.search.SearchRequestBuilder;
import org.elasticsearch.action.search.SearchResponse;
import org.elasticsearch.index.query.BoolQueryBuilder; import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.MatchPhraseQueryBuilder; import org.elasticsearch.index.query.MatchPhraseQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders; import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.aggregations.Aggregation; import org.elasticsearch.search.aggregations.Aggregation;
import org.elasticsearch.search.aggregations.AggregationBuilder;
import org.elasticsearch.search.aggregations.AggregationBuilders; import org.elasticsearch.search.aggregations.AggregationBuilders;
import org.elasticsearch.search.aggregations.Aggregations; import org.elasticsearch.search.aggregations.Aggregations;
import org.elasticsearch.search.aggregations.bucket.terms.ParsedStringTerms; import org.elasticsearch.search.aggregations.bucket.terms.ParsedStringTerms;
...@@ -229,7 +225,7 @@ public class CommonServiceImpl { ...@@ -229,7 +225,7 @@ public class CommonServiceImpl {
public List<StationCacheInfoDto> getListStationCacheInfoDto() { public List<StationCacheInfoDto> getListStationCacheInfoDto() {
List<StationCacheInfoDto> stationCacheInfoDtos = new ArrayList<>(); List<StationCacheInfoDto> stationCacheInfoDtos = new ArrayList<>();
List<Region> regionList = regionMapper.selectList(new LambdaQueryWrapper<Region>().eq(Region::getLevel, 1)); List<Region> regionList = regionMapper.selectList(new LambdaQueryWrapper<Region>().eq(Region::getLevel_, 1));
List<MapRegion> mapRegionList = mapRegionMapper.selectList(new QueryWrapper<MapRegion>().isNotNull("name")); List<MapRegion> mapRegionList = mapRegionMapper.selectList(new QueryWrapper<MapRegion>().isNotNull("name"));
List<StationBasic> stationBasicList = stationBasicMapper.selectList(new QueryWrapper<StationBasic>().isNotNull("belong_area").isNotNull("fan_gateway_id")); List<StationBasic> stationBasicList = stationBasicMapper.selectList(new QueryWrapper<StationBasic>().isNotNull("belong_area").isNotNull("fan_gateway_id"));
for (int i = 0; i < stationBasicList.size(); i++) { for (int i = 0; i < stationBasicList.size(); i++) {
......
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