Commit ece65294 authored by 李成龙's avatar 李成龙

新增装备工程

parent bfe763c3
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>amos-biz-boot</artifactId>
<groupId>com.amosframework.boot</groupId>
<version>1.0.0</version>
</parent>
<artifactId>amos-boot-system-equip</artifactId>
<version>3.0.1.3</version>
<dependencies>
<dependency>
<groupId>com.amosframework.boot</groupId>
<artifactId>amos-boot-module-equip-biz</artifactId>
<version>${amos-biz-boot.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
package com.yeejoin;
import java.net.InetAddress;
import java.net.UnknownHostException;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableAsync;
import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler;
import com.yeejoin.amos.boot.biz.common.utils.oConvertUtils;
@SpringBootApplication
@EnableDiscoveryClient
@MapperScan({ "org.typroject.tyboot.demo.face.orm.dao*", "org.typroject.tyboot.face.*.orm.dao*",
"org.typroject.tyboot.core.auth.face.orm.dao*", "org.typroject.tyboot.component.*.face.orm.dao*",
"com.yeejoin.amos.boot.module.*.api.mapper", "com.yeejoin.amos.boot.biz.common.dao.mapper",
"com.yeejoin.equipmanage.mapper"})
@ComponentScan({"org.typroject", "com.yeejoin.amos", "com.yeejoin.equipmanage"})
@EnableFeignClients
@EnableAsync
public class AmostEquipApplication {
private static final Logger logger = LoggerFactory.getLogger(AmostEquipApplication.class);
public static void main(String[] args) throws UnknownHostException {
ConfigurableApplicationContext context = SpringApplication.run(AmostEquipApplication.class, args);
Environment env = context.getEnvironment();
String ip = InetAddress.getLocalHost().getHostAddress();
String port = env.getProperty("server.port");
String path = oConvertUtils.getString(env.getProperty("server.servlet.context-path"));
GlobalExceptionHandler.setAlwaysOk(true);
logger.info("\n----------------------------------------------------------\n\t"
+ "Application Amos-Biz-Boot is running! Access URLs:\n\t" + "Swagger文档: \thttp://" + ip + ":" + port
+ path + "/doc.html\n" + "----------------------------------------------------------");
}
}
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url = jdbc:mysql://172.16.10.85:3306/autosys_business_v3.0.0.2?useUnicode=true&allowMultiQueries=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
spring.datasource.username=root
spring.datasource.password=Amos2019Mysql8
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.pool-name=DatebookHikariCP
spring.datasource.hikari.minimum-idle= 3
spring.datasource.hikari.maximum-pool-size= 30
spring.datasource.hikari.auto-commit= true
spring.datasource.hikari.idle-timeout= 500000
spring.datasource.hikari.max-lifetime= 1800000
spring.datasource.hikari.connection-timeout= 60000
spring.datasource.hikari.connection-test-query= SELECT 1
# \u6587\u4EF6\u670D\u52A1\u5668\u5730\u5740
fileserver_domain=http://39.98.246.31:8888/
eureka.instance.hostname= 172.16.11.20
eureka.instance.prefer-ip-address = true
eureka.client.serviceUrl.defaultZone: http://${eureka.instance.hostname}:10001/eureka/
#security config
security.password=a1234560
security.loginId=fas_system
security.productApp=STUDIO_APP_MOBILE
security.productWeb=STUDIO_APP_WEB
security.appKeyApp=studio_normalapp_3056965
#redis
spring.redis.database=1
spring.redis.host=172.16.11.20
spring.redis.port=6379
spring.redis.password=1234560
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
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.11.33:1883
emqx.user-name=admin
emqx.password=public
mqtt.scene.host=mqtt://172.16.11.33:8083/mqtt
mqtt.client.product.id=mqtt
mqtt.topic=topic_mqtt
spring.mqtt.completionTimeout=3000
#数据同步开关
systemctl.sync.switch=false
#数据JCS开关
systemctl.jcs.switch=false
#平台数据开关
systemctl.amos.switch=false
#报表数据地址
equip.report.url=/fire-fighting-system/ureport/preview?_u=file:
#数字化南瑞平台接口
dcs.url.token=http://198.87.103.158:8001/auth-service/oauth/token
dcs.url.sendalarm=http://198.87.103.158:8001/alarm-service/appalarm/sendalarm
#系统上线时间
param.system.online.date = 2019-02-12
# 视频转码服务开关 off/on,默认关闭,数字换流站使用时开启
param.isUseVideoTranscoding = off
# 航天视频服务地址
param.htvideo.url="http://192.168.4.174:9001";
# 南瑞视频转码服务地址
param.nrvideo.url="http://198.87.103.158:8001";
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url = jdbc:mysql://172.16.11.20:3306/autosys_business_v3.0.0.2?useUnicode=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
spring.datasource.username= root
spring.datasource.password= root_123
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.pool-name=DatebookHikariCP
spring.datasource.hikari.minimum-idle= 3
spring.datasource.hikari.maximum-pool-size= 30
spring.datasource.hikari.auto-commit= true
spring.datasource.hikari.idle-timeout= 10000
spring.datasource.hikari.max-lifetime= 1800000
spring.datasource.hikari.connection-timeout= 30000
spring.datasource.hikari.connection-test-query= SELECT 1
# 文件服务器地址
fileserver_domain=http://39.98.246.31:8888/
eureka.instance.hostname= 172.16.11.20
eureka.instance.prefer-ip-address = true
eureka.client.serviceUrl.defaultZone: http://${eureka.instance.hostname}:10001/eureka/
#security config
security.password=a1234560
security.loginId=fas_system
security.productApp=STUDIO_APP_MOBILE
security.productWeb=STUDIO_APP_WEB
security.appKeyApp=studio_normalapp_3056965
#redis
spring.redis.database=1
spring.redis.host=172.16.11.20
spring.redis.port=6379
spring.redis.password=1234560
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
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.11.33:1883
emqx.user-name=admin
emqx.password=public
mqtt.scene.host=mqtt://172.16.11.33:8083/mqtt
mqtt.client.product.id=mqtt
mqtt.topic=topic_mqtt
spring.mqtt.completionTimeout=3000
#数据同步开关
systemctl.sync.switch=false
#数据JCS开关
systemctl.jcs.switch=false
#平台数据开关
systemctl.amos.switch=false
#报表数据地址
equip.report.url=/fire-fighting-system/ureport/preview?_u=file:
#数字化南瑞平台接口
dcs.url.token=http://198.87.103.158:8001/auth-service/oauth/token
dcs.url.sendalarm=http://198.87.103.158:8001/alarm-service/appalarm/sendalarm
#系统上线时间
param.system.online.date = 2019-02-12
# 视频转码服务开关 off/on,默认关闭,数字换流站使用时开启
param.isUseVideoTranscoding = off
# 航天视频服务地址
param.htvideo.url="";
# 南瑞视频转码服务地址
param.nrvideo.url="";
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url = jdbc:mysql://172.16.10.66:3306/safety-business-3.0.1?useUnicode=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
spring.datasource.username= root
spring.datasource.password= root_123
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.pool-name=DatebookHikariCP
spring.datasource.hikari.minimum-idle= 3
spring.datasource.hikari.maximum-pool-size= 30
spring.datasource.hikari.auto-commit= true
spring.datasource.hikari.idle-timeout= 10000
spring.datasource.hikari.max-lifetime= 1800000
spring.datasource.hikari.connection-timeout= 30000
spring.datasource.hikari.connection-test-query= SELECT 1
fdfs.so-timeout=1501
fdfs.connect-timeout=601
fdfs.thumb-image.height=200
fdfs.thumb-image.width=200
fdfs.tracker-list[0]=39.98.246.31:22122
# 文件服务器地址
fileserver_domain=http://39.98.246.31:8888/
eureka.instance.hostname= 172.16.10.72
eureka.instance.prefer-ip-address = true
eureka.client.serviceUrl.defaultZone: http://${eureka.instance.hostname}:10001/eureka/
#security config
security.password=a1234560
security.loginId=fas_system
security.productApp=STUDIO_APP_MOBILE
security.productWeb=STUDIO_APP_WEB
security.appKeyApp=studio_normalapp_3157169
#redis
spring.redis.database=0
spring.redis.host=172.16.10.85
spring.redis.port=6379
spring.redis.password=amos2019Redis
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
mqtt.scene.host=mqtt://172.16.10.85:8083/mqtt
mqtt.client.product.id=mqtt
mqtt.topic=topic_mqtt
spring.mqtt.completionTimeout=3000
## emqx
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.10.85:1883
emqx.user-name=super
emqx.password=a123456
#数据同步开关
systemctl.sync.switch=false
#数据JCS开关
systemctl.jcs.switch=true
#平台数据开关
systemctl.amos.switch=true
#报表数据地址
equip.report.url=/fire-fighting-system/ureport/preview?_u=file:
#数字化南瑞平台接口
dcs.url.token=http://198.87.103.158:8001/auth-service/oauth/token
dcs.url.sendalarm=http://198.87.103.158:8001/alarm-service/appalarm/sendalarm
#系统上线时间
param.system.online.date = 2019-02-12
# 视频转码服务开关 off/on,默认关闭,数字换流站使用时开启
param.isUseVideoTranscoding = off
# 航天视频服务地址
param.htvideo.url="";
# 南瑞视频转码服务地址
param.nrvideo.url="";
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url = jdbc:mysql://172.16.11.20:3306/autosys_business_v3.0.0.2?useUnicode=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
spring.datasource.username= root
spring.datasource.password= root_123
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.pool-name=DatebookHikariCP
spring.datasource.hikari.minimum-idle= 3
spring.datasource.hikari.maximum-pool-size= 30
spring.datasource.hikari.auto-commit= true
spring.datasource.hikari.idle-timeout= 10000
spring.datasource.hikari.max-lifetime= 1800000
spring.datasource.hikari.connection-timeout= 30000
spring.datasource.hikari.connection-test-query= SELECT 1
# 文件服务器地址
fileserver_domain=http://39.98.246.31:8888/
eureka.instance.hostname= 172.16.11.20
eureka.instance.prefer-ip-address = true
eureka.client.serviceUrl.defaultZone: http://${eureka.instance.hostname}:10001/eureka/
#security config
security.password=a1234560
security.loginId=fas_system
security.productApp=STUDIO_APP_MOBILE
security.productWeb=STUDIO_APP_WEB
security.appKeyApp=studio_normalapp_3056965
#redis
spring.redis.database=1
spring.redis.host=172.16.11.20
spring.redis.port=6379
spring.redis.password=1234560
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
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.11.33:1883
emqx.user-name=admin
emqx.password=public
mqtt.scene.host=mqtt://172.16.11.33:8083/mqtt
mqtt.client.product.id=mqtt
mqtt.topic=topic_mqtt
spring.mqtt.completionTimeout=3000
#数据同步开关
systemctl.sync.switch=false
#数据JCS开关
systemctl.jcs.switch=false
#平台数据开关
systemctl.amos.switch=false
#报表数据地址
equip.report.url=/fire-fighting-system/ureport/preview?_u=file:
#数字化南瑞平台接口
dcs.url.token=http://198.87.103.158:8001/auth-service/oauth/token
dcs.url.sendalarm=http://198.87.103.158:8001/alarm-service/appalarm/sendalarm
#系统上线时间
param.system.online.date = 2019-02-12
# 视频转码服务开关 off/on,默认关闭,数字换流站使用时开启
param.isUseVideoTranscoding = off
# 航天视频服务地址
param.htvideo.url="";
# 南瑞视频转码服务地址
param.nrvideo.url="";
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url = jdbc:mysql://172.16.11.20:3306/autosys_business_v3.0.0.2?useUnicode=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai
spring.datasource.username= root
spring.datasource.password= root_123
spring.datasource.type=com.zaxxer.hikari.HikariDataSource
spring.datasource.hikari.pool-name=DatebookHikariCP
spring.datasource.hikari.minimum-idle= 3
spring.datasource.hikari.maximum-pool-size= 30
spring.datasource.hikari.auto-commit= true
spring.datasource.hikari.idle-timeout= 10000
spring.datasource.hikari.max-lifetime= 1800000
spring.datasource.hikari.connection-timeout= 30000
spring.datasource.hikari.connection-test-query= SELECT 1
# 文件服务器地址
fileserver_domain=http://39.98.246.31:8888/
eureka.instance.hostname= 172.16.11.20
eureka.instance.prefer-ip-address = true
eureka.client.serviceUrl.defaultZone: http://${eureka.instance.hostname}:10001/eureka/
#security config
security.password=a1234560
security.loginId=fas_system
security.productApp=STUDIO_APP_MOBILE
security.productWeb=STUDIO_APP_WEB
security.appKeyApp=studio_normalapp_3056965
#redis
spring.redis.database=1
spring.redis.host=172.16.11.20
spring.redis.port=6379
spring.redis.password=1234560
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
emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.11.33:1883
emqx.user-name=admin
emqx.password=public
mqtt.scene.host=mqtt://172.16.11.33:8083/mqtt
mqtt.client.product.id=mqtt
mqtt.topic=topic_mqtt
spring.mqtt.completionTimeout=3000
#报表数据地址
equip.report.url=/fire-fighting-system/ureport/preview?_u=file:
#数字化南瑞平台接口
dcs.url.token=http://198.87.103.158:8001/auth-service/oauth/token
dcs.url.sendalarm=http://198.87.103.158:8001/alarm-service/appalarm/sendalarm
#系统上线时间
param.system.online.date = 2019-02-12
# 视频转码服务开关 off/on,默认关闭,数字换流站使用时开启
param.isUseVideoTranscoding = off
# 航天视频服务地址
param.htvideo.url="";
# 南瑞视频转码服务地址
param.nrvideo.url="";
spring.application.name= AMOS-EQUIPMANAGE
server.servlet.context-path=/equip
server.port= 8100
#server.servlet.context-path=/case
spring.profiles.active = dev
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#mybatis mapper file
mybatis.mapper-locations=classpath:mapper/*.xml
#mybatis-plus
mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
# mybatis entity package
mybatis.type-aliases-package=com.yeejoin.equipmanage.common.entity
spring.jackson.time-zone=GMT+8
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
#pagehelper \u5206\u9875\u63D2\u4EF6
pagehelper.helper-dialect=mysql
pagehelper.params=count=countSql
pagehelper.reasonable=false
pagehelper.support-methods-arguments=true
#liquibase
spring.liquibase.change-log = classpath:/changelog/changelog-master.xml
spring.liquibase.enabled= true
#\u5355\u4E2A\u6587\u4EF6\u6700\u5927\u5927\u5C0F
spring.servlet.multipart.maxFileSize=100MB
spring.servlet.multipart.maxRequestSize=100MB
#saveUserRedis\u8FC7\u671F\u65F6\u95F428\u5929
#redis_region_time_second=2419200
patrol.fegin.name = AMOS-PATROL
maintenance.feign.name = AMOS-MAINTENANCE-API
precontrol.feign.name = JEPCC-PRECONTROL-SERVER
security.privilege.name=AMOS-API-PRIVILEGE
security.systemctl.name=AMOS-API-SYSTEMCTL
#jpush
Push.fegin.name=AppMessagePushService
dutyMode.fegin.name=AMOS-DUTYMODE
riskSource.feign.name=AMOS-AUTOSYS
equipManage.name=AMOS-EQUIPMANAGE
iot.vehicle.track=AMOS-API-IOT
jcs.fegin.name=JCS
#项目初始化画布id
morphic.projectSeq=1390314016458514433
#wl_equipment_category 表id (取火灾报警系统id)
equipment.fire.systemid=1302870628873932802
equipment.type=2
equipment.hierarchy=1,2,4,6
#装备查询根据装备类型编码过滤,4为过滤掉车相关数据,多个的话,添加方式为4,5
equipment.filter.code=4
#wl_equipment_category 编码 92040000 为消防行业 火灾系统分类编码
equip.system.alarm.code=92040000
#wl_equipment_category 编码 50000000 为安防行业 摄像头分类编码
equip.security.code=50000000
## redis失效时间
redis.cache.failure.time=10800
#平台字典配置项
systemctl.dict.iot-core-param=IOT_CORE_PARAM
systemctl.dict.area-type=AREA_TYPE
systemctl.dict.allow-operation=ALLOW_OPERATION
systemctl.dict.build-type=BUILD_TYPE
systemctl.dict.build-use-type=BUILD_USE_TYPE
systemctl.dict.building-structure-type=BUILDING_STRUCTURE_TYPE
equip.dict.car-state=CarState
equip.dict.name-key=FireCar_GDLongitude,FireCar_GDLatitude
#Project application topic
mqtt.vehicle.topic=${equipManage.name}.vehicle.state
equip.point.equipmentdata.topic=${equipManage.name}.equipment.state
equip.index.topic=${equipManage.name}.equipment.index.state
equip.iot.monitor.topic=team/station/monitor/matrix
# 接口地址
equip.scene.detail.url=${server.servlet.context-path}/scene/%s/detail/list
equip.point.equipmentdata.url=${server.servlet.context-path}/equipSpecific/getAll?id=
equip.point.speindex.url=${server.servlet.context-path}/fire-fighting-system/getSpeIndex?id=
equip.point.equipmentDetail.url=${server.servlet.context-path}/equipSpecific/getOneCard?id=
#组态获取系统详情接口地址
firefightingsystem.detail.url=${server.servlet.context-path}/fire-fighting-system/getSystemById?id=
#组态获取分页接口地址
firefightingsystem.equip.alarms.url=${server.servlet.context-path}/fire-fighting-system/getEquipmentAlarmBySystemIdOrSourceIdVO
building.detail=${server.servlet.context-path}/building/findByInstanceId
building.floor.detail=${server.servlet.context-path}/building/getBuildDetaliByFloorId?instanceId=
dcs.client-id=fire_system
dcs.grant-type=client_credentials
dcs.scope=all
dcs.token-key=dcs_token_key
dcs.client.secret=fire_system
dcs.x.hw.id=NR_REST_APP
dcs.x.hw.appKey=s+YkvQhwilx91TRJHhNDmw==
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<track>
<car
longitude = "108.905463"
latitude = "34.23045"
/>
<car
longitude = "108.906965"
latitude = "34.229811"
/>
<car
longitude = "108.907823"
latitude = "34.229403"
/>
<car
longitude = "108.909626"
latitude = "34.228658"
/>
<car
longitude = "108.910849"
latitude = "34.228108"
/>
<car
longitude = "108.91175"
latitude = "34.2277"
/>
<car
longitude = "108.91205"
latitude = "34.227647"
/>
<car
longitude = "108.912072"
latitude = "34.227629"
/>
<car
longitude = "108.912737"
latitude = "34.227328"
/>
<car
longitude = "108.915591"
latitude = "34.225997"
/>
<car
longitude = "108.915419"
latitude = "34.226139"
/>
<car
longitude = "108.917072"
latitude = "34.225465"
/>
<car
longitude = "108.917501"
latitude = "34.22511"
/>
<car
longitude = "108.917093"
latitude = "34.224968"
/>
<car
longitude = "108.91675"
latitude = "34.224542"
/>
<car
longitude = "108.916621"
latitude = "34.224028"
/>
<car
longitude = "108.916428"
latitude = "34.223744"
/>
<car
longitude = "108.916278"
latitude = "34.223549"
/>
<car
longitude = "108.91602"
latitude = "34.223265"
/>
<car
longitude = "108.915527"
latitude = "34.22252"
/>
<car
longitude = "108.915269"
latitude = "34.222484"
/>
<car
longitude = "108.915505"
latitude = "34.222733"
/>
<car
longitude = "108.915441"
latitude = "34.2222"
/>
</track>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<trend>
<car
speed = "50.00"
time = "2020-11-24 01:33:44"
courseOverGround = "10.00"
/>
<car
speed = "85.00"
time = "2020-11-24 02:33:44"
courseOverGround = "40.00"
/>
<car
speed = "110.00"
time = "2020-11-24 03:33:44"
courseOverGround = "40.00"
/>
<car
speed = "150.00"
time = "2020-11-24 04:33:44"
courseOverGround = "50.00"
/>
<car
speed = "150.00"
time = "2020-11-24 05:33:44"
courseOverGround = "55.00"
/>
<car
speed = "150.00"
time = "2020-11-24 06:33:44"
courseOverGround = "40.00"
/>
<car
speed = "180.00"
time = "2020-11-24 07:33:44"
courseOverGround = "40.00"
/>
<car
speed = "200.00"
time = "2020-11-24 08:33:44"
courseOverGround = "40.00"
/>
<car
speed = "220.00"
time = "2020-11-24 09:33:44"
courseOverGround = "52.00"
/>
<car
speed = "250.00"
time = "2020-11-24 10:33:44"
courseOverGround = "63.00"
/>
<car
speed = "190.00"
time = "2020-11-24 11:33:44"
courseOverGround = "60.00"
/>
<car
speed = "150.00"
time = "2020-11-24 12:33:44"
courseOverGround = "63.00"
/>
<car
speed = "120.00"
time = "2020-11-24 13:33:44"
courseOverGround = "70.00"
/>
<car
speed = "100.00"
time = "2020-11-24 14:33:44"
courseOverGround = "80.00"
/>
<car
speed = "130.00"
time = "2020-11-24 15:33:44"
courseOverGround = "75.00"
/>
<car
speed = "190.00"
time = "2020-11-24 16:33:44"
courseOverGround = "89.00"
/>
<car
speed = "140.00"
time = "2020-11-24 17:33:44"
courseOverGround = "95.00"
/>
<car
speed = "100.00"
time = "2020-11-24 18:33:44"
courseOverGround = "86.00"
/>
<car
speed = "205.00"
time = "2020-11-24 19:33:44"
courseOverGround = "105.00"
/>
<car
speed = "40.00"
time = "2020-11-24 20:33:44"
courseOverGround = "255.00"
/>
<car
speed = "140.00"
time = "2020-11-24 21:33:44"
courseOverGround = "95.00"
/>
<car
speed = "110.00"
time = "2020-11-24 22:33:44"
courseOverGround = "95.00"
/>
<car
speed = "150.00"
time = "2020-11-24 23:33:44"
courseOverGround = "60.00"
/>
<car
speed = "120.00"
time = "2020-11-25 00:33:44"
courseOverGround = "150.00"
/>
</trend>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd">
<include file="wl-3.0.1.xml" relativeToChangelogFile="true"/>
<!--全量包含视图和函数-->
<include file="sql-task-all.xml" relativeToChangelogFile="true"/>
</databaseChangeLog>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property name="LOG_HOME" value="/opt/log"/>
<timestamp key="startTime" datePattern="yyyyMMdd'T'HHmmss"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg [%file:%line] %n</pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_HOME}/equip-manage.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${LOG_HOME}/equip-manage.log.%i.zip</fileNamePattern>
<maxIndex>100</maxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<maxFileSize>50MB</maxFileSize>
</triggeringPolicy>
<encoder charset="UTF-8">
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg [%file:%line] %n</pattern>
</encoder>
</appender>
<appender name="ERROR" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOG_HOME}/equip-manage-error.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${LOG_HOME}/equip-manage-error.log.%i.zip</fileNamePattern>
<maxIndex>50</maxIndex>
</rollingPolicy>
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<maxFileSize>50MB</maxFileSize>
</triggeringPolicy>
<encoder charset="UTF-8">
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg [%file:%line] %n</pattern>
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<root>
<level value="INFO"/>
<appender-ref ref="STDOUT"/>
<appender-ref ref="FILE"/>
<appender-ref ref="ERROR"/>
</root>
<logger name="org.springframework" level="INFO"/>
<logger name="org.springframework.boot" level="INFO"/>
<logger name="org.springframework.boot.actuate" level="INFO"/>
<logger name="org.springframework.boot.web" level="INFO"/>
<logger name="org.quartz" level="INFO"/>
<logger name="org.apache.kafka" level="INFO"/>
<logger name="org.apache.zookeeper" level="INFO"/>
<logger name="org.mybatis.spring" level="INFO"/>
<logger name="org.apache.http" level="INFO"/>
<logger name="com.zaxxer.hikari" level="INFO"/>
</configuration>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.AlarmMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.AnalysisReportLogMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.AreaMapper">
<select id="findByIsDeleted" resultType="com.yeejoin.equipmanage.common.dto.AreaDto">
SELECT
a.id,
a.`name`,
a.`code`,
a.parent_id
FROM
`wl_area` a
<where>
<if test="isDelete != null">
a.is_delete = #{isDelete}
</if>
</where>
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.BadManagementMapper">
</mapper>
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.BuildingAuditMapper">
<!-- 批量删除 -->
<delete id="deleteAd" parameterType="java.util.List">
update wl_building_audit set is_delete = 1
where id in
<foreach item="id" collection="list" open="(" close=")" separator=",">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.CarConfMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.CarInfoMapper">
</mapper>
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.CarPropertyMapper">
<select id="getCarPropListByIotCode" resultType="com.yeejoin.equipmanage.common.entity.CarProperty">
SELECT
wcp.id AS id,
wcp.car_id AS carId,
wcp.value AS value,
wcp.remark AS remark,
wcp.equipment_index_id AS equipmentIndexId,
wei.name_key AS nameKey
FROM
wl_car_property wcp
LEFT JOIN wl_car AS wc ON wc.id = wcp.car_id
LEFT JOIN wl_equipment_index AS wei ON wei.id = wcp.equipment_index_id
WHERE
wc.iot_code = #{iotCode}
AND
TRIM(wei.name_key) != '' AND wei.name_key IS NOT NULL
</select>
<select id="getCarPropertyList" resultType="com.yeejoin.equipmanage.common.entity.vo.CarPropertyVo">
SELECT
cp.id,
cp.car_id,
ei.`name`,
ei.name_key AS nameKey,
cp.`value`,
ei.unit,
ei.is_iot AS isIot,
ei.sort_num AS sort,
cp.create_date
FROM
wl_car_property cp
LEFT JOIN wl_equipment_index ei ON ei.id = cp.equipment_index_id
<where>
<if test="id != null">
cp.car_id = #{id}
</if>
</where>
</select>
<select id="getCarPropertyListByCarIds" resultType="com.yeejoin.equipmanage.common.entity.vo.CarPropertyVo">
SELECT
cp.id,
cp.car_id,
ei.`name`,
ei.name_key AS nameKey,
cp.`value`,
ei.unit,
ei.is_iot AS isIot,
ei.sort_num AS sort,
cp.create_date
FROM
wl_car_property cp
LEFT JOIN wl_equipment_index ei ON ei.id = cp.equipment_index_id
<where>
<if test="list != null and list.size > 0">
cp.car_id IN
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
</where>
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.CommonTreeMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.CompanyBusinessMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.CompanyMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.CompanyQualificationMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.CompanyQualificationsMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.ConfirmAlarmMapper">
<select id="getDetailsById" resultType="com.yeejoin.equipmanage.common.entity.EquipmentSpecificAlarmLog">
select
ala.id,
(
SELECT
sou.scene_id
FROM
wl_source_scene sou
WHERE
find_in_set(ala.equipment_specific_id,sou.point_in_scene)>0
and EXISTS (SELECT distinct fi.instance_id from wl_form_instance fi where fi.instance_id = sou.source_id)
limit 1
) AS sceneId,
ala.equipment_specific_id,
spe.code AS equipmentSpecificCode,
ala.equipment_specific_index_name,
ala.type as equipment_specific_index_key,
concat(ala.equipment_specific_name,ala.equipment_specific_index_name) as alarmContent,
(
SELECT
ws.full_name
FROM
wl_warehouse_structure ws,wl_stock_detail sd
WHERE
ws.id = sd.warehouse_structure_id
and sd.equipment_specific_id = ala.equipment_specific_id
) AS alarmPlace,
ala.create_date as create_date,
ala.location as location,
if(spe.code is null,ala.equipment_specific_name,concat(ala.equipment_specific_name,'(',spe.code,')')) as equipmentName,
(select
group_concat(fet.`name`)
from f_equipment_fire_equipment as fefe
left join f_equipment as fet on fet.id = fefe.equipment_id
where fefe.fire_equipment_id = ala.equipment_specific_id
) as protectName,
if(confirm_type is null,'去确认','已处理') isConfirm,
confirm_type,
alarm_reason,
resolve_result,
confirm_user,
confirm_user_name,
confirm_date,
(SELECT GROUP_CONCAT(fem.name) FROM `f_fire_fighting_system` fem WHERE find_in_set(fem.id,spe.system_id)) as systemName
from
wl_equipment_specific_alarm_log as ala
left join wl_equipment_specific as spe on spe.id = ala.equipment_specific_id
<where>
<choose>
<when test="equipId != null and equipId != ''">
ala.equipment_specific_id =#{equipId}
</when>
<otherwise>
ala.id =#{id} limit 1
</otherwise>
</choose>
</where>
</select>
<update id="confirmAlam" >
update
wl_equipment_specific_alarm_log
set
confirm_date = now(),
confirm_type = #{confirmType},
alarm_reason = #{alarmReason},
resolve_result = #{resolveResult},
confirm_user = #{confirmUser},
confirm_user_name = #{confirmUserName}
<where>
confirm_date IS NULL
<if test="isBatch == 0">
AND id = #{id}
</if>
<if test="isBatch == 1">
AND equipment_specific_alarm_id = #{equipmentSpecificAlarmId}
</if>
</where>
</update>
<select id="getIdAndConfirmType" resultType="com.yeejoin.equipmanage.common.entity.EquipmentSpecificAlarmLog">
select id,confirm_type,create_date,equipment_specific_alarm_id
from wl_equipment_specific_alarm_log
where equipment_specific_id = #{id}
order by confirm_type asc,equipment_specific_index_key desc,create_date desc
limit 1
</select>
<select id="getFireAlarm" resultType="java.lang.Integer">
SELECT
count(1)
FROM
(
SELECT
wlesal.id,
wlesal.equipment_specific_alarm_id,
wles.id AS equipmentSpecificId,
wlesal.equipment_specific_id AS fireEquipmentId,
wles.CODE AS fireEquipmentCode,
wled.`name` AS fireEquipmentName,
wlesal.equipment_index_id AS fireEquipmentIndexId,
wlesal.equipment_specific_index_key AS fireEquipmentSpecificIndexKey,
wlesal.equipment_specific_index_name AS fireEquipmentSpecificIndexName,
CASE
WHEN wlesal.confirm_type <![CDATA[<>]]> ''
THEN 'yes'
ELSE 'no'
END AS isFirm,
wlesal.confirm_type confirmType,
CASE
wlesal.equipment_specific_index_value
WHEN 'true' THEN
'是'
WHEN 'false' THEN
'否' ELSE wlesal.equipment_specific_index_value
END AS fireEquipmentPointValue,
wlesa.frequency AS frequency,
wlesa.`status`,
wlesal.type AS type,
wlesal.create_date AS createDate,
wws.full_name AS warehouseStructureName,
wlesal.confirm_user_name confirmUserName,
wlesal.system_ids systemIds,
(select
group_concat(fet.`name`)
from f_equipment_fire_equipment as fefe
left join f_equipment as fet on fet.id = fefe.equipment_id
where fefe.fire_equipment_id = wlesal.equipment_specific_id
) as equipmentName,
wlesal.confirm_date,
wlesal.alarm_reason,
wlesal.resolve_result,
wles.code
FROM
wl_equipment_specific_alarm_log wlesal
LEFT JOIN wl_equipment_specific wles ON wlesal.equipment_specific_id = wles.id
LEFT JOIN wl_stock_detail wlsd ON wlsd.equipment_specific_id = wles.id
LEFT JOIN wl_warehouse_structure wws ON wlsd.warehouse_structure_id = wws.id
LEFT JOIN wl_equipment_detail wled ON wles.equipment_detail_id = wled.id
LEFT JOIN wl_equipment_specific_alarm wlesa ON wlesa.id = wlesal.equipment_specific_alarm_id
<where>
wlesal.confirm_type is null
</where>
) d
<where>
d.fireEquipmentName IS NOT null
AND d.type = 'FIREALARM'
</where>
ORDER BY
d.createDate desc
</select>
<select id="getFaultAlarm" resultType="java.lang.Integer">
SELECT
count(1)
FROM
(
SELECT
wlesal.id,
wlesal.equipment_specific_alarm_id,
wles.id AS equipmentSpecificId,
wlesal.equipment_specific_id AS fireEquipmentId,
wles.CODE AS fireEquipmentCode,
wled.`name` AS fireEquipmentName,
wlesal.equipment_index_id AS fireEquipmentIndexId,
wlesal.equipment_specific_index_key AS fireEquipmentSpecificIndexKey,
wlesal.equipment_specific_index_name AS fireEquipmentSpecificIndexName,
CASE
WHEN wlesal.confirm_type <![CDATA[<>]]> ''
THEN 'yes'
ELSE 'no'
END AS isFirm,
wlesal.confirm_type confirmType,
CASE
wlesal.equipment_specific_index_value
WHEN 'true' THEN
'是'
WHEN 'false' THEN
'否' ELSE wlesal.equipment_specific_index_value
END AS fireEquipmentPointValue,
wlesa.frequency AS frequency,
wlesa.`status`,
wlesal.type AS type,
wlesal.create_date AS createDate,
wws.full_name AS warehouseStructureName,
wlesal.confirm_user_name confirmUserName,
wlesal.system_ids systemIds,
(select
group_concat(fet.`name`)
from f_equipment_fire_equipment as fefe
left join f_equipment as fet on fet.id = fefe.equipment_id
where fefe.fire_equipment_id = wlesal.equipment_specific_id
) as equipmentName,
wlesal.confirm_date,
wlesal.alarm_reason,
wlesal.resolve_result,
wles.code
FROM
wl_equipment_specific_alarm_log wlesal
LEFT JOIN wl_equipment_specific wles ON wlesal.equipment_specific_id = wles.id
LEFT JOIN wl_stock_detail wlsd ON wlsd.equipment_specific_id = wles.id
LEFT JOIN wl_warehouse_structure wws ON wlsd.warehouse_structure_id = wws.id
LEFT JOIN wl_equipment_detail wled ON wles.equipment_detail_id = wled.id
LEFT JOIN wl_equipment_specific_alarm wlesa ON wlesa.id = wlesal.equipment_specific_alarm_id
<where>
wlesal.confirm_type is null
</where>
) d
<where>
d.fireEquipmentName IS NOT null
AND d.type = 'BREAKDOWN'
</where>
ORDER BY
d.createDate desc
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.DeviceServicingMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.DistrictsMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.DynamicFormColumnMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.DynamicFormGroupMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.DynamicFormInstanceMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.EquPropertyMapper">
<select id="queryListByEquipDetailId" resultType="com.yeejoin.equipmanage.common.entity.EquProperty">
SELECT
si.id,
sp.equipment_detail_id AS equipmentDetailId,
si.value,
wei.name AS perfQuotaName,
wei.unit AS unitName,
si.create_date AS createDate,
si.equipment_index_id AS equipmentIndexId
FROM
wl_equipment_specific_index si
LEFT JOIN wl_equipment_specific sp on si.equipment_specific_id = sp.id
LEFT JOIN wl_equipment_index wei ON wei.id = si.equipment_index_id
WHERE
sp.equipment_detail_id = #{id}
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.EquipmentAccountMapper">
<select id="getNameList" resultType="com.yeejoin.equipmanage.common.vo.EquipmentAccountFilterVo">
select * from
(
select
(select code from wl_equipment_category where id =( select category_id from wl_equipment where equipment_id = wl_equipment.id)) as id,
car.name as name
from
wl_car as car
group by car.name
union all
select
(select code from wl_equipment_category where id =( select category_id from wl_equipment where equipment_id = wl_equipment.id)) as id,
eq.name as name
from
wl_equipment_detail as eq
group by eq.name) data
where id like CONCAT(#{eType},'%')
</select>
<select id="getAccounList" resultType="com.yeejoin.equipmanage.common.vo.EquipmentAccountVo">
select * from
( select
id,
(select name from wl_equipment where equipment_id = wl_equipment.id) as equipmentType,
(select code from wl_equipment_category where id =( select category_id from wl_equipment where equipment_id = wl_equipment.id)) as equipmentTypeId,
car.name as equipmentName,
'辆' unit,
count(case when car.car_state= 1 then 1 else null end ) inLibCount,
0 onCarCount,
count(case when car.car_state= 3 then 1 else null end ) maintainCount,
count(case when car.car_state= 7 then 1 else null end ) badCount,
0 wasteCount,
'car' as dataType
from
wl_car as car
group by car.name
union all
select
eq.id,
(select name from wl_equipment where equipment_id = wl_equipment.id) as equipmentType,
(select code from wl_equipment_category where id =( select category_id from wl_equipment where equipment_id = wl_equipment.id)) as equipmentTypeId,
eq.name as equipmentName,
(select name from wl_unit where wleq.unit_id = wl_unit.id) as unit,
sum(if(sto.status= 1,sto.amount,0)) as inLibCount,
sum(if(sto.status= 10,sto.amount,0)) as onCarCount,
sum(if(sto.status= 3,sto.amount,0)) as maintainCount,
sum(if(sto.status= 7,sto.amount,0)) as badCount,
sum(if(sto.status= 11,sto.amount,0)) as wasteCount,
'acc' as dataType
from
wl_equipment_detail as eq
left join
wl_stock_detail as sto on
eq.id = sto.equipment_detail_id
left join
wl_equipment as wleq on
eq.equipment_id = wleq.id
group by eq.name) data
where 1=1
<if test="eType != null and eType != '' ">
AND equipmentTypeId like CONCAT(#{eType},'%')
</if>
<if test="eName != null and eName != '' ">
AND equipmentName = #{eName}
</if>
LIMIT #{spage},#{pageSize}
</select>
<select id="getAccounListCount" resultType="int">
select count(1) from
(
select
(select code from wl_equipment_category where id =( select category_id from wl_equipment where equipment_id = wl_equipment.id)) as equipmentTypeId,
car.name as equipmentName
from
wl_car as car
group by car.name
union all
select
(select code from wl_equipment_category where id =( select category_id from wl_equipment where equipment_id = wl_equipment.id)) as equipmentTypeId,
eq.name as equipmentName
from
wl_equipment_detail as eq
group by eq.name
) data
where 1=1
<if test="eType != null and eType != '' ">
AND equipmentTypeId like CONCAT(#{eType},'%')
</if>
<if test="eName != null and eName != '' ">
AND equipmentName = #{eName}
</if>
</select>
<select id="getMoreCarList" resultType="com.yeejoin.equipmanage.common.vo.EquipmentAccountCarVo">
select
id,
name,
(select name from wl_equipment where id = equipment_id) as type,
car_num as carNum,
if(is_import=0,'进口','国产') as isImport,
brand,
(select name from wl_manufacturer_info where id = manufacturer_id ) as facturer,
standard,
chassis_brand as carBrand
from wl_car
where
name =#{equipmentName}
and car_state = #{accType}
<if test="carNum != null and carNum != '' ">
and car_num like CONCAT(#{carNum},'%')
</if>
LIMIT #{spage},#{pageSize}
</select>
<select id="getMoreCarListCount" resultType="int">
select
count(1)
from wl_car
where
name =#{equipmentName}
and car_state = #{accType}
<if test="carNum != null and carNum != '' ">
and car_num like CONCAT(#{carNum},'%')
</if>
</select>
<select id="getMoreAccList" resultType="com.yeejoin.equipmanage.common.vo.EquipmentAccountAccVo">
select
sto.id,
eq.name,
(select name from wl_manufacturer_info where id = eq.manufacturer_id) facturer,
date_format(eq.production_date,'%Y-%m-%d') AS proDate,
eq.standard,
eq.maintenance_cycle as cycle,
eq.expiry_date AS expDate,
sto.qr_code as code,
amount
from wl_equipment_detail as eq
left join
wl_stock_detail as sto on
eq.id = sto.equipment_detail_id
where
name =#{equipmentName}
and status = #{accType}
<if test="code != null and code != '' ">
and qr_code like CONCAT(#{code},'%')
</if>
LIMIT #{spage},#{pageSize}
</select>
<select id="getMoreAccListCount" resultType="int">
select
count(1)
from wl_equipment_detail as eq
left join
wl_stock_detail as sto on
eq.id = sto.equipment_detail_id
where
name =#{equipmentName}
and status = #{accType}
<if test="code != null and code != '' ">
and qr_code like CONCAT(#{code},'%')
</if>
</select>
<select id="selectHistoryById" resultType="com.yeejoin.equipmanage.common.vo.EquipmentHistoryVo">
select
remark ,
date_format(create_date,'%Y-%m-%d') as date,
user_name as user,
department_name as deptName
from
wl_journal
where
car_id =#{id}
</select>
<select id="getaccData" resultType="String">
select
date_format(production_date,'%Y-%m-%d') AS proDate
from
wl_stock_detail as sto
left join wl_equipment_detail as eq on sto.equipment_detail_id = eq.id
where
sto.id=#{id}
</select>
<select id="selectAccHistoryById" resultType="com.yeejoin.equipmanage.common.vo.EquipmentHistoryVo">
select
remark ,
date_format(create_date,'%Y-%m-%d') as date,
user_name as user,
department_name as deptName
from
wl_journal
where
stock_detail_id =#{id}
</select>
<select id="getaccId" resultType="String">
select equipment_detail_id from wl_stock_detail where id =#{id}
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.EquipmentAlarmReportDayMapper">
<select id="getOneByDateAndSpeIdAndAlarmType" resultType="com.yeejoin.equipmanage.common.entity.EquipmentAlarmReportDay">
SELECT
weard.id AS id,
weard.org_code AS orgCode,
weard.report_date AS reportDate,
weard.equipment_specific_id AS equipmentSpecificId,
weard.equipment_specific_name AS equipmentSpecificName,
weard.system_ids AS systemIds,
weard.alarm_type AS alarmType,
weard.last_report_date AS lastReportDate,
weard.frequency AS frequency,
weard.create_date AS createDate,
weard.update_date AS updateDate
FROM wl_equipment_alarm_report_day weard
WHERE weard.report_date = #{reportDate} AND weard.equipment_specific_id = #{speId} AND weard.alarm_type = #{alarmType}
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace="com.yeejoin.equipmanage.mapper.EquipmentDetailMapper">
<select id="page"
resultType="com.yeejoin.equipmanage.common.entity.EquipmentDetail">
SELECT
wed.id AS id,
wec.name AS categoryName,
wed.name,
wed.code,
wed.standard,
wed.maintenance_cycle
AS maintenanceCycle,
wmi.name AS
manufacturerName,
wed.brand,
wed.equipment_id AS equipmentId,
wed.create_date AS createDate,
wed.update_date AS
updateDate,
wlu.name unitName
FROM
wl_equipment_detail wed
LEFT JOIN
wl_equipment we ON we.id =
wed.equipment_id
LEFT JOIN
wl_equipment_category wec ON wec.id =
we.category_id
LEFT JOIN
wl_manufacturer_info wmi ON wmi.id =
wed.manufacturer_id
LEFT JOIN
wl_unit wlu ON we.unit_id= wlu.id
<where>
<if test="equip!=null ">
<if test="equip.name != null and equip.name != ''"> AND wed.name LIKE CONCAT('%',#{equip.name},'%' )</if>
<if test="equip.standard != null and equip.standard != ''"> AND wed.standard LIKE CONCAT('%',#{equip.standard},'%'
)
</if>
<if
test="equip.manufacturerName != null and equip.manufacturerName != ''"> AND wmi.name LIKE CONCAT('%',#{equip.manufacturerName},'%' )
</if>
</if>
</where>
ORDER BY wed.id DESC
LIMIT #{offset},#{size}
</select>
<select id="count" resultType="Integer">
SELECT
COUNT(1)
FROM
wl_equipment_detail wed
LEFT JOIN wl_equipment we ON
we.id =
wed.equipment_id
LEFT JOIN wl_equipment_category wec ON wec.id =
we.category_id
LEFT JOIN wl_manufacturer_info wmi ON wmi.id =
wed.manufacturer_id
<where>
<if test="equip!=null ">
<if test="equip.name != null and equip.name != ''"> AND wed.name LIKE CONCAT('%',#{equip.name},'%' )</if>
<if test="equip.standard != null and equip.standard != ''"> AND wed.standard LIKE CONCAT('%',#{equip.standard},'%'
)
</if>
<if
test="equip.manufacturerName != null and equip.manufacturerName != ''"> AND wmi.name LIKE CONCAT('%',#{equip.manufacturerName},'%' )
</if>
</if>
</where>
</select>
<select id="pageCategory"
resultType="com.yeejoin.equipmanage.common.entity.EquipmentDetail">
SELECT
wed.id AS id,
wec.name AS categoryName,
wed.name,
wed.code,
wed.standard,
wed.maintenance_cycle
AS maintenanceCycle,
wmi.name AS
manufacturerName,
wed.brand,
wed.equipment_id AS equipmentId,
wed.create_date AS
createDate,
wed.update_date AS updateDate
FROM
wl_equipment_detail wed
LEFT JOIN
wl_equipment we ON we.id =
wed.equipment_id
LEFT JOIN
wl_equipment_category wec ON wec.id =
we.category_id
LEFT JOIN
wl_manufacturer_info wmi ON wmi.id =
wed.manufacturer_id
<where>
<if test="list!=null">
AND we.category_id IN
<foreach item="item" collection="list" separator=","
open="(" close=")" index=""> #{item.id}
</foreach>
</if>
</where>
LIMIT #{offset},#{size}
</select>
<select id="countCategory" resultType="Integer">
SELECT
COUNT(1)
FROM
wl_equipment_detail wed
LEFT JOIN
wl_equipment we ON
we.id =
wed.equipment_id
LEFT JOIN
wl_equipment_category wec ON wec.id =
we.category_id
LEFT JOIN
wl_manufacturer_info wmi ON wmi.id =
wed.manufacturer_id
<where>
<if test="list!=null">
AND we.category_id IN
<foreach item="item" collection="list" separator=","
open="(" close=")" index=""> #{item.id}
</foreach>
</if>
</where>
LIMIT #{offset},#{size}
</select>
<update id="quotaUpdate">
update
wl_equipment_index
set perf_value =#{value}
where id =#{equipmentIndexId}
</update>
<select id="getPref" resultType="String">
select
pref_quota
from
wl_equipment
where id=#{id}
</select>
<select id="checkDelete" resultType="String">
select
(select name from wl_equipment_detail eq where eq.id = sto.equipment_detail_id) as name
from wl_stock_detail as sto
where
equipment_detail_id = #{id}
group by equipment_detail_id
</select>
<select id="getWareId" resultType="Long">
select id from wl_warehouse_structure where parent_id in(
select id from
wl_warehouse_structure
where
id = #{id}
or parent_id = #{id}
)
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.EquipmentIndexMapper">
<resultMap id="Page" type="com.yeejoin.equipmanage.common.entity.vo.EquipmentIndexVO">
<result property="id" column="id"></result>
<result property="perfQuotaName" column="prefQuotaNAME"></result>
<result property="perfQuotaDefinitionId" column="perf_quota_definition_id"></result>
<result property="unitName" column="unitName"></result>
<result property="unitId" column="unitId"></result>
<result property="groupName" column="group_name"></result>
<result property="isImportentParameter" column="is_importent_parameter"></result>
</resultMap>
<select id="queryEquipmentIndexListByEquipId" resultType="Map">
SELECT * FROM(
SELECT
wei.id AS id,
we.id AS equipDefId,
'' AS perfQuotaStr,
wei.unit AS measureUnitName,
wei.name AS performanceIndexName,
'true' AS isImportentParameter
FROM
wl_equipment_index wei
LEFT JOIN wl_equipment we ON wl.equipment_id = we.id
WHERE
we.id = #{equipmentId}
UNION ALL
SELECT
equipment.id AS id,
'' AS perfQuotaDefinitionId,
equipment.id AS equipDefId,
equipment.pref_quota AS perfQuotaStr,
'' AS measureUnitName,
equipment.pref_quota AS performanceIndexName,
'false' AS isImportentParameter
FROM
wl_equipment equipment
WHERE
equipment.pref_quota IS NOT NULL
AND equipment.id =#{equipmentId}
)temp
LIMIT #{start},#{page}
</select>
<select id="queryEquipmentIndexCountByEquipId" resultType="Integer">
SELECT COUNT(1) FROM(
SELECT
wei.id AS id,
we.id AS equipDefId,
'' AS perfQuotaStr,
wei.unit AS measureUnitName,
wei.name AS performanceIndexName,
'true' AS isImportentParameter
FROM
wl_equipment_index wei
LEFT JOIN wl_equipment we ON wl.equipment_id = we.id
WHERE
we.id = #{equipmentId}
UNION ALL
SELECT
equipment.id AS id,
'' AS perfQuotaDefinitionId,
equipment.id AS equipDefId,
equipment.pref_quota AS perfQuotaStr,
'' AS measureUnitName,
equipment.pref_quota AS performanceIndexName,
'false' AS isImportentParameter
FROM
wl_equipment equipment
WHERE
equipment.pref_quota IS NOT NULL
AND equipment.id =#{equipmentId}
)temp
</select>
<select id="getPage" resultMap="Page">
select
* from
( select
null as equipment_id,
null as id,
pref_quota as prefQuotaNAME,
null as perf_quota_definition_id,
null AS unitName,
0 as is_iot,
null as type_name,
null as type_code,
null as group_name,
null as index_id,
0 as is_importent_parameter,
0 as sort_num
from wl_equipment
where
id = #{id}
and pref_quota is not null
and pref_quota !=''
UNION all
select * from (select
equipment_id,
id,
name,
name_key,
unit,
is_iot ,
type_name ,
type_code ,
group_name,
index_definition_id,
1 as is_importent_parameter,
sort_num
from
wl_equipment_index
where equipment_id = #{id}
order by group_name,sort_num ) impor) data
where prefQuotaNAME like concat('%',#{groupName},'%')
</select>
<select id="getPerfQutoaList" resultType="com.yeejoin.equipmanage.common.entity.vo.EquipmentIndexVO">
select
* from
( select
pref_quota as perfQuotaName,
null as perfQuotaDefinitionId,
0 as isIot
from wl_equipment
where
id = #{id}
and pref_quota is not null
and pref_quota !=''
UNION all
select * from (select
name as perfQuotaName,
name_key as perfQuotaDefinitionId,
is_iot as isIot
from
wl_equipment_index
where equipment_id = #{id}
order by group_name,sort_num ) impor) data
</select>
<select id="getOnePrefQuota" resultMap="Page">
SELECT
equipment_id ,
id,
name as prefQuotaNAME,
name_key as perf_quota_definition_id,
unit as unitName,
is_iot ,
type_name ,
type_code ,
group_name ,
index_definition_id as index_id,
1 as is_importent_parameter,
sort_num,
type
from
wl_equipment_index
where id = #{id}
</select>
<select id="checkName" resultType="int">
select count(1) from wl_equipment_index where
index_definition_id=#{id}
and equipment_id = #{fId}
<if test="dataId != null and dataId !='' ">
and id != #{dataId}
</if>
</select>
<update id="updateE">
UPDATE
wl_equipment
SET
pref_quota = ''
where id = #{id}
</update>
<insert id="savePerfQuota" >
insert into wl_equipment_index
VALUES(
#{id},
#{equipmentId},
#{perfQuotaName},
#{perfQuotaDefinitionId},
#{unitName},
#{indexId},
#{isIot},
#{typeName},
#{typeCode},
#{groupName},
#{sortNum},
#{type},
now())
</insert>
<select id="checkUnit" resultType="int">
select count(1) from wl_equipment_index where
unit=#{unitName}
</select>
<select id="getEquipmentIndexByIot" resultType="com.yeejoin.equipmanage.common.entity.vo.EquipmentIndexVO">
SELECT
wei.id AS id,
wei.name_key AS nameKey
FROM
wl_equipment_index wei
WHERE
wei.is_iot = 1
AND
wei.name_key != ""
</select>
<select id="getGruopName" resultType="java.lang.String">
SELECT
group_name
FROM
wl_equipment_index
WHERE
group_name != ' '
AND group_name IS NOT NULL
AND equipment_id = #{equipmentId}
GROUP BY
group_name
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.EquipmentManageMapper">
<select id="queryEquipmenInfo" resultType="com.yeejoin.equipmanage.common.vo.EquipmentManageVo">
select
id as id,
name as name,
code as code,
form_group_id,
instance_id,
date_format(install_date,'%Y-%m-%d') AS installDate,
date_format(first_maintenance_date,'%Y-%m-%d') AS firstMaintenanceDate,
charge_person as chargePerson,
(select name from wl_manufacturer_info where id = construction_unit) as constructionUnit,
(select name from wl_manufacturer_info where id = maintenance_unit) as maintenanceUnit,
(select name from wl_equipment_category where id = system_type) as systemType,
system_type as systemTypeCode,
construction_unit as constructionUnitCode,
maintenance_unit as maintenanceUnitCode,
maintenance_frequency as maintenanceFrequency,
scene_id as sceneId,
(select count(1) from `wl_equipment_specific` es where find_in_set(sys.id,es.system_id) and es.single = true ) equipCount
from
f_fire_fighting_system as sys
where 1=1
<if test="equimentName != 'null' ">
AND NAME like CONCAT('%',#{equimentName},'%')
</if>
<if test="equimentCode != 'null' ">
AND CODE like CONCAT('%',#{equimentCode},'%')
</if>
<if test="construction != 'all' ">
AND CONSTRUCTION_UNIT = #{construction}
</if>
<if test="maintenance != 'all' ">
AND MAINTENANCE_UNIT = #{maintenance}
</if>
order by id DESC
LIMIT #{spage},#{pageSize}
</select>
<select id="queryEquipmenCount" resultType="long">
select
count(1)
from
f_fire_fighting_system
where 1=1
<if test="equimentName != 'null' ">
AND name like CONCAT('%',#{equimentName},'%')
</if>
<if test="equimentCode != 'null' ">
AND code like CONCAT('%',#{equimentCode},'%')
</if>
<if test="construction != 'all' ">
AND construction_unit = #{construction}
</if>
<if test="maintenance != 'all' ">
AND maintenance_unit = #{maintenance}
</if>
</select>
<select id="getUtils" resultType="com.yeejoin.equipmanage.common.vo.EquipmentManageVo">
select
id ,
name as name
from
wl_manufacturer_info
order by id
</select>
<select id="getSystemList" resultType="com.yeejoin.equipmanage.common.vo.EquipmentManageVo">
SELECT
id,
`name`,
`code`
FROM
wl_equipment_category
WHERE
parent_id = (
SELECT
CONCAT(id, '')
FROM
wl_equipment_category
WHERE
`code` = '92000000'
)
ORDER BY
`code`
</select>
<delete id="deleteByid">
DELETE FROM f_fire_fighting_system WHERE id = #{param}
</delete>
<select id="checkCode" resultType="int">
select
count(1) from f_fire_fighting_system
where CODE=#{param}
</select>
<insert id="insertEquipment">
INSERT INTO
f_fire_fighting_system
(id,
name,
code,
system_type,
install_date,
charge_person,
construction_unit,
maintenance_unit,
maintenance_frequency,
first_maintenance_date,
rec_user_id,
rec_date,
sort)
VALUES(
#{id},
#{name},
#{code},
#{systemType},
STR_TO_DATE(#{installDate},'%Y-%m-%d'),
#{chargePerson},
#{constructionUnit},
#{maintenanceUnit},
#{maintenanceFrequency},
STR_TO_DATE(#{firstMaintenanceDate},'%Y-%m-%d'),
#{recUserId},
now(),
#{sort})
</insert>
<insert id="insertFile">
insert into wl_upload_file
(id,
url,
name,
user_id,
file_type,
object_id,
create_date)
VALUES(
#{id},
#{url},
#{name},
#{userId},
#{fileType},
#{objectId},
now())
</insert>
<select id="getFiles" resultType="com.yeejoin.equipmanage.common.vo.FileUploadVo">
select
id,
url,
name,
file_type as fileType,
object_id as objectId,
date_format(create_date,'%Y-%m-%d') AS createDate
from
wl_upload_file
where
object_id =#{id}
and file_type=#{type}
</select>
<update id="updateEquipment">
UPDATE
f_fire_fighting_system
SET
NAME = #{name},
system_type =#{systemType} ,
install_date =STR_TO_DATE(#{installDate},'%Y-%m-%d'),
charge_person =#{chargePerson},
construction_unit =#{constructionUnit},
maintenance_unit =#{maintenanceUnit},
maintenance_frequency =#{maintenanceFrequency},
first_maintenance_date =STR_TO_DATE(#{firstMaintenanceDate},'%Y-%m-%d'),
rec_user_id =#{recUserId},
rec_date = now()
where id = #{id}
</update>
<update id="updateFile">
UPDATE
wl_upload_file
SET
url = #{url},
create_date= now()
where
object_id =#{objectId}
and file_type=#{fileType}
</update>
<delete id="deleteFilre">
delete from wl_upload_file WHERE object_id = #{id}
</delete>
<select id="chekcName" resultType="int">
select count(1)
from f_fire_fighting_system
where NAME=#{name}
<if test="id != null ">
and id !=#{id}
</if>
</select>
<select id="getNotFireSystemList" resultType="hashmap">
SELECT
fs.id AS systemId,
fs.`name` AS systemName
FROM
f_fire_fighting_system fs
JOIN wl_equipment_category ec ON ec.id = fs.system_type
AND ec.`code` != #{alarmSystemCode}
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.EquipmentOnCarMapper">
<select id="onCarIPage" resultType="com.yeejoin.equipmanage.common.vo.EquipmentOnCarVo">
SELECT
e.`name` AS equipmentName,
ed.`name` AS equipmentSpecificName,
oc.amount,
ed.area,
oc.id AS equipmentOnCarId,
sd.warehouse_id AS warehouseId,
sd.warehouse_structure_id AS warehouseStructureId,
sd.id AS stockDetailId,
es.code equipmentSpecificCode,
CASE
sd.`status`
WHEN 10 THEN
'车载' ELSE ''
END AS `status`,
oc.create_date
FROM
wl_equipment_on_car oc
LEFT JOIN wl_equipment_specific es ON oc.equipment_specific_id = es.id
LEFT JOIN wl_equipment_detail ed ON ed.id = es.equipment_detail_id
LEFT JOIN wl_equipment e ON e.id = ed.equipment_id
LEFT JOIN wl_stock_detail sd ON sd.id = oc.stock_detail_id
<where>
<if test="dto.carId != null">
oc.car_id = #{dto.carId}
</if>
<if test="dto.teamId != null">
AND es.team_id = #{dto.teamId}
</if>
<if test="dto.equipmentSpecificName != null and dto.equipmentSpecificName !=''">
AND ed.`name` LIKE CONCAT( '%', #{dto.equipmentSpecificName}, '%' )
</if>
<if test="dto.createDate != null">
AND TO_DAYS( oc.create_date ) = TO_DAYS( #{dto.createDate} )
</if>
</where>
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.EquipmentPointMapper">
<select id="listBySearchMap" resultType="com.yeejoin.equipmanage.common.entity.EquipmentPoint">
select
a.id,
a.name,
a.code,
a.equipment_id as fireEquipmentId,
a.create_by as createBy,
a.create_date as createDate,
a.remark,
a.type,
a.value,
a.unit,
a.unit_name as unitName,
a.org_code as orgCode,
fd.name as alarmName,
a.equipment_name as equipmentName,
a.equipment_code as equipmentCode
from
wl_equipment_point as a
left join wl_system_dic fd on fd.id = a.alarm_type
<where>
a.org_code = #{compCode}
<if test="searchValue!=null and searchValue.trim() != ''">
and (a.name like concat('%',#{searchValue},'%') or a.code like concat('%',#{searchValue},'%'))
</if>
<if test="type!=null and type.trim() != ''">
and a.type = #{type}
</if>
</where>
order by a.create_date desc
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace="com.yeejoin.equipmanage.mapper.EquipmentQrcodeMapper">
<select id="page"
resultType="com.yeejoin.equipmanage.common.entity.EquipmentQrcode">
SELECT
weq.id AS id,
weq.equipment_detail_id AS equipmentDetailId,
weq.q_r_code AS
qRCode,
weq.car_id AS carId,
weq.product_date AS productDate,
wsd.STATUS,
wsd.update_date AS updateDate,
wsd.create_date AS createDate,
wws.full_name AS location
FROM
wl_equipment_qrcode weq
LEFT
JOIN wl_stock_detail wsd ON
wsd.qr_code =
weq.q_r_code
LEFT JOIN
wl_warehouse_structure wws ON wws.id =
wsd.warehouse_structure_id
<where>
<if test="equipment.qRCode != null and equipment.qRCode != ''">
AND weq.q_r_code LIKE CONCAT('%',#{equipment.qRCode},'%')
</if>
<if
test="equipment.equipmentDetailId != null and equipment.equipmentDetailId != ''">
AND weq.equipment_detail_id = #{equipment.equipmentDetailId}
</if>
<if test="equipment.status != null and equipment.status != ''">
AND find_in_set(wsd.status,#{equipment.status})
</if>
</where>
LIMIT #{start},#{size}
</select>
<select id="count" resultType="Integer">
SELECT
COUNT(1)
FROM
wl_equipment_qrcode weq
LEFT JOIN wl_stock_detail wsd
ON
wsd.qr_code = weq.q_r_code
LEFT JOIN
wl_warehouse_structure wws ON wws.id = wsd.warehouse_structure_id
<where>
<if test="equipment.qRCode != null and equipment.qRCode != ''">
AND weq.q_r_code LIKE CONCAT('%',#{equipment.qRCode},'%')
</if>
<if
test="equipment.equipmentDetailId != null and equipment.equipmentDetailId != ''">
AND weq.equipment_detail_id = #{equipment.equipmentDetailId}
</if>
<if test="equipment.status != null and equipment.status != ''">
AND find_in_set(wsd.status,#{equipment.status})
</if>
</where>
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.EquipmentSpecificAlarmLogMapper">
<update id="updateAlarmLogByIotCodeAndIndexKey">
UPDATE wl_equipment_specific_alarm_log wesal
SET wesal.confirm_type = #{dto.confirmType},
wesal.resolve_result = #{dto.resolveResult},
wesal.confirm_user_name = #{dto.confirmUserName},
wesal.confirm_date = now()
WHERE
wesal.equipment_specific_alarm_id IN (
SELECT
id
FROM
wl_equipment_specific_alarm wesa
WHERE
wesa.iot_code = #{dto.iotCode}
AND wesa.equipment_specific_index_key = #{dto.equipmentSpecificIndexKey}
)
</update>
<select id="findByIdList" resultType="com.yeejoin.equipmanage.common.datasync.vo.AppAlarmExtVo">
SELECT
CONCAT(sal.create_date) AS time,
IFNULL(a.`code`,' ') AS areaid,
IFNULL(a.`name`,' ') AS areaname,
f.`code` AS stationid,
f.`name` AS stationname,
s.`code` AS deviceid,
s.`name` AS devicename,
sal.equipment_specific_code AS partid,
sal.equipment_specific_name AS partname,
s.`system_type_code` AS type,
IF
( sal.confirm_type = 'FIREALARM', 0, 1 ) AS eventlevel,
-- CONCAT( sal.equipment_specific_name, ' ', sal.equipment_specific_index_name ) AS eventdesc,
CONCAT( '位于', a.`name`, '的', sal.equipment_specific_name, '(', sal.equipment_specific_code, ')在', sal.create_date, '发生', sal.equipment_specific_index_name, ',请相关人员进行核实确认现场情况!') AS eventdesc,
sal.equipment_specific_index_name AS eventaction,
IF
( sal.confirm_date IS NULL, FALSE, TRUE ) AS isreport ,
CONCAT(sal.confirm_date) AS confirmtime,
sal.alarm_reason AS eventreason
FROM
wl_equipment_specific_alarm_log sal
LEFT JOIN wl_form_instance i ON sal.build_id = i.instance_id
LEFT JOIN wl_area a ON a.id = i.field_value
LEFT JOIN f_fire_fighting_system s ON s.id = IF(LOCATE(',' , sal.system_ids) > 0,SUBSTRING(sal.system_ids,1,LOCATE(',' , sal.system_ids)-1),sal.system_ids),
f_station_info f
WHERE
i.field_name = "belongAreaId"
<if test="list != null and list.size() >0">
AND sal.id IN
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
GROUP BY
sal.id
</select>
<select id="findByIdListNoBuildId" resultType="com.yeejoin.equipmanage.common.datasync.vo.AppAlarmExtVo">
SELECT
CONCAT(sal.create_date) AS time,
' ' AS areaid,
' ' AS areaname,
f.`code` AS stationid,
f.`name` AS stationname,
s.`code` AS deviceid,
s.`name` AS devicename,
sal.equipment_specific_code AS partid,
sal.equipment_specific_name AS partname,
s.`system_type_code` AS type,
IF
( sal.confirm_type = 'FIREALARM', 0, 1 ) AS eventlevel,
-- CONCAT( sal.equipment_specific_name, ' ', sal.equipment_specific_index_name ) AS eventdesc,
CONCAT(sal.equipment_specific_name, '(', sal.equipment_specific_code, ')在', sal.create_date, '发生', sal.equipment_specific_index_name, ',请相关人员进行核实确认现场情况!') AS eventdesc,
sal.equipment_specific_index_name AS eventaction,
IF
( sal.confirm_date IS NULL, FALSE, TRUE ) AS isreport ,
CONCAT(sal.confirm_date) AS confirmtime,
sal.alarm_reason AS eventreason
FROM
wl_equipment_specific_alarm_log sal
LEFT JOIN wl_equipment_specific_alarm sa ON sa.id = sal.equipment_specific_alarm_id
LEFT JOIN f_fire_fighting_system s ON s.id = IF(LOCATE(',' , sal.system_ids) > 0,SUBSTRING(sal.system_ids,1,LOCATE(',' , sal.system_ids)-1),sal.system_ids),
f_station_info f
<where>
<if test="list != null and list.size() >0">
AND sal.id IN
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
</where>
GROUP BY
sal.id
</select>
<select id="getIsConfirmByAlarmId" resultType="com.yeejoin.equipmanage.common.entity.EquipmentSpecificAlarmLog">
SELECT
*
FROM
wl_equipment_specific_alarm_log weal
<where>
<if test="equipmentSpecificAlarmId != null">
weal.equipment_specific_alarm_id = #{equipmentSpecificAlarmId}
</if>
<if test="isConfirm != null and isConfirm != '' and isConfirm == 0">
AND weal.confirm_date IS NULL
</if>
<if test="isConfirm != null and isConfirm != '' and isConfirm == 1">
AND weal.confirm_date IS NOT NULL
</if>
</where>
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.EquipmentSpecificRelationMapper">
<resultMap id="associatedEquipmentList" type="com.yeejoin.equipmanage.common.entity.vo.AssociatedEquipmentVO">
<result column="id" property="id"></result>
<result column="fullqrCode" property="fullqrCode"></result>
<result column="amount" property="amount"></result>
<result column="equipmentName" property="equipmentName"></result>
<result column="unitName" property="unitName"></result>
<result property="qrCode" column="qr_code"></result>
<result property="standard" column="standard"></result>
<result property="img" column="img"></result>
<result property="warehouseStructureName" column="full_name"></result>
<result property="systemName" column="systemName"></result>
<result property="amount" column="amount"></result>
<result property="manufacturerName" column="manufacturerName"></result>
<result property="status" column="status"></result>
<result property="type" column="type"></result>
<result property="code" column="code"></result>
<result property="iotCode" column="iotCode"></result>
<result property="associateType" column="associateType"></result>
<result property="eqpSpecificId" column="eqpSpecificId"></result>
</resultMap>
<select id="getAssociatedEquipmentPageList" resultMap="associatedEquipmentList">
SELECT
esr.type associateType,
ed.id,
es.qr_code,
es.id eqpSpecificId,
CONCAT( '01#', es.qr_code ) fullqrCode,
ed.standard,
eqp.img,
ed.name equipmentName,
ws.full_name,
u.`name` unitName,
(select group_concat(ffs.name) from `f_fire_fighting_system` ffs where ffs.id = es.system_id) as systemName,
sd.amount,
'equipment' AS type,
mi.`name` manufacturerName,
es.code,
es.iot_code iotCode,
CASE
sd.`status`
WHEN '1' THEN
'在位'
WHEN '2' THEN
'执勤'
WHEN '3' THEN
'维修'
WHEN '6' THEN
'退役'
WHEN '7' THEN
'报废'
WHEN '10' THEN
'车载'
WHEN '11' THEN
'损耗' ELSE '未入库'
END AS STATUS
FROM
wl_equipment_specific_relation esr
LEFT JOIN wl_equipment_specific es ON es.id = esr.relation_equipment_specific_id
LEFT JOIN wl_equipment_detail ed ON ed.id = es.equipment_detail_id
LEFT JOIN wl_stock_detail sd ON sd.equipment_detail_id = es.equipment_detail_id
LEFT JOIN wl_warehouse_structure ws ON ws.id = sd.warehouse_structure_id
LEFT JOIN wl_equipment eqp ON eqp.id = ed.equipment_id
LEFT JOIN wl_unit u ON u.id = eqp.unit_id
LEFT JOIN wl_manufacturer_info mi ON mi.id = ed.manufacturer_id
WHERE 1=1
<if test="equipId != null and equipId != ''">
AND esr.equipment_specific_id = #{equipId}
</if>
<if test="type != null and type != -1">
AND esr.type = #{type}
</if>
ORDER BY
esr.id
</select>
<select id="getAssociatedEqpList"
resultType="com.yeejoin.equipmanage.common.entity.vo.EquipmentDetailVO">
SELECT
ed.id eqpId,
ed.name eqpName,
ed.code,
es.id eqpSpecificId
FROM
wl_equipment_specific_relation esr
LEFT JOIN wl_equipment_specific es ON es.id = esr.relation_equipment_specific_id
LEFT JOIN wl_equipment_detail ed ON ed.id = es.equipment_detail_id
WHERE 1=1
<if test="eqpSpecificId != null and eqpSpecificId != ''">
AND esr.equipment_specific_id = #{eqpSpecificId}
</if>
<if test="type != null and type != -1">
AND esr.type = #{type}
</if>
ORDER BY
esr.id
</select>
<select id="queryByRelatedEqpSpecIds" resultType="java.lang.Long">
SELECT id
FROM wl_equipment_specific_relation
WHERE relation_equipment_specific_id = #{eqpSpecificId}
and equipment_specific_id IN (SELECT relation_equipment_specific_id
FROM wl_equipment_specific_relation
WHERE equipment_specific_id = #{eqpSpecificId})
</select>
<select id="getEqpDetailCategoryIdAndName"
resultType="com.yeejoin.equipmanage.common.entity.vo.EquipmentDetailVO">
SELECT
ed.id eqpId,
ed.NAME eqpName,
ed.CODE,
es.id eqpSpecificId
FROM
wl_equipment_specific es
LEFT JOIN wl_equipment_detail ed ON es.equipment_detail_id = ed.id
LEFT JOIN wl_equipment e ON e.id = ed.equipment_id
WHERE
1 = 1
<if test="eqpName != null and eqpName != ''">
AND ed.name LIKE CONCAT('%', #{eqpName}, '%')
</if>
<if test="categoryIdList != null and categoryIdList.size() > 0">
AND e.category_id in
<foreach collection="categoryIdList" item="categoryId" open="(" separator="," close=")">
#{categoryId}
</foreach>
</if>
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.EquipmentStandardMapper">
<resultMap id="EquipmentStandardDetail" type="com.yeejoin.equipmanage.common.entity.vo.EquipmentStandardVO">
<result column="id" property="id"></result>
<result column="equipmentId" property="equipment_id"></result>
<result column="equipmentName" property="equipment_name"></result>
<result column="equipmentStyleCode" property="equipment_style_code"></result>
<result column="equipmentStyleName" property="equipment_style_name"></result>
<result column="standardName" property="standard_name"></result>
<result column="standardKey" property="standard_key"></result>
</resultMap>
<select id="findEquipmentStandardList"
resultMap="EquipmentStandardDetail" >
select
equ_stand.id as id,
equ.code as equipment_code,
equ.name as equipment_name,
equ_cate.code as equipment_style_code,
equ_cate.name as equipment_style_name,
equ_stand.standard_name as standard_name
from wl_equipment_standard equ_stand
left join wl_equipment equ on equ_stand.equipment_id = equ.`id`
left join wl_equipment_category equ_cate on equ.category_id = equ_cate.id
where equ_stand.org_code=#{orgCode}
<if test="standardKey != null and standardKey != ''">
AND equ_stand.standard_key = #{standardKey}
</if>
<if test="equipmentName != null and equipmentName != ''">
AND equ.name like CONCAT('%',#{equipmentName},'%')
</if>
order by equ_stand.create_date desc
</select>
<select id="findById"
resultMap="EquipmentStandardDetail" >
select
equ_stand.id as id,
equ_stand.equipment_id as equipment_id,
equ.name as equipment_name,
equ_cate.code as equipment_style_code,
equ_cate.name as equipment_style_name,
equ_stand.standard_name as standard_name,
equ_stand.standard_key as standard_key
from wl_equipment_standard equ_stand
left join wl_equipment equ
on equ_stand.equipment_id = equ.`id`
left join wl_equipment_category equ_cate
on equ.category_id = equ_cate.id
where equ_stand.id=#{id}
</select>
<select id="getNoAddEquipmentStandardNameList"
resultType="java.util.Map" parameterType="java.lang.String">
SELECT equ.id,equ.code ,equ.`name` from wl_equipment equ
where not EXISTS (select euq_stand.equipment_id from wl_equipment_standard euq_stand where euq_stand.org_code=#{orgCode} and equ.id = euq_stand.equipment_id)
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.EquipmentStandardRelationsMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.EquipmentStandardWarningMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.EquipmentSystemSourceStatisticsMapper">
<select id="getEquipmentSystemSourceStatisticsCount"
resultType="com.yeejoin.equipmanage.common.entity.vo.MainIotMonitorItemVo">
SELECT
wlesst.id,
wlws.id as sourceId,
wlws.name title,
wlesst.status status,
( select id from wl_equipment_specific_alarm
where equipment_specific_id = wlesst.equipment_specific_id
order by confirm_type asc,equipment_specific_index_key desc,create_date desc
limit 1) as alamId,
( select confirm_type from wl_equipment_specific_alarm
where equipment_specific_id = wlesst.equipment_specific_id
order by confirm_type asc,equipment_specific_index_key desc,create_date desc
limit 1) as confirmType,
( select create_date from wl_equipment_specific_alarm
where equipment_specific_id = wlesst.equipment_specific_id
order by confirm_type asc,equipment_specific_index_key desc,create_date desc
limit 1) as `time`
FROM
wl_equipment_system_source_statistics wlesst
LEFT JOIN f_fire_fighting_system fffs ON find_in_set(fffs.id,wlesst.system_id)
left join wl_warehouse_structure wlws on wlesst.source_id = wlws.id
left join wl_equipment_specific_alarm as ala on ala.equipment_specific_id = wlesst.equipment_specific_id
where fffs.id=#{id}
-- group by sourceId
order by wlesst.update_time desc
</select>
<select id="getEquipmentAlarmSystemList" resultType="com.yeejoin.equipmanage.common.entity.vo.MainIotMonitorItemVo">
SELECT
wlesst.id,
wlesst.equipment_specific_id AS speId,
wlws.id AS sourceId,
wlws.NAME title,
wlesst.`status`,
( SELECT id FROM wl_equipment_specific_alarm WHERE equipment_specific_id = wlesst.equipment_specific_id ORDER BY confirm_type ASC, equipment_specific_index_key DESC, create_date DESC LIMIT 1 ) AS alamId,
( SELECT confirm_type FROM wl_equipment_specific_alarm WHERE equipment_specific_id = wlesst.equipment_specific_id ORDER BY confirm_type ASC, equipment_specific_index_key DESC, create_date DESC LIMIT 1 ) AS confirmType
FROM
wl_equipment_system_source_statistics wlesst
LEFT JOIN f_fire_fighting_system fffs ON find_in_set(fffs.id,wlesst.system_id)
LEFT JOIN wl_warehouse_structure wlws ON wlesst.source_id = wlws.id
LEFT JOIN wl_equipment_specific_alarm AS ala ON ala.equipment_specific_id = wlesst.equipment_specific_id
WHERE wlesst.source_id=#{areaId}
and wlesst.system_id=#{systemId}
ORDER BY
wlesst.update_time DESC
</select>
<select id="getBingspeId" resultType="String">
select point_in_scene from wl_source_scene where source_id =#{id}
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.ExtinguishantOnCarMapper">
<select id="queryExtinguishantOnCarlist" resultType="Map" >
SELECT car.id as 'carId', (CASE WHEN car.car_num IS NOT NULL AND car.car_num != ''
THEN car.car_num ELSE '无车牌号' END) as 'carNum' FROM wl_car car
WHERE car.car_state NOT IN
<foreach collection="list" item="names" open="(" close=")" separator=",">
#{names}
</foreach>
<!-- LEFT JOIN wl_system_dic system_dic ON car.car_state_id = system_dic.id
WHERE system_dic.code NOT IN ('03','04','06','07','08') -->
</select>
<select id="getCarExtinguishants" resultType="Map" >
SELECT table_1.car_id,
equipment_detail.name equipmentName, unit.name unitName, table_1.amount, table_1.equipment_detail_id equipmentDetailId,
(CASE WHEN equipment_detail.img IS NULL OR equipment_detail.img = '' THEN equipment.img ELSE equipment_detail.img END) img
FROM (SELECT SUM(amount) amount, equipment_detail_id, car_id FROM wl_extinguishant_on_car WHERE car_id =#{carId}
GROUP BY equipment_detail_id,car_id ) table_1
INNER JOIN wl_equipment_detail equipment_detail ON equipment_detail.id = table_1.equipment_detail_id
INNER JOIN wl_equipment equipment ON equipment.id = equipment_detail.equipment_id
INNER JOIN wl_unit unit ON unit.id = equipment.unit_id
<where>
<if test="code != null and code != '' ">
equipment_detail.code like CONCAT(#{code},"%" )
</if>
<if test="codedate != null and codedate != '' ">
and equipment_detail.code like CONCAT(#{codedate},"%" )
</if>
</where>
LIMIT #{start},#{page}
</select>
<select id="getCarExtinguishantscount" resultType="Integer" >
SELECT
COUNT(1)
FROM (SELECT SUM(amount) amount, equipment_detail_id, car_id FROM wl_extinguishant_on_car WHERE car_id =#{carId}
GROUP BY equipment_detail_id,car_id ) table_1
INNER JOIN wl_equipment_detail equipment_detail ON equipment_detail.id = table_1.equipment_detail_id
INNER JOIN wl_equipment equipment ON equipment.id = equipment_detail.equipment_id
INNER JOIN wl_unit unit ON unit.id = equipment.unit_id
<where>
<if test="code != null and code != '' ">
equipment_detail.code like CONCAT(#{code},"%" )
</if>
<if test="codedate != null and codedate != '' ">
and equipment_detail.code like CONCAT(#{codedate},"%" )
</if>
</where>
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.FormGroupColumnMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.FormGroupMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.IllegalAttachmentMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.IllegalMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.IndustryMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.JournalMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.LochusEquipmentMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.LochusStandardMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.MaintainResultMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.MaintainWithinSevenDaysMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.MaintianQueryMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.ManufacturerInfoMapper">
<select id="finduseManufacturer" resultType="int">
select sum(count) from
(
select
count(1) as count
from
wl_car a
where a.manufacturer_id =#{id}
union
select
count(1) as count
from
wl_equipment_detail a
where a.manufacturer_id =#{id}
)data
</select>
<select id="checkName" resultType="int">
select count(1) from wl_manufacturer_info
where name = #{name}
<if test="id != null and id != ''">
and id != #{id}
</if>
</select>
<select id="checkDelete" resultType="string">
select name from wl_equipment_detail where equipment_id = #{id}
union
select name from wl_car where equipment_id = #{id}
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.MonitorEventMapper">
<insert id="saveEvent">
INSERT INTO wl_monitor_event(
id,
event_content,
event_type,
video_id,
video_name,
video_code,
video_position,
video_monitor_position,
event_state,
snap_pictures,
event_date,
onduty,
disposal_record,
disposal_user_id,
disposal_user_name,
disposal_date,
create_date)
value (
#{id},
#{eventContent},
#{eventType},
#{videoId},
#{videoName},
#{videoCode},
#{videoPosition},
#{videoMonitorPosition},
#{eventState},
#{snapPictures},
sysdate(),
#{onduty},
null,
null,
null,
null,
sysdate()
)
</insert>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.MonitorViewVideoMapper">
<delete id="deleteMonitorViewVideo">
DELETE from wl_monitor_view_video where view_id = #{viewId};
</delete>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.NoticeMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.RiskSourceMapper">
<select id="findByIsRegion" resultType="com.yeejoin.equipmanage.common.dto.FireRiskSourceDto">
SELECT
a.id,
a.`name`,
a.parent_id,
a.`code` AS mrid
FROM
`f_risk_source` a
<where>
<choose>
<when test="isRegion">
a.is_region = 'TRUE'
</when>
<otherwise>
a.is_region = 'FALSE'
</otherwise>
</choose>
</where>
</select>
<select id="findAll" resultType="com.yeejoin.equipmanage.common.dto.FireRiskSourceDto">
SELECT
a.id,
a.`name`,
a.parent_id,
a.`code` AS mrid
FROM
`f_risk_source` a
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.RiskSourceSceneMapper">
<resultMap id="riskSourceMap" type="com.yeejoin.equipmanage.common.entity.vo.RiskSourceTreeVO">
<result property="id" column="id"/>
<result property="parentId" column="parent_id"/>
<result property="code" column="code"/>
<result property="name" column="name"/>
<result property="level" column="level"/>
<result property="riskLevelId" column="risk_level_id"/>
<result property="rpn" column="rpn"/>
<result property="rpni" column="rpni"/>
<result property="isRegion" column="is_region"/>
<result property="isIndoor" column="is_indoor"/>
<result property="status" column="status"/>
<result property="count" column="ccount"/>
<result property="qualified" column="qualified"/>
<result property="unqualified" column="unqualified"/>
<result property="omission" column="omission"/>
<result property="unplan" column="unplan"/>
<result property="position3d" column="position3d"/>
<result property="tube" column="tube"/>
<result property="port" column="port"/>
<result property="password" column="password"/>
<result property="account" column="account"/>
<result property="ip" column="ip"/>
<result property="rtspAddress" column="rtsp_address"/>
<result property="url" column="url"/>
<result property="carmeraType" column="carmera_type"/>
<result property="token" column="token"/>
<result property="riskSourceType" column="riskSourceType"/>
<result property="sceneId" column="sceneId"/>
</resultMap>
<select id="getRiskSources" resultMap="riskSourceMap">
SELECT
id,
`code`,
parent_id,
`name`,
risk_level_id,
rpn,
rpni,
is_region,
position3d,
floor3d,
status,
is_indoor,
'menu' riskSourceType
FROM
`f_risk_source`
where org_code = #{compCode} and is_region='TRUE'
ORDER BY sort_num,id ASC
</select>
<select id="getVideo" resultMap="riskSourceMap">
select
wlv.name,
wlvs.id,
wlv.token,
wlv.carmera_type,
wlv.url,
wlv.rtsp_address,
wlv.ip,
wlv.account,
wlv.password,
wlv.port,
wlv.position3d,
wlv.tube,
'video' riskSourceType,
wlvs.source_id as sceneId
from wl_video wlv
left join wl_video_source wlvs on wlv.id = wlvs.video_id
where wlvs.source_id=#{sourceId}
</select>
<select id="getImportantEquip" resultMap="riskSourceMap">
select id,name,'false' is_region from f_equipment where risk_source_id=#{sourceId}
</select>
<select id="getAllImportantEquip" resultType="com.yeejoin.equipmanage.common.entity.vo.PointTreeVo">
select
feq.id as sequenceNbr,
feq.name as displayName ,
feq.risk_source_id as parentId,
'equip' as template
from f_equipment as feq
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.ScrapDetailMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.ScrapMapper">
<select id="getImgById" resultType="String">
<if test="type != 2">
select
eq.img
from
wl_scrap_detail as det
left join wl_stock_detail as stdet on det.stock_detail_id =stdet .id
left join wl_equipment_detail as eqdet on stdet.equipment_detail_id = eqdet .id
left join wl_equipment as eq on eqdet.equipment_id =eq.id
where det.scrap_id =#{id}
</if>
<if test="type == 2">
select
eq.img
from
wl_scrap_detail as det
left join wl_car as wc on det.car_id =wc.id
left join wl_equipment as eq on wc.equipment_id =eq.id
where det.scrap_id =#{id}
</if>
limit 1
</select>
<select id="getOneByQrcode" resultType="java.lang.Integer">
select count(1)
from
wl_scrap_detail as wsd
left join wl_stock_detail as stdet on wsd.stock_detail_id = stdet.id
where
stdet.qr_code = #{qrCode}
and
stdet.status = 7
</select>
<select id="getCarByQrcode" resultType="java.lang.Integer">
select count(1)
from
wl_scrap_detail as wsd
left join wl_car as wc on wsd.car_id = wc.id
where
wc.qr_code = #{qrCode}
and
wc.car_state = 7
</select>
<select id="geteqTypeAndAmount" resultType="java.util.Map">
select
wsd.amount as amount ,
substring( wed.code,1,1) as eqType,
IFNULL(wu.name, '') as unitName
from
wl_scrap_detail as wsd
left join wl_stock_detail as wskd on wskd.id = wsd.stock_detail_id
left join wl_equipment_detail as wed on wed.id = wskd.equipment_detail_id
left join wl_equipment as we on we.id = wed.equipment_id
left join wl_unit as wu on wu.id = we.unit_id
where
wsd.scrap_id = #{id}
and wsd.car_id is null
union all
select
wsd.amount,
'2' as code,
IFNULL(wu.name, '') as unitName
from
wl_scrap_detail as wsd
left join wl_car as wc on wc.id = wsd.car_id
left join wl_equipment as we on we.id = wc.equipment_id
left join wl_unit as wu on wu.id = we.unit_id
where
wsd.scrap_id = #{id}
and wsd.car_id is not null
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace="com.yeejoin.equipmanage.mapper.SearchMapper">
<select id="universal" resultType="Map">
SELECT
wec.NAME AS categoryName,
wed.NAME AS name,
wed.CODE AS code,
wec.CODE AS
categoryCode,
COUNT( wed.NAME ) AS count,
SUM( wsd.amount ) AS sum,
warehouse_structure_id AS warehouseStructureId,
wws.full_name AS
warehouseStructureName,
wsd.equipment_detail_id AS equipmentDetailId,
wed.standard,
wmi.NAME AS manufacturerName,
wed.brand,
wed.equipment_id
AS equipmentId,
"" AS carNum
FROM
wl_stock_detail wsd
LEFT JOIN
wl_equipment_detail wed ON wed.id = wsd.equipment_detail_id
LEFT JOIN
wl_equipment we ON we.id = wed.equipment_id
LEFT JOIN
wl_equipment_category wec ON wec.id = we.category_id
LEFT JOIN
wl_manufacturer_info wmi ON wmi.id = wed.manufacturer_id
LEFT JOIN
wl_warehouse_structure wws ON wws.id =
wsd.warehouse_structure_id
<where>
AND wsd.warehouse_id = #{warehouseId}
AND wsd.STATUS != 7
AND wsd.STATUS != 11
<if test="keyword != null and keyword != ''">AND wed.NAME LIKE CONCAT('%',#{keyword},'%' ) </if>
</where>
GROUP BY
warehouse_structure_id,
equipment_detail_id
UNION
SELECT
wec.NAME
AS categoryName,
we.NAME AS
name,
c.car_code AS code,
wec.CODE AS
categoryCode,
1 AS count,
1 AS sum,
"" AS
warehouseStructureId,
"" AS
warehouseStructureName,
"" AS
equipmentDetailId,
"" AS standard,
wmi.NAME
AS manufacturerName,
c.brand,
c.equipment_id AS equipmentId,
c.car_num AS
carNum
FROM
wl_car c
LEFT JOIN
wl_equipment we ON we.id = c.equipment_id
LEFT JOIN
wl_equipment_category wec ON wec.id = we.category_id
LEFT JOIN
wl_manufacturer_info wmi ON wmi.id = c.manufacturer_id
<where>
AND c.org_code = #{orgcode}
<if test="keyword != null and keyword != ''">AND we.NAME LIKE CONCAT('%',#{keyword},'%' ) OR c.car_num
LIKE CONCAT('%',#{keyword},'%' ) </if>
</where>
ORDER BY NAME
LIMIT #{offset},#{size}
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.SourceFileMapper">
<select id="findImgByFileCategory" resultType="com.yeejoin.equipmanage.common.vo.SourceFileVo">
SELECT
f.file_category,
f.file_name,
f.file_path,
f.source_id
FROM
`wl_source_file` f
<where>
<if test="id != null">
f.source_id = #{id}
</if>
<if test="fileCategory != null and fileCategory != ''">
AND f.file_category = #{fileCategory}
</if>
</where>
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.SourceSceneMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.StockBillMapper">
<resultMap id="allBill" type="com.yeejoin.equipmanage.common.entity.vo.AllBillVO">
<result column="id" property="id"></result>
<result column="bill_code" property="billCode"></result>
<result column="bill_type" property="billType"></result>
<result column="creator_name" property="creatorName"></result>
<result column="create_date" property="createDate"></result>
<result column="company_name" property="companyName"></result>
<result column="type" property="type"></result>
</resultMap>
<select id="selectAllBill" resultMap="allBill" parameterType="com.yeejoin.equipmanage.common.entity.dto.StockBillDTO">
select * from (
<if test='stockBillDTO.billType=="0" or stockBillDTO.billType=="4"'>
select id,bill_code,bill_type,creator_name,create_date,company_name,4 as type from wl_wastage_bill
where 1=1
<if test="stockBillDTO.billCode!=null and stockBillDTO.billCode!=''">
and bill_code like concat('%',#{stockBillDTO.billCode},'%')
</if>
<if test="stockBillDTO.createDateStart!=null">
and create_date &gt;= #{stockBillDTO.createDateStart}
</if>
<if test="stockBillDTO.createDateEnd!=null">
and create_date &lt;= #{stockBillDTO.createDateEnd}
</if>
</if>
<if test='stockBillDTO.billType=="0"'>
union all
</if>
<if test='stockBillDTO.billType=="0" or stockBillDTO.billType=="1"'>
select id,bill_code,bill_type,creator_name,create_date,company_name,1 as type from wl_stock_bill
where 1=1
<if test="stockBillDTO.billCode!=null and stockBillDTO.billCode!=''">
and bill_code like concat('%',#{stockBillDTO.billCode},'%')
</if>
<if test="stockBillDTO.createDateStart!=null">
and create_date &gt;= #{stockBillDTO.createDateStart}
</if>
<if test="stockBillDTO.createDateEnd!=null">
and create_date &lt;= #{stockBillDTO.createDateEnd}
</if>
</if>
<if test='stockBillDTO.billType=="0"'>
union all
</if>
<if test='stockBillDTO.billType=="0" or stockBillDTO.billType=="5"'>
select id,bill_code,bill_type,creator_name,create_date,company_name,5 as type from wl_scrap
where 1=1
<if test="stockBillDTO.billCode!=null and stockBillDTO.billCode!=''">
and bill_code like concat('%',#{stockBillDTO.billCode},'%')
</if>
<if test="stockBillDTO.createDateStart!=null">
and create_date &gt;= #{stockBillDTO.createDateStart}
</if>
<if test="stockBillDTO.createDateEnd!=null">
and create_date &lt;= #{stockBillDTO.createDateEnd}
</if>
</if>
<if test='stockBillDTO.billType=="0"'>
union all
</if>
<if test='stockBillDTO.billType=="0" or stockBillDTO.billType=="2" '>
select id,bill_code,bill_type,creator_name,create_date,company_name,2 as type from wl_repair
where 1=1
<if test="stockBillDTO.billCode!=null and stockBillDTO.billCode!=''">
and bill_code like concat('%',#{stockBillDTO.billCode},'%')
</if>
<if test="stockBillDTO.createDateStart!=null">
and create_date &gt;= #{stockBillDTO.createDateStart}
</if>
<if test="stockBillDTO.createDateEnd!=null">
and create_date &lt;= #{stockBillDTO.createDateEnd}
</if>
</if>
<if test='stockBillDTO.billType=="0"'>
union all
</if>
<if test='stockBillDTO.billType=="0" or stockBillDTO.billType=="3"'>
select id,bill_code,bill_type,creator_name,create_date,company_name,3 as type from wl_maintain
where 1=1
<if test="stockBillDTO.billCode!=null and stockBillDTO.billCode!=''">
and bill_code like concat('%',#{stockBillDTO.billCode},'%')
</if>
<if test="stockBillDTO.createDateStart!=null">
and create_date &gt;= #{stockBillDTO.createDateStart}
</if>
<if test="stockBillDTO.createDateEnd!=null">
and create_date &lt;= #{stockBillDTO.createDateEnd}
</if>
</if>) as da
order by create_date desc
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.StockDetailMapper">
<resultMap id="StockDetail" type="com.yeejoin.equipmanage.common.entity.StockDetail">
<id column="id" property="id"/>
<result column="batch_num" property="batchNum"/>
<result column="amount" property="amount"/>
<result column="stock_id" property="stockId"/>
<result column="warehouse_structure_id" property="warehouseStructureId"/>
<result column="rfid" property="rfid"/>
<result column="equipment_detail_id" property="equipmentDetailId"/>
<result column="org_code" property="orgCode"/>
<result column="qr_code" property="qrCode"/>
<result column="warehouse_id" property="warehouseId"/>
<result column="org_code" property="companyName"/>
<result column="status" property="status"/>
<result column="company_name" property="companyName"/>
<result column="department_name" property="departmentName"/>
<result column="department_orgcode" property="departmentOrgcode"/>
<result column="create_date" property="createDate"/>
<!-- <association column="equipment_detail_id" property="equipmentDetail" select="com.yeejoin.fireIotPlatform.common.dao.mapper.EquipmentDetailMapper.queryEquipmentDetailById"/>
<association column="shelf_cell_id" property="shelfCell" select="com.yeejoin.fireIotPlatform.common.dao.mapper.ShelfCellMapper.queryShelfCellById"/>
<association column="warehouse_id" property="warehouse" select="com.yeejoin.fireIotPlatform.common.dao.mapper.WarehouseMapper.queryWarehouseById"/>
<association column="stock_id" property="stock" select="com.yeejoin.fireIotPlatform.common.dao.mapper.StockMapper.queryStockById"/>
--> </resultMap>
<select id="findByIdInAndStatus" resultMap="StockDetail" >
SELECT * FROM wl_stock_detail WHERE wl_stock_detail.status=#{status}
<if test="ids!=null and ids.size()&gt; 0">
<foreach collection="ids" item="id" separator="," open="and id in(" close=")">
#{id}
</foreach>
</if>
</select>
<select id="findCategoryNameByID" resultType="Map" >
SELECT category.name from wl_stock_detail stock_detail INNER JOIN wl_equipment_detail equipment_detail
ON stock_detail.equipment_detail_id = equipment_detail.id
INNER JOIN wl_equipment equipment ON equipment.id = equipment_detail.equipment_id
INNER JOIN wl_equipment_category category ON category.id = equipment.category_id
WHERE stock_detail.id = #{id}
</select>
<select id="getStatisticsEquipCount"
resultType="com.yeejoin.equipmanage.common.entity.vo.StatisticsEquipCountVO">
select 'S' as code, IFNULL(sum(wlsd.amount),0) as sum from wl_stock_detail wlsd
left join wl_equipment_detail wled on wlsd.equipment_detail_id = wled.id
left join wl_equipment wle on wle.id = wled.equipment_id
left join wl_equipment_category wlec on wle.category_id=wlec.id
where left(wlec.code, 3)=410 and (wlsd.`status`=1 or wlsd.`status`=10)
union all
select 'PM' as code, IFNULL(sum(wlsd.amount),0) as sum from wl_stock_detail wlsd
left join wl_equipment_detail wled on wlsd.equipment_detail_id = wled.id
left join wl_equipment wle on wle.id = wled.equipment_id
left join wl_equipment_category wlec on wle.category_id=wlec.id
where left(wlec.code, 3)=420 and (wlsd.`status`=1 or wlsd.`status`=10)
union all
select 'GF' as code, IFNULL(sum(wlsd.amount),0) as sum from wl_stock_detail wlsd
left join wl_equipment_detail wled on wlsd.equipment_detail_id = wled.id
left join wl_equipment wle on wle.id = wled.equipment_id
left join wl_equipment_category wlec on wle.category_id=wlec.id
where left(wlec.code, 3)=430 and (wlsd.`status`=1 or wlsd.`status`=10)
union all
select 'QT' as code, IFNULL(sum(wlsd.amount),0) as sum from wl_stock_detail wlsd
left join wl_equipment_detail wled on wlsd.equipment_detail_id = wled.id
left join wl_equipment wle on wle.id = wled.equipment_id
left join wl_equipment_category wlec on wle.category_id=wlec.id
where left(wlec.code, 3)=440 and (wlsd.`status`=1 or wlsd.`status`=10)
</select>
<delete id="clearWareHouse">
delete from wl_stock_detail where warehouse_structure_id =#{id}
</delete>
<update id="updateStatus">
update wl_stock_detail
<trim prefix="set" prefixOverrides="," suffix="where id=#{bean.stockDetailId}">
amount = amount - 1,
<if test="status != null">status=#{status}</if>
</trim>
</update>
<update id="updateBatch" parameterType="java.util.List">
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
update wl_stock_detail
<trim prefix="set" prefixOverrides="," suffix="where id=#{item.stockDetailId}">
amount = amount - 1,
<if test="status != null">status=#{status}</if>
</trim>
</foreach>
</update>
<!-- <update id="updateBatch" parameterType="java.util.List">-->
<!-- <foreach collection="list" item="item" index="index" open="" close="" separator=";">-->
<!-- update wl_stock_detail-->
<!-- <set>-->
<!-- status=${status},-->
<!-- amount = amount - 1-->
<!-- </set>-->
<!-- where id = ${item.stockDetailId}-->
<!-- </foreach>-->
<!-- </update>-->
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.StockMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.StockWarningRuleMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.SystemDicMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.TaskMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.TaskPaycheckMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.TaskPersonFileMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.TaskPersonMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.TaskTechDocumentMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.TechDocumentAttachmentMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.TechDocumentMapper">
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.equipmanage.mapper.UnitMapper">
<select id="getUnitClassification" resultType="Map">
SELECT
wl.id,
wl. name,
wl.code
FROM
wl_unit wl
WHERE
wl.parent_id IS NULL
</select>
<select id="getUnitFirstLevelCode" resultType="String">
SELECT
CONCAT(
(
IFNULL(MAX(unit. CODE), 0) + 100
),
''
) AS code
FROM
wl_unit unit
WHERE
unit.parent_id IS NULL
</select>
<select id="getUnitSecondLevelCode" resultType="String">
SELECT
LPAD(IFNULL(MAX(wu. CODE), wl. CODE) + 1,4,0) code
FROM
wl_unit wl
LEFT JOIN wl_unit wu ON wl.id = wu.parent_id
WHERE
wl.id = #{id}
AND wl.parent_id IS NULL;
</select>
<select id="getUnitList" resultType="com.yeejoin.equipmanage.common.entity.Unit">
SELECT
u.*
FROM
`wl_unit` u
<if test="name != null and name !=''">
LEFT JOIN wl_unit u1 ON u1.id = u.id
OR u1.parent_id = u.id
WHERE
u1.`name` LIKE concat(concat("%",#{name}),"%")
</if>
ORDER BY
u.code
</select>
<select id="getOne" resultType="com.yeejoin.equipmanage.common.entity.Unit">
SELECT
u.*
FROM
`wl_unit` u
WHERE
u.id=#{id}
</select>
</mapper>
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
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