Commit 49ef8e3f authored by 李秀明's avatar 李秀明

feat(patrol): 兼容PostgreSQL

parent b51b18c5
...@@ -152,6 +152,11 @@ ...@@ -152,6 +152,11 @@
<version>15.8.0</version> <version>15.8.0</version>
<classifier>jdk16</classifier> <classifier>jdk16</classifier>
</dependency> </dependency>
<dependency>
<groupId>cn.com.vastdata</groupId>
<artifactId>vastbase-jdbc</artifactId>
<version>2.7v</version>
</dependency>
</dependencies> </dependencies>
</project> </project>
eureka.client.serviceUrl.defaultZone=http://${spring.security.user.name}:${spring.security.user.password}@172.16.11.201:10001/eureka/ eureka.client.serviceUrl.defaultZone=http://${spring.security.user.name}:${spring.security.user.password}@172.16.10.210:10001/eureka/
eureka.client.registry-fetch-interval-seconds=5 eureka.client.registry-fetch-interval-seconds=5
spring.security.user.name=admin spring.security.user.name=admin
spring.security.user.password=a1234560 spring.security.user.password=a1234560
...@@ -20,10 +20,10 @@ ribbon.MaxAutoRetries = 1 ...@@ -20,10 +20,10 @@ ribbon.MaxAutoRetries = 1
xiy_amos_satety_business xiy_amos_satety_business
spring.reactor.debug-agent.enabled=true spring.reactor.debug-agent.enabled=true
#DB properties: #DB properties:
spring.datasource.url=jdbc:mysql://172.16.11.201:3306/dl_business_v3.0.1.3?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8 spring.datasource.url=jdbc:vastbase://36.46.137.116:5432/tzs_amos_tzs_biz_init?currentSchema=business&allowMultiQueries=true
spring.datasource.username=root spring.datasource.username=admin
spring.datasource.password=Yeejoin@2020 spring.datasource.password=Yeejoin@2023
spring.datasource.driver-class-name = com.mysql.jdbc.Driver spring.datasource.driver-class-name = cn.com.vastbase.Driver
spring.datasource.hikari.maxLifetime = 1765000 spring.datasource.hikari.maxLifetime = 1765000
spring.datasource.hikari.maximum-pool-size = 10 spring.datasource.hikari.maximum-pool-size = 10
spring.datasource.testWhileIdle = true spring.datasource.testWhileIdle = true
...@@ -37,7 +37,7 @@ security.appKey=studio_normalapp_3056965 ...@@ -37,7 +37,7 @@ security.appKey=studio_normalapp_3056965
#redis 配置 #redis 配置
spring.redis.database=1 spring.redis.database=1
spring.redis.host=172.16.11.201 spring.redis.host=172.16.10.210
spring.redis.port=6379 spring.redis.port=6379
spring.redis.password=yeejoin@2020 spring.redis.password=yeejoin@2020
spring.redis.jedis.pool.max-active=200 spring.redis.jedis.pool.max-active=200
...@@ -70,13 +70,13 @@ emq.patrol.sync.switch=true ...@@ -70,13 +70,13 @@ emq.patrol.sync.switch=true
params.work.flow.normalProcessDefinitionKey=normalHazardManagement params.work.flow.normalProcessDefinitionKey=normalHazardManagement
params.work.flow.processDefinitionKey=hazardManagement params.work.flow.processDefinitionKey=hazardManagement
params.work.flow.address=http://172.16.11.201:30040 params.work.flow.address=http://172.16.10.210:30040
params.spc.address=http://172.16.3.89:9001 params.spc.address=http://172.16.3.89:9001
#websocket #websocket
params.remoteWebsocketUrl=http://172.16.11.201:8080/ params.remoteWebsocketUrl=http://172.16.10.210:8080/
#websocket send message url #websocket send message url
params.remoteWebSocketSendMsgUrl=http://172.16.11.201:10601/ params.remoteWebSocketSendMsgUrl=http://172.16.10.210:10601/
#上传文件配置 #上传文件配置
spring.http.multipart.maxFileSize = 80480000 spring.http.multipart.maxFileSize = 80480000
...@@ -87,12 +87,12 @@ linux.img.path = / ...@@ -87,12 +87,12 @@ linux.img.path = /
## emqx ## emqx
emqx.clean-session=true emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}-3578 emqx.client-id=${spring.application.name}-${random.int[1024,65536]}-3578
emqx.broker=tcp://172.16.11.201:1883 emqx.broker=tcp://172.16.10.210:1883
emqx.user-name=admin emqx.user-name=admin
emqx.password=public emqx.password=public
emqx.max-inflight=1000 emqx.max-inflight=1000
file.url=http://172.16.11.201:9000/ file.url=http://172.16.10.210:9000/
##代码中有部分逻辑冲突需要处理 为区分机场和电力逻辑 增加开关 若为true 则为机场逻辑 为false 则为电力逻辑 ##代码中有部分逻辑冲突需要处理 为区分机场和电力逻辑 增加开关 若为true 则为机场逻辑 为false 则为电力逻辑
logic=false logic=false
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
c.point_id, c.point_id,
c.point_name, c.point_name,
c.check_time, c.check_time,
null AS `date`, null AS date,
c.plan_id, c.plan_id,
c.plan_name, c.plan_name,
c.route_id, c.route_id,
...@@ -91,11 +91,11 @@ ...@@ -91,11 +91,11 @@
c.dep_id, c.dep_id,
c.dep_name, c.dep_name,
es.id AS eq_id, es.id AS eq_id,
es.`name` eq_name, es.name eq_name,
es.`code` eq_code, es.code eq_code,
( (
SELECT SELECT
GROUP_CONCAT(ffs.`name`) GROUP_CONCAT(ffs.name)
FROM FROM
f_fire_fighting_system ffs f_fire_fighting_system ffs
WHERE WHERE
...@@ -103,11 +103,11 @@ ...@@ -103,11 +103,11 @@
) AS system_name, ) AS system_name,
CONCAT(pt.id, '') AS plan_task_id, CONCAT(pt.id, '') AS plan_task_id,
pt.end_time AS plan_completion_time, pt.end_time AS plan_completion_time,
cou.`code` AS company_code, cou.code AS company_code,
es.equipment_code AS equipment_type_code, es.equipment_code AS equipment_type_code,
pii.item_no AS input_code, pii.item_no AS input_code,
pp.point_no as pointCode, pp.point_no as pointCode,
wws.`code` as buildCode, wws.code as buildCode,
wws.full_name as buildName wws.full_name as buildName
FROM FROM
p_check_input ci p_check_input ci
...@@ -124,15 +124,15 @@ ...@@ -124,15 +124,15 @@
o.biz_org_code bzOrgCode, o.biz_org_code bzOrgCode,
o.amos_org_id, o.amos_org_id,
o.amos_org_code, o.amos_org_code,
o.`code` o.code
FROM FROM
cb_org_usr o, cb_org_usr o,
`idx_biz_station_info` s idx_biz_station_info s
WHERE WHERE
o.biz_org_type = 'COMPANY' o.biz_org_type = 'COMPANY'
and o.is_delete = 0 and o.is_delete = 0
and o.`code` = s.`code` and o.code = s.code
) cou ON LOCATE(cou.bzOrgCode, ci.org_code) > 0 ]]> ) cou ON ci.org_code LIKE concat('%', cou.bzOrgCode, '%') ]]>
<where> <where>
<if test="id != null"> <if test="id != null">
ci.id = #{id} ci.id = #{id}
......
...@@ -549,11 +549,11 @@ ...@@ -549,11 +549,11 @@
pld.infer_other_things inferOtherThings, pld.infer_other_things inferOtherThings,
pld.remark, pld.remark,
pp.plan_type planType, pp.plan_type planType,
pp.`name` planName, pp.name planName,
pr.`name` routeName, pr.name routeName,
pld.danger_type dangerType, pld.danger_type dangerType,
pc.check_time checkTimeDate, pc.check_time checkTimeDate,
pii.`name` checkContent, pii.name checkContent,
pc.user_id checkUser, pc.user_id checkUser,
pc.error checkResult, pc.error checkResult,
pc.is_ok checkStatus, pc.is_ok checkStatus,
...@@ -680,11 +680,11 @@ ...@@ -680,11 +680,11 @@
pld.danger_state dangerState, pld.danger_state dangerState,
pld.overtime_state overtimeState, pld.overtime_state overtimeState,
pp.plan_type planType, pp.plan_type planType,
pp.`name` planName, pp.name planName,
pr.`name` routeName, pr.name routeName,
pld.danger_type dangerType, pld.danger_type dangerType,
pc.check_time checkTimeDate, pc.check_time checkTimeDate,
pii.`name` checkContent, pii.name checkContent,
pc.user_id checkUser, pc.user_id checkUser,
pc.error checkResult, pc.error checkResult,
pc.is_ok checkStatus, pc.is_ok checkStatus,
......
...@@ -309,7 +309,7 @@ ...@@ -309,7 +309,7 @@
and and
department_id = #{departmentId} department_id = #{departmentId}
and and
(a.`status` in (5,6) or (a.`status` = 7 and DATEDIFF(a.update_date,CURDATE()) =0 )) (a.status in (5,6) or (a.status = 7 and DATEDIFF(a.update_date,CURDATE()) =0 ))
and and
violate_state != 1 violate_state != 1
</select> </select>
......
...@@ -250,7 +250,7 @@ ...@@ -250,7 +250,7 @@
d.point_id, d.point_id,
d.task_no, d.task_no,
d.is_finish, d.is_finish,
pp.`name` pointName pp.name pointName
FROM FROM
p_plan_task_detail d p_plan_task_detail d
LEFT JOIN p_point pp ON pp.id = d.point_id LEFT JOIN p_point pp ON pp.id = d.point_id
...@@ -1078,7 +1078,7 @@ ...@@ -1078,7 +1078,7 @@
d.point_id, d.point_id,
d.task_no, d.task_no,
pt.plan_id, pt.plan_id,
pp.`name` planName, pp.name planName,
d.is_finish d.is_finish
FROM FROM
p_plan_task_detail d p_plan_task_detail d
...@@ -1356,7 +1356,7 @@ ...@@ -1356,7 +1356,7 @@
d.point_id, d.point_id,
d.task_no, d.task_no,
pr.id route_id, pr.id route_id,
pr.`name` routeName, pr.name routeName,
d.is_finish d.is_finish
FROM FROM
p_plan_task_detail d p_plan_task_detail d
...@@ -1493,7 +1493,7 @@ FROM ...@@ -1493,7 +1493,7 @@ FROM
p_plan_task_detail pd p_plan_task_detail pd
WHERE WHERE
pd.task_no = pt.id pd.task_no = pt.id
AND pd.`status` != 1 AND pd.status != 1
)) notQualifiedPointCount, )) notQualifiedPointCount,
sum( sum(
CASE CASE
...@@ -1634,7 +1634,7 @@ FROM ...@@ -1634,7 +1634,7 @@ FROM
p_plan_task_detail pd p_plan_task_detail pd
WHERE WHERE
pd.task_no = pt.id pd.task_no = pt.id
AND pd.`status` != 1 AND pd.status != 1
)) notQualifiedPointCount, )) notQualifiedPointCount,
sum( sum(
CASE CASE
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
s_user b, s_user b,
s_company d --> s_company d -->
WHERE <!-- a.create_by = b.id and d.comp_code = a.org_code -->1=1 WHERE <!-- a.create_by = b.id and d.comp_code = a.org_code -->1=1
<if test="name!=null"> and a.name like concat(concat("%",#{name}),"%") </if> <if test="name!=null"> and a.name like concat('%',#{name},'%') </if>
<if test="parentId!=null"> and a.parent_id = #{parentId}</if> <if test="parentId!=null"> and a.parent_id = #{parentId}</if>
<if test="orgCode!=null"> and a.org_Code like #{orgCode}</if> <if test="orgCode!=null"> and a.org_Code like #{orgCode}</if>
</select> </select>
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
FROM FROM
p_catalog_tree a p_catalog_tree a
where 1=1 where 1=1
<if test="name!=null"> and a.name like concat(concat("%",#{name}),"%") </if> <if test="name!=null"> and a.name like concat(concat('%',#{name}),'%') </if>
<if test="parentId!=null"> and a.parent_id = #{parentId} </if> <if test="parentId!=null"> and a.parent_id = #{parentId} </if>
<if test="orgCode!=null"> and a.org_Code like #{orgCode}</if> <if test="orgCode!=null"> and a.org_Code like #{orgCode}</if>
......
...@@ -74,8 +74,8 @@ ...@@ -74,8 +74,8 @@
FROM FROM
p_input_item a p_input_item a
where a.is_delete = '0' and a.input_type!='1' where a.is_delete = '0' and a.input_type!='1'
<if test="name!=null"> and a.name like concat(concat("%",#{name}),"%")</if> <if test="name!=null"> and a.name like concat(concat('%',#{name}),'%')</if>
<if test="itemNo!=null"> and a.item_no like concat(concat("%",#{itemNo}),"%")</if> <if test="itemNo!=null"> and a.item_no like concat(concat('%',#{itemNo}),'%')</if>
<if test="isScore!=null"> and a.is_Score = #{isScore}</if> <if test="isScore!=null"> and a.is_Score = #{isScore}</if>
<if test="itemType!=null"> and a.item_Type = #{itemType} </if> <if test="itemType!=null"> and a.item_Type = #{itemType} </if>
<!-- <if test="level!=null"> and a.level = #{level} </if> --> <!-- <if test="level!=null"> and a.level = #{level} </if> -->
...@@ -108,8 +108,8 @@ ...@@ -108,8 +108,8 @@
p_input_item a left join p_catalog_tree b on a.catalog_id = b.id p_input_item a left join p_catalog_tree b on a.catalog_id = b.id
where a.is_delete = '0' where a.is_delete = '0'
and a.input_type!='1' and a.input_type!='1'
<if test="name!=null"> and a.name like concat(concat("%",#{name}),"%")</if> <if test="name!=null"> and a.name like concat(concat('%',#{name}),'%')</if>
<if test="itemNo!=null"> and a.item_no like concat(concat("%",#{itemNo}),"%")</if> <if test="itemNo!=null"> and a.item_no like concat(concat('%',#{itemNo}),'%')</if>
<if test="isScore!=null"> and a.is_Score = #{isScore}</if> <if test="isScore!=null"> and a.is_Score = #{isScore}</if>
<if test="itemType!=null"> and a.item_Type = #{itemType} </if> <if test="itemType!=null"> and a.item_Type = #{itemType} </if>
<!-- <if test="level!=null"> and a.level = #{level} </if> --> <!-- <if test="level!=null"> and a.level = #{level} </if> -->
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
and item_type = #{itemType} and item_type = #{itemType}
</if> </if>
<if test="nameOrItemNo!=null and nameOrItemNo !='' "> <if test="nameOrItemNo!=null and nameOrItemNo !='' ">
and (name like concat("%", #{nameOrItemNo}, "%") or item_no like concat("%", #{nameOrItemNo}, "%")) and (name like concat('%', #{nameOrItemNo}, '%') or item_no like concat('%', #{nameOrItemNo}, '%'))
</if> </if>
<if test="equipmentType!=null and equipmentType.size()>0"> <if test="equipmentType!=null and equipmentType.size()>0">
and equipment_type in and equipment_type in
...@@ -235,8 +235,8 @@ ...@@ -235,8 +235,8 @@
FROM FROM
p_input_item a p_input_item a
where a.is_delete = '0' and a.input_type!='1' where a.is_delete = '0' and a.input_type!='1'
<if test="name!=null"> and a.name like concat(concat("%",#{name}),"%")</if> <if test="name!=null"> and a.name like concat(concat('%',#{name}),'%')</if>
<if test="itemNo!=null"> and a.item_no like concat(concat("%",#{itemNo}),"%")</if> <if test="itemNo!=null"> and a.item_no like concat(concat('%',#{itemNo}),'%')</if>
<if test="isScore!=null"> and a.is_Score = #{isScore}</if> <if test="isScore!=null"> and a.is_Score = #{isScore}</if>
<if test="itemType!=null"> and a.item_Type = #{itemType} </if> <if test="itemType!=null"> and a.item_Type = #{itemType} </if>
<if test="orgCode!=null"> and a.org_Code = #{orgCode}</if> <if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>
...@@ -315,8 +315,8 @@ ...@@ -315,8 +315,8 @@
p_input_item a left join p_catalog_tree b on a.catalog_id = b.id p_input_item a left join p_catalog_tree b on a.catalog_id = b.id
where a.is_delete = '0' where a.is_delete = '0'
and a.input_type!='1' and a.input_type!='1'
<if test="name!=null"> and a.name like concat(concat("%",#{name}),"%")</if> <if test="name!=null"> and a.name like concat(concat('%',#{name}),'%')</if>
<if test="itemNo!=null"> and a.item_no like concat(concat("%",#{itemNo}),"%")</if> <if test="itemNo!=null"> and a.item_no like concat(concat('%',#{itemNo}),'%')</if>
<if test="isScore!=null"> and a.is_Score = #{isScore}</if> <if test="isScore!=null"> and a.is_Score = #{isScore}</if>
<if test="itemType!=null"> and a.item_Type = #{itemType} </if> <if test="itemType!=null"> and a.item_Type = #{itemType} </if>
<if test="orgCode!=null"> and a.org_Code = #{orgCode}</if> <if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>
...@@ -414,8 +414,8 @@ ...@@ -414,8 +414,8 @@
p_input_item a left join p_catalog_tree b on a.catalog_id = b.id p_input_item a left join p_catalog_tree b on a.catalog_id = b.id
where a.is_delete = '0' where a.is_delete = '0'
and a.input_type!='1' and a.input_type!='1'
<if test="name!=null"> and a.name like concat(concat("%",#{name}),"%")</if> <if test="name!=null"> and a.name like concat(concat('%',#{name}),'%')</if>
<if test="itemNo!=null"> and a.item_no like concat(concat("%",#{itemNo}),"%")</if> <if test="itemNo!=null"> and a.item_no like concat(concat('%',#{itemNo}),'%')</if>
<if test="isScore!=null"> and a.is_Score = #{isScore}</if> <if test="isScore!=null"> and a.is_Score = #{isScore}</if>
<if test="itemType!=null"> and a.item_Type = #{itemType} </if> <if test="itemType!=null"> and a.item_Type = #{itemType} </if>
<if test="orgCode!=null"> and a.org_Code = #{orgCode}</if> <if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>
...@@ -516,7 +516,7 @@ ...@@ -516,7 +516,7 @@
</select> </select>
<select id="getAllCategoryName" resultType="java.util.Map"> <select id="getAllCategoryName" resultType="java.util.Map">
select code, `name` from wl_equipment_category select code, name from wl_equipment_category
</select> </select>
<delete id="delPointInputItemById"> <delete id="delPointInputItemById">
......
...@@ -5,95 +5,95 @@ ...@@ -5,95 +5,95 @@
<!-- 另存计划 --> <!-- 另存计划 -->
<insert id="saveAs" parameterType="String"> <insert id="saveAs" parameterType="String">
INSERT INTO p_plan ( INSERT INTO p_plan (
`name`, name,
`dept_id`, dept_id,
`org_code`, org_code,
`route_id`, route_id,
`plan_type`, plan_type,
`is_fixed_date`, is_fixed_date,
`in_order`, in_order,
`plan_begin`, plan_begin,
`plan_end`, plan_end,
`day_rate`, day_rate,
`day_time`, day_time,
`day_interval`, day_interval,
`day_interval_unit`, day_interval_unit,
`day_begin`, day_begin,
`day_end`, day_end,
`execute_interval`, execute_interval,
`month_type`, month_type,
`what_day`, what_day,
`what_week`, what_week,
`week_day`, week_day,
`duration`, duration,
`user_id`, user_id,
`execute_rate`, execute_rate,
`week_begin_num`, week_begin_num,
`week_end_num`, week_end_num,
`min_space`, min_space,
`is_score`, is_score,
`score_formula`, score_formula,
`status`, status,
`error`, error,
`next_gen_date`, next_gen_date,
`create_by`, create_by,
`create_date`, create_date,
`last_upd_by`, last_upd_by,
`last_upd_time`, last_upd_time,
`remark`, remark,
`remark1`, remark1,
`remark2`, remark2,
`is_single_execution`, is_single_execution,
`user_dept` user_dept
) SELECT ) SELECT
CONCAT(`name`, '复制'), CONCAT(name, '复制'),
`dept_id`, dept_id,
`org_code`, org_code,
`route_id`, route_id,
`plan_type`, plan_type,
`is_fixed_date`, is_fixed_date,
`in_order`, in_order,
`plan_begin`, plan_begin,
`plan_end`, plan_end,
`day_rate`, day_rate,
`day_time`, day_time,
`day_interval`, day_interval,
`day_interval_unit`, day_interval_unit,
`day_begin`, day_begin,
`day_end`, day_end,
`execute_interval`, execute_interval,
`month_type`, month_type,
`what_day`, what_day,
`what_week`, what_week,
`week_day`, week_day,
`duration`, duration,
`user_id`, user_id,
`execute_rate`, execute_rate,
`week_begin_num`, week_begin_num,
`week_end_num`, week_end_num,
`min_space`, min_space,
`is_score`, is_score,
`score_formula`, score_formula,
`status`, status,
`error`, error,
`next_gen_date`, next_gen_date,
`create_by`, create_by,
`create_date`, create_date,
`last_upd_by`, last_upd_by,
`last_upd_time`, last_upd_time,
`remark`, remark,
`remark1`, remark1,
`remark2`, remark2,
`is_single_execution`, is_single_execution,
`user_dept` user_dept
FROM FROM
`p_plan` p_plan
WHERE WHERE
id = #{id} id = #{id}
</insert> </insert>
<select id="getPlanByRouteId" resultType="com.yeejoin.amos.patrol.dao.entity.Plan"> <select id="getPlanByRouteId" resultType="com.yeejoin.amos.patrol.dao.entity.Plan">
SELECT * FROM `p_plan` SELECT * FROM p_plan
<where> <where>
is_delete = 0 is_delete = 0
<if test="routeId != null"> and route_id = #{routeId}</if> <if test="routeId != null"> and route_id = #{routeId}</if>
...@@ -118,21 +118,21 @@ ...@@ -118,21 +118,21 @@
p_route b p_route b
WHERE WHERE
a.route_Id = b.id and a.is_delete = 0 a.route_Id = b.id and a.is_delete = 0
<if test="planName!=null"> and a.name like concat(concat("%",#{planName}),"%")</if> <if test="planName!=null"> and a.name like concat(concat('%',#{planName}),'%')</if>
<if test="planType!=null"> and a.plan_Type = #{planType}</if> <if test="planType!=null"> and a.plan_Type = #{planType}</if>
<if test="routeId!=null"> and a.route_Id = #{routeId}</if> <if test="routeId!=null"> and a.route_Id = #{routeId}</if>
<if test="remark!=null"> and a.remark like concat(concat("%",#{remark}),"%")</if> <if test="remark!=null"> and a.remark like concat(concat('%',#{remark}),'%')</if>
<if test="deptId!=null"> and a.dept_id = #{deptId}</if> <if test="deptId!=null"> and a.dept_id = #{deptId}</if>
<if test="orgCode!=null"> and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})</if> <if test="orgCode!=null"> and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})</if>
<if test="userId!=null"> and FIND_IN_SET(#{userId},a.user_id)</if> <if test="userId!=null"> and FIND_IN_SET(#{userId},a.user_id)</if>
<if test="bizOrgCode!=null"> and b.biz_org_code like concat(concat("%",#{bizOrgCode}),"%")</if> <if test="bizOrgCode!=null"> and b.biz_org_code like concat(concat('%',#{bizOrgCode}),'%')</if>
</select> </select>
<!--巡检计划查询 --> <!--巡检计划查询 -->
<select id="getPlanInfo" resultType="java.util.HashMap"> <select id="getPlanInfo" resultType="java.util.HashMap">
SELECT SELECT
a.id,a.name , IFNULL(a.plan_begin,"") planBegin,a.`status`, a.id,a.name , IFNULL(a.plan_begin,"") planBegin,a.status,
(case a.plan_type (case a.plan_type
when 1 THEN '天' when 1 THEN '天'
when 2 THEN '周' when 2 THEN '周'
...@@ -150,13 +150,13 @@ ...@@ -150,13 +150,13 @@
p_route b p_route b
WHERE WHERE
a.route_Id = b.id and a.is_delete = 0 a.route_Id = b.id and a.is_delete = 0
<if test="planName!=null"> and a.name like concat(concat("%",#{planName}),"%")</if> <if test="planName!=null"> and a.name like concat(concat('%',#{planName}),'%')</if>
<if test="planType!=null"> and a.plan_Type = #{planType}</if> <if test="planType!=null"> and a.plan_Type = #{planType}</if>
<if test="routeId!=null"> and a.route_Id = #{routeId}</if> <if test="routeId!=null"> and a.route_Id = #{routeId}</if>
<if test="remark!=null"> and a.remark1 like concat(concat("%",#{remark}),"%")</if> <if test="remark!=null"> and a.remark1 like concat(concat('%',#{remark}),'%')</if>
<if test="orgCode!=null"> and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})</if> <if test="orgCode!=null"> and (a.org_Code like concat (#{orgCode},"-%")or a.org_Code= #{orgCode})</if>
<if test="userId!=null"> and FIND_IN_SET(#{userId},a.user_id)</if> <if test="userId!=null"> and FIND_IN_SET(#{userId},a.user_id)</if>
<if test="bizOrgCode!=null"> and b.biz_org_code like concat(concat("%",#{bizOrgCode}),"%")</if> <if test="bizOrgCode!=null"> and b.biz_org_code like concat(concat('%',#{bizOrgCode}),'%')</if>
order by a.id desc order by a.id desc
<choose> <choose>
...@@ -176,25 +176,25 @@ ...@@ -176,25 +176,25 @@
p_route b p_route b
WHERE WHERE
a.is_delete = 0 and a.route_Id = b.id a.is_delete = 0 and a.route_Id = b.id
<if test="planName!=null"> and a.name like concat(concat("%",#{planName}),"%")</if> <if test="planName!=null"> and a.name like concat(concat('%',#{planName}),'%')</if>
<if test="planType!=null"> and a.plan_Type = #{planType}</if> <if test="planType!=null"> and a.plan_Type = #{planType}</if>
<if test="routeId!=null"> and a.route_Id = #{routeId}</if> <if test="routeId!=null"> and a.route_Id = #{routeId}</if>
<if test="remark!=null"> and a.remark like concat(concat("%",#{remark}),"%")</if> <if test="remark!=null"> and a.remark like concat(concat('%',#{remark}),'%')</if>
<if test="orgCode!=null"> and (a.org_code LIKE CONCAT( #{orgCode}, '-%' ) or a.org_code= #{orgCode} )</if> <if test="orgCode!=null"> and (a.org_code LIKE CONCAT( #{orgCode}, '-%' ) or a.org_code= #{orgCode} )</if>
<if test="userId!=null"> and FIND_IN_SET(#{userId},a.user_id)</if> <if test="userId!=null"> and FIND_IN_SET(#{userId},a.user_id)</if>
<if test="bizOrgCode!=null"> and b.biz_org_code like concat(#{bizOrgCode},"%")</if> <if test="bizOrgCode!=null"> and b.biz_org_code like concat(#{bizOrgCode},'%')</if>
order by a.id order by a.id
</select> </select>
<select id="queryPlanListByOrgCode" resultType="Map"> <select id="queryPlanListByOrgCode" resultType="Map">
select p.id, p.name from p_plan p where p.is_delete = 0 and and b.biz_org_code like concat(#{loginOrgCode},"%") select p.id, p.name from p_plan p where p.is_delete = 0 and and b.biz_org_code like concat(#{loginOrgCode},'%')
</select> </select>
<update id="initUpdatePlanStatus"> <update id="initUpdatePlanStatus">
UPDATE p_plan p SET p.`status` = 1 WHERE p.is_delete = 0 AND p.`status` = 0 AND p.plan_end <![CDATA[ < ]]> CURDATE(); UPDATE p_plan p SET p.status = 1 WHERE p.is_delete = 0 AND p.status = 0 AND p.plan_end <![CDATA[ < ]]> CURDATE();
</update> </update>
<update id="initUpdatePlanNextGenDate"> <update id="initUpdatePlanNextGenDate">
UPDATE p_plan p SET p.next_gen_date = CURDATE() WHERE p.is_delete = 0 AND p.`status` = 0 AND p.plan_end IS NULL AND p.next_gen_date <![CDATA[ < ]]> CURDATE(); UPDATE p_plan p SET p.next_gen_date = CURDATE() WHERE p.is_delete = 0 AND p.status = 0 AND p.plan_end IS NULL AND p.next_gen_date <![CDATA[ < ]]> CURDATE();
</update> </update>
</mapper> </mapper>
\ No newline at end of file
...@@ -151,18 +151,18 @@ ...@@ -151,18 +151,18 @@
FROM FROM
p_task a p_task a
<!-- <trim prefix="WHERE" prefixOverrides="AND "> <!-- <trim prefix="WHERE" prefixOverrides="AND ">
<if test="remark!=null"> and a.remark like concat(concat("%",#{remark}),"%")</if> <if test="remark!=null"> and a.remark like concat(concat('%',#{remark}),'%')</if>
<if test="status!=null"> and a.status = #{status}</if> <if test="status!=null"> and a.status = #{status}</if>
<if test="title!=null"> and a.title like concat(concat("%",#{title}),"%")</if> <if test="title!=null"> and a.title like concat(concat('%',#{title}),'%')</if>
<if test="userId!=null"> and (a.publisher = #{userId} or a.executor_id = #{userId})</if> <if test="userId!=null"> and (a.publisher = #{userId} or a.executor_id = #{userId})</if>
<if test="orgCode!=null"> and a.org_Code like #{orgCode}</if> <if test="orgCode!=null"> and a.org_Code like #{orgCode}</if>
<if test="pointId!=null"> and a.point_id = #{pointId}</if> <if test="pointId!=null"> and a.point_id = #{pointId}</if>
</trim> --> </trim> -->
<trim prefix="WHERE" prefixOverrides="AND "> <trim prefix="WHERE" prefixOverrides="AND ">
<if test="remark!=null"> and a.remark like concat(concat("%",#{remark}),"%")</if> <if test="remark!=null"> and a.remark like concat(concat('%',#{remark}),'%')</if>
<if test="status!=null"> and a.status = #{status}</if> <if test="status!=null"> and a.status = #{status}</if>
<if test="title!=null"> and a.title like concat(concat("%",#{title}),"%")</if> <if test="title!=null"> and a.title like concat(concat('%',#{title}),'%')</if>
<if test="userId!=null"> and (a.publisher = #{userId} or a.executor_id = #{userId})</if> <if test="userId!=null"> and (a.publisher = #{userId} or a.executor_id = #{userId})</if>
<if test="orgCode!=null"> and a.org_Code = #{orgCode}</if> <if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>
<if test="deptId!=null"> and a.dep_id = #{deptId}</if> <if test="deptId!=null"> and a.dep_id = #{deptId}</if>
...@@ -191,17 +191,17 @@ ...@@ -191,17 +191,17 @@
<!-- IFNULL(case when u.mobile = '' or u.mobile is null then null else u.mobile END,u.telephone) as telep, <!-- IFNULL(case when u.mobile = '' or u.mobile is null then null else u.mobile END,u.telephone) as telep,
--> a.remark, --> a.remark,
a.feedback_num AS feedbackNum, a.feedback_num AS feedbackNum,
( SELECT CONCAT(pp.`name`,'(',GROUP_CONCAT(pii.`name`),')') FROM p_task_detail ptd ( SELECT CONCAT(pp.name,'(',GROUP_CONCAT(pii.name),')') FROM p_task_detail ptd
LEFT JOIN p_input_item pii ON pii.id = ptd.item_id LEFT JOIN p_input_item pii ON pii.id = ptd.item_id
LEFT JOIN p_point pp ON pp.id = ptd.point_id LEFT JOIN p_point pp ON pp.id = ptd.point_id
WHERE ptd.task_id = a.id WHERE ptd.task_id = a.id
GROUP BY pp.`name`) as pointItemName GROUP BY pp.name) as pointItemName
from p_task a from p_task a
<!-- LEFT JOIN s_user u on u.id = a.executor_id --> <!-- LEFT JOIN s_user u on u.id = a.executor_id -->
<trim prefix="WHERE" prefixOverrides="AND "> <trim prefix="WHERE" prefixOverrides="AND ">
<if test="remark!=null"> and a.remark like concat(concat("%",#{remark}),"%")</if> <if test="remark!=null"> and a.remark like concat(concat('%',#{remark}),'%')</if>
<if test="status!=null"> and a.status = #{status}</if> <if test="status!=null"> and a.status = #{status}</if>
<if test="title!=null"> and a.title like concat(concat("%",#{title}),"%")</if> <if test="title!=null"> and a.title like concat(concat('%',#{title}),'%')</if>
<if test="userId!=null"> and (a.publisher = #{userId} or a.executor_id = #{userId})</if> <if test="userId!=null"> and (a.publisher = #{userId} or a.executor_id = #{userId})</if>
<if test="orgCode!=null"> and a.org_Code = #{orgCode}</if> <if test="orgCode!=null"> and a.org_Code = #{orgCode}</if>
<if test="deptId!=null"> and a.dep_id = #{deptId}</if> <if test="deptId!=null"> and a.dep_id = #{deptId}</if>
...@@ -224,14 +224,14 @@ ...@@ -224,14 +224,14 @@
FROM FROM
( (
SELECT SELECT
@s :=@s - 1 AS `index`, @s :=@s - 1 AS index,
LEFT ( LEFT (
DATE_SUB( DATE_SUB(
CURRENT_DATE, CURRENT_DATE,
INTERVAL @s MONTH INTERVAL @s MONTH
), ),
7 7
) AS `date` ) AS date
FROM FROM
mysql.help_topic, mysql.help_topic,
( (
...@@ -256,11 +256,11 @@ ...@@ -256,11 +256,11 @@
case when t.status = 2 then 1 else 0 end canelNum, case when t.status = 2 then 1 else 0 end canelNum,
case when t.status = 1 then 1 else 0 end finishNum case when t.status = 1 then 1 else 0 end finishNum
from ( from (
SELECT @a :=@a + 1 as `index`, DATE(ADDDATE(CURRENT_DATE, INTERVAL @a DAY)) AS `date` SELECT @a :=@a + 1 as index, DATE(ADDDATE(CURRENT_DATE, INTERVAL @a DAY)) AS date
FROM mysql.help_topic,(SELECT @a := 0) temp FROM mysql.help_topic,(SELECT @a := 0) temp
WHERE @a <![CDATA[<]]> DAY(LAST_DAY(CURRENT_DATE)) - DAY(CURRENT_DATE) WHERE @a <![CDATA[<]]> DAY(LAST_DAY(CURRENT_DATE)) - DAY(CURRENT_DATE)
UNION UNION
SELECT @s :=@s - 1 as `index`, DATE(DATE_SUB(CURRENT_DATE, INTERVAL @s DAY)) AS `date` SELECT @s :=@s - 1 as index, DATE(DATE_SUB(CURRENT_DATE, INTERVAL @s DAY)) AS date
FROM mysql.help_topic,(SELECT @s := day(CURRENT_DATE)) temp FROM mysql.help_topic,(SELECT @s := day(CURRENT_DATE)) temp
WHERE @s > 0 WHERE @s > 0
) date LEFT JOIN p_task t on date.date = DATE_FORMAT(t.publish_time,'%Y%m%d') and t.org_code = #{orgCode} ) date LEFT JOIN p_task t on date.date = DATE_FORMAT(t.publish_time,'%Y%m%d') and t.org_code = #{orgCode}
...@@ -330,15 +330,15 @@ ...@@ -330,15 +330,15 @@
SELECT SELECT
pt.id taskID, pt.id taskID,
pt.title taskName, pt.title taskName,
pt.`status`, pt.status,
pt.publisher_name arranger, pt.publisher_name arranger,
pt.executor, pt.executor,
pt.finish_time AS planTime, pt.finish_time AS planTime,
pt.fact_finish_time AS fishTime, pt.fact_finish_time AS fishTime,
pt.remark AS content, pt.remark AS content,
ptd.point_id AS pointId, ptd.point_id AS pointId,
pp.`name` pointName, pp.name pointName,
pii.`name` AS inputItemName, pii.name AS inputItemName,
pci.input_value AS inputValue, pci.input_value AS inputValue,
pci.is_ok AS inputStatus pci.is_ok AS inputStatus
FROM FROM
...@@ -362,25 +362,25 @@ ...@@ -362,25 +362,25 @@
( (
SELECT SELECT
t.id, t.id,
CASE t.`status` CASE t.status
WHEN 0 THEN WHEN 0 THEN
1 1
ELSE ELSE
0 0
END proccesed, END proccesed,
CASE t.`status` CASE t.status
WHEN 1 THEN WHEN 1 THEN
1 1
ELSE ELSE
0 0
END finished, END finished,
CASE t.`status` CASE t.status
WHEN 2 THEN WHEN 2 THEN
1 1
ELSE ELSE
0 0
END cancel, END cancel,
CASE t.`status` CASE t.status
WHEN 3 THEN WHEN 3 THEN
1 1
ELSE ELSE
...@@ -464,7 +464,7 @@ ...@@ -464,7 +464,7 @@
r.NAME routeName, r.NAME routeName,
</when > </when >
<when test=" statisticsTyle == 3 "> <when test=" statisticsTyle == 3 ">
pt.`name` pointName, pt.name pointName,
</when > </when >
<when test=" statisticsTyle == 4 "> <when test=" statisticsTyle == 4 ">
d.department_name departmentName, d.department_name departmentName,
...@@ -473,25 +473,25 @@ ...@@ -473,25 +473,25 @@
pn.NAME planName, pn.NAME planName,
</when > </when >
</choose> </choose>
CASE t.`status` CASE t.status
WHEN 0 THEN WHEN 0 THEN
1 1
ELSE ELSE
0 0
END proccesed, END proccesed,
CASE t.`status` CASE t.status
WHEN 1 THEN WHEN 1 THEN
1 1
ELSE ELSE
0 0
END finished, END finished,
CASE t.`status` CASE t.status
WHEN 2 THEN WHEN 2 THEN
1 1
ELSE ELSE
0 0
END cancel, END cancel,
CASE t.`status` CASE t.status
WHEN 3 THEN WHEN 3 THEN
1 1
ELSE ELSE
...@@ -639,7 +639,7 @@ ...@@ -639,7 +639,7 @@
r.NAME routeName, r.NAME routeName,
</when> </when>
<when test=" statisticsTyle == 3 "> <when test=" statisticsTyle == 3 ">
pt.`name` pointName, pt.name pointName,
</when> </when>
<when test=" statisticsTyle == 4 "> <when test=" statisticsTyle == 4 ">
t.dep_id departmentName, t.dep_id departmentName,
...@@ -648,25 +648,25 @@ ...@@ -648,25 +648,25 @@
pn.NAME planName, pn.NAME planName,
</when> </when>
</choose> </choose>
CASE t.`status` CASE t.status
WHEN 0 THEN WHEN 0 THEN
1 1
ELSE ELSE
0 0
END proccesed, END proccesed,
CASE t.`status` CASE t.status
WHEN 1 THEN WHEN 1 THEN
1 1
ELSE ELSE
0 0
END finished, END finished,
CASE t.`status` CASE t.status
WHEN 2 THEN WHEN 2 THEN
1 1
ELSE ELSE
0 0
END cancel, END cancel,
CASE t.`status` CASE t.status
WHEN 3 THEN WHEN 3 THEN
1 1
ELSE ELSE
...@@ -785,8 +785,8 @@ ...@@ -785,8 +785,8 @@
td. STATUS, td. STATUS,
td.remark, td.remark,
td.point_id pointId, td.point_id pointId,
CASE WHEN pci.point_classify_name is NULL THEN ii.`name` CASE WHEN pci.point_classify_name is NULL THEN ii.name
ELSE CONCAT(pci.point_classify_name,'-',ii.`name`) ELSE CONCAT(pci.point_classify_name,'-',ii.name)
END itemName, END itemName,
t. NAME pointName, t. NAME pointName,
t.point_no pointNo, t.point_no pointNo,
......
...@@ -160,7 +160,7 @@ ...@@ -160,7 +160,7 @@
<select id="getTaskMsgBos" resultType="com.yeejoin.amos.patrol.business.entity.mybatis.TaskMsgBo"> <select id="getTaskMsgBos" resultType="com.yeejoin.amos.patrol.business.entity.mybatis.TaskMsgBo">
SELECT SELECT
pt.id taskId, pt.id taskId,
pt.`status`, pt.status,
<![CDATA[ <![CDATA[
CONCAT( CONCAT(
'您好,您有一条名称为:', '您好,您有一条名称为:',
...@@ -205,11 +205,11 @@ ...@@ -205,11 +205,11 @@
SELECT SELECT
COUNT(1) AS total COUNT(1) AS total
FROM FROM
`p_msg` m p_msg m
<where> <where>
<if test="orgCode!=null"> and (org_Code like concat (#{orgCode},"-%")or org_Code= #{orgCode})</if> <if test="orgCode!=null"> and (org_Code like concat (#{orgCode},"-%")or org_Code= #{orgCode})</if>
<if test="userId != null">AND m.user_id = #{userId}</if> <if test="userId != null">AND m.user_id = #{userId}</if>
<if test="userName != null and userName != '' ">AND m.`reciver_name` LIKE concat('%', #{userName}, '%')</if> <if test="userName != null and userName != '' ">AND m.reciver_name LIKE concat('%', #{userName}, '%')</if>
<if test="msgType != null">AND m.msg_type = #{msgType}</if> <if test="msgType != null">AND m.msg_type = #{msgType}</if>
<if test="beginDate != null and beginDate != '' ">AND m.create_date <![CDATA[>=]]> #{beginDate}</if> <if test="beginDate != null and beginDate != '' ">AND m.create_date <![CDATA[>=]]> #{beginDate}</if>
<if test="endDate != null and endDate != '' ">AND m.create_date <![CDATA[<=]]> #{endDate}</if> <if test="endDate != null and endDate != '' ">AND m.create_date <![CDATA[<=]]> #{endDate}</if>
...@@ -221,7 +221,7 @@ ...@@ -221,7 +221,7 @@
<select id="getMsgVoData" resultType="com.yeejoin.amos.patrol.business.vo.MsgVo"> <select id="getMsgVoData" resultType="com.yeejoin.amos.patrol.business.vo.MsgVo">
SELECT SELECT
m.id, m.id,
m.`reciver_name` AS userName, m.reciver_name AS userName,
m.body AS msgBody, m.body AS msgBody,
m.msg_type AS msgType, m.msg_type AS msgType,
m.send_time AS sendTime, m.send_time AS sendTime,
...@@ -233,11 +233,11 @@ ...@@ -233,11 +233,11 @@
END AS isImmediately, END AS isImmediately,
m.fixed_time AS fixedTime m.fixed_time AS fixedTime
FROM FROM
`p_msg` m p_msg m
<where> <where>
<if test="orgCode!=null"> and (org_Code like concat (#{orgCode},"-%")or org_Code= #{orgCode})</if> <if test="orgCode!=null"> and (org_Code like concat (#{orgCode},"-%")or org_Code= #{orgCode})</if>
<if test="userId != null">AND m.user_id = #{userId}</if> <if test="userId != null">AND m.user_id = #{userId}</if>
<if test="userName != null and userName != '' ">AND m.`reciver_name` LIKE concat('%', #{userName}, '%')</if> <if test="userName != null and userName != '' ">AND m.reciver_name LIKE concat('%', #{userName}, '%')</if>
<if test="msgType != null">AND m.msg_type = #{msgType}</if> <if test="msgType != null">AND m.msg_type = #{msgType}</if>
<if test="beginDate != null and beginDate != '' ">AND m.create_date <![CDATA[>=]]> #{beginDate}</if> <if test="beginDate != null and beginDate != '' ">AND m.create_date <![CDATA[>=]]> #{beginDate}</if>
<if test="endDate != null and endDate != '' ">AND m.create_date <![CDATA[<=]]> #{endDate}</if> <if test="endDate != null and endDate != '' ">AND m.create_date <![CDATA[<=]]> #{endDate}</if>
...@@ -266,10 +266,10 @@ ...@@ -266,10 +266,10 @@
pms.msg_type msgType, pms.msg_type msgType,
pms.attribute1, pms.attribute1,
pms.attribute2 pms.attribute2
<!-- su.`name`, <!-- su.name,
su.user_name username --> su.user_name username -->
FROM FROM
`p_msg_subscribe` pms p_msg_subscribe pms
<!-- LEFT JOIN s_user su ON su.id = pms.user_id --> <!-- LEFT JOIN s_user su ON su.id = pms.user_id -->
WHERE WHERE
...@@ -292,9 +292,9 @@ ...@@ -292,9 +292,9 @@
<![CDATA[ <![CDATA[
CONCAT( CONCAT(
'您好,巡检工作即将开始!<br />计划名称:', '您好,巡检工作即将开始!<br />计划名称:',
pp.`name`, pp.name,
' <br />巡检路线:', ' <br />巡检路线:',
pr.`name`, pr.name,
' <br />开始时间:', ' <br />开始时间:',
ppt.begin_time, ppt.begin_time,
' <br />结束时间:', ' <br />结束时间:',
...@@ -302,9 +302,9 @@ ...@@ -302,9 +302,9 @@
]]> ]]>
CONCAT( CONCAT(
'您好,巡检工作即将开始!计划名称:', '您好,巡检工作即将开始!计划名称:',
pp.`name`, pp.name,
' 巡检路线:', ' 巡检路线:',
pr.`name`, pr.name,
' 开始时间:', ' 开始时间:',
ppt.begin_time, ppt.begin_time,
' 结束时间:', ' 结束时间:',
...@@ -329,9 +329,9 @@ ...@@ -329,9 +329,9 @@
<![CDATA[ <![CDATA[
CONCAT( CONCAT(
'您好,巡检工作未按计划开始!<br />计划名称:', '您好,巡检工作未按计划开始!<br />计划名称:',
pp.`name`, pp.name,
' <br />巡检路线:', ' <br />巡检路线:',
pr.`name`, pr.name,
' <br />开始时间:', ' <br />开始时间:',
ppt.begin_time, ppt.begin_time,
' <br />结束时间:', ' <br />结束时间:',
...@@ -340,9 +340,9 @@ ...@@ -340,9 +340,9 @@
]]> ]]>
CONCAT( CONCAT(
'您好,巡检工作未按计划开始!计划名称:', '您好,巡检工作未按计划开始!计划名称:',
pp.`name`, pp.name,
'; 巡检路线:', '; 巡检路线:',
pr.`name`, pr.name,
'; 开始时间:', '; 开始时间:',
ppt.begin_time, ppt.begin_time,
'; 结束时间:', '; 结束时间:',
...@@ -367,11 +367,11 @@ ...@@ -367,11 +367,11 @@
<![CDATA[ <![CDATA[
CONCAT( CONCAT(
'您好,巡检工作已结束!<br />以下地点尚未巡检:', '您好,巡检工作已结束!<br />以下地点尚未巡检:',
GROUP_CONCAT(p.`name`), GROUP_CONCAT(p.name),
'<br />计划名称:', '<br />计划名称:',
pp.`name`, pp.name,
' <br />巡检路线:', ' <br />巡检路线:',
pr.`name`, pr.name,
' <br />开始时间:', ' <br />开始时间:',
ppt.begin_time, ppt.begin_time,
' <br />结束时间:', ' <br />结束时间:',
...@@ -380,11 +380,11 @@ ...@@ -380,11 +380,11 @@
]]> ]]>
CONCAT( CONCAT(
'您好,巡检工作已结束!以下地点尚未巡检:', '您好,巡检工作已结束!以下地点尚未巡检:',
GROUP_CONCAT(p.`name`), GROUP_CONCAT(p.name),
';计划名称:', ';计划名称:',
pp.`name`, pp.name,
'; 巡检路线:', '; 巡检路线:',
pr.`name`, pr.name,
'; 开始时间:', '; 开始时间:',
ppt.begin_time, ppt.begin_time,
'; 结束时间:', '; 结束时间:',
...@@ -416,7 +416,7 @@ ...@@ -416,7 +416,7 @@
SELECT SELECT
point_id point_id
FROM FROM
`p_check` p_check
WHERE WHERE
id = #{checkId} id = #{checkId}
) t ) t
...@@ -434,7 +434,7 @@ ...@@ -434,7 +434,7 @@
SELECT SELECT
point_id point_id
FROM FROM
`p_check` p_check
WHERE WHERE
id = #{checkId} id = #{checkId}
) t ) t
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</select> </select>
<select id="getPointClassInputItemById" resultType="com.yeejoin.amos.patrol.business.vo.PointInputItemVo"> <select id="getPointClassInputItemById" resultType="com.yeejoin.amos.patrol.business.vo.PointInputItemVo">
SELECT SELECT
pc.`name` classifyNames, pc.name classifyNames,
pc.id classifyIds, pc.id classifyIds,
pi.order_no pOrderNo, pi.order_no pOrderNo,
pi.id AS pointItemId, pi.id AS pointItemId,
...@@ -411,10 +411,10 @@ ...@@ -411,10 +411,10 @@
SELECT SELECT
ppi.order_no pOrderNo, ppi.order_no pOrderNo,
ppi.id pointItemId, ppi.id pointItemId,
ppc.`name` classifyNames, ppc.name classifyNames,
ppc.id classifyIds, ppc.id classifyIds,
pii.id, pii.id,
pii.`name`, pii.name,
pii.risk_desc riskDesc, pii.risk_desc riskDesc,
pii.order_no orderNo, pii.order_no orderNo,
pii.item_type itemType, pii.item_type itemType,
...@@ -430,13 +430,13 @@ ...@@ -430,13 +430,13 @@
pii.create_by createBy, pii.create_by createBy,
pii.create_date createDate, pii.create_date createDate,
pii.is_delete isDelete, pii.is_delete isDelete,
pii.`level`, pii.level,
pii.item_no itemNo, pii.item_no itemNo,
pii.original_id originalId, pii.original_id originalId,
pii.basis_json basisJson, pii.basis_json basisJson,
pii.org_code orgCode pii.org_code orgCode
FROM FROM
`p_point_inputitem` ppi p_point_inputitem ppi
LEFT JOIN p_input_item pii ON pii.id = ppi.input_item_id LEFT JOIN p_input_item pii ON pii.id = ppi.input_item_id
LEFT JOIN p_point_classify ppc ON FIND_IN_SET(ppc.id, ppi.classify_ids) > 0 LEFT JOIN p_point_classify ppc ON FIND_IN_SET(ppc.id, ppi.classify_ids) > 0
WHERE WHERE
...@@ -450,13 +450,13 @@ ...@@ -450,13 +450,13 @@
SELECT SELECT
ppc.id, ppc.id,
ppc.point_id pointId, ppc.point_id pointId,
ppc.`name`, ppc.name,
ppc.order_no orderNo, ppc.order_no orderNo,
ppc.equipment_id equipmentId, ppc.equipment_id equipmentId,
ppc.code, ppc.code,
ppc.data_source_code dataSourceCode ppc.data_source_code dataSourceCode
FROM FROM
`p_route_point_item` prpi p_route_point_item prpi
LEFT JOIN p_route_point prp ON prp.id = prpi.route_point_id LEFT JOIN p_route_point prp ON prp.id = prpi.route_point_id
LEFT JOIN p_point_classify ppc ON ppc.id = prpi.point_classify_id LEFT JOIN p_point_classify ppc ON ppc.id = prpi.point_classify_id
WHERE WHERE
...@@ -465,7 +465,7 @@ ...@@ -465,7 +465,7 @@
GROUP BY GROUP BY
ppc.id, ppc.id,
ppc.point_id, ppc.point_id,
ppc.`name`, ppc.name,
ppc.order_no ppc.order_no
</select> </select>
...@@ -498,49 +498,49 @@ ...@@ -498,49 +498,49 @@
SELECT SELECT
IFNULL( count( * ), 0 ) IFNULL( count( * ), 0 )
FROM FROM
`p_check` p_check
WHERE WHERE
check_time LIKE CONCAT( DATE_FORMAT( now( ), '%Y-%m-%d' ), '%' ) check_time LIKE CONCAT( DATE_FORMAT( now( ), '%Y-%m-%d' ), '%' )
<if test="orgCode!=null"> <if test="orgCode!=null">
and (org_code LIKE CONCAT('%',#{orgCode},'%' )) and (org_code LIKE CONCAT('%',#{orgCode},'%' ))
</if> </if>
AND is_ok = 1 AND is_ok = 1
) AS `over_num`, ) AS over_num,
( (
SELECT SELECT
IFNULL( count( * ), 0 ) IFNULL( count( * ), 0 )
FROM FROM
`p_check` p_check
WHERE WHERE
check_time LIKE CONCAT( DATE_FORMAT( now( ), '%Y-%m-%d' ), '%' ) check_time LIKE CONCAT( DATE_FORMAT( now( ), '%Y-%m-%d' ), '%' )
<if test="orgCode!=null"> <if test="orgCode!=null">
and (org_code LIKE CONCAT('%',#{orgCode},'%' )) and (org_code LIKE CONCAT('%',#{orgCode},'%' ))
</if> </if>
AND is_ok = 2 AND is_ok = 2
) AS `unfinish_num`, ) AS unfinish_num,
( (
SELECT SELECT
IFNULL( count( * ), 0 ) IFNULL( count( * ), 0 )
FROM FROM
`p_check` p_check
WHERE WHERE
check_time LIKE CONCAT( DATE_FORMAT( now( ), '%Y-%m-%d' ), '%' ) check_time LIKE CONCAT( DATE_FORMAT( now( ), '%Y-%m-%d' ), '%' )
<if test="orgCode!=null"> <if test="orgCode!=null">
and (org_code LIKE CONCAT('%',#{orgCode},'%' )) and (org_code LIKE CONCAT('%',#{orgCode},'%' ))
</if> </if>
AND is_ok = 3 AND is_ok = 3
) AS `miss_num`, ) AS miss_num,
( (
SELECT SELECT
ifnull( sum( `p_plan_task`.`point_num` ), 0 ) ifnull( sum( p_plan_task.point_num ), 0 )
FROM FROM
`p_plan_task` p_plan_task
WHERE WHERE
( `p_plan_task`.`check_date` LIKE concat( curdate( ), '%' ) ) ( p_plan_task.check_date LIKE concat( curdate( ), '%' ) )
<if test="orgCode!=null"> <if test="orgCode!=null">
and (org_code LIKE CONCAT('%',#{orgCode},'%' )) and (org_code LIKE CONCAT('%',#{orgCode},'%' ))
</if> </if>
) AS `today_num` ) AS today_num
</select> </select>
<!-- 巡检点统计 --> <!-- 巡检点统计 -->
<select id="getSumPtForDept" resultType="java.util.HashMap"> <select id="getSumPtForDept" resultType="java.util.HashMap">
...@@ -807,25 +807,25 @@ ...@@ -807,25 +807,25 @@
( (
SELECT SELECT
pt.id, pt.id,
CASE pt.`status` CASE pt.status
WHEN '1' THEN WHEN '1' THEN
1 1
ELSE ELSE
0 0
END QUALIFIED, END QUALIFIED,
CASE pt.`status` CASE pt.status
WHEN '0' THEN WHEN '0' THEN
1 1
ELSE ELSE
0 0
END UNPLAN, END UNPLAN,
CASE pt.`status` CASE pt.status
WHEN '2' THEN WHEN '2' THEN
1 1
ELSE ELSE
0 0
END UNQUALIFIED, END UNQUALIFIED,
CASE pt.`status` CASE pt.status
WHEN '3' THEN WHEN '3' THEN
1 1
ELSE ELSE
...@@ -856,25 +856,25 @@ ...@@ -856,25 +856,25 @@
pt.id, pt.id,
pt.charge_dept_id, pt.charge_dept_id,
case when pt.charge_dept_id = ''|| pt.charge_dept_id is null then '其他' else pt.charge_dept_id end department_name, case when pt.charge_dept_id = ''|| pt.charge_dept_id is null then '其他' else pt.charge_dept_id end department_name,
CASE pt.`status` CASE pt.status
WHEN '1' THEN WHEN '1' THEN
1 1
ELSE ELSE
0 0
END QUALIFIED, END QUALIFIED,
CASE pt.`status` CASE pt.status
WHEN '0' THEN WHEN '0' THEN
1 1
ELSE ELSE
0 0
END UNPLAN, END UNPLAN,
CASE pt.`status` CASE pt.status
WHEN '2' THEN WHEN '2' THEN
1 1
ELSE ELSE
0 0
END UNQUALIFIED, END UNQUALIFIED,
CASE pt.`status` CASE pt.status
WHEN '3' THEN WHEN '3' THEN
1 1
ELSE ELSE
...@@ -902,12 +902,12 @@ ...@@ -902,12 +902,12 @@
pp.id pointId, pp.id pointId,
pp.floor, pp.floor,
pp.is_indoor isIndoor, pp.is_indoor isIndoor,
pp.`name` pointName, pp.name pointName,
pp.coordinates, pp.coordinates,
pp.`level` pointLevel, pp.level pointLevel,
pp.`status`, pp.status,
pp.address, pp.address,
ppl.`name` pplName, ppl.name pplName,
ppl.user_id userName, ppl.user_id userName,
ppl.user_id userId, ppl.user_id userId,
pp.org_code orgCode, pp.org_code orgCode,
...@@ -972,7 +972,7 @@ ...@@ -972,7 +972,7 @@
<select id="queryLeavelPoint" resultMap="leavelPoint"> <select id="queryLeavelPoint" resultMap="leavelPoint">
SELECT SELECT
p.id, p.id,
p.`status`, p.status,
p.offline, p.offline,
p.NAME pointName, p.NAME pointName,
point_no pointNo, point_no pointNo,
...@@ -993,14 +993,14 @@ ...@@ -993,14 +993,14 @@
WHERE p.is_delete = 0 WHERE p.is_delete = 0
AND p.offline = 1 AND p.offline = 1
AND ( select COUNT(p_point_inputitem.id) FROM p_point_inputitem where p_point_inputitem.point_id =p.id) >0 AND ( select COUNT(p_point_inputitem.id) FROM p_point_inputitem where p_point_inputitem.point_id =p.id) >0
<if test="orgCode != null and orgCode != ''">AND p.biz_org_code LIKE concat("%", #{orgCode}, "%")</if> <if test="orgCode != null and orgCode != ''">AND p.biz_org_code LIKE concat('%', #{orgCode}, '%')</if>
<!-- <if test="startTime !=null and startTime != ''">AND p.last_update_time <![CDATA[>= ]]> STR_TO_DATE(#{startTime}, '%Y-%m-%d')</if>--> <!-- <if test="startTime !=null and startTime != ''">AND p.last_update_time <![CDATA[>= ]]> STR_TO_DATE(#{startTime}, '%Y-%m-%d')</if>-->
</select> </select>
<select id="getPoints" resultType="Map"> <select id="getPoints" resultType="Map">
SELECT SELECT
p.point_no pointNo, p.point_no pointNo,
p.`name` pointName, p.name pointName,
CASE p.`status` CASE p.status
WHEN '0' THEN WHEN '0' THEN
'未纳入巡检' '未纳入巡检'
WHEN '1' THEN WHEN '1' THEN
...@@ -1010,7 +1010,7 @@ ...@@ -1010,7 +1010,7 @@
ELSE ELSE
'漏检' '漏检'
END status , END status ,
pct.`name` catalogName, pct.name catalogName,
p.address, p.address,
sd.department_name depName, sd.department_name depName,
su. NAME username, su. NAME username,
...@@ -1042,7 +1042,7 @@ ...@@ -1042,7 +1042,7 @@
<select id="getPointConfigDom" resultMap="pointConfigResultMap"> <select id="getPointConfigDom" resultMap="pointConfigResultMap">
SELECT SELECT
p.id pointId, p.id pointId,
p.`status` status, p.status status,
p.NAME pointName, p.NAME pointName,
p.point_no pointNo, p.point_no pointNo,
p.is_fixed isFixed, p.is_fixed isFixed,
...@@ -1122,12 +1122,12 @@ ...@@ -1122,12 +1122,12 @@
SELECT SELECT
p.id, p.id,
p.point_no pointNo, p.point_no pointNo,
p.`name`, p.name,
p.is_fixed isFixed, p.is_fixed isFixed,
CONCAT(p.shot_min_number,'-',p.shot_max_number) shotNumber, CONCAT(p.shot_min_number,'-',p.shot_max_number) shotNumber,
p.route_name routeName, p.route_name routeName,
ppc.id classifyId, ppc.id classifyId,
ppc.`name` classifyName, ppc.name classifyName,
p.biz_org_name p.biz_org_name
FROM FROM
p_point p p_point p
...@@ -1138,10 +1138,10 @@ ...@@ -1138,10 +1138,10 @@
and p.biz_org_code like CONCAT(#{bizOrgCode},'%') and p.biz_org_code like CONCAT(#{bizOrgCode},'%')
</if> </if>
<if test="pointNo !=null and pointNo !=''"> <if test="pointNo !=null and pointNo !=''">
and p.point_no like concat(concat("%",#{pointNo}),"%") and p.point_no like concat(concat('%',#{pointNo}),'%')
</if> </if>
<if test="name !=null and name !=''"> <if test="name !=null and name !=''">
and p.name like concat(concat("%",#{name}),"%") and p.name like concat(concat('%',#{name}),'%')
</if> </if>
<if test="isFixed !=null and isFixed !=''"> <if test="isFixed !=null and isFixed !=''">
and p.is_fixed = #{isFixed} and p.is_fixed = #{isFixed}
...@@ -1167,12 +1167,12 @@ ...@@ -1167,12 +1167,12 @@
p_point p p_point p
where p.is_delete = 0 where p.is_delete = 0
<if test="orgCode!=null and orgCode !=''">and p.org_code= #{orgCode} </if> <if test="orgCode!=null and orgCode !=''">and p.org_code= #{orgCode} </if>
<if test="name!=null and name !=''">and p.name like concat(concat("%",#{name}),"%")</if> <if test="name!=null and name !=''">and p.name like concat(concat('%',#{name}),'%')</if>
<if test="code !=null and code !=''"> and p.point_no like concat(concat("%",#{code}),"%")</if> <if test="code !=null and code !=''"> and p.point_no like concat(concat('%',#{code}),'%')</if>
</select> </select>
<select id="queryAllPointConfig" resultType="java.util.Map"> <select id="queryAllPointConfig" resultType="java.util.Map">
SELECT SELECT
c.`name`, c.name,
c.point_code pointCode c.point_code pointCode
FROM FROM
p_point_config c, p_point_config c,
...@@ -1250,10 +1250,10 @@ ...@@ -1250,10 +1250,10 @@
</foreach> </foreach>
</if> </if>
<if test="name != null and name.length > 0"> <if test="name != null and name.length > 0">
AND pp.name LIKE concat("%", #{name}, "%") AND pp.name LIKE concat('%', #{name}, '%')
</if> </if>
<if test="pointNo != null and pointNo.length > 0"> <if test="pointNo != null and pointNo.length > 0">
AND pp.point_no LIKE concat("%", #{pointNo}, "%") AND pp.point_no LIKE concat('%', #{pointNo}, '%')
</if> </if>
<if test="nullRiskSourceId == true"> <if test="nullRiskSourceId == true">
AND ( pp.risk_source_id is NULL OR trim(pp.risk_source_id)='') AND ( pp.risk_source_id is NULL OR trim(pp.risk_source_id)='')
...@@ -1277,10 +1277,10 @@ ...@@ -1277,10 +1277,10 @@
</foreach> </foreach>
</if> </if>
<if test="name != null and name.length > 0"> <if test="name != null and name.length > 0">
AND pp.name LIKE concat("%", #{name}, "%") AND pp.name LIKE concat('%', #{name}, '%')
</if> </if>
<if test="pointNo != null and pointNo.length > 0"> <if test="pointNo != null and pointNo.length > 0">
AND pp.point_no LIKE concat("%", #{pointNo}, "%") AND pp.point_no LIKE concat('%', #{pointNo}, '%')
</if> </if>
<if test="nullRiskSourceId == true"> <if test="nullRiskSourceId == true">
AND ( pp.risk_source_id is NULL OR trim(pp.risk_source_id)='') AND ( pp.risk_source_id is NULL OR trim(pp.risk_source_id)='')
...@@ -1317,10 +1317,10 @@ ...@@ -1317,10 +1317,10 @@
</foreach> </foreach>
</if> </if>
<if test="name != null and name.length > 0"> <if test="name != null and name.length > 0">
AND pp.name LIKE concat("%", #{name}, "%") AND pp.name LIKE concat('%', #{name}, '%')
</if> </if>
<if test="pointNo != null and pointNo.length > 0"> <if test="pointNo != null and pointNo.length > 0">
AND pp.point_no LIKE concat("%", #{pointNo}, "%") AND pp.point_no LIKE concat('%', #{pointNo}, '%')
</if> </if>
<if test="nullRiskSourceId == true"> <if test="nullRiskSourceId == true">
AND ( pp.risk_source_id is NULL OR trim(pp.risk_source_id)='' ) AND ( pp.risk_source_id is NULL OR trim(pp.risk_source_id)='' )
...@@ -1351,10 +1351,10 @@ ...@@ -1351,10 +1351,10 @@
</foreach> </foreach>
</if> </if>
<if test="name != null and name.length > 0"> <if test="name != null and name.length > 0">
AND pp.name LIKE concat("%", #{name}, "%") AND pp.name LIKE concat('%', #{name}, '%')
</if> </if>
<if test="pointNo != null and pointNo.length > 0"> <if test="pointNo != null and pointNo.length > 0">
AND pp.point_no LIKE concat("%", #{pointNo}, "%") AND pp.point_no LIKE concat('%', #{pointNo}, '%')
</if> </if>
<if test="nullRiskSourceId == true"> <if test="nullRiskSourceId == true">
AND ( pp.risk_source_id is NULL OR trim(pp.risk_source_id)='' ) AND ( pp.risk_source_id is NULL OR trim(pp.risk_source_id)='' )
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
( (
SELECT SELECT
p.id AS pointId, p.id AS pointId,
p.`name` AS pointName p.name AS pointName
FROM FROM
p_point p p_point p
LEFT JOIN p_plan_task_detail ptd ON ptd.point_id = p.id LEFT JOIN p_plan_task_detail ptd ON ptd.point_id = p.id
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
SELECT DISTINCT SELECT DISTINCT
route_id route_id
FROM FROM
`p_route_point` p_route_point
<where> <where>
<if test="pointId != null">point_id = #{pointId}</if> <if test="pointId != null">point_id = #{pointId}</if>
</where> </where>
...@@ -83,12 +83,12 @@ ...@@ -83,12 +83,12 @@
SELECT SELECT
COUNT(1) AS total_sum COUNT(1) AS total_sum
FROM FROM
`p_route` r p_route r
<!-- LEFT JOIN s_department d ON r.dept_id = d.id <!-- LEFT JOIN s_department d ON r.dept_id = d.id
LEFT JOIN s_user u ON r.user_id = u.id --> LEFT JOIN s_user u ON r.user_id = u.id -->
WHERE WHERE
r.is_delete = 0 r.is_delete = 0
<if test="name!=null">AND r.`name` LIKE CONCAT('%', #{name}, '%')</if> <if test="name!=null">AND r.name LIKE CONCAT('%', #{name}, '%')</if>
<if test="remark!=null">AND r.remark LIKE CONCAT('%', #{remark}, '%')</if> <if test="remark!=null">AND r.remark LIKE CONCAT('%', #{remark}, '%')</if>
<if test="orgCode!=null">AND r.org_Code = #{orgCode}</if> <if test="orgCode!=null">AND r.org_Code = #{orgCode}</if>
<if test="bizOrgCode!=null">AND r.biz_org_code LIKE CONCAT( #{bizOrgCode}, '%') </if> <if test="bizOrgCode!=null">AND r.biz_org_code LIKE CONCAT( #{bizOrgCode}, '%') </if>
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
<!--返回路线信息--> <!--返回路线信息-->
<select id="getRouteInfo" resultType="java.util.HashMap"> <select id="getRouteInfo" resultType="java.util.HashMap">
SELECT SELECT
r.`name`, r.name,
r.id, r.id,
r.boss, r.boss,
r.tel, r.tel,
...@@ -112,10 +112,10 @@ ...@@ -112,10 +112,10 @@
r.boss_name bossName, r.boss_name bossName,
ifnull(r.biz_org_code, "") as bizOrgCode ifnull(r.biz_org_code, "") as bizOrgCode
FROM FROM
`p_route` r p_route r
WHERE WHERE
r.is_delete = 0 r.is_delete = 0
<if test="name!=null">AND r.`name` LIKE CONCAT('%', #{name}, '%')</if> <if test="name!=null">AND r.name LIKE CONCAT('%', #{name}, '%')</if>
<if test="remark!=null">AND r.remark LIKE CONCAT('%', #{remark}, '%')</if> <if test="remark!=null">AND r.remark LIKE CONCAT('%', #{remark}, '%')</if>
<if test="orgCode!=null">AND r.org_Code = #{orgCode}</if> <if test="orgCode!=null">AND r.org_Code = #{orgCode}</if>
<if test="bizOrgCode!=null">AND r.biz_org_code LIKE CONCAT( #{bizOrgCode}, '%') </if> <if test="bizOrgCode!=null">AND r.biz_org_code LIKE CONCAT( #{bizOrgCode}, '%') </if>
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
SELECT SELECT
r.id, r.id,
r.`name` r.name
FROM FROM
p_plan ppl p_plan ppl
LEFT JOIN p_route r ON r.id = ppl.route_id LEFT JOIN p_route r ON r.id = ppl.route_id
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
</if> </if>
SELECT SELECT
r.id, r.id,
r.`name` r.name
FROM FROM
p_route r p_route r
WHERE WHERE
...@@ -180,7 +180,7 @@ ...@@ -180,7 +180,7 @@
SELECT SELECT
r.id, r.id,
r.`name` r.name
FROM FROM
p_plan ppl p_plan ppl
LEFT JOIN p_route r ON r.id = ppl.route_id LEFT JOIN p_route r ON r.id = ppl.route_id
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
</if> </if>
SELECT SELECT
r.id, r.id,
r.`name` r.name
FROM FROM
p_route r p_route r
WHERE WHERE
...@@ -340,7 +340,7 @@ ...@@ -340,7 +340,7 @@
IFNULL(ppl.org_code,'') orgCode, IFNULL(ppl.org_code,'') orgCode,
IFNULL(ppl.dept_id ,'')groupName, IFNULL(ppl.dept_id ,'')groupName,
pr.id routeId, pr.id routeId,
IFNULL( pr.`name`,'') routeName, IFNULL( pr.name,'') routeName,
pr.tel, pr.tel,
pr.is_delete isDelete, pr.is_delete isDelete,
IFNULL(pr.boss,'') boss, IFNULL(pr.boss,'') boss,
...@@ -383,10 +383,10 @@ ...@@ -383,10 +383,10 @@
ppi.point_id pointId, ppi.point_id pointId,
ppi.order_no orderNo, ppi.order_no orderNo,
ppi.id pointInputItemId, ppi.id pointInputItemId,
pii.`name` inputName, pii.name inputName,
ppc.`name` classifyName, ppc.name classifyName,
ppc.id pointClassifyId, ppc.id pointClassifyId,
pii.`level`, pii.level,
pii.item_type itemType, pii.item_type itemType,
pii.is_must isMust, pii.is_must isMust,
pii.is_score isScore, pii.is_score isScore,
...@@ -424,18 +424,18 @@ ...@@ -424,18 +424,18 @@
WHERE WHERE
ppi.point_id = #{pointId} ppi.point_id = #{pointId}
<!-- <if test="level!=null and level !=''"> <!-- <if test="level!=null and level !=''">
and pii.`level` = #{level} and pii.level = #{level}
</if> --> </if> -->
<choose> <choose>
<when test="level!=null and level !='' and level > 0">and pii.`level` = #{level}</when> <when test="level!=null and level !='' and level > 0">and pii.level = #{level}</when>
<when test="level== -1"> and pii.`level` is null</when> <when test="level== -1"> and pii.level is null</when>
</choose> </choose>
<if test="classifyId!=null and classifyId !=''"> <if test="classifyId!=null and classifyId !=''">
and ppc.id = #{classifyId} and ppc.id = #{classifyId}
</if> </if>
<if test="inputName!=null and inputName !=''"> <if test="inputName!=null and inputName !=''">
and (pii.`name` like CONCAT('%', #{inputName}, '%') and (pii.name like CONCAT('%', #{inputName}, '%')
or pii.`item_no` like CONCAT('%', #{inputName}, '%')) or pii.item_no like CONCAT('%', #{inputName}, '%'))
</if> </if>
<if test="isBound!=null and isBound !=''"> <if test="isBound!=null and isBound !=''">
and temp.routePointItemId >0 and temp.routePointItemId >0
......
...@@ -60,8 +60,8 @@ ...@@ -60,8 +60,8 @@
</delete> </delete>
<insert id="insertRoutePointItem"> <insert id="insertRoutePointItem">
insert into `p_route_point_item` insert into p_route_point_item
(`id`, `route_point_id`, `order_no`, `point_input_item_id`, `creator_id`, `create_date`, `point_classify_id`, `basis_json`) (id, route_point_id, order_no, point_input_item_id, creator_id, create_date, point_classify_id, basis_json)
VALUES( VALUES(
#{id}, #{id},
#{routePointId}, #{routePointId},
......
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