Commit 51ccd7ab authored by zhangyingbin's avatar zhangyingbin

修改国产数据库适配

parent ee379411
......@@ -36,7 +36,7 @@
<select id="queryNearlyCount" resultType="java.util.Map">
SELECT
DATE_ADD(#{beginDate},INTERVAL -7 DAY) dateTime,
DATE_ADD(#{beginDate},INTERVAL -7 DAY) "dateTime",
sum( CASE WHEN
father_alert is null THEN 1 ELSE 0 END ) majorAlertCount
FROM
......@@ -56,7 +56,7 @@
</if>
UNION ALL
SELECT
DATE_ADD(#{beginDate},INTERVAL -6 DAY) dateTime,
DATE_ADD(#{beginDate},INTERVAL -6 DAY) "dateTime",
sum(
CASE WHEN father_alert is null THEN 1 ELSE 0 END ) majorAlertCount
FROM
......@@ -76,7 +76,7 @@
</if>
UNION ALL
SELECT
DATE_ADD(#{beginDate},INTERVAL -5 DAY) dateTime,
DATE_ADD(#{beginDate},INTERVAL -5 DAY) "dateTime",
sum(
CASE WHEN father_alert is null THEN 1 ELSE 0 END ) majorAlertCount
FROM
......@@ -96,7 +96,7 @@
</if>
UNION ALL
SELECT
DATE_ADD(#{beginDate},INTERVAL -4 DAY) dateTime,
DATE_ADD(#{beginDate},INTERVAL -4 DAY) "dateTime",
sum(
CASE WHEN father_alert is null THEN 1 ELSE 0 END ) majorAlertCount
FROM
......@@ -116,7 +116,7 @@
</if>
UNION ALL
SELECT
DATE_ADD(#{beginDate},INTERVAL -3 DAY) dateTime,
DATE_ADD(#{beginDate},INTERVAL -3 DAY) "dateTime",
sum(
CASE WHEN father_alert is null THEN 1 ELSE 0 END ) majorAlertCount
FROM
......@@ -136,7 +136,7 @@
</if>
UNION ALL
SELECT
DATE_ADD(#{beginDate},INTERVAL -2 DAY) dateTime,
DATE_ADD(#{beginDate},INTERVAL -2 DAY) "dateTime",
sum(
CASE WHEN father_alert is null THEN 1 ELSE 0 END ) majorAlertCount
FROM
......@@ -156,7 +156,7 @@
</if>
UNION ALL
SELECT
DATE_ADD(#{beginDate},INTERVAL -1 DAY) dateTime,
DATE_ADD(#{beginDate},INTERVAL -1 DAY) "dateTime",
sum(
CASE WHEN father_alert is null THEN 1 ELSE 0 END ) majorAlertCount
FROM
......@@ -546,7 +546,7 @@
<when test="isHistory == true">
AND a.alert_status = 1
AND
DATE_SUB(CURDATE(), INTERVAL 7 DAY) <![CDATA[ <= ]]> date(a.call_time)
DATE_SUB(CURDATE(), INTERVAL 7 DAY) <![CDATA[ <= ]]> a.call_time
</when>
<otherwise>
AND a.alert_status = 0
......
......@@ -4,7 +4,7 @@
<select id="queryIntegirtyByAppId" resultType="java.lang.Double">
SELECT AVG(integrity) AS score_avg FROM tz_cylinder_filling_record t where t.app_id = #{appId} AND
DATE_SUB(CURDATE(), INTERVAL 30 DAY) <![CDATA[ <= ]]> date(t.sync_date);
DATE_SUB(CURDATE(), INTERVAL 30 DAY) <![CDATA[ <= ]]> t.sync_date;
</select>
<select id="getFillingSum" resultType="java.lang.Double">
......
package com.yeejoin.amos.boot.module.tzs.biz.config;
import com.baomidou.mybatisplus.annotation.DbType;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
......@@ -13,6 +14,14 @@ public class MybatisPlusConfig {
{
PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
paginationInterceptor.setLimit(50000);
paginationInterceptor.setDialectType(DbType.POSTGRE_SQL.getDb());
return paginationInterceptor;
}
// @Bean
// public MybatisPlusInterceptor mybatisPlusInterceptor() {
// MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
// interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.H2));
// return interceptor;
// }
}
#DB properties:
spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.url=jdbc:postgresql://172.16.10.213:5432/per_tzs_amos_tzs_biz?currentSchema=per_tzs_amos_tzs_biz
spring.datasource.username=vbadmin
spring.datasource.driver-class-name=cn.com.vastbase.Driver
spring.datasource.url=jdbc:vastbase://36.46.137.116:5432/per_tzs_amos_tzs_biz?currentSchema=amos_tzs_biz
spring.datasource.username=admin
spring.datasource.password=Yeejoin@2023
#eureka properties:
eureka.instance.hostname= eureka
eureka.instance.prefer-ip-address = true
eureka.client.serviceUrl.defaultZone =http://36.46.151.113:10001/eureka/
eureka.instance.ip-address = 172.16.3.133
#DB properties:
#spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#spring.datasource.url=jdbc:mysql://172.16.10.210:53306/${TZS_BIZ_DATABASE}?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
#spring.datasource.username=${MYSQL_ROOT_USER}
#spring.datasource.password=${MYSQL_ROOT_PASSWORD}
#eureka prioperties:
#eureka.client.serviceUrl.defaultZone=http://172.16.10.210:10001/eureka/
#eureka.client.register-with-eureka=true
#eureka.client.fetch-registry=true
#eureka.client.healthcheck.enabled=true
#ribbon.eureka.enabled=true
#eureka.instance.hostname=${spring.cloud.client.ip-address}
#eureka.instance.prefer-ip-address=true
#eureka.instance.instance-id=${spring.cloud.client.ip-address}:${spring.application.name}:${server.port}
#eureka.instance.lease-expiration-duration-in-seconds=10
#eureka.instance.lease-renewal-interval-in-seconds=5
#management.endpoint.health.show-details=always
#management.endpoints.web.exposure.include=*
#
#eureka.instance.prefer-ip-address = true
#eureka.instance.ip-address = 172.16.10.210
eureka.client.service-url.defaultZone =http://172.16.10.210:10001/eureka/
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.health-check-url=http://172.16.3.34:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://172.16.3.34:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://172.16.3.34:${server.port}${server.servlet.context-path}/doc.html
eureka.instance.ip-address = 172.16.3.34
## ES properties:
biz.elasticsearch.address=36.46.151.113
......@@ -17,8 +44,10 @@ spring.data.elasticsearch.cluster-name=docker-cluster
spring.data.elasticsearch.cluster-nodes=${biz.elasticsearch.address}:9300
spring.elasticsearch.rest.uris=http://${biz.elasticsearch.address}:9200
elasticsearch.username=elastic
elasticsearch.password=123456
elasticsearch.username= elastic
elasticsearch.password= 123456
## unit(h)
alertcall.es.synchrony.time=48
......@@ -26,8 +55,8 @@ alertcall.es.synchrony.time=48
#redis properties:
spring.redis.database=1
spring.redis.host=36.46.151.113
spring.redis.port=16379
spring.redis.host=172.16.10.210
spring.redis.port=6379
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1
......@@ -43,9 +72,12 @@ emqx.user-name=super
emqx.password=123456
emqx.keepAliveInterval=1000
tzs.cti.appkey=4e805006-3fef-ae43-3915-a153731007c4
tzs.cti.secretkey=7bd29115-99ee-4f7d-1fb1-7c4719d5f43a
tzs.cti.url=http://36.46.151.113:8000
tzs.cti.url=http://36.41.172.83:8000
##wechatToken
......@@ -87,16 +119,26 @@ flc.sms.tempCode=SMS_TZS_0001
## \u9884\u8B66\u901A\u77E5\u6A21\u677Fid
## ??????id
tzs.wechat.tempId.warning=-pHsHLIjW8j-_AemoZycf6Dmu6iYc-YWWaJ0cAPGeUY
##\u7763\u67E5\u6574\u6539\u901A\u77E5
##??????
tzs.wechat.tempId.supervise=P5XGbszS2Pc6kynvGjzPpZ--ikAwDZo6O7WdJ2EUxtE
## \u516C\u4F17\u53F7\u6D4B\u8BD5\u7528\u6237id\uFF08\u5E73\u53F0userId\uFF09
## ???????id???userId?
tzs.wechat.test.userId=3413513
fileserver.domain=https://rpm.yeeamos.com:8888/
##new properties
org.filter.group.seq=1564150103147573249
fileserver.domain=http://172.16.10.210:19000/
log.level=INFO
duty.seats.role.ids=1585956200472674305,1585956257590706177
## ???? properties:
rule.definition.load=false
##rule.definition.model-package=com.yeejoin.amos.boot.module.jcs.api.dto
rule.definition.default-agency=tzs
rule.definition.local-ip=172.16.10.210
\ No newline at end of file
......@@ -24,6 +24,11 @@
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- &lt;!&ndash; ELK管理 &ndash;&gt;-->
<!-- <appender name="ELK" class="net.logstash.logback.appender.LogstashTcpSocketAppender">-->
<!-- <destination>172.16.10.210:4560</destination>-->
<!-- <encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>-->
<!-- </appender>-->
<!-- show parameters for hibernate sql 专为 Hibernate 定制
<logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" />
<logger name="org.hibernate.type.descriptor.sql.BasicExtractor" level="DEBUG" />
......@@ -43,10 +48,11 @@
<logger name="org.apache.activemq" level="INFO"/>
<logger name="org.typroject" level="INFO"/>
<logger name="com.yeejoin" level="INFO"/>
<logger name="org.apache.http" level="ERROR"/>
<!-- 日志输出级别 -->
<root level="DEBUG">
<!-- <appender-ref ref="FILE" /> -->
<appender-ref ref="STDOUT" />
<appender-ref ref="ELK" />
</root>
</configuration>
\ No newline at end of file
......@@ -50,15 +50,16 @@
<dependency>
<groupId>cn.com.vastdata</groupId>
<artifactId>vastbase</artifactId>
<version>1.0.0.1</version>
<version>1.0.0.2</version>
</dependency>
<!-- LOG4J -->
<!-- Logstash -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
<scope>compile</scope>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>6.3</version>
</dependency>
</dependencies>
<dependencyManagement>
......
......@@ -4,13 +4,13 @@
<select id="queryCompanyPage" resultType="com.yeejoin.amos.boot.module.ugp.api.entity.Company">
select * from tz_ugp_company
select * from tz_ugp_company co
<where>
<if test="companyParam.name != '' and companyParam.name != null">
and `name` like concat('%',#{companyParam.name},'%')
and co.name like concat('%',#{companyParam.name},'%')
</if>
<if test="companyParam.type != '' and companyParam.type != null">
and `type` like concat('%',#{companyParam.type},'%')
and co.type like concat('%',#{companyParam.type},'%')
</if>
</where>
</select>
......
......@@ -3,19 +3,19 @@
<mapper namespace="com.yeejoin.amos.boot.module.ugp.api.mapper.EquipmentMapper">
<select id="queryEquipmentPage" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.EquipmentDto">
select * from tz_ugp_equipment
select * from tz_ugp_equipment em
<where>
<if test="equipment.name != '' and equipment.name != null">
and `name` like concat('%',#{equipment.name},'%')
and em.name like concat('%',#{equipment.name},'%')
</if>
<if test="equipment.code != '' and equipment.code != null">
and `code` like concat('%',#{equipment.code},'%')
and em.code like concat('%',#{equipment.code},'%')
</if>
<if test="equipment.verifyStatus != '' and equipment.verifyStatus != null">
and `verify_status` like concat('%',#{equipment.verifyStatus},'%')
and em.verify_status like concat('%',#{equipment.verifyStatus},'%')
</if>
<if test="companyIds != null ">
and `company_id` in
and em.company_id in
<foreach collection="companyIds" item = "item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
......
......@@ -8,7 +8,7 @@
FROM (SELECT
tz_ugp_install_notice.sequence_nbr,
tz_ugp_install_notice.project_id,
tz_ugp_project.`NAME`,
tz_ugp_project.NAME,
install_region,
start_date,
construction_unit,
......@@ -29,7 +29,7 @@
LEFT JOIN cb_org_usr AS u1 ON a.supervise_dept_id=u1.sequence_nbr
<where>
<if test="name != '' and name != null">
and a.`NAME` LIKE concat("%",#{name},"%")
and a.NAME LIKE concat("%",#{name},"%")
</if>
<if test="constructionUnit != '' and constructionUnit != null">
and a.construction_unit LIKE concat("%",#{constructionUnit},"%")
......
......@@ -3,7 +3,7 @@
<mapper namespace="com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMsgMapper">
<select id="InstallNoticeMsgPage" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto">
SELECT `name`,
SELECT tz_ugp_project.name,
install_region,
start_date,
construction_unit,
......@@ -34,7 +34,7 @@
order by rec_date desc
</select>
<select id="selectByName" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto">
SELECT name,
SELECT tz_ugp_project.name,
install_region,
start_date,
construction_unit,
......@@ -58,7 +58,7 @@
</select>
<select id="customSelectById"
resultType="com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeMsgPageDto">
SELECT name,
SELECT tz_ugp_project.name,
install_region,
start_date,
construction_unit,
......
......@@ -40,7 +40,7 @@
tz_ugp_project pt
LEFT JOIN tz_ugp_quality_info qy ON qy.project_id = pt.sequence_nbr
WHERE
pt.`status` = "流程结束!"
pt.status = '流程结束!'
<if test="dto !=null">
<if test="dto.name !='' and dto.name != null">
and
......
......@@ -15,7 +15,7 @@
<select id="getMaterialCount" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.MaterialCount">
select
manufacture_addr AS manufactureAddr,
count(manufacture_addr) AS `sum`
count(manufacture_addr) AS "sum"
from
tz_ugp_material
GROUP BY
......@@ -24,7 +24,7 @@
<select id="getConditionCount" parameterType="java.util.List" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.MaterialCount">
select
manufacture_addr AS manufactureAddr,
count(manufacture_addr) AS `sum`
count(manufacture_addr) AS "sum"
from tz_ugp_material
where
company_id in
......
......@@ -45,10 +45,10 @@
</if>
</if>
<if test="project.name != '' and project.name != null">
and pt.`name` like concat('%',#{project.name},'%')
and pt.name like concat('%',#{project.name},'%')
</if>
<if test="project.constructionUnit != '' and project.constructionUnit != null">
and pt.`construction_Unit` like concat('%',#{project.constructionUnit},'%')
and pt.construction_Unit like concat('%',#{project.constructionUnit},'%')
</if>
</where>
order by pt.rec_date desc
......@@ -70,7 +70,7 @@
(select sequence_nbr
from tz_ugp_project
where install_region_code in (SELECT admin_region_code from tz_ugp_supervise_rule where supervise_dept_id = #{companyId}))
and tz_ugp_weld.`status` = 0
and tz_ugp_weld.status = 0
GROUP BY
tz_ugp_weld.project_id) as w
on q.project_id = w.project_id) as l
......@@ -93,7 +93,7 @@
(select sequence_nbr
from tz_ugp_project
where install_region_code in (SELECT admin_region_code from tz_ugp_supervise_rule where supervise_dept_id = #{companyId}))
and tz_ugp_weld.`status` = 0
and tz_ugp_weld.status = 0
GROUP BY
tz_ugp_weld.project_id) as w
on q.project_id = w.project_id) as l
......@@ -116,7 +116,7 @@
(select sequence_nbr
from tz_ugp_project
where install_region_code in (SELECT admin_region_code from tz_ugp_supervise_rule where inspection_unit_id = #{companyId}))
and tz_ugp_weld.`status` = 0
and tz_ugp_weld.status = 0
GROUP BY
tz_ugp_weld.project_id) as w
on q.project_id = w.project_id) as l
......@@ -139,7 +139,7 @@
(select sequence_nbr
from tz_ugp_project
where install_region_code in (SELECT admin_region_code from tz_ugp_supervise_rule where inspection_unit_id = #{companyId}))
and tz_ugp_weld.`status` = 0
and tz_ugp_weld.status = 0
GROUP BY
tz_ugp_weld.project_id) as w
on q.project_id = w.project_id) as l
......@@ -164,7 +164,7 @@
(select sequence_nbr
from tz_ugp_project
where install_region_code in (SELECT admin_region_code from tz_ugp_supervise_rule where supervise_dept_id = #{companyId}))
and tz_ugp_weld.`status` = 0
and tz_ugp_weld.status = 0
GROUP BY
tz_ugp_weld.project_id) as w
on q.project_id = w.project_id) as l
......@@ -190,7 +190,7 @@
(select sequence_nbr
from tz_ugp_project
where install_region_code in (SELECT admin_region_code from tz_ugp_supervise_rule where supervise_dept_id = #{companyId}))
and tz_ugp_weld.`status` = 0
and tz_ugp_weld.status = 0
GROUP BY
tz_ugp_weld.project_id) as w
on q.project_id = w.project_id) as l
......@@ -216,7 +216,7 @@
(select sequence_nbr
from tz_ugp_project
where install_region_code in (SELECT admin_region_code from tz_ugp_supervise_rule where inspection_unit_id = #{companyId}))
and tz_ugp_weld.`status` = 0
and tz_ugp_weld.status = 0
GROUP BY
tz_ugp_weld.project_id) as w
on q.project_id = w.project_id) as l
......@@ -242,7 +242,7 @@
(select sequence_nbr
from tz_ugp_project
where install_region_code in (SELECT admin_region_code from tz_ugp_supervise_rule where inspection_unit_id = #{companyId}))
and tz_ugp_weld.`status` = 0
and tz_ugp_weld.status = 0
GROUP BY
tz_ugp_weld.project_id) as w
on q.project_id = w.project_id) as l
......
......@@ -136,8 +136,8 @@
<select id="getProjectMaterial" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.ProjectResourceDto">
SELECT
material.`name`,
material.`code`,
material.name,
material.code,
material.type,
material.spec,
material.wall_thickness,
......@@ -146,7 +146,7 @@
material.batch_num,
material.sequence_nbr,
material.rec_date,
project.`name` AS projectName
project.name AS projectName
FROM tz_ugp_project_resource resource
LEFT JOIN tz_ugp_material AS material ON resource.resource_id = material.sequence_nbr
LEFT JOIN tz_ugp_project AS project ON project.sequence_nbr = resource.project_id
......@@ -154,10 +154,10 @@
resource.type = #{type}
<if test="projectResourceDto != null">
<if test="projectResourceDto.name !=null and projectResourceDto.name != ''">
and material.`name` LIKE CONCAT("%",#{projectResourceDto.name},"%")
and material.name LIKE CONCAT('%',#{projectResourceDto.name},'%')
</if>
<if test="projectResourceDto.projectName !=null and projectResourceDto.projectName != ''">
and project.`name` LIKE CONCAT("%",#{projectResourceDto.projectName},"%")
and project.name LIKE CONCAT('%',#{projectResourceDto.projectName},'%')
</if>
</if>
<if test="codes !=null and codes.size > 0">
......@@ -174,14 +174,14 @@
<select id="getProjectEquipment" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.ProjectResourceDto">
SELECT
equipment.name ,
equipment.`code`,
equipment.code,
equipment.type ,
equipment.manufacturer,
equipment.manufacture_date ,
equipment.service_life,
equipment.verify_status,
equipment.sequence_nbr,
project.`name` AS projectName,
project.name AS projectName,
resource.rec_date
FROM tz_ugp_project_resource resource
LEFT JOIN tz_ugp_project AS project ON project.sequence_nbr = resource.project_id
......@@ -193,10 +193,10 @@
<if test="projectResourceDto !=null">
<if test="projectResourceDto.name !=null and projectResourceDto.name != ''">
and equipment.`name` LIKE CONCAT("%",#{projectResourceDto.name},"%")
and equipment.name LIKE CONCAT('%',#{projectResourceDto.name},'%')
</if>
<if test="projectResourceDto.projectName !=null and projectResourceDto.projectName != ''">
and project.`name` LIKE CONCAT("%",#{projectResourceDto.projectName},"%")
and project.name LIKE CONCAT('%',#{projectResourceDto.projectName},'%')
</if>
</if>
<if test="codes !=null and codes.size > 0">
......
......@@ -5,7 +5,7 @@
<select id="getItems" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.QualityProblemDto">
SELECT
qi.*,
up.`name` AS project_name,
up.name AS project_name,
up.install_region AS project_address,
up.construction_unit,
up.installation_unit,
......@@ -28,10 +28,10 @@
LEFT JOIN cb_org_usr AS cou ON ur.inspection_unit_id = cou.sequence_nbr
<where>
<if test="qualityProblemDto.projectName != '' and qualityProblemDto.projectName != null">
and up.`name` like concat("%",#{qualityProblemDto.projectName},"%")
and up.name like concat('%',#{qualityProblemDto.projectName},'%')
</if>
<if test="qualityProblemDto.code != '' and qualityProblemDto.code != null">
and qi.`code` like concat("%",#{qualityProblemDto.code},"%")
and qi.code like concat('%',#{qualityProblemDto.code},'%')
</if>
<if test="projectIds != null and projectIds.size > 0">
and qi.project_id in
......@@ -46,7 +46,7 @@
<select id="getInfoBySequenceNbr" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.QualityProblemDto">
SELECT
qi.*,
up.`name` AS project_name,
up.name AS project_name,
up.install_region AS project_address,
up.construction_unit,
up.installation_unit,
......@@ -70,8 +70,8 @@
<select id="qualityProblemStatistics" resultType="java.util.Map">
SELECT
qi.generate_stage AS `name`,
count(1) AS `value`
qi.generate_stage AS name,
count(1) AS value
FROM
tz_ugp_quality_problem AS qi
<where>
......
......@@ -3,7 +3,7 @@
<mapper namespace="com.yeejoin.amos.boot.module.ugp.api.mapper.RectifyMsgMapper">
<select id = 'queryForRectifyMsgPage' resultType="com.yeejoin.amos.boot.module.ugp.api.dto.RectifyMsgDto">
SELECT msg.*,pro.project_id,org.biz_org_name AS msg_receiver_name,up.installation_unit,pro.`code`,pro.generate_stage,pro.problem_describe,up.`name`,up.install_region AS address,pro.process_progress,gro.biz_org_name AS notice_unit_name
SELECT msg.*,pro.project_id,org.biz_org_name AS msg_receiver_name,up.installation_unit,pro.code,pro.generate_stage,pro.problem_describe,up.name,up.install_region AS address,pro.process_progress,gro.biz_org_name AS notice_unit_name
FROM tz_ugp_rectify_msg AS msg
LEFT JOIN tz_ugp_quality_problem AS pro ON pro.sequence_nbr = msg.problem_id
LEFT JOIN cb_org_usr AS org ON org.sequence_nbr = msg.msg_receiver
......@@ -11,11 +11,11 @@
LEFT JOIN cb_org_usr AS gro ON gro.amos_org_id = msg.notice_unit_id
<where>
<if test="name != '' and name != null" >
and up.`name` like concat("%", #{name},"%")
and up.name like concat('%', #{name},'%')
</if>
<if test="installationUnit != '' and installationUnit != null" >
and up.installation_unit like concat("%",#{installationUnit},"%")
and up.installation_unit like concat('%',#{installationUnit},'%')
</if>
<if test="isProblem != '' and isProblem != null">
and msg.is_problem = #{isProblem}
......@@ -33,7 +33,7 @@
<select id="InstallNoticeMsgPage" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.RectifyMsgDto">
SELECT
tz_ugp_rectify_msg.sequence_nbr,
`name`,
tz_ugp_project.name,
install_region,
start_date,
construction_unit,
......@@ -53,7 +53,7 @@
and tz_ugp_project.name like '%${name}%'
</if>
<if test="installationUnit != null and installationUnit != ''">
and tz_ugp_project.installation_unit like concat("%",#{installationUnit},"%")
and tz_ugp_project.installation_unit like concat('%',#{installationUnit},'%')
</if>
<if test=" seqs != null">
and tz_ugp_rectify_msg.install_notice_id in
......@@ -64,7 +64,7 @@
order by rec_date desc
</select>
<select id="selectByName" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.RectifyMsgDto">
SELECT name,
SELECT tz_ugp_project.name,
install_region,
start_date,
construction_unit,
......@@ -88,7 +88,7 @@
</select>
<select id="customSelectById"
resultType="com.yeejoin.amos.boot.module.ugp.api.dto.RectifyMsgDto">
SELECT name,
SELECT tz_ugp_project.name,
install_region,
start_date,
construction_unit,
......
......@@ -9,11 +9,11 @@
<select id="getTask" resultType="com.yeejoin.amos.boot.module.ugp.api.entity.Task">
SELECT
tk.*,
tp.`url` AS extend
tp.url AS extend
FROM
tz_ugp_task tk
LEFT JOIN
tz_ugp_path tp ON tk.title = tp.`name` and tk.`status` = tp.`status`
tz_ugp_path tp ON tk.title = tp.name and tk.status = tp.status
where tk.unit_id =#{unitId}
<if test="type != null ">
and tk.status =#{type}
......
......@@ -4,16 +4,16 @@
<select id="queryForWeldPage" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.WeldDto">
SELECT tz_ugp_weld.`sequence_nbr`,`code`,project_id,install_company,region,coding_status,coding_method,coding_date,project.`name`, tz_ugp_weld.rec_date,project.installation_unit FROM tz_ugp_weld,
(SELECT `sequence_nbr`,`name`,installation_unit FROM tz_ugp_project ) AS project
SELECT tz_ugp_weld.sequence_nbr,tz_ugp_weld.code,project_id,install_company,region,coding_status,coding_method,coding_date,project.name, tz_ugp_weld.rec_date,project.installation_unit FROM tz_ugp_weld,
(SELECT sequence_nbr,p.name,installation_unit FROM tz_ugp_project p ) AS "project"
<where>
project.sequence_nbr=tz_ugp_weld.project_id
<if test="weldDto!=null">
<if test="weldDto.name !=null and weldDto.name !=''">
AND project.name LIKE CONCAT("%",#{weldDto.name},"%")
AND project.name LIKE CONCAT('%',#{weldDto.name},'%')
</if>
<if test="weldDto.projectId !=null and weldDto.projectId !=''">
AND project_id LIKE CONCAT("%",#{weldDto.projectId},"%")
AND project_id LIKE CONCAT('%',#{weldDto.projectId},'%')
</if>
</if>
......@@ -30,7 +30,7 @@
SELECT * FROM tz_ugp_weld
<where>
<if test="region != '' and region != null" >
and tz_ugp_weld.region like concat("%", #{region},"%")
and tz_ugp_weld.region like concat('%', #{region},'%')
</if>
<if test="ids !=null and ids.size > 0">
AND tz_ugp_weld.project_id in
......
......@@ -4,15 +4,15 @@
<select id="welderStatistics" resultType="java.util.Map">
SELECT
fi.field_value AS `name`,COUNT(1) AS value
fi.field_value AS "name",COUNT(1) AS value
FROM
cb_org_usr AS ou
LEFT JOIN cb_dynamic_form_instance AS fi ON ou.sequence_nbr = fi.instance_id and fi.field_code = "licensedProject"
WHERE ou.org_expand_attr1 = "WELDER" AND ou.biz_org_type="PERSON"
LEFT JOIN cb_dynamic_form_instance AS fi ON ou.sequence_nbr = fi.instance_id and fi.field_code = 'licensedProject'
WHERE ou.org_expand_attr1 = 'WELDER' AND ou.biz_org_type='PERSON'
<if test="personCode!=null and personCode.size>0">
AND (
<foreach collection="personCode" index="index" item="item" close="" open="" separator="or">
ou.biz_org_code LIKE CONCAT("%",#{item},"%")
ou.biz_org_code LIKE CONCAT('%',#{item},'%')
</foreach>
)
</if>
......
......@@ -3,26 +3,26 @@
<mapper namespace="com.yeejoin.amos.boot.module.ugp.api.mapper.WorkHistoryMapper">
<select id="pageList" resultType="com.yeejoin.amos.boot.module.ugp.api.dto.WorkHistoryDto">
SELECT wh.*,ou.biz_org_name AS name FROM `tz_ugp_work_history` AS wh LEFT JOIN cb_org_usr AS ou ON ou.sequence_nbr = wh.welder_id
SELECT wh.*,ou.biz_org_name AS name FROM tz_ugp_work_history AS wh LEFT JOIN cb_org_usr AS ou ON ou.sequence_nbr = wh.welder_id
<where>
<if test="tzUgpWorkHistory !=null">
<if test="tzUgpWorkHistory.companyName!='' and tzUgpWorkHistory.companyName!=null">
and wh.company_name like concat("%",#{tzUgpWorkHistory.companyName},"%")
and wh.company_name like concat('%',#{tzUgpWorkHistory.companyName},'%')
</if>
<if test="tzUgpWorkHistory.name!='' and tzUgpWorkHistory.name!=null">
and ou.biz_org_name like concat("%",#{tzUgpWorkHistory.name},"%")
and ou.biz_org_name like concat('%',#{tzUgpWorkHistory.name},'%')
</if>
<if test="tzUgpWorkHistory.projectName!='' and tzUgpWorkHistory.projectName!=null">
and wh.project_name like concat("%",#{tzUgpWorkHistory.projectName},"%")
and wh.project_name like concat('%',#{tzUgpWorkHistory.projectName},'%')
</if>
<if test="tzUgpWorkHistory.weldNumber!='' and tzUgpWorkHistory.weldNumber!=null">
and wh.weld_number like concat("%",#{tzUgpWorkHistory.weldNumber},"%")
and wh.weld_number like concat('%',#{tzUgpWorkHistory.weldNumber},'%')
</if>
<if test="tzUgpWorkHistory.startDate!='' and tzUgpWorkHistory.startDate!=null">
and wh.start_date like concat("%",#{tzUgpWorkHistory.startDate},"%")
and wh.start_date like concat('%',#{tzUgpWorkHistory.startDate},'%')
</if>
<if test="tzUgpWorkHistory.endDate!='' and tzUgpWorkHistory.endDate!=null">
and wh.end_date like concat("%",#{tzUgpWorkHistory.endDate},"%")
and wh.end_date like concat('%',#{tzUgpWorkHistory.endDate},'%')
</if>
</if>
<if test="sequenceNbr!='' and sequenceNbr!=null">
......
package com.yeejoin.amos.boot.module.ugp.biz.config;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.core.parser.ISqlParser;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.apache.ibatis.mapping.DatabaseIdProvider;
import org.apache.ibatis.mapping.VendorDatabaseIdProvider;
import org.mybatis.spring.annotation.MapperScan;
......@@ -20,6 +23,7 @@ public class MybatisPlusConfig {
* @return
**/
@Bean
public DatabaseIdProvider getDatabaseIdProvider() {
VendorDatabaseIdProvider databaseIdProvider = new VendorDatabaseIdProvider();
......@@ -29,4 +33,13 @@ public class MybatisPlusConfig {
databaseIdProvider.setProperties(properties);
return databaseIdProvider;
}
@Bean
public PaginationInterceptor paginationInterceptor()
{
PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
paginationInterceptor.setLimit(50000);
paginationInterceptor.setDialectType(DbType.POSTGRE_SQL.getDb());
return paginationInterceptor;
}
}
#DB properties:
spring.datasource.driver-class-name=cn.com.vastbase.Driver
spring.datasource.url=jdbc:vastbase://36.46.137.116:5432/per_tzs_amos_tzs_biz?currentSchema=amos_ugp_biz
spring.datasource.username=admin
spring.datasource.password=Yeejoin@2023
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.minimum-idle=5
spring.datasource.hikari.maximum-pool-size=15
spring.datasource.hikari.auto-commit=true
spring.datasource.hikari.idle-timeout=30000
spring.datasource.hikari.pool-name=DatebookHikariCP
spring.datasource.hikari.max-lifetime=1800000
spring.datasource.hikari.connection-timeout=30000
spring.datasource.hikari.connection-test-query=SELECT 1
##eureka properties:
eureka.client.registry-fetch-interval-seconds=5
eureka.instance.lease-expiration-duration-in-seconds=10
eureka.instance.lease-renewal-interval-in-seconds=5
eureka.client.service-url.defaultZone =http://admin:a1234560@172.16.10.210:10001/eureka/
eureka.instance.health-check-url=http://172.16.3.34:${server.port}${server.servlet.context-path}/actuator/health
eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
eureka.instance.status-page-url=http://172.16.3.34:${server.port}${server.servlet.context-path}/actuator/info
eureka.instance.metadata-map.management.api-docs=http://172.16.3.34:${server.port}${server.servlet.context-path}/doc.html
eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
eureka.instance.ip-address=172.16.3.34
eureka.instance.instance-id=${eureka.instance.ip-address}:${server.port}
#eureka.client.registry-fetch-interval-seconds=5
#eureka.instance.lease-expiration-duration-in-seconds=10
#eureka.instance.lease-renewal-interval-in-seconds=5
#eureka.client.service-url.defaultZone =http://39.98.45.134:10001/eureka/
#eureka.instance.health-check-url=http://39.98.45.134:${server.port}${server.servlet.context-path}/actuator/health
#eureka.instance.metadata-map.management.context-path=${server.servlet.context-path}/actuator
#eureka.instance.status-page-url=http://39.98.45.134:${server.port}${server.servlet.context-path}/actuator/info
#eureka.instance.metadata-map.management.api-docs=http://39.98.45.134:${server.port}${server.servlet.context-path}/doc.html
#eureka.instance.prefer-ip-address=true
#management.endpoint.health.show-details=always
#management.endpoints.web.exposure.include=*
#redis properties:
spring.redis.database=1
#spring.redis.host=39.98.45.134
#spring.redis.host=172.16.10.90
spring.redis.host=172.16.10.210
spring.redis.port=6379
spring.redis.password=yeejoin@2020
spring.redis.lettuce.pool.max-active=200
spring.redis.lettuce.pool.max-wait=-1
spring.redis.lettuce.pool.max-idle=10
spring.redis.lettuce.pool.min-idle=0
spring.redis.expire.time=300
## emqx properties:
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.10.210:1883
emqx.user-name=admin
emqx.password=public
## ͼƬʶӿڷid
maas.service.ocr.id=0a456d67-5e12-48af-8923-ccc447d4cb2b
\ No newline at end of file
spring.application.name=UGP
server.servlet.context-path=/ugp
server.port=12000
spring.profiles.active=dev2
spring.profiles.active=vb
##mybatis-plus
mybatis-plus.configuration.database-id=postgresql
spring.main.allow-bean-definition-overriding=true
spring.jackson.time-zone=GMT+8
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
......
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="false">
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
<property name="LOG_HOME" value="log" />
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<property name="LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %-50.50logger{50} - %msg [%file:%line] %n" />
<!-- 按照每天生成日志文件 -->
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/tzs.log.%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数-->
<MaxHistory>30</MaxHistory>
<!--日志文件大小-->
<MaxFileSize>30mb</MaxFileSize>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- 控制台输出 -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
</appender>
<!-- show parameters for hibernate sql 专为 Hibernate 定制
<logger name="org.hibernate.type.descriptor.sql.BasicBinder" level="TRACE" />
<logger name="org.hibernate.type.descriptor.sql.BasicExtractor" level="DEBUG" />
<logger name="org.hibernate.SQL" level="DEBUG" />
<logger name="org.hibernate.engine.QueryParameters" level="DEBUG" />
<logger name="org.hibernate.engine.query.HQLQueryPlan" level="DEBUG" />
-->
<!--myibatis log configure-->
<logger name="com.apache.ibatis" level="INFO"/>
<logger name="org.mybatis" level="INFO" />
<logger name="java.sql.Connection" level="INFO"/>
<logger name="java.sql.Statement" level="INFO"/>
<logger name="java.sql.PreparedStatement" level="INFO"/>
<logger name="org.springframework" level="INFO"/>
<logger name="com.baomidou.mybatisplus" level="INFO"/>
<logger name="org.apache.activemq" level="INFO"/>
<logger name="org.typroject" level="INFO"/>
<logger name="com.yeejoin" level="INFO"/>
<!-- 日志输出级别 -->
<root level="DEBUG">
<!-- <appender-ref ref="FILE" /> -->
<appender-ref ref="STDOUT" />
</root>
</configuration>
\ No newline at end of file
......@@ -37,7 +37,14 @@
<dependency>
<groupId>cn.com.vastdata</groupId>
<artifactId>vastbase</artifactId>
<version>1.0.0.1</version>
<version>1.0.0.2</version>
</dependency>
<!-- Logstash -->
<dependency>
<groupId>net.logstash.logback</groupId>
<artifactId>logstash-logback-encoder</artifactId>
<version>6.3</version>
</dependency>
</dependencies>
</project>
......
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