From e15ae9985f8fd543c63cd45ce77579081e667848 Mon Sep 17 00:00:00 2001 From: Geoffrey <Geoffrey@mail.com> Date: 星期二, 14 一月 2025 15:45:00 +0800 Subject: [PATCH] 删除classes 文件 --- /dev/null | 44 -------------------------------------------- 1 files changed, 0 insertions(+), 44 deletions(-) diff --git a/zhitan-admin/target/classes/META-INF/spring-devtools.properties b/zhitan-admin/target/classes/META-INF/spring-devtools.properties deleted file mode 100644 index 37e7b58..0000000 --- a/zhitan-admin/target/classes/META-INF/spring-devtools.properties +++ /dev/null @@ -1 +0,0 @@ -restart.include.json=/com.alibaba.fastjson2.*.jar \ No newline at end of file diff --git a/zhitan-admin/target/classes/application-dev.yml b/zhitan-admin/target/classes/application-dev.yml deleted file mode 100644 index fbf552a..0000000 --- a/zhitan-admin/target/classes/application-dev.yml +++ /dev/null @@ -1,61 +0,0 @@ -# 鏁版嵁婧愰厤缃� -spring: - datasource: - type: com.alibaba.druid.pool.DruidDataSource - driverClassName: org.postgresql.Driver - druid: - # 涓诲簱鏁版嵁婧� - master: - url: jdbc:postgresql://127.0.0.1:5432/energy - username: root - password: 123456 - # 浠庡簱鏁版嵁婧� - slave: - # 浠庢暟鎹簮寮�鍏�/榛樿鍏抽棴 - enabled: false - url: - username: - password: - # 鍒濆杩炴帴鏁� - initialSize: 5 - # 鏈�灏忚繛鎺ユ睜鏁伴噺 - minIdle: 10 - # 鏈�澶ц繛鎺ユ睜鏁伴噺 - maxActive: 20 - # 閰嶇疆鑾峰彇杩炴帴绛夊緟瓒呮椂鐨勬椂闂� - maxWait: 60000 - # 閰嶇疆杩炴帴瓒呮椂鏃堕棿 - connectTimeout: 30000 - # 閰嶇疆缃戠粶瓒呮椂鏃堕棿 - socketTimeout: 60000 - # 閰嶇疆闂撮殧澶氫箙鎵嶈繘琛屼竴娆℃娴嬶紝妫�娴嬮渶瑕佸叧闂殑绌洪棽杩炴帴锛屽崟浣嶆槸姣 - timeBetweenEvictionRunsMillis: 60000 - # 閰嶇疆涓�涓繛鎺ュ湪姹犱腑鏈�灏忕敓瀛樼殑鏃堕棿锛屽崟浣嶆槸姣 - minEvictableIdleTimeMillis: 300000 - # 閰嶇疆涓�涓繛鎺ュ湪姹犱腑鏈�澶х敓瀛樼殑鏃堕棿锛屽崟浣嶆槸姣 - maxEvictableIdleTimeMillis: 900000 - # 閰嶇疆妫�娴嬭繛鎺ユ槸鍚︽湁鏁� - validationQuery: SELECT 1 - testWhileIdle: true - testOnBorrow: false - testOnReturn: false - webStatFilter: - enabled: true - statViewServlet: - enabled: true - # 璁剧疆鐧藉悕鍗曪紝涓嶅~鍒欏厑璁告墍鏈夎闂� - allow: - url-pattern: /druid/* - # 鎺у埗鍙扮鐞嗙敤鎴峰悕鍜屽瘑鐮� - login-username: admin - login-password: 123456 - filter: - stat: - enabled: true - # 鎱QL璁板綍 - log-slow-sql: true - slow-sql-millis: 1000 - merge-sql: true - wall: - config: - multi-statement-allow: true diff --git a/zhitan-admin/target/classes/application-prod.yml b/zhitan-admin/target/classes/application-prod.yml deleted file mode 100644 index 2f5a7cb..0000000 --- a/zhitan-admin/target/classes/application-prod.yml +++ /dev/null @@ -1,61 +0,0 @@ -# 鏁版嵁婧愰厤缃� -spring: - datasource: - type: com.alibaba.druid.pool.DruidDataSource - driverClassName: org.postgresql.Driver - druid: - # 涓诲簱鏁版嵁婧� - master: - url: jdbc:postgresql://127.0.0.1:5432/energy_ml - username: root - password: 123456 - # 浠庡簱鏁版嵁婧� - slave: - # 浠庢暟鎹簮寮�鍏�/榛樿鍏抽棴 - enabled: false - url: - username: - password: - # 鍒濆杩炴帴鏁� - initialSize: 5 - # 鏈�灏忚繛鎺ユ睜鏁伴噺 - minIdle: 10 - # 鏈�澶ц繛鎺ユ睜鏁伴噺 - maxActive: 20 - # 閰嶇疆鑾峰彇杩炴帴绛夊緟瓒呮椂鐨勬椂闂� - maxWait: 60000 - # 閰嶇疆杩炴帴瓒呮椂鏃堕棿 - connectTimeout: 30000 - # 閰嶇疆缃戠粶瓒呮椂鏃堕棿 - socketTimeout: 60000 - # 閰嶇疆闂撮殧澶氫箙鎵嶈繘琛屼竴娆℃娴嬶紝妫�娴嬮渶瑕佸叧闂殑绌洪棽杩炴帴锛屽崟浣嶆槸姣 - timeBetweenEvictionRunsMillis: 60000 - # 閰嶇疆涓�涓繛鎺ュ湪姹犱腑鏈�灏忕敓瀛樼殑鏃堕棿锛屽崟浣嶆槸姣 - minEvictableIdleTimeMillis: 300000 - # 閰嶇疆涓�涓繛鎺ュ湪姹犱腑鏈�澶х敓瀛樼殑鏃堕棿锛屽崟浣嶆槸姣 - maxEvictableIdleTimeMillis: 900000 - # 閰嶇疆妫�娴嬭繛鎺ユ槸鍚︽湁鏁� - validationQuery: SELECT 1 FROM DUAL - testWhileIdle: true - testOnBorrow: false - testOnReturn: false - webStatFilter: - enabled: true - statViewServlet: - enabled: true - # 璁剧疆鐧藉悕鍗曪紝涓嶅~鍒欏厑璁告墍鏈夎闂� - allow: - url-pattern: /druid/* - # 鎺у埗鍙扮鐞嗙敤鎴峰悕鍜屽瘑鐮� - login-username: admin - login-password: 123456 - filter: - stat: - enabled: true - # 鎱QL璁板綍 - log-slow-sql: true - slow-sql-millis: 1000 - merge-sql: true - wall: - config: - multi-statement-allow: true \ No newline at end of file diff --git a/zhitan-admin/target/classes/application.yml b/zhitan-admin/target/classes/application.yml deleted file mode 100644 index 54e3b37..0000000 --- a/zhitan-admin/target/classes/application.yml +++ /dev/null @@ -1,173 +0,0 @@ -# 椤圭洰鐩稿叧閰嶇疆 -base: - # 鍚嶇О - name: admin - # 鐗堟湰 - version: 3.8.7 - # 鐗堟潈骞翠唤 - copyrightYear: 2024 - profile: ./uploadPath - # 鑾峰彇ip鍦板潃寮�鍏� - addressEnabled: true - # 楠岃瘉鐮佺被鍨� math 鏁板瓧璁$畻 char 瀛楃楠岃瘉 - captchaType: math - -# 寮�鍙戠幆澧冮厤缃� -server: - # 鏈嶅姟鍣ㄧ殑HTTP绔彛锛岄粯璁や负8080 - port: 8080 - servlet: - # 搴旂敤鐨勮闂矾寰� - context-path: / - # undertow 閰嶇疆 - undertow: - # HTTP post鍐呭鐨勬渶澶уぇ灏忋�傚綋鍊间负-1鏃讹紝榛樿鍊间负澶у皬鏄棤闄愮殑 - max-http-post-size: -1 - # 浠ヤ笅鐨勯厤缃細褰卞搷buffer,杩欎簺buffer浼氱敤浜庢湇鍔″櫒杩炴帴鐨処O鎿嶄綔,鏈夌偣绫讳技netty鐨勬睜鍖栧唴瀛樼鐞� - # 姣忓潡buffer鐨勭┖闂村ぇ灏�,瓒婂皬鐨勭┖闂磋鍒╃敤瓒婂厖鍒� - buffer-size: 512 - # 鏄惁鍒嗛厤鐨勭洿鎺ュ唴瀛� - direct-buffers: true - threads: - # 璁剧疆IO绾跨▼鏁�, 瀹冧富瑕佹墽琛岄潪闃诲鐨勪换鍔�,瀹冧滑浼氳礋璐e涓繛鎺�, 榛樿璁剧疆姣忎釜CPU鏍稿績涓�涓嚎绋� - io: 8 - # 闃诲浠诲姟绾跨▼姹�, 褰撴墽琛岀被浼約ervlet璇锋眰闃诲鎿嶄綔, undertow浼氫粠杩欎釜绾跨▼姹犱腑鍙栧緱绾跨▼,瀹冪殑鍊艰缃彇鍐充簬绯荤粺鐨勮礋杞� - worker: 256 - -# 鏃ュ織閰嶇疆 -logging: - level: - com.zhitan: debug - org.springframework: warn - -# 鐢ㄦ埛閰嶇疆 -user: - password: - # 瀵嗙爜鏈�澶ч敊璇鏁� - maxRetryCount: 5 - # 瀵嗙爜閿佸畾鏃堕棿锛堥粯璁�10鍒嗛挓锛� - lockTime: 10 - -# Spring閰嶇疆 -spring: - # 璧勬簮淇℃伅 - messages: - # 鍥介檯鍖栬祫婧愭枃浠惰矾寰� - basename: i18n/messages - profiles: - active: dev - # 鏂囦欢涓婁紶 - servlet: - multipart: - # 鍗曚釜鏂囦欢澶у皬 - max-file-size: 10MB - # 璁剧疆鎬讳笂浼犵殑鏂囦欢澶у皬 - max-request-size: 20MB - # 鏈嶅姟妯″潡 - devtools: - restart: - # 鐑儴缃插紑鍏� - enabled: true - # redis 閰嶇疆 - redis: - # 鍦板潃 - host: localhost - # 绔彛锛岄粯璁や负6379 - port: 6379 - # 鏁版嵁搴撶储寮� - database: 0 - # 瀵嗙爜 - password: - # 杩炴帴瓒呮椂鏃堕棿 - timeout: 10s - lettuce: - pool: - # 杩炴帴姹犱腑鐨勬渶灏忕┖闂茶繛鎺� - min-idle: 0 - # 杩炴帴姹犱腑鐨勬渶澶х┖闂茶繛鎺� - max-idle: 8 - # 杩炴帴姹犵殑鏈�澶ф暟鎹簱杩炴帴鏁� - max-active: 8 - # #杩炴帴姹犳渶澶ч樆濉炵瓑寰呮椂闂达紙浣跨敤璐熷�艰〃绀烘病鏈夐檺鍒讹級 - max-wait: -1ms - -# token閰嶇疆 -token: - # 浠ょ墝鑷畾涔夋爣璇� - header: Authorization - # 浠ょ墝瀵嗛挜 - secret: abcdefghijklmnopqrstuvwxyzzhitancloud - # 浠ょ墝鏈夋晥鏈燂紙榛樿30鍒嗛挓锛� - expireTime: 300 - -mybatis-plus: - # configuration: - # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl - typeAliasesPackage: com.zhitan.**.domain - mapperLocations: classpath*:mapper/**/*Mapper.xml - # 鍔犺浇鍏ㄥ眬鐨勯厤缃枃浠� - configLocation: classpath:mybatis/mybatis-config.xml - -# PageHelper鍒嗛〉鎻掍欢 -pagehelper: - helperDialect: PostgreSQL - reasonable: true - supportMethodsArguments: true - params: count=countSql - maxPageSize: 500 - -# Swagger閰嶇疆 -swagger: - # 鏄惁寮�鍚痵wagger - enabled: true - # 璇锋眰鍓嶇紑 - pathMapping: /dev-api - -# 闃叉XSS鏀诲嚮 -xss: - # 杩囨护寮�鍏� - enabled: true - # 鎺掗櫎閾炬帴锛堝涓敤閫楀彿鍒嗛殧锛� - excludes: /system/notice - # 鍖归厤閾炬帴 - urlPatterns: /system/*,/monitor/*,/tool/* - -# Shiro -shiro: - session: - # 鍚屼竴涓敤鎴锋渶澶т細璇濇暟锛屾瘮濡�2鐨勬剰鎬濇槸鍚屼竴涓处鍙峰厑璁告渶澶氬悓鏃朵袱涓汉鐧诲綍锛堥粯璁�-1涓嶉檺鍒讹級 - maxSession: 1 - # 韪㈠嚭涔嬪墠鐧诲綍鐨�/涔嬪悗鐧诲綍鐨勭敤鎴凤紝榛樿韪㈠嚭涔嬪墠鐧诲綍鐨勭敤鎴� - kickoutAfter: false -rtdb: - host: http://127.0.0.1:8086 - token: == - org: org - bucket: bucket - -###################### MQTT ################################# -mqtt: - # 鏈嶅姟鍣ㄥ湴鍧� - host: tcp://127.0.0.1:1883 - # ID鍞竴 - clientId: MQTT_WK - # 涓婚 澶氫釜涓婚鐢ㄩ�楀彿(,)鍒嗗壊 #琛ㄧず杩欎釜涓婚涓嬮潰鎵�鏈夛紝topic1,topic2,topic2/topic22/#(榛樿浼氬彇绗竴涓富棰�) - topics: topic1 - # 鐢ㄦ埛鍚� - username: admin - # 瀵嗙爜 - password: 1q2w3e4r. - # 杩炴帴瓒呮椂 - timeout: 30 - # 蹇冭烦妫�娴� - keepalive: 60 - # 瀵规秷鎭鐞嗙殑鍑犵鏈哄埗銆� - # 0 琛ㄧず鐨勬槸璁㈤槄鑰呮病鏀跺埌娑堟伅涓嶄細鍐嶆鍙戦�侊紝娑堟伅浼氫涪澶� - # 1 琛ㄧず鐨勬槸浼氬皾璇曢噸璇曪紝涓�鐩村埌鎺ユ敹鍒版秷鎭紝浣嗚繖绉嶆儏鍐靛彲鑳藉鑷磋闃呰�呮敹鍒板娆¢噸澶嶆秷鎭� - # 2 澶氫簡涓�娆″幓閲嶇殑鍔ㄤ綔锛岀‘淇濊闃呰�呮敹鍒扮殑娑堟伅鏈変竴娆� - qos: 1 - # false涓哄缓绔嬫寔涔呬細璇� - cleanSession: false - # 鏂紑鍚庨噸鏂拌繛鎺� - automaticReconnect: true -singleLoginUrl: localhost:8090/singleLogin/getInfo diff --git a/zhitan-admin/target/classes/banner.txt b/zhitan-admin/target/classes/banner.txt deleted file mode 100644 index ba1fe49..0000000 --- a/zhitan-admin/target/classes/banner.txt +++ /dev/null @@ -1,24 +0,0 @@ -Application Version: 3.8.7 -Spring Boot Version: ${spring-boot.version} -//////////////////////////////////////////////////////////////////// -// _ooOoo_ // -// o8888888o // -// 88" . "88 // -// (| ^_^ |) // -// O\ = /O // -// ____/`---'\____ // -// .' \\| |// `. // -// / \\||| : |||// \ // -// / _||||| -:- |||||- \ // -// | | \\\ - /// | | // -// | \_| ''\---/'' | | // -// \ .-\__ `-` ___/-. / // -// ___`. .' /--.--\ `. . ___ // -// ."" '< `.___\_<|>_/___.' >'"". // -// | | : `- \`.;`\ _ /`;.`/ - ` : | | // -// \ \ `-. \_ __\ /__ _/ .-` / / // -// ========`-.____`-.___\_____/___.-`____.-'======== // -// `=---=' // -// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // -// 浣涚淇濅綉 姘镐笉瀹曟満 姘告棤BUG // -//////////////////////////////////////////////////////////////////// \ No newline at end of file diff --git a/zhitan-admin/target/classes/i18n/messages.properties b/zhitan-admin/target/classes/i18n/messages.properties deleted file mode 100644 index 93de005..0000000 --- a/zhitan-admin/target/classes/i18n/messages.properties +++ /dev/null @@ -1,38 +0,0 @@ -#閿欒娑堟伅 -not.null=* 蹇呴』濉啓 -user.jcaptcha.error=楠岃瘉鐮侀敊璇� -user.jcaptcha.expire=楠岃瘉鐮佸凡澶辨晥 -user.not.exists=鐢ㄦ埛涓嶅瓨鍦�/瀵嗙爜閿欒 -user.password.not.match=鐢ㄦ埛涓嶅瓨鍦�/瀵嗙爜閿欒 -user.password.retry.limit.count=瀵嗙爜杈撳叆閿欒{0}娆� -user.password.retry.limit.exceed=瀵嗙爜杈撳叆閿欒{0}娆★紝甯愭埛閿佸畾{1}鍒嗛挓 -user.password.delete=瀵逛笉璧凤紝鎮ㄧ殑璐﹀彿宸茶鍒犻櫎 -user.blocked=鐢ㄦ埛宸插皝绂侊紝璇疯仈绯荤鐞嗗憳 -role.blocked=瑙掕壊宸插皝绂侊紝璇疯仈绯荤鐞嗗憳 -login.blocked=寰堥仐鎲撅紝璁块棶IP宸茶鍒楀叆绯荤粺榛戝悕鍗� -user.logout.success=閫�鍑烘垚鍔� - -length.not.valid=闀垮害蹇呴』鍦▄min}鍒皗max}涓瓧绗︿箣闂� - -user.username.not.valid=* 2鍒�20涓眽瀛椼�佸瓧姣嶃�佹暟瀛楁垨涓嬪垝绾跨粍鎴愶紝涓斿繀椤讳互闈炴暟瀛楀紑澶� -user.password.not.valid=* 5-50涓瓧绗� - -user.email.not.valid=閭鏍煎紡閿欒 -user.mobile.phone.number.not.valid=鎵嬫満鍙锋牸寮忛敊璇� -user.login.success=鐧诲綍鎴愬姛 -user.register.success=娉ㄥ唽鎴愬姛 -user.notfound=璇烽噸鏂扮櫥褰� -user.forcelogout=绠$悊鍛樺己鍒堕��鍑猴紝璇烽噸鏂扮櫥褰� -user.unknown.error=鏈煡閿欒锛岃閲嶆柊鐧诲綍 - -##鏂囦欢涓婁紶娑堟伅 -upload.exceed.maxSize=涓婁紶鐨勬枃浠跺ぇ灏忚秴鍑洪檺鍒剁殑鏂囦欢澶у皬锛�<br/>鍏佽鐨勬枃浠舵渶澶уぇ灏忔槸锛歿0}MB锛� -upload.filename.exceed.length=涓婁紶鐨勬枃浠跺悕鏈�闀縶0}涓瓧绗� - -##鏉冮檺 -no.permission=鎮ㄦ病鏈夋暟鎹殑鏉冮檺锛岃鑱旂郴绠$悊鍛樻坊鍔犳潈闄� [{0}] -no.create.permission=鎮ㄦ病鏈夊垱寤烘暟鎹殑鏉冮檺锛岃鑱旂郴绠$悊鍛樻坊鍔犳潈闄� [{0}] -no.update.permission=鎮ㄦ病鏈変慨鏀规暟鎹殑鏉冮檺锛岃鑱旂郴绠$悊鍛樻坊鍔犳潈闄� [{0}] -no.delete.permission=鎮ㄦ病鏈夊垹闄ゆ暟鎹殑鏉冮檺锛岃鑱旂郴绠$悊鍛樻坊鍔犳潈闄� [{0}] -no.export.permission=鎮ㄦ病鏈夊鍑烘暟鎹殑鏉冮檺锛岃鑱旂郴绠$悊鍛樻坊鍔犳潈闄� [{0}] -no.view.permission=鎮ㄦ病鏈夋煡鐪嬫暟鎹殑鏉冮檺锛岃鑱旂郴绠$悊鍛樻坊鍔犳潈闄� [{0}] diff --git a/zhitan-admin/target/classes/logback.xml b/zhitan-admin/target/classes/logback.xml deleted file mode 100644 index 6491ba9..0000000 --- a/zhitan-admin/target/classes/logback.xml +++ /dev/null @@ -1,93 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<configuration> - <!-- 鏃ュ織瀛樻斁璺緞 --> - <property name="log.path" value="./logs" /> - <!-- 鏃ュ織杈撳嚭鏍煎紡 --> - <property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" /> - - <!-- 鎺у埗鍙拌緭鍑� --> - <appender name="console" class="ch.qos.logback.core.ConsoleAppender"> - <encoder> - <pattern>${log.pattern}</pattern> - </encoder> - </appender> - - <!-- 绯荤粺鏃ュ織杈撳嚭 --> - <appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender"> - <file>${log.path}/sys-info.log</file> - <!-- 寰幆鏀跨瓥锛氬熀浜庢椂闂村垱寤烘棩蹇楁枃浠� --> - <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> - <!-- 鏃ュ織鏂囦欢鍚嶆牸寮� --> - <fileNamePattern>${log.path}/sys-info.%d{yyyy-MM-dd}.log</fileNamePattern> - <!-- 鏃ュ織鏈�澶х殑鍘嗗彶 60澶� --> - <maxHistory>60</maxHistory> - </rollingPolicy> - <encoder> - <pattern>${log.pattern}</pattern> - </encoder> - <filter class="ch.qos.logback.classic.filter.LevelFilter"> - <!-- 杩囨护鐨勭骇鍒� --> - <level>INFO</level> - <!-- 鍖归厤鏃剁殑鎿嶄綔锛氭帴鏀讹紙璁板綍锛� --> - <onMatch>ACCEPT</onMatch> - <!-- 涓嶅尮閰嶆椂鐨勬搷浣滐細鎷掔粷锛堜笉璁板綍锛� --> - <onMismatch>DENY</onMismatch> - </filter> - </appender> - - <appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender"> - <file>${log.path}/sys-error.log</file> - <!-- 寰幆鏀跨瓥锛氬熀浜庢椂闂村垱寤烘棩蹇楁枃浠� --> - <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> - <!-- 鏃ュ織鏂囦欢鍚嶆牸寮� --> - <fileNamePattern>${log.path}/sys-error.%d{yyyy-MM-dd}.log</fileNamePattern> - <!-- 鏃ュ織鏈�澶х殑鍘嗗彶 60澶� --> - <maxHistory>60</maxHistory> - </rollingPolicy> - <encoder> - <pattern>${log.pattern}</pattern> - </encoder> - <filter class="ch.qos.logback.classic.filter.LevelFilter"> - <!-- 杩囨护鐨勭骇鍒� --> - <level>ERROR</level> - <!-- 鍖归厤鏃剁殑鎿嶄綔锛氭帴鏀讹紙璁板綍锛� --> - <onMatch>ACCEPT</onMatch> - <!-- 涓嶅尮閰嶆椂鐨勬搷浣滐細鎷掔粷锛堜笉璁板綍锛� --> - <onMismatch>DENY</onMismatch> - </filter> - </appender> - - <!-- 鐢ㄦ埛璁块棶鏃ュ織杈撳嚭 --> - <appender name="sys-user" class="ch.qos.logback.core.rolling.RollingFileAppender"> - <file>${log.path}/sys-user.log</file> - <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> - <!-- 鎸夊ぉ鍥炴粴 daily --> - <fileNamePattern>${log.path}/sys-user.%d{yyyy-MM-dd}.log</fileNamePattern> - <!-- 鏃ュ織鏈�澶х殑鍘嗗彶 60澶� --> - <maxHistory>60</maxHistory> - </rollingPolicy> - <encoder> - <pattern>${log.pattern}</pattern> - </encoder> - </appender> - - <!-- 绯荤粺妯″潡鏃ュ織绾у埆鎺у埗 --> - <logger name="com.zhitan" level="info" /> - <!-- Spring鏃ュ織绾у埆鎺у埗 --> - <logger name="org.springframework" level="warn" /> - - <root level="info"> - <appender-ref ref="console" /> - </root> - - <!--绯荤粺鎿嶄綔鏃ュ織--> - <root level="info"> - <appender-ref ref="file_info" /> - <appender-ref ref="file_error" /> - </root> - - <!--绯荤粺鐢ㄦ埛鎿嶄綔鏃ュ織--> - <logger name="sys-user" level="info"> - <appender-ref ref="sys-user"/> - </logger> -</configuration> \ No newline at end of file diff --git a/zhitan-admin/target/classes/mybatis/mybatis-config.xml b/zhitan-admin/target/classes/mybatis/mybatis-config.xml deleted file mode 100644 index dc7b13b..0000000 --- a/zhitan-admin/target/classes/mybatis/mybatis-config.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!DOCTYPE configuration - PUBLIC "-//mybatis.org//DTD Config 3.0//EN" - "http://mybatis.org/dtd/mybatis-3-config.dtd"> -<configuration> - <!-- 鍏ㄥ眬鍙傛暟 --> - <settings> - <!-- 浣垮叏灞�鐨勬槧灏勫櫒鍚敤鎴栫鐢ㄧ紦瀛� --> - <setting name="cacheEnabled" value="true"/> - <!-- 鍏佽JDBC 鏀寔鑷姩鐢熸垚涓婚敭 --> - <setting name="useGeneratedKeys" value="true"/> - <!-- 閰嶇疆榛樿鐨勬墽琛屽櫒.SIMPLE灏辨槸鏅�氭墽琛屽櫒;REUSE鎵ц鍣ㄤ細閲嶇敤棰勫鐞嗚鍙�(prepared statements);BATCH鎵ц鍣ㄥ皢閲嶇敤璇彞骞舵墽琛屾壒閲忔洿鏂� --> - <setting name="defaultExecutorType" value="SIMPLE"/> - <!-- 鎸囧畾 MyBatis 鎵�鐢ㄦ棩蹇楃殑鍏蜂綋瀹炵幇 --> - <setting name="logImpl" value="SLF4J"/> - <!-- 浣跨敤椹煎嘲鍛藉悕娉曡浆鎹㈠瓧娈� --> - <setting name="mapUnderscoreToCamelCase" value="true"/> - </settings> - -</configuration> \ No newline at end of file diff --git a/zhitan-generator/target/classes/generator.yml b/zhitan-generator/target/classes/generator.yml deleted file mode 100644 index 3d6ffea..0000000 --- a/zhitan-generator/target/classes/generator.yml +++ /dev/null @@ -1,10 +0,0 @@ -# 浠g爜鐢熸垚 -gen: - # 浣滆�� - author: ZhiTan - # 榛樿鐢熸垚鍖呰矾寰� system 闇�鏀规垚鑷繁鐨勬ā鍧楀悕绉� 濡� system monitor tool - packageName: com.zhitan.system - # 鑷姩鍘婚櫎琛ㄥ墠缂�锛岄粯璁ゆ槸false - autoRemovePre: false - # 琛ㄥ墠缂�锛堢敓鎴愮被鍚嶄笉浼氬寘鍚〃鍓嶇紑锛屽涓敤閫楀彿鍒嗛殧锛� - tablePrefix: sys_ \ No newline at end of file diff --git a/zhitan-generator/target/classes/mapper/generator/GenTableColumnMapper.xml b/zhitan-generator/target/classes/mapper/generator/GenTableColumnMapper.xml deleted file mode 100644 index 8766496..0000000 --- a/zhitan-generator/target/classes/mapper/generator/GenTableColumnMapper.xml +++ /dev/null @@ -1,154 +0,0 @@ -<?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.zhitan.generator.mapper.GenTableColumnMapper"> - - <resultMap type="GenTableColumn" id="GenTableColumnResult"> - <id property="columnId" column="column_id"/> - <result property="tableId" column="table_id"/> - <result property="columnName" column="column_name"/> - <result property="columnComment" column="column_comment"/> - <result property="columnType" column="column_type"/> - <result property="javaType" column="java_type"/> - <result property="javaField" column="java_field"/> - <result property="isPk" column="is_pk"/> - <result property="isIncrement" column="is_increment"/> - <result property="isRequired" column="is_required"/> - <result property="isInsert" column="is_insert"/> - <result property="isEdit" column="is_edit"/> - <result property="isList" column="is_list"/> - <result property="isQuery" column="is_query"/> - <result property="queryType" column="query_type"/> - <result property="htmlType" column="html_type"/> - <result property="dictType" column="dict_type"/> - <result property="sort" column="sort"/> - <result property="createBy" column="create_by"/> - <result property="createTime" column="create_time"/> - <result property="updateBy" column="update_by"/> - <result property="updateTime" column="update_time"/> - </resultMap> - - <sql id="selectGenTableColumnVo"> - select column_id, - table_id, - column_name, - column_comment, - column_type, - java_type, - java_field, - is_pk, - is_increment, - is_required, - is_insert, - is_edit, - is_list, - is_query, - query_type, - html_type, - dict_type, - sort, - create_by, - create_time, - update_by, - update_time - from gen_table_column - </sql> - - <select id="selectGenTableColumnListByTableId" parameterType="Long" resultMap="GenTableColumnResult"> - <include refid="selectGenTableColumnVo"/> - where table_id = #{tableId} - order by sort - </select> - - <select id="selectDbTableColumnsByName" parameterType="String" resultMap="GenTableColumnResult"> - SELECT A.attname AS COLUMN_NAME, - col_description(A.attrelid, A.attnum) AS column_comment, - T.typname AS column_type, - CASE col.is_nullable WHEN 'NO' THEN 1 END AS is_required, - CASE col.is_identity WHEN 'NO' THEN 0 END AS is_pk, - col.ordinal_position AS sort, - '0' AS is_increment - FROM pg_class C - LEFT JOIN pg_attribute A ON A.attrelid = C.oid - LEFT JOIN pg_type T ON A.atttypid = T.oid - LEFT JOIN information_schema.COLUMNS col ON col.COLUMN_NAME = A.attname - WHERE C.relname = #{tableName} - AND col.TABLE_NAME = #{tableName} - AND A.attnum > 0 - order by col.ordinal_position asc - </select> - - <insert id="insertGenTableColumn" parameterType="GenTableColumn" useGeneratedKeys="true" keyProperty="columnId"> - insert into gen_table_column ( - <if test="tableId != null and tableId != ''">table_id,</if> - <if test="columnName != null and columnName != ''">column_name,</if> - <if test="columnComment != null and columnComment != ''">column_comment,</if> - <if test="columnType != null and columnType != ''">column_type,</if> - <if test="javaType != null and javaType != ''">java_type,</if> - <if test="javaField != null and javaField != ''">java_field,</if> - <if test="isPk != null and isPk != ''">is_pk,</if> - <if test="isIncrement != null and isIncrement != ''">is_increment,</if> - <if test="isRequired != null and isRequired != ''">is_required,</if> - <if test="isInsert != null and isInsert != ''">is_insert,</if> - <if test="isEdit != null and isEdit != ''">is_edit,</if> - <if test="isList != null and isList != ''">is_list,</if> - <if test="isQuery != null and isQuery != ''">is_query,</if> - <if test="queryType != null and queryType != ''">query_type,</if> - <if test="htmlType != null and htmlType != ''">html_type,</if> - <if test="dictType != null and dictType != ''">dict_type,</if> - <if test="sort != null">sort,</if> - <if test="createBy != null and createBy != ''">create_by,</if> - create_time - )values( - <if test="tableId != null and tableId != ''">#{tableId},</if> - <if test="columnName != null and columnName != ''">#{columnName},</if> - <if test="columnComment != null and columnComment != ''">#{columnComment},</if> - <if test="columnType != null and columnType != ''">#{columnType},</if> - <if test="javaType != null and javaType != ''">#{javaType},</if> - <if test="javaField != null and javaField != ''">#{javaField},</if> - <if test="isPk != null and isPk != ''">#{isPk},</if> - <if test="isIncrement != null and isIncrement != ''">#{isIncrement},</if> - <if test="isRequired != null and isRequired != ''">#{isRequired},</if> - <if test="isInsert != null and isInsert != ''">#{isInsert},</if> - <if test="isEdit != null and isEdit != ''">#{isEdit},</if> - <if test="isList != null and isList != ''">#{isList},</if> - <if test="isQuery != null and isQuery != ''">#{isQuery},</if> - <if test="queryType != null and queryType != ''">#{queryType},</if> - <if test="htmlType != null and htmlType != ''">#{htmlType},</if> - <if test="dictType != null and dictType != ''">#{dictType},</if> - <if test="sort != null">#{sort},</if> - <if test="createBy != null and createBy != ''">#{createBy},</if> - now() - ) - </insert> - - <update id="updateGenTableColumn" parameterType="GenTableColumn"> - update gen_table_column - <set> - column_comment = #{columnComment}, - java_type = #{javaType}, - java_field = #{javaField}, - is_insert = #{isInsert}, - is_edit = #{isEdit}, - is_list = #{isList}, - is_query = #{isQuery}, - is_required = #{isRequired}, - query_type = #{queryType}, - html_type = #{htmlType}, - dict_type = #{dictType}, - sort = #{sort}, - update_by = #{updateBy}, - update_time = now() - </set> - where column_id = #{columnId} - </update> - - <delete id="deleteGenTableColumnByIds" parameterType="Long"> - delete from gen_table_column where table_id in - <foreach collection="array" item="tableId" open="(" separator="," close=")"> - #{tableId} - </foreach> - </delete> - -</mapper> diff --git a/zhitan-generator/target/classes/mapper/generator/GenTableMapper.xml b/zhitan-generator/target/classes/mapper/generator/GenTableMapper.xml deleted file mode 100644 index d34669a..0000000 --- a/zhitan-generator/target/classes/mapper/generator/GenTableMapper.xml +++ /dev/null @@ -1,172 +0,0 @@ -<?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.zhitan.generator.mapper.GenTableMapper"> - - <resultMap type="com.zhitan.generator.domain.GenTable" id="GenTableResult"> - <id property="tableId" column="table_id"/> - <result property="tableName" column="table_name"/> - <result property="tableComment" column="table_comment"/> - <result property="className" column="class_name"/> - <result property="tplCategory" column="tpl_category"/> - <result property="packageName" column="package_name"/> - <result property="moduleName" column="module_name"/> - <result property="businessName" column="business_name"/> - <result property="functionName" column="function_name"/> - <result property="functionAuthor" column="function_author"/> - <result property="options" column="options"/> - <result property="createBy" column="create_by"/> - <result property="createTime" column="create_time"/> - <result property="updateBy" column="update_by"/> - <result property="updateTime" column="update_time"/> - <result property="remark" column="remark"/> - <collection property="columns" javaType="java.util.List" resultMap="GenTableColumnResult"/> - </resultMap> - - <resultMap type="com.zhitan.generator.domain.GenTableColumn" id="GenTableColumnResult"> - <id property="columnId" column="column_id"/> - <result property="tableId" column="table_id"/> - <result property="columnName" column="column_name"/> - <result property="columnComment" column="column_comment"/> - <result property="columnType" column="column_type"/> - <result property="javaType" column="java_type"/> - <result property="javaField" column="java_field"/> - <result property="isPk" column="is_pk"/> - <result property="isIncrement" column="is_increment"/> - <result property="isRequired" column="is_required"/> - <result property="isInsert" column="is_insert"/> - <result property="isEdit" column="is_edit"/> - <result property="isList" column="is_list"/> - <result property="isQuery" column="is_query"/> - <result property="queryType" column="query_type"/> - <result property="htmlType" column="html_type"/> - <result property="dictType" column="dict_type"/> - <result property="sort" column="sort"/> - <result property="createBy" column="create_by"/> - <result property="createTime" column="create_time"/> - <result property="updateBy" column="update_by"/> - <result property="updateTime" column="update_time"/> - </resultMap> - - <sql id="selectGenTableVo"> - select table_id, table_name, table_comment, class_name, tpl_category, package_name, module_name, business_name, function_name, function_author, options, create_by, create_time, update_by, update_time, remark from gen_table - </sql> - - <select id="selectGenTableList" parameterType="com.zhitan.generator.domain.GenTable" - resultMap="GenTableResult"> - <include refid="selectGenTableVo"/> - <where> - <if test="tableName != null and tableName != ''"> - AND lower(table_name) like lower(concat('%', #{tableName}, '%')) - </if> - <if test="tableComment != null and tableComment != ''"> - AND lower(table_comment) like lower(concat('%', #{tableComment}, '%')) - </if> - <!-- <if test="beginTime != null and beginTime != ''">寮�濮嬫椂闂存绱� --> - <!-- AND date_format(create_time,'%y%m%d') >= date_format(#{beginTime},'%y%m%d') --> - <!-- </if> --> - <!-- <if test="endTime != null and endTime != ''">缁撴潫鏃堕棿妫�绱� --> - <!-- AND date_format(create_time,'%y%m%d') <= date_format(#{endTime},'%y%m%d') --> - <!-- </if> --> - </where> - order by table_id - </select> - - <select id="selectDbTableList" parameterType="com.zhitan.generator.domain.GenTable" - resultMap="GenTableResult"> - SELECT tablename AS table_name FROM pg_tables WHERE schemaname='public' - AND tablename NOT LIKE 'qrtz_%' AND tablename NOT LIKE 'gen_%' - AND tablename NOT IN (select table_name from gen_table) - <if test="tableName != null and tableName != ''"> - AND lower(tablename) like lower(concat('%', #{tableName}, '%')) - </if> - </select> - - <select id="selectDbTableListByNames" resultMap="GenTableResult"> - SELECT C.relname AS table_name,CAST (obj_description (relfilenode,'pg_class') AS VARCHAR) AS table_comment,null - AS create_time,null AS update_time FROM pg_class C WHERE - C.relname IN (SELECT tablename FROM pg_tables WHERE schemaname='public' AND POSITION ('_2' IN tablename)=0) - and C.relname NOT LIKE 'qrtz_%' and C.relname NOT LIKE 'gen_%' - and C.relname in - <foreach collection="array" item="name" open="(" separator="," close=")"> - #{name} - </foreach> - ORDER BY C.relname - </select> - - <select id="selectGenTableById" parameterType="Long" resultMap="GenTableResult"> - SELECT t.table_id, t.table_name, t.table_comment, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.options, t.remark, - c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort - FROM gen_table t - LEFT JOIN gen_table_column c ON t.table_id = c.table_id - where t.table_id = #{tableId} - </select> - - <select id="selectGenTableByName" parameterType="String" resultMap="GenTableResult"> - SELECT t.table_id, t.table_name, t.table_comment, t.class_name, t.tpl_category, t.package_name, t.module_name, t.business_name, t.function_name, t.function_author, t.options, t.remark, - c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort - FROM gen_table t - LEFT JOIN gen_table_column c ON t.table_id = c.table_id - where t.table_name = #{tableName} - </select> - - <insert id="insertGenTable" parameterType="com.zhitan.generator.domain.GenTable" - useGeneratedKeys="true" keyProperty="tableId"> - insert into gen_table ( - <if test="tableName != null">table_name,</if> - <if test="tableComment != null and tableComment != ''">table_comment,</if> - <if test="className != null and className != ''">class_name,</if> - <if test="tplCategory != null and tplCategory != ''">tpl_category,</if> - <if test="packageName != null and packageName != ''">package_name,</if> - <if test="moduleName != null and moduleName != ''">module_name,</if> - <if test="businessName != null and businessName != ''">business_name,</if> - <if test="functionName != null and functionName != ''">function_name,</if> - <if test="functionAuthor != null and functionAuthor != ''">function_author,</if> - <if test="remark != null and remark != ''">remark,</if> - <if test="createBy != null and createBy != ''">create_by,</if> - create_time - )values( - <if test="tableName != null">#{tableName},</if> - <if test="tableComment != null and tableComment != ''">#{tableComment},</if> - <if test="className != null and className != ''">#{className},</if> - <if test="tplCategory != null and tplCategory != ''">#{tplCategory},</if> - <if test="packageName != null and packageName != ''">#{packageName},</if> - <if test="moduleName != null and moduleName != ''">#{moduleName},</if> - <if test="businessName != null and businessName != ''">#{businessName},</if> - <if test="functionName != null and functionName != ''">#{functionName},</if> - <if test="functionAuthor != null and functionAuthor != ''">#{functionAuthor},</if> - <if test="remark != null and remark != ''">#{remark},</if> - <if test="createBy != null and createBy != ''">#{createBy},</if> - now() - ) - </insert> - - <update id="updateGenTable" parameterType="com.zhitan.generator.domain.GenTable"> - update gen_table - <set> - <if test="tableName != null">table_name = #{tableName},</if> - <if test="tableComment != null and tableComment != ''">table_comment = #{tableComment},</if> - <if test="className != null and className != ''">class_name = #{className},</if> - <if test="functionAuthor != null and functionAuthor != ''">function_author = #{functionAuthor},</if> - <if test="tplCategory != null and tplCategory != ''">tpl_category = #{tplCategory},</if> - <if test="packageName != null and packageName != ''">package_name = #{packageName},</if> - <if test="moduleName != null and moduleName != ''">module_name = #{moduleName},</if> - <if test="businessName != null and businessName != ''">business_name = #{businessName},</if> - <if test="functionName != null and functionName != ''">function_name = #{functionName},</if> - <if test="options != null and options != ''">options = #{options},</if> - <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> - <if test="remark != null">remark = #{remark},</if> - update_time = now() - </set> - where table_id = #{tableId} - </update> - - <delete id="deleteGenTableByIds" parameterType="Long"> - delete from gen_table where table_id in - <foreach collection="array" item="tableId" open="(" separator="," close=")"> - #{tableId} - </foreach> - </delete> - -</mapper> diff --git a/zhitan-generator/target/classes/vm/java/controller.java.vm b/zhitan-generator/target/classes/vm/java/controller.java.vm deleted file mode 100644 index bb7928a..0000000 --- a/zhitan-generator/target/classes/vm/java/controller.java.vm +++ /dev/null @@ -1,108 +0,0 @@ -package ${packageName}.controller; - -import java.util.List; -import javax.servlet.http.HttpServletResponse; -import org.springframework.security.access.prepost.PreAuthorize; -import javax.annotation.Resource; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; -import com.zhitan.common.annotation.Log; -import com.zhitan.common.core.controller.BaseController; -import com.zhitan.common.core.domain.AjaxResult; -import com.zhitan.common.enums.BusinessType; -import ${packageName}.domain.${ClassName}; -import ${packageName}.service.I${ClassName}Service; -import com.zhitan.common.utils.poi.ExcelUtil; -#if($table.crud || $table.sub) -import com.zhitan.common.core.page.TableDataInfo; -#elseif($table.tree) -#end - -/** - * ${functionName}Controller - * - * @author ${author} - * @date ${datetime} - */ -@RestController -@RequestMapping("/${moduleName}/${businessName}") -public class ${ClassName}Controller extends BaseController -{ - @Resource - private I${ClassName}Service ${className}Service; - - /** - * 鏌ヨ${functionName}鍒楄〃 - */ - @PreAuthorize("@ss.hasPermi('${permissionPrefix}:list')") - @GetMapping("/list") - public TableDataInfo list(${ClassName} ${className}) - { - startPage(); - List<${ClassName}> list = ${className}Service.select${ClassName}List(${className}); - return getDataTable(list); - } - - - /** - * 瀵煎嚭${functionName}鍒楄〃 - */ - @PreAuthorize("@ss.hasPermi('${permissionPrefix}:export')") - @Log(title = "${functionName}", businessType = BusinessType.EXPORT) - @PostMapping("/export") - public void export(HttpServletResponse response, ${ClassName} ${className}) - { - List<${ClassName}> list = ${className}Service.select${ClassName}List(${className}); - ExcelUtil<${ClassName}> util = new ExcelUtil<${ClassName}>(${ClassName}.class); - util.exportExcel(response, list, "${functionName}鏁版嵁"); - } - - /** - * 鑾峰彇${functionName}璇︾粏淇℃伅 - */ - @PreAuthorize("@ss.hasPermi('${permissionPrefix}:query')") - @GetMapping(value = "/{${pkColumn.javaField}}") - public AjaxResult getInfo(@PathVariable("${pkColumn.javaField}") ${pkColumn.javaType} ${pkColumn.javaField}) - { - return success(${className}Service.select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaField})); - } - - /** - * 鏂板${functionName} - */ - @PreAuthorize("@ss.hasPermi('${permissionPrefix}:add')") - @Log(title = "${functionName}", businessType = BusinessType.INSERT) - @PostMapping - public AjaxResult add(@RequestBody ${ClassName} ${className}) - { - return toAjax(${className}Service.insert${ClassName}(${className})); - } - - /** - * 淇敼${functionName} - */ - @PreAuthorize("@ss.hasPermi('${permissionPrefix}:edit')") - @Log(title = "${functionName}", businessType = BusinessType.UPDATE) - @PutMapping - public AjaxResult edit(@RequestBody ${ClassName} ${className}) - { - return toAjax(${className}Service.update${ClassName}(${className})); - } - - /** - * 鍒犻櫎${functionName} - */ - @PreAuthorize("@ss.hasPermi('${permissionPrefix}:remove')") - @Log(title = "${functionName}", businessType = BusinessType.DELETE) - @DeleteMapping("/{${pkColumn.javaField}s}") - public AjaxResult remove(@PathVariable ${pkColumn.javaType}[] ${pkColumn.javaField}s) - { - return toAjax(${className}Service.delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaField}s)); - } -} diff --git a/zhitan-generator/target/classes/vm/java/domain.java.vm b/zhitan-generator/target/classes/vm/java/domain.java.vm deleted file mode 100644 index da3cce5..0000000 --- a/zhitan-generator/target/classes/vm/java/domain.java.vm +++ /dev/null @@ -1,112 +0,0 @@ -package ${packageName}.domain; - -#foreach ($import in $importList) -import ${import}; -#end -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.zhitan.common.annotation.Excel; -#if($table.crud || $table.sub) -import com.zhitan.common.core.domain.BaseEntity; -#elseif($table.tree) -import com.zhitan.common.core.domain.TreeEntity; -#end - -/** - * ${functionName}瀵硅薄 ${tableName} - * - * @author ${author} - * @date ${datetime} - */ -#if($table.crud || $table.sub) - #set($Entity="BaseEntity") -#elseif($table.tree) - #set($Entity="TreeEntity") -#end -@TableName("${tableName}") -public class ${ClassName} extends BaseEntity { - private static final long serialVersionUID = 1L; - -#foreach ($column in $columns) - #if(!$table.isSuperColumn($column.javaField)) - /** $column.columnComment */ - #if($column.list) - #set($parentheseIndex=$column.columnComment.indexOf("锛�")) - #if($parentheseIndex != -1) - #set($comment=$column.columnComment.substring(0, $parentheseIndex)) - #else - #set($comment=$column.columnComment) - #end - #if($parentheseIndex != -1) - @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") - #elseif($column.javaType == 'Date') - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd") - #else - @Excel(name = "${comment}") - #end - #end - #if($column.isPk == 1) - @TableId(value = "$column.columnName",type = IdType.AUTO) - #end - private $column.javaType $column.javaField; - - #end -#end -#if($table.sub) -/** $table.subTable.functionName淇℃伅 */ -private List<${subClassName}> ${subclassName}List; - -#end -#foreach ($column in $columns) - #if(!$table.isSuperColumn($column.javaField)) - #if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]")) - #set($AttrName=$column.javaField) - #else - #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - #end - - public void set${AttrName}($column.javaType $column.javaField) - { - this.$column.javaField = $column.javaField; - } - - public $column.javaType get${AttrName}() - { - return $column.javaField; - } - #end -#end - -#if($table.sub) - public List<${subClassName}> get${subClassName}List() - { - return ${subclassName}List; - } - - public void set${subClassName}List(List<${subClassName}> ${subclassName}List) - { - this.${subclassName}List = ${subclassName}List; - } - -#end - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - #foreach ($column in $columns) - #if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]")) - #set($AttrName=$column.javaField) - #else - #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - #end - .append("${column.javaField}", get${AttrName}()) - #end - #if($table.sub) - .append("${subclassName}List", get${subClassName}List()) - #end - .toString(); - } -} diff --git a/zhitan-generator/target/classes/vm/java/mapper.java.vm b/zhitan-generator/target/classes/vm/java/mapper.java.vm deleted file mode 100644 index 1435b4e..0000000 --- a/zhitan-generator/target/classes/vm/java/mapper.java.vm +++ /dev/null @@ -1,91 +0,0 @@ -package ${packageName}.mapper; - -import java.util.List; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import ${packageName}.domain.${ClassName}; -#if($table.sub) -import ${packageName}.domain.${subClassName}; -#end - -/** - * ${functionName}Mapper鎺ュ彛 - * - * @author ${author} - * @date ${datetime} - */ -public interface ${ClassName}Mapper extends BaseMapper<${ClassName}> { - /** - * 鏌ヨ${functionName} - * - * @param ${pkColumn.javaField} ${functionName}涓婚敭 - * @return ${functionName} - */ - public ${ClassName} select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); - - /** - * 鏌ヨ${functionName}鍒楄〃 - * - * @param ${className} ${functionName} - * @return ${functionName}闆嗗悎 - */ - public List<${ClassName}> select${ClassName}List(${ClassName} ${className}); - - /** - * 鏂板${functionName} - * - * @param ${className} ${functionName} - * @return 缁撴灉 - */ - public int insert${ClassName}(${ClassName} ${className}); - - /** - * 淇敼${functionName} - * - * @param ${className} ${functionName} - * @return 缁撴灉 - */ - public int update${ClassName}(${ClassName} ${className}); - - /** - * 鍒犻櫎${functionName} - * - * @param ${pkColumn.javaField} ${functionName}涓婚敭 - * @return 缁撴灉 - */ - public int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); - - /** - * 鎵归噺鍒犻櫎${functionName} - * - * @param ${pkColumn.javaField}s 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎 - * @return 缁撴灉 - */ - public int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); - #if($table.sub) - - /** - * 鎵归噺鍒犻櫎${subTable.functionName} - * - * @param ${pkColumn.javaField}s 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎 - * @return 缁撴灉 - */ - public int delete${subClassName}By${subTableFkClassName}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); - - /** - * 鎵归噺鏂板${subTable.functionName} - * - * @param ${subclassName}List ${subTable.functionName}鍒楄〃 - * @return 缁撴灉 - */ - public int batch${subClassName}(List<${subClassName}> ${subclassName}List); - - - /** - * 閫氳繃${functionName}涓婚敭鍒犻櫎${subTable.functionName}淇℃伅 - * - * @param ${pkColumn.javaField} ${functionName}ID - * @return 缁撴灉 - */ - public int delete${subClassName}By${subTableFkClassName}(${pkColumn.javaType} ${pkColumn.javaField}); - #end -} diff --git a/zhitan-generator/target/classes/vm/java/service.java.vm b/zhitan-generator/target/classes/vm/java/service.java.vm deleted file mode 100644 index 149a552..0000000 --- a/zhitan-generator/target/classes/vm/java/service.java.vm +++ /dev/null @@ -1,61 +0,0 @@ -package ${packageName}.service; - -import java.util.List; -import ${packageName}.domain.${ClassName}; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - * ${functionName}Service鎺ュ彛 - * - * @author ${author} - * @date ${datetime} - */ -public interface I${ClassName}Service extends IService<${ClassName}> { - /** - * 鏌ヨ${functionName} - * - * @param ${pkColumn.javaField} ${functionName}涓婚敭 - * @return ${functionName} - */ - public ${ClassName} select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); - - /** - * 鏌ヨ${functionName}鍒楄〃 - * - * @param ${className} ${functionName} - * @return ${functionName}闆嗗悎 - */ - public List<${ClassName}> select${ClassName}List(${ClassName} ${className}); - - /** - * 鏂板${functionName} - * - * @param ${className} ${functionName} - * @return 缁撴灉 - */ - public int insert${ClassName}(${ClassName} ${className}); - - /** - * 淇敼${functionName} - * - * @param ${className} ${functionName} - * @return 缁撴灉 - */ - public int update${ClassName}(${ClassName} ${className}); - - /** - * 鎵归噺鍒犻櫎${functionName} - * - * @param ${pkColumn.javaField}s 闇�瑕佸垹闄ょ殑${functionName}涓婚敭闆嗗悎 - * @return 缁撴灉 - */ - public int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s); - - /** - * 鍒犻櫎${functionName}淇℃伅 - * - * @param ${pkColumn.javaField} ${functionName}涓婚敭 - * @return 缁撴灉 - */ - public int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}); -} diff --git a/zhitan-generator/target/classes/vm/java/serviceImpl.java.vm b/zhitan-generator/target/classes/vm/java/serviceImpl.java.vm deleted file mode 100644 index c7087f2..0000000 --- a/zhitan-generator/target/classes/vm/java/serviceImpl.java.vm +++ /dev/null @@ -1,162 +0,0 @@ -package ${packageName}.service.impl; - -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import java.util.List; - #foreach ($column in $columns) - #if($column.javaField == 'createTime' || $column.javaField == 'updateTime') - import com.zhitan.common.utils.DateUtils; - #break - #end - #end -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - #if($table.sub) - import java.util.ArrayList; - import com.zhitan.common.utils.StringUtils; - import org.springframework.transaction.annotation.Transactional; - import ${packageName}.domain.${subClassName}; - #end -import ${packageName}.mapper.${ClassName}Mapper; -import ${packageName}.domain.${ClassName}; -import ${packageName}.service.I${ClassName}Service; - -/** - * ${functionName}Service涓氬姟灞傚鐞� - * - * @author ${author} - * @date ${datetime} - */ -@Service -public class ${ClassName}ServiceImpl extends ServiceImpl<${ClassName}Mapper, ${ClassName}> implements I${ClassName}Service { - @Autowired - private ${ClassName}Mapper ${className}Mapper; - - /** - * 鏌ヨ${functionName} - * - * @param ${pkColumn.javaField} ${functionName}涓婚敭 - * @return ${functionName} - */ - @Override - public ${ClassName} select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}) { - return ${className}Mapper.select${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaField}); - } - - /** - * 鏌ヨ${functionName}鍒楄〃 - * - * @param ${className} ${functionName} - * @return ${functionName} - */ - @Override - public List<${ClassName}> select${ClassName}List(${ClassName} ${className}) { - return ${className}Mapper.select${ClassName}List(${className}); - } - - /** - * 鏂板${functionName} - * - * @param ${className} ${functionName} - * @return 缁撴灉 - */ - #if($table.sub) - @Transactional - #end - @Override - public int insert${ClassName}(${ClassName} ${className}) { - #foreach ($column in $columns) - #if($column.javaField == 'createTime') - ${className}.setCreateTime(DateUtils.getNowDate()); - #end - #end - #if($table.sub) - int rows = ${className}Mapper.insert${ClassName}(${className}); - insert${subClassName}(${className}); - return rows; - #else - return ${className}Mapper.insert${ClassName}(${className}); - #end - } - - /** - * 淇敼${functionName} - * - * @param ${className} ${functionName} - * @return 缁撴灉 - */ - #if($table.sub) - @Transactional - #end - @Override - public int update${ClassName}(${ClassName} ${className}) { - #foreach ($column in $columns) - #if($column.javaField == 'updateTime') - ${className}.setUpdateTime(DateUtils.getNowDate()); - #end - #end - #if($table.sub) - ${className}Mapper.delete${subClassName}By${subTableFkClassName}(${className}.get${pkColumn.capJavaField}()); - insert${subClassName}(${className}); - #end - return ${className}Mapper.update${ClassName}(${className}); - } - - /** - * 鎵归噺鍒犻櫎${functionName} - * - * @param ${pkColumn.javaField}s 闇�瑕佸垹闄ょ殑${functionName}涓婚敭 - * @return 缁撴灉 - */ - #if($table.sub) - @Transactional - #end - @Override - public int delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaType}[] ${pkColumn.javaField}s) { - #if($table.sub) - ${className}Mapper.delete${subClassName}By${subTableFkClassName}s(${pkColumn.javaField}s); - #end - return ${className}Mapper.delete${ClassName}By${pkColumn.capJavaField}s(${pkColumn.javaField}s); - } - - /** - * 鍒犻櫎${functionName}淇℃伅 - * - * @param ${pkColumn.javaField} ${functionName}涓婚敭 - * @return 缁撴灉 - */ - #if($table.sub) - @Transactional - #end - @Override - public int delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaType} ${pkColumn.javaField}) { - #if($table.sub) - ${className}Mapper.delete${subClassName}By${subTableFkClassName}(${pkColumn.javaField}); - #end - return ${className}Mapper.delete${ClassName}By${pkColumn.capJavaField}(${pkColumn.javaField}); - } - #if($table.sub) - - /** - * 鏂板${subTable.functionName}淇℃伅 - * - * @param ${className} ${functionName}瀵硅薄 - */ - public void insert${subClassName}(${ClassName} ${className}) { - List<${subClassName}> ${subclassName}List = ${className}.get${subClassName}List(); - ${pkColumn.javaType} ${pkColumn.javaField} = ${className}.get${pkColumn.capJavaField}(); - if (StringUtils.isNotNull(${subclassName}List)) - { - List<${subClassName}> list = new ArrayList<${subClassName}>(); - for (${subClassName} ${subclassName} : ${subclassName}List) - { - ${subclassName}.set${subTableFkClassName}(${pkColumn.javaField}); - list.add(${subclassName}); - } - if (list.size() > 0) - { - ${className}Mapper.batch${subClassName}(list); - } - } - } - #end -} diff --git a/zhitan-generator/target/classes/vm/java/sub-domain.java.vm b/zhitan-generator/target/classes/vm/java/sub-domain.java.vm deleted file mode 100644 index d6d51d1..0000000 --- a/zhitan-generator/target/classes/vm/java/sub-domain.java.vm +++ /dev/null @@ -1,73 +0,0 @@ -package ${packageName}.domain; - - #foreach ($import in $subImportList) - import ${import}; - #end -import org.apache.commons.lang3.builder.ToStringBuilder; -import org.apache.commons.lang3.builder.ToStringStyle; -import com.zhitan.common.annotation.Excel; -import com.zhitan.common.core.domain.BaseEntity; - -/** - * ${subTable.functionName}瀵硅薄 ${subTableName} - * - * @author ${author} - * @date ${datetime} - */ -public class ${subClassName} extends BaseEntity { -private static final long serialVersionUID = 1L; - -#foreach ($column in $subTable.columns) - #if(!$table.isSuperColumn($column.javaField)) - /** $column.columnComment */ - #if($column.list) - #set($parentheseIndex=$column.columnComment.indexOf("锛�")) - #if($parentheseIndex != -1) - #set($comment=$column.columnComment.substring(0, $parentheseIndex)) - #else - #set($comment=$column.columnComment) - #end - #if($parentheseIndex != -1) - @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") - #elseif($column.javaType == 'Date') - @JsonFormat(pattern = "yyyy-MM-dd") - @Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd") - #else - @Excel(name = "${comment}") - #end - #end - private $column.javaType $column.javaField; - - #end -#end -#foreach ($column in $subTable.columns) - #if(!$table.isSuperColumn($column.javaField)) - #if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]")) - #set($AttrName=$column.javaField) - #else - #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - #end - public void set${AttrName}($column.javaType $column.javaField) { - this.$column.javaField = $column.javaField; - } - - public $column.javaType get${AttrName}() { - return $column.javaField; - } - #end -#end - -@Override -public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - #foreach ($column in $subTable.columns) - #if($column.javaField.length() > 2 && $column.javaField.substring(1,2).matches("[A-Z]")) - #set($AttrName=$column.javaField) - #else - #set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - #end - .append("${column.javaField}", get${AttrName}()) - #end - .toString(); - } - } diff --git a/zhitan-generator/target/classes/vm/js/api.js.vm b/zhitan-generator/target/classes/vm/js/api.js.vm deleted file mode 100644 index 9295524..0000000 --- a/zhitan-generator/target/classes/vm/js/api.js.vm +++ /dev/null @@ -1,44 +0,0 @@ -import request from '@/utils/request' - -// 鏌ヨ${functionName}鍒楄〃 -export function list${BusinessName}(query) { - return request({ - url: '/${moduleName}/${businessName}/list', - method: 'get', - params: query - }) -} - -// 鏌ヨ${functionName}璇︾粏 -export function get${BusinessName}(${pkColumn.javaField}) { - return request({ - url: '/${moduleName}/${businessName}/' + ${pkColumn.javaField}, - method: 'get' - }) -} - -// 鏂板${functionName} -export function add${BusinessName}(data) { - return request({ - url: '/${moduleName}/${businessName}', - method: 'post', - data: data - }) -} - -// 淇敼${functionName} -export function update${BusinessName}(data) { - return request({ - url: '/${moduleName}/${businessName}', - method: 'put', - data: data - }) -} - -// 鍒犻櫎${functionName} -export function del${BusinessName}(${pkColumn.javaField}) { - return request({ - url: '/${moduleName}/${businessName}/' + ${pkColumn.javaField}, - method: 'delete' - }) -} diff --git a/zhitan-generator/target/classes/vm/sql/sql.vm b/zhitan-generator/target/classes/vm/sql/sql.vm deleted file mode 100644 index 0575583..0000000 --- a/zhitan-generator/target/classes/vm/sql/sql.vm +++ /dev/null @@ -1,22 +0,0 @@ --- 鑿滃崟 SQL -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) -values('${functionName}', '${parentMenuId}', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 'admin', sysdate(), '', null, '${functionName}鑿滃崟'); - --- 鎸夐挳鐖惰彍鍗旾D -SELECT @parentId := LAST_INSERT_ID(); - --- 鎸夐挳 SQL -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) -values('${functionName}鏌ヨ', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:query', '#', 'admin', sysdate(), '', null, ''); - -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) -values('${functionName}鏂板', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:add', '#', 'admin', sysdate(), '', null, ''); - -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) -values('${functionName}淇敼', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:edit', '#', 'admin', sysdate(), '', null, ''); - -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) -values('${functionName}鍒犻櫎', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:remove', '#', 'admin', sysdate(), '', null, ''); - -insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) -values('${functionName}瀵煎嚭', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:export', '#', 'admin', sysdate(), '', null, ''); \ No newline at end of file diff --git a/zhitan-generator/target/classes/vm/vue/index-tree.vue.vm b/zhitan-generator/target/classes/vm/vue/index-tree.vue.vm deleted file mode 100644 index 4819c2a..0000000 --- a/zhitan-generator/target/classes/vm/vue/index-tree.vue.vm +++ /dev/null @@ -1,505 +0,0 @@ -<template> - <div class="app-container"> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> -#foreach($column in $columns) -#if($column.query) -#set($dictType=$column.dictType) -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end -#if($column.htmlType == "input") - <el-form-item label="${comment}" prop="${column.javaField}"> - <el-input - v-model="queryParams.${column.javaField}" - placeholder="璇疯緭鍏�${comment}" - clearable - @keyup.enter.native="handleQuery" - /> - </el-form-item> -#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType) - <el-form-item label="${comment}" prop="${column.javaField}"> - <el-select v-model="queryParams.${column.javaField}" placeholder="璇烽�夋嫨${comment}" clearable> - <el-option - v-for="dict in dict.type.${dictType}" - :key="dict.value" - :label="dict.label" - :value="dict.value" - /> - </el-select> - </el-form-item> -#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && $dictType) - <el-form-item label="${comment}" prop="${column.javaField}"> - <el-select v-model="queryParams.${column.javaField}" placeholder="璇烽�夋嫨${comment}" clearable> - <el-option label="璇烽�夋嫨瀛楀吀鐢熸垚" value="" /> - </el-select> - </el-form-item> -#elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN") - <el-form-item label="${comment}" prop="${column.javaField}"> - <el-date-picker clearable - v-model="queryParams.${column.javaField}" - type="date" - value-format="yyyy-MM-dd" - placeholder="閫夋嫨${comment}"> - </el-date-picker> - </el-form-item> -#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN") - <el-form-item label="${comment}"> - <el-date-picker - v-model="daterange${AttrName}" - style="width: 240px" - value-format="yyyy-MM-dd" - type="daterange" - range-separator="-" - start-placeholder="寮�濮嬫棩鏈�" - end-placeholder="缁撴潫鏃ユ湡" - ></el-date-picker> - </el-form-item> -#end -#end -#end - <el-form-item> - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> - </el-form-item> - </el-form> - - <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button - type="primary" - plain - icon="el-icon-plus" - size="mini" - @click="handleAdd" - v-hasPermi="['${moduleName}:${businessName}:add']" - >鏂板</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="info" - plain - icon="el-icon-sort" - size="mini" - @click="toggleExpandAll" - >灞曞紑/鎶樺彔</el-button> - </el-col> - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> - </el-row> - - <el-table - v-if="refreshTable" - v-loading="loading" - :data="${businessName}List" - row-key="${treeCode}" - :default-expand-all="isExpandAll" - :tree-props="{children: 'children', hasChildren: 'hasChildren'}" - > -#foreach($column in $columns) -#set($javaField=$column.javaField) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end -#if($column.pk) -#elseif($column.list && $column.htmlType == "datetime") - <el-table-column label="${comment}" align="center" prop="${javaField}" width="180"> - <template slot-scope="scope"> - <span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}</span> - </template> - </el-table-column> -#elseif($column.list && $column.htmlType == "imageUpload") - <el-table-column label="${comment}" align="center" prop="${javaField}" width="100"> - <template slot-scope="scope"> - <image-preview :src="scope.row.${javaField}" :width="50" :height="50"/> - </template> - </el-table-column> -#elseif($column.list && "" != $column.dictType) - <el-table-column label="${comment}" align="center" prop="${javaField}"> - <template slot-scope="scope"> -#if($column.htmlType == "checkbox") - <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/> -#else - <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField}"/> -#end - </template> - </el-table-column> -#elseif($column.list && "" != $javaField) -#if(${foreach.index} == 1) - <el-table-column label="${comment}" prop="${javaField}" /> -#else - <el-table-column label="${comment}" align="center" prop="${javaField}" /> -#end -#end -#end - <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> - <template slot-scope="scope"> - <el-button - size="mini" - type="text" - icon="el-icon-edit" - @click="handleUpdate(scope.row)" - v-hasPermi="['${moduleName}:${businessName}:edit']" - >淇敼</el-button> - <el-button - size="mini" - type="text" - icon="el-icon-plus" - @click="handleAdd(scope.row)" - v-hasPermi="['${moduleName}:${businessName}:add']" - >鏂板</el-button> - <el-button - size="mini" - type="text" - icon="el-icon-delete" - @click="handleDelete(scope.row)" - v-hasPermi="['${moduleName}:${businessName}:remove']" - >鍒犻櫎</el-button> - </template> - </el-table-column> - </el-table> - - <!-- 娣诲姞鎴栦慨鏀�${functionName}瀵硅瘽妗� --> - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> - <el-form ref="form" :model="form" :rules="rules" label-width="80px"> -#foreach($column in $columns) -#set($field=$column.javaField) -#if($column.insert && !$column.pk) -#if(($column.usableColumn) || (!$column.superColumn)) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end -#set($dictType=$column.dictType) -#if("" != $treeParentCode && $column.javaField == $treeParentCode) - <el-form-item label="${comment}" prop="${treeParentCode}"> - <treeselect v-model="form.${treeParentCode}" :options="${businessName}Options" :normalizer="normalizer" placeholder="璇烽�夋嫨${comment}" /> - </el-form-item> -#elseif($column.htmlType == "input") - <el-form-item label="${comment}" prop="${field}"> - <el-input v-model="form.${field}" placeholder="璇疯緭鍏�${comment}" /> - </el-form-item> -#elseif($column.htmlType == "imageUpload") - <el-form-item label="${comment}" prop="${field}"> - <image-upload v-model="form.${field}"/> - </el-form-item> -#elseif($column.htmlType == "fileUpload") - <el-form-item label="${comment}" prop="${field}"> - <file-upload v-model="form.${field}"/> - </el-form-item> -#elseif($column.htmlType == "editor") - <el-form-item label="${comment}"> - <editor v-model="form.${field}" :min-height="192"/> - </el-form-item> -#elseif($column.htmlType == "select" && "" != $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-select v-model="form.${field}" placeholder="璇烽�夋嫨${comment}"> - <el-option - v-for="dict in dict.type.${dictType}" - :key="dict.value" - :label="dict.label" -#if($column.javaType == "Integer" || $column.javaType == "Long") - :value="parseInt(dict.value)" -#else - :value="dict.value" -#end - ></el-option> - </el-select> - </el-form-item> -#elseif($column.htmlType == "select" && $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-select v-model="form.${field}" placeholder="璇烽�夋嫨${comment}"> - <el-option label="璇烽�夋嫨瀛楀吀鐢熸垚" value="" /> - </el-select> - </el-form-item> -#elseif($column.htmlType == "checkbox" && "" != $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-checkbox-group v-model="form.${field}"> - <el-checkbox - v-for="dict in dict.type.${dictType}" - :key="dict.value" - :label="dict.value"> - {{dict.label}} - </el-checkbox> - </el-checkbox-group> - </el-form-item> -#elseif($column.htmlType == "checkbox" && $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-checkbox-group v-model="form.${field}"> - <el-checkbox>璇烽�夋嫨瀛楀吀鐢熸垚</el-checkbox> - </el-checkbox-group> - </el-form-item> -#elseif($column.htmlType == "radio" && "" != $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-radio-group v-model="form.${field}"> - <el-radio - v-for="dict in dict.type.${dictType}" - :key="dict.value" -#if($column.javaType == "Integer" || $column.javaType == "Long") - :label="parseInt(dict.value)" -#else - :label="dict.value" -#end - >{{dict.label}}</el-radio> - </el-radio-group> - </el-form-item> -#elseif($column.htmlType == "radio" && $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-radio-group v-model="form.${field}"> - <el-radio label="1">璇烽�夋嫨瀛楀吀鐢熸垚</el-radio> - </el-radio-group> - </el-form-item> -#elseif($column.htmlType == "datetime") - <el-form-item label="${comment}" prop="${field}"> - <el-date-picker clearable - v-model="form.${field}" - type="date" - value-format="yyyy-MM-dd" - placeholder="閫夋嫨${comment}"> - </el-date-picker> - </el-form-item> -#elseif($column.htmlType == "textarea") - <el-form-item label="${comment}" prop="${field}"> - <el-input v-model="form.${field}" type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" /> - </el-form-item> -#end -#end -#end -#end - </el-form> - <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> - <el-button @click="cancel">鍙� 娑�</el-button> - </div> - </el-dialog> - </div> -</template> - -<script> -import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"; -import Treeselect from "@riophae/vue-treeselect"; -import "@riophae/vue-treeselect/dist/vue-treeselect.css"; - -export default { - name: "${BusinessName}", -#if(${dicts} != '') - dicts: [${dicts}], -#end - components: { - Treeselect - }, - data() { - return { - // 閬僵灞� - loading: true, - // 鏄剧ず鎼滅储鏉′欢 - showSearch: true, - // ${functionName}琛ㄦ牸鏁版嵁 - ${businessName}List: [], - // ${functionName}鏍戦�夐」 - ${businessName}Options: [], - // 寮瑰嚭灞傛爣棰� - title: "", - // 鏄惁鏄剧ず寮瑰嚭灞� - open: false, - // 鏄惁灞曞紑锛岄粯璁ゅ叏閮ㄥ睍寮� - isExpandAll: true, - // 閲嶆柊娓叉煋琛ㄦ牸鐘舵�� - refreshTable: true, -#foreach ($column in $columns) -#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - // $comment鏃堕棿鑼冨洿 - daterange${AttrName}: [], -#end -#end - // 鏌ヨ鍙傛暟 - queryParams: { -#foreach ($column in $columns) -#if($column.query) - $column.javaField: null#if($foreach.count != $columns.size()),#end -#end -#end - }, - // 琛ㄥ崟鍙傛暟 - form: {}, - // 琛ㄥ崟鏍¢獙 - rules: { -#foreach ($column in $columns) -#if($column.required) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end - $column.javaField: [ - { required: true, message: "$comment涓嶈兘涓虹┖", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end } - ]#if($foreach.count != $columns.size()),#end -#end -#end - } - }; - }, - created() { - this.getList(); - }, - methods: { - /** 鏌ヨ${functionName}鍒楄〃 */ - getList() { - this.loading = true; -#foreach ($column in $columns) -#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") - this.queryParams.params = {}; -#break -#end -#end -#foreach ($column in $columns) -#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - if (null != this.daterange${AttrName} && '' != this.daterange${AttrName}) { - this.queryParams.params["begin${AttrName}"] = this.daterange${AttrName}[0]; - this.queryParams.params["end${AttrName}"] = this.daterange${AttrName}[1]; - } -#end -#end - list${BusinessName}(this.queryParams).then(response => { - this.${businessName}List = this.handleTree(response.data, "${treeCode}", "${treeParentCode}"); - this.loading = false; - }); - }, - /** 杞崲${functionName}鏁版嵁缁撴瀯 */ - normalizer(node) { - if (node.children && !node.children.length) { - delete node.children; - } - return { - id: node.${treeCode}, - label: node.${treeName}, - children: node.children - }; - }, - /** 鏌ヨ${functionName}涓嬫媺鏍戠粨鏋� */ - getTreeselect() { - list${BusinessName}().then(response => { - this.${businessName}Options = []; - const data = { ${treeCode}: 0, ${treeName}: '椤剁骇鑺傜偣', children: [] }; - data.children = this.handleTree(response.data, "${treeCode}", "${treeParentCode}"); - this.${businessName}Options.push(data); - }); - }, - // 鍙栨秷鎸夐挳 - cancel() { - this.open = false; - this.reset(); - }, - // 琛ㄥ崟閲嶇疆 - reset() { - this.form = { -#foreach ($column in $columns) -#if($column.htmlType == "checkbox") - $column.javaField: []#if($foreach.count != $columns.size()),#end -#else - $column.javaField: null#if($foreach.count != $columns.size()),#end -#end -#end - }; - this.resetForm("form"); - }, - /** 鎼滅储鎸夐挳鎿嶄綔 */ - handleQuery() { - this.getList(); - }, - /** 閲嶇疆鎸夐挳鎿嶄綔 */ - resetQuery() { -#foreach ($column in $columns) -#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - this.daterange${AttrName} = []; -#end -#end - this.resetForm("queryForm"); - this.handleQuery(); - }, - /** 鏂板鎸夐挳鎿嶄綔 */ - handleAdd(row) { - this.reset(); - this.getTreeselect(); - if (row != null && row.${treeCode}) { - this.form.${treeParentCode} = row.${treeCode}; - } else { - this.form.${treeParentCode} = 0; - } - this.open = true; - this.title = "娣诲姞${functionName}"; - }, - /** 灞曞紑/鎶樺彔鎿嶄綔 */ - toggleExpandAll() { - this.refreshTable = false; - this.isExpandAll = !this.isExpandAll; - this.$nextTick(() => { - this.refreshTable = true; - }); - }, - /** 淇敼鎸夐挳鎿嶄綔 */ - handleUpdate(row) { - this.reset(); - this.getTreeselect(); - if (row != null) { - this.form.${treeParentCode} = row.${treeParentCode}; - } - get${BusinessName}(row.${pkColumn.javaField}).then(response => { - this.form = response.data; -#foreach ($column in $columns) -#if($column.htmlType == "checkbox") - this.form.$column.javaField = this.form.${column.javaField}.split(","); -#end -#end - this.open = true; - this.title = "淇敼${functionName}"; - }); - }, - /** 鎻愪氦鎸夐挳 */ - submitForm() { - this.#[[$]]#refs["form"].validate(valid => { - if (valid) { -#foreach ($column in $columns) -#if($column.htmlType == "checkbox") - this.form.$column.javaField = this.form.${column.javaField}.join(","); -#end -#end - if (this.form.${pkColumn.javaField} != null) { - update${BusinessName}(this.form).then(response => { - this.#[[$modal]]#.msgSuccess("淇敼鎴愬姛"); - this.open = false; - this.getList(); - }); - } else { - add${BusinessName}(this.form).then(response => { - this.#[[$modal]]#.msgSuccess("鏂板鎴愬姛"); - this.open = false; - this.getList(); - }); - } - } - }); - }, - /** 鍒犻櫎鎸夐挳鎿嶄綔 */ - handleDelete(row) { - this.#[[$modal]]#.confirm('鏄惁纭鍒犻櫎${functionName}缂栧彿涓�"' + row.${pkColumn.javaField} + '"鐨勬暟鎹」锛�').then(function() { - return del${BusinessName}(row.${pkColumn.javaField}); - }).then(() => { - this.getList(); - this.#[[$modal]]#.msgSuccess("鍒犻櫎鎴愬姛"); - }).catch(() => {}); - } - } -}; -</script> diff --git a/zhitan-generator/target/classes/vm/vue/index.vue.vm b/zhitan-generator/target/classes/vm/vue/index.vue.vm deleted file mode 100644 index 6296014..0000000 --- a/zhitan-generator/target/classes/vm/vue/index.vue.vm +++ /dev/null @@ -1,602 +0,0 @@ -<template> - <div class="app-container"> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> -#foreach($column in $columns) -#if($column.query) -#set($dictType=$column.dictType) -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end -#if($column.htmlType == "input") - <el-form-item label="${comment}" prop="${column.javaField}"> - <el-input - v-model="queryParams.${column.javaField}" - placeholder="璇疯緭鍏�${comment}" - clearable - @keyup.enter.native="handleQuery" - /> - </el-form-item> -#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType) - <el-form-item label="${comment}" prop="${column.javaField}"> - <el-select v-model="queryParams.${column.javaField}" placeholder="璇烽�夋嫨${comment}" clearable> - <el-option - v-for="dict in dict.type.${dictType}" - :key="dict.value" - :label="dict.label" - :value="dict.value" - /> - </el-select> - </el-form-item> -#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && $dictType) - <el-form-item label="${comment}" prop="${column.javaField}"> - <el-select v-model="queryParams.${column.javaField}" placeholder="璇烽�夋嫨${comment}" clearable> - <el-option label="璇烽�夋嫨瀛楀吀鐢熸垚" value="" /> - </el-select> - </el-form-item> -#elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN") - <el-form-item label="${comment}" prop="${column.javaField}"> - <el-date-picker clearable - v-model="queryParams.${column.javaField}" - type="date" - value-format="yyyy-MM-dd" - placeholder="璇烽�夋嫨${comment}"> - </el-date-picker> - </el-form-item> -#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN") - <el-form-item label="${comment}"> - <el-date-picker - v-model="daterange${AttrName}" - style="width: 240px" - value-format="yyyy-MM-dd" - type="daterange" - range-separator="-" - start-placeholder="寮�濮嬫棩鏈�" - end-placeholder="缁撴潫鏃ユ湡" - ></el-date-picker> - </el-form-item> -#end -#end -#end - <el-form-item> - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> - <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> - </el-form-item> - </el-form> - - <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button - type="primary" - plain - icon="el-icon-plus" - size="mini" - @click="handleAdd" - v-hasPermi="['${moduleName}:${businessName}:add']" - >鏂板</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="success" - plain - icon="el-icon-edit" - size="mini" - :disabled="single" - @click="handleUpdate" - v-hasPermi="['${moduleName}:${businessName}:edit']" - >淇敼</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="danger" - plain - icon="el-icon-delete" - size="mini" - :disabled="multiple" - @click="handleDelete" - v-hasPermi="['${moduleName}:${businessName}:remove']" - >鍒犻櫎</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="warning" - plain - icon="el-icon-download" - size="mini" - @click="handleExport" - v-hasPermi="['${moduleName}:${businessName}:export']" - >瀵煎嚭</el-button> - </el-col> - <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> - </el-row> - - <el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange"> - <el-table-column type="selection" width="55" align="center" /> -#foreach($column in $columns) -#set($javaField=$column.javaField) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end -#if($column.pk) - <el-table-column label="${comment}" align="center" prop="${javaField}" /> -#elseif($column.list && $column.htmlType == "datetime") - <el-table-column label="${comment}" align="center" prop="${javaField}" width="180"> - <template slot-scope="scope"> - <span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}</span> - </template> - </el-table-column> -#elseif($column.list && $column.htmlType == "imageUpload") - <el-table-column label="${comment}" align="center" prop="${javaField}" width="100"> - <template slot-scope="scope"> - <image-preview :src="scope.row.${javaField}" :width="50" :height="50"/> - </template> - </el-table-column> -#elseif($column.list && "" != $column.dictType) - <el-table-column label="${comment}" align="center" prop="${javaField}"> - <template slot-scope="scope"> -#if($column.htmlType == "checkbox") - <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/> -#else - <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField}"/> -#end - </template> - </el-table-column> -#elseif($column.list && "" != $javaField) - <el-table-column label="${comment}" align="center" prop="${javaField}" /> -#end -#end - <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> - <template slot-scope="scope"> - <el-button - size="mini" - type="text" - icon="el-icon-edit" - @click="handleUpdate(scope.row)" - v-hasPermi="['${moduleName}:${businessName}:edit']" - >淇敼</el-button> - <el-button - size="mini" - type="text" - icon="el-icon-delete" - @click="handleDelete(scope.row)" - v-hasPermi="['${moduleName}:${businessName}:remove']" - >鍒犻櫎</el-button> - </template> - </el-table-column> - </el-table> - - <pagination - v-show="total>0" - :total="total" - :page.sync="queryParams.pageNum" - :limit.sync="queryParams.pageSize" - @pagination="getList" - /> - - <!-- 娣诲姞鎴栦慨鏀�${functionName}瀵硅瘽妗� --> - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> - <el-form ref="form" :model="form" :rules="rules" label-width="80px"> -#foreach($column in $columns) -#set($field=$column.javaField) -#if($column.insert && !$column.pk) -#if(($column.usableColumn) || (!$column.superColumn)) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end -#set($dictType=$column.dictType) -#if($column.htmlType == "input") - <el-form-item label="${comment}" prop="${field}"> - <el-input v-model="form.${field}" placeholder="璇疯緭鍏�${comment}" /> - </el-form-item> -#elseif($column.htmlType == "imageUpload") - <el-form-item label="${comment}" prop="${field}"> - <image-upload v-model="form.${field}"/> - </el-form-item> -#elseif($column.htmlType == "fileUpload") - <el-form-item label="${comment}" prop="${field}"> - <file-upload v-model="form.${field}"/> - </el-form-item> -#elseif($column.htmlType == "editor") - <el-form-item label="${comment}"> - <editor v-model="form.${field}" :min-height="192"/> - </el-form-item> -#elseif($column.htmlType == "select" && "" != $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-select v-model="form.${field}" placeholder="璇烽�夋嫨${comment}"> - <el-option - v-for="dict in dict.type.${dictType}" - :key="dict.value" - :label="dict.label" -#if($column.javaType == "Integer" || $column.javaType == "Long") - :value="parseInt(dict.value)" -#else - :value="dict.value" -#end - ></el-option> - </el-select> - </el-form-item> -#elseif($column.htmlType == "select" && $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-select v-model="form.${field}" placeholder="璇烽�夋嫨${comment}"> - <el-option label="璇烽�夋嫨瀛楀吀鐢熸垚" value="" /> - </el-select> - </el-form-item> -#elseif($column.htmlType == "checkbox" && "" != $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-checkbox-group v-model="form.${field}"> - <el-checkbox - v-for="dict in dict.type.${dictType}" - :key="dict.value" - :label="dict.value"> - {{dict.label}} - </el-checkbox> - </el-checkbox-group> - </el-form-item> -#elseif($column.htmlType == "checkbox" && $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-checkbox-group v-model="form.${field}"> - <el-checkbox>璇烽�夋嫨瀛楀吀鐢熸垚</el-checkbox> - </el-checkbox-group> - </el-form-item> -#elseif($column.htmlType == "radio" && "" != $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-radio-group v-model="form.${field}"> - <el-radio - v-for="dict in dict.type.${dictType}" - :key="dict.value" -#if($column.javaType == "Integer" || $column.javaType == "Long") - :label="parseInt(dict.value)" -#else - :label="dict.value" -#end - >{{dict.label}}</el-radio> - </el-radio-group> - </el-form-item> -#elseif($column.htmlType == "radio" && $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-radio-group v-model="form.${field}"> - <el-radio label="1">璇烽�夋嫨瀛楀吀鐢熸垚</el-radio> - </el-radio-group> - </el-form-item> -#elseif($column.htmlType == "datetime") - <el-form-item label="${comment}" prop="${field}"> - <el-date-picker clearable - v-model="form.${field}" - type="date" - value-format="yyyy-MM-dd" - placeholder="璇烽�夋嫨${comment}"> - </el-date-picker> - </el-form-item> -#elseif($column.htmlType == "textarea") - <el-form-item label="${comment}" prop="${field}"> - <el-input v-model="form.${field}" type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" /> - </el-form-item> -#end -#end -#end -#end -#if($table.sub) - <el-divider content-position="center">${subTable.functionName}淇℃伅</el-divider> - <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd${subClassName}">娣诲姞</el-button> - </el-col> - <el-col :span="1.5"> - <el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDelete${subClassName}">鍒犻櫎</el-button> - </el-col> - </el-row> - <el-table :data="${subclassName}List" :row-class-name="row${subClassName}Index" @selection-change="handle${subClassName}SelectionChange" ref="${subclassName}"> - <el-table-column type="selection" width="50" align="center" /> - <el-table-column label="搴忓彿" align="center" prop="index" width="50"/> -#foreach($column in $subTable.columns) -#set($javaField=$column.javaField) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end -#if($column.pk || $javaField == ${subTableFkclassName}) -#elseif($column.list && $column.htmlType == "input") - <el-table-column label="$comment" prop="${javaField}" width="150"> - <template slot-scope="scope"> - <el-input v-model="scope.row.$javaField" placeholder="璇疯緭鍏�$comment" /> - </template> - </el-table-column> -#elseif($column.list && $column.htmlType == "datetime") - <el-table-column label="$comment" prop="${javaField}" width="240"> - <template slot-scope="scope"> - <el-date-picker clearable v-model="scope.row.$javaField" type="date" value-format="yyyy-MM-dd" placeholder="璇烽�夋嫨$comment" /> - </template> - </el-table-column> -#elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" != $column.dictType) - <el-table-column label="$comment" prop="${javaField}" width="150"> - <template slot-scope="scope"> - <el-select v-model="scope.row.$javaField" placeholder="璇烽�夋嫨$comment"> - <el-option - v-for="dict in dict.type.$column.dictType" - :key="dict.value" - :label="dict.label" - :value="dict.value" - ></el-option> - </el-select> - </template> - </el-table-column> -#elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" == $column.dictType) - <el-table-column label="$comment" prop="${javaField}" width="150"> - <template slot-scope="scope"> - <el-select v-model="scope.row.$javaField" placeholder="璇烽�夋嫨$comment"> - <el-option label="璇烽�夋嫨瀛楀吀鐢熸垚" value="" /> - </el-select> - </template> - </el-table-column> -#end -#end - </el-table> -#end - </el-form> - <div slot="footer" class="dialog-footer"> - <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> - <el-button @click="cancel">鍙� 娑�</el-button> - </div> - </el-dialog> - </div> -</template> - -<script> -import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"; - -export default { - name: "${BusinessName}", -#if(${dicts} != '') - dicts: [${dicts}], -#end - data() { - return { - // 閬僵灞� - loading: true, - // 閫変腑鏁扮粍 - ids: [], -#if($table.sub) - // 瀛愯〃閫変腑鏁版嵁 - checked${subClassName}: [], -#end - // 闈炲崟涓鐢� - single: true, - // 闈炲涓鐢� - multiple: true, - // 鏄剧ず鎼滅储鏉′欢 - showSearch: true, - // 鎬绘潯鏁� - total: 0, - // ${functionName}琛ㄦ牸鏁版嵁 - ${businessName}List: [], -#if($table.sub) - // ${subTable.functionName}琛ㄦ牸鏁版嵁 - ${subclassName}List: [], -#end - // 寮瑰嚭灞傛爣棰� - title: "", - // 鏄惁鏄剧ず寮瑰嚭灞� - open: false, -#foreach ($column in $columns) -#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - // $comment鏃堕棿鑼冨洿 - daterange${AttrName}: [], -#end -#end - // 鏌ヨ鍙傛暟 - queryParams: { - pageNum: 1, - pageSize: 10, -#foreach ($column in $columns) -#if($column.query) - $column.javaField: null#if($foreach.count != $columns.size()),#end -#end -#end - }, - // 琛ㄥ崟鍙傛暟 - form: {}, - // 琛ㄥ崟鏍¢獙 - rules: { -#foreach ($column in $columns) -#if($column.required) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end - $column.javaField: [ - { required: true, message: "$comment涓嶈兘涓虹┖", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end } - ]#if($foreach.count != $columns.size()),#end -#end -#end - } - }; - }, - created() { - this.getList(); - }, - methods: { - /** 鏌ヨ${functionName}鍒楄〃 */ - getList() { - this.loading = true; -#foreach ($column in $columns) -#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") - this.queryParams.params = {}; -#break -#end -#end -#foreach ($column in $columns) -#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - if (null != this.daterange${AttrName} && '' != this.daterange${AttrName}) { - this.queryParams.params["begin${AttrName}"] = this.daterange${AttrName}[0]; - this.queryParams.params["end${AttrName}"] = this.daterange${AttrName}[1]; - } -#end -#end - list${BusinessName}(this.queryParams).then(response => { - this.${businessName}List = response.rows; - this.total = response.total; - this.loading = false; - }); - }, - // 鍙栨秷鎸夐挳 - cancel() { - this.open = false; - this.reset(); - }, - // 琛ㄥ崟閲嶇疆 - reset() { - this.form = { -#foreach ($column in $columns) -#if($column.htmlType == "checkbox") - $column.javaField: []#if($foreach.count != $columns.size()),#end -#else - $column.javaField: null#if($foreach.count != $columns.size()),#end -#end -#end - }; -#if($table.sub) - this.${subclassName}List = []; -#end - this.resetForm("form"); - }, - /** 鎼滅储鎸夐挳鎿嶄綔 */ - handleQuery() { - this.queryParams.pageNum = 1; - this.getList(); - }, - /** 閲嶇疆鎸夐挳鎿嶄綔 */ - resetQuery() { -#foreach ($column in $columns) -#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - this.daterange${AttrName} = []; -#end -#end - this.resetForm("queryForm"); - this.handleQuery(); - }, - // 澶氶�夋閫変腑鏁版嵁 - handleSelectionChange(selection) { - this.ids = selection.map(item => item.${pkColumn.javaField}) - this.single = selection.length!==1 - this.multiple = !selection.length - }, - /** 鏂板鎸夐挳鎿嶄綔 */ - handleAdd() { - this.reset(); - this.open = true; - this.title = "娣诲姞${functionName}"; - }, - /** 淇敼鎸夐挳鎿嶄綔 */ - handleUpdate(row) { - this.reset(); - const ${pkColumn.javaField} = row.${pkColumn.javaField} || this.ids - get${BusinessName}(${pkColumn.javaField}).then(response => { - this.form = response.data; -#foreach ($column in $columns) -#if($column.htmlType == "checkbox") - this.form.$column.javaField = this.form.${column.javaField}.split(","); -#end -#end -#if($table.sub) - this.${subclassName}List = response.data.${subclassName}List; -#end - this.open = true; - this.title = "淇敼${functionName}"; - }); - }, - /** 鎻愪氦鎸夐挳 */ - submitForm() { - this.#[[$]]#refs["form"].validate(valid => { - if (valid) { -#foreach ($column in $columns) -#if($column.htmlType == "checkbox") - this.form.$column.javaField = this.form.${column.javaField}.join(","); -#end -#end -#if($table.sub) - this.form.${subclassName}List = this.${subclassName}List; -#end - if (this.form.${pkColumn.javaField} != null) { - update${BusinessName}(this.form).then(response => { - this.#[[$modal]]#.msgSuccess("淇敼鎴愬姛"); - this.open = false; - this.getList(); - }); - } else { - add${BusinessName}(this.form).then(response => { - this.#[[$modal]]#.msgSuccess("鏂板鎴愬姛"); - this.open = false; - this.getList(); - }); - } - } - }); - }, - /** 鍒犻櫎鎸夐挳鎿嶄綔 */ - handleDelete(row) { - const ${pkColumn.javaField}s = row.${pkColumn.javaField} || this.ids; - this.#[[$modal]]#.confirm('鏄惁纭鍒犻櫎${functionName}缂栧彿涓�"' + ${pkColumn.javaField}s + '"鐨勬暟鎹」锛�').then(function() { - return del${BusinessName}(${pkColumn.javaField}s); - }).then(() => { - this.getList(); - this.#[[$modal]]#.msgSuccess("鍒犻櫎鎴愬姛"); - }).catch(() => {}); - }, -#if($table.sub) - /** ${subTable.functionName}搴忓彿 */ - row${subClassName}Index({ row, rowIndex }) { - row.index = rowIndex + 1; - }, - /** ${subTable.functionName}娣诲姞鎸夐挳鎿嶄綔 */ - handleAdd${subClassName}() { - let obj = {}; -#foreach($column in $subTable.columns) -#if($column.pk || $column.javaField == ${subTableFkclassName}) -#elseif($column.list && "" != $javaField) - obj.$column.javaField = ""; -#end -#end - this.${subclassName}List.push(obj); - }, - /** ${subTable.functionName}鍒犻櫎鎸夐挳鎿嶄綔 */ - handleDelete${subClassName}() { - if (this.checked${subClassName}.length == 0) { - this.#[[$modal]]#.msgError("璇峰厛閫夋嫨瑕佸垹闄ょ殑${subTable.functionName}鏁版嵁"); - } else { - const ${subclassName}List = this.${subclassName}List; - const checked${subClassName} = this.checked${subClassName}; - this.${subclassName}List = ${subclassName}List.filter(function(item) { - return checked${subClassName}.indexOf(item.index) == -1 - }); - } - }, - /** 澶嶉�夋閫変腑鏁版嵁 */ - handle${subClassName}SelectionChange(selection) { - this.checked${subClassName} = selection.map(item => item.index) - }, -#end - /** 瀵煎嚭鎸夐挳鎿嶄綔 */ - handleExport() { - this.download('${moduleName}/${businessName}/export', { - ...this.queryParams - }, `${businessName}_#[[${new Date().getTime()}]]#.xlsx`) - } - } -}; -</script> diff --git a/zhitan-generator/target/classes/vm/vue/v3/index-tree.vue.vm b/zhitan-generator/target/classes/vm/vue/v3/index-tree.vue.vm deleted file mode 100644 index c54d62b..0000000 --- a/zhitan-generator/target/classes/vm/vue/v3/index-tree.vue.vm +++ /dev/null @@ -1,474 +0,0 @@ -<template> - <div class="app-container"> - <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px"> -#foreach($column in $columns) -#if($column.query) -#set($dictType=$column.dictType) -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end -#if($column.htmlType == "input") - <el-form-item label="${comment}" prop="${column.javaField}"> - <el-input - v-model="queryParams.${column.javaField}" - placeholder="璇疯緭鍏�${comment}" - clearable - @keyup.enter="handleQuery" - /> - </el-form-item> -#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType) - <el-form-item label="${comment}" prop="${column.javaField}"> - <el-select v-model="queryParams.${column.javaField}" placeholder="璇烽�夋嫨${comment}" clearable> - <el-option - v-for="dict in ${dictType}" - :key="dict.value" - :label="dict.label" - :value="dict.value" - /> - </el-select> - </el-form-item> -#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && $dictType) - <el-form-item label="${comment}" prop="${column.javaField}"> - <el-select v-model="queryParams.${column.javaField}" placeholder="璇烽�夋嫨${comment}" clearable> - <el-option label="璇烽�夋嫨瀛楀吀鐢熸垚" value="" /> - </el-select> - </el-form-item> -#elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN") - <el-form-item label="${comment}" prop="${column.javaField}"> - <el-date-picker clearable - v-model="queryParams.${column.javaField}" - type="date" - value-format="YYYY-MM-DD" - placeholder="閫夋嫨${comment}"> - </el-date-picker> - </el-form-item> -#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN") - <el-form-item label="${comment}" style="width: 308px"> - <el-date-picker - v-model="daterange${AttrName}" - value-format="YYYY-MM-DD" - type="daterange" - range-separator="-" - start-placeholder="寮�濮嬫棩鏈�" - end-placeholder="缁撴潫鏃ユ湡" - ></el-date-picker> - </el-form-item> -#end -#end -#end - <el-form-item> - <el-button type="primary" icon="Search" @click="handleQuery">鎼滅储</el-button> - <el-button icon="Refresh" @click="resetQuery">閲嶇疆</el-button> - </el-form-item> - </el-form> - - <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button - type="primary" - plain - icon="Plus" - @click="handleAdd" - v-hasPermi="['${moduleName}:${businessName}:add']" - >鏂板</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="info" - plain - icon="Sort" - @click="toggleExpandAll" - >灞曞紑/鎶樺彔</el-button> - </el-col> - <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> - </el-row> - - <el-table - v-if="refreshTable" - v-loading="loading" - :data="${businessName}List" - row-key="${treeCode}" - :default-expand-all="isExpandAll" - :tree-props="{children: 'children', hasChildren: 'hasChildren'}" - > -#foreach($column in $columns) -#set($javaField=$column.javaField) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end -#if($column.pk) -#elseif($column.list && $column.htmlType == "datetime") - <el-table-column label="${comment}" align="center" prop="${javaField}" width="180"> - <template #default="scope"> - <span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}</span> - </template> - </el-table-column> -#elseif($column.list && $column.htmlType == "imageUpload") - <el-table-column label="${comment}" align="center" prop="${javaField}" width="100"> - <template #default="scope"> - <image-preview :src="scope.row.${javaField}" :width="50" :height="50"/> - </template> - </el-table-column> -#elseif($column.list && "" != $column.dictType) - <el-table-column label="${comment}" align="center" prop="${javaField}"> - <template #default="scope"> -#if($column.htmlType == "checkbox") - <dict-tag :options="${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/> -#else - <dict-tag :options="${column.dictType}" :value="scope.row.${javaField}"/> -#end - </template> - </el-table-column> -#elseif($column.list && "" != $javaField) -#if(${foreach.index} == 1) - <el-table-column label="${comment}" prop="${javaField}" /> -#else - <el-table-column label="${comment}" align="center" prop="${javaField}" /> -#end -#end -#end - <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> - <template #default="scope"> - <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${moduleName}:${businessName}:edit']">淇敼</el-button> - <el-button link type="primary" icon="Plus" @click="handleAdd(scope.row)" v-hasPermi="['${moduleName}:${businessName}:add']">鏂板</el-button> - <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${moduleName}:${businessName}:remove']">鍒犻櫎</el-button> - </template> - </el-table-column> - </el-table> - - <!-- 娣诲姞鎴栦慨鏀�${functionName}瀵硅瘽妗� --> - <el-dialog :title="title" v-model="open" width="500px" append-to-body> - <el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="80px"> -#foreach($column in $columns) -#set($field=$column.javaField) -#if($column.insert && !$column.pk) -#if(($column.usableColumn) || (!$column.superColumn)) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end -#set($dictType=$column.dictType) -#if("" != $treeParentCode && $column.javaField == $treeParentCode) - <el-form-item label="${comment}" prop="${treeParentCode}"> - <el-tree-select - v-model="form.${treeParentCode}" - :data="${businessName}Options" - :props="{ value: '${treeCode}', label: '${treeName}', children: 'children' }" - value-key="${treeCode}" - placeholder="璇烽�夋嫨${comment}" - check-strictly - /> - </el-form-item> -#elseif($column.htmlType == "input") - <el-form-item label="${comment}" prop="${field}"> - <el-input v-model="form.${field}" placeholder="璇疯緭鍏�${comment}" /> - </el-form-item> -#elseif($column.htmlType == "imageUpload") - <el-form-item label="${comment}" prop="${field}"> - <image-upload v-model="form.${field}"/> - </el-form-item> -#elseif($column.htmlType == "fileUpload") - <el-form-item label="${comment}" prop="${field}"> - <file-upload v-model="form.${field}"/> - </el-form-item> -#elseif($column.htmlType == "editor") - <el-form-item label="${comment}"> - <editor v-model="form.${field}" :min-height="192"/> - </el-form-item> -#elseif($column.htmlType == "select" && "" != $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-select v-model="form.${field}" placeholder="璇烽�夋嫨${comment}"> - <el-option - v-for="dict in ${dictType}" - :key="dict.value" - :label="dict.label" -#if($column.javaType == "Integer" || $column.javaType == "Long") - :value="parseInt(dict.value)" -#else - :value="dict.value" -#end - ></el-option> - </el-select> - </el-form-item> -#elseif($column.htmlType == "select" && $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-select v-model="form.${field}" placeholder="璇烽�夋嫨${comment}"> - <el-option label="璇烽�夋嫨瀛楀吀鐢熸垚" value="" /> - </el-select> - </el-form-item> -#elseif($column.htmlType == "checkbox" && "" != $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-checkbox-group v-model="form.${field}"> - <el-checkbox - v-for="dict in ${dictType}" - :key="dict.value" - :label="dict.value"> - {{dict.label}} - </el-checkbox> - </el-checkbox-group> - </el-form-item> -#elseif($column.htmlType == "checkbox" && $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-checkbox-group v-model="form.${field}"> - <el-checkbox>璇烽�夋嫨瀛楀吀鐢熸垚</el-checkbox> - </el-checkbox-group> - </el-form-item> -#elseif($column.htmlType == "radio" && "" != $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-radio-group v-model="form.${field}"> - <el-radio - v-for="dict in ${dictType}" - :key="dict.value" -#if($column.javaType == "Integer" || $column.javaType == "Long") - :label="parseInt(dict.value)" -#else - :label="dict.value" -#end - >{{dict.label}}</el-radio> - </el-radio-group> - </el-form-item> -#elseif($column.htmlType == "radio" && $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-radio-group v-model="form.${field}"> - <el-radio label="1">璇烽�夋嫨瀛楀吀鐢熸垚</el-radio> - </el-radio-group> - </el-form-item> -#elseif($column.htmlType == "datetime") - <el-form-item label="${comment}" prop="${field}"> - <el-date-picker clearable - v-model="form.${field}" - type="date" - value-format="YYYY-MM-DD" - placeholder="閫夋嫨${comment}"> - </el-date-picker> - </el-form-item> -#elseif($column.htmlType == "textarea") - <el-form-item label="${comment}" prop="${field}"> - <el-input v-model="form.${field}" type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" /> - </el-form-item> -#end -#end -#end -#end - </el-form> - <template #footer> - <div class="dialog-footer"> - <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> - <el-button @click="cancel">鍙� 娑�</el-button> - </div> - </template> - </el-dialog> - </div> -</template> - -<script setup name="${BusinessName}"> -import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"; - -const { proxy } = getCurrentInstance(); -#if(${dicts} != '') -#set($dictsNoSymbol=$dicts.replace("'", "")) -const { ${dictsNoSymbol} } = proxy.useDict(${dicts}); -#end - -const ${businessName}List = ref([]); -const ${businessName}Options = ref([]); -const open = ref(false); -const loading = ref(true); -const showSearch = ref(true); -const title = ref(""); -const isExpandAll = ref(true); -const refreshTable = ref(true); -#foreach ($column in $columns) -#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) -const daterange${AttrName} = ref([]); -#end -#end - -const data = reactive({ - form: {}, - queryParams: { - #foreach ($column in $columns) -#if($column.query) - $column.javaField: null#if($foreach.count != $columns.size()),#end -#end -#end - }, - rules: { - #foreach ($column in $columns) -#if($column.required) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end - $column.javaField: [ - { required: true, message: "$comment涓嶈兘涓虹┖", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end } - ]#if($foreach.count != $columns.size()),#end -#end -#end - } -}); - -const { queryParams, form, rules } = toRefs(data); - -/** 鏌ヨ${functionName}鍒楄〃 */ -function getList() { - loading.value = true; -#foreach ($column in $columns) -#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") - queryParams.value.params = {}; -#break -#end -#end -#foreach ($column in $columns) -#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - if (null != daterange${AttrName} && '' != daterange${AttrName}) { - queryParams.value.params["begin${AttrName}"] = daterange${AttrName}.value[0]; - queryParams.value.params["end${AttrName}"] = daterange${AttrName}.value[1]; - } -#end -#end - list${BusinessName}(queryParams.value).then(response => { - ${businessName}List.value = proxy.handleTree(response.data, "${treeCode}", "${treeParentCode}"); - loading.value = false; - }); -} - -/** 鏌ヨ${functionName}涓嬫媺鏍戠粨鏋� */ -function getTreeselect() { - list${BusinessName}().then(response => { - ${businessName}Options.value = []; - const data = { ${treeCode}: 0, ${treeName}: '椤剁骇鑺傜偣', children: [] }; - data.children = proxy.handleTree(response.data, "${treeCode}", "${treeParentCode}"); - ${businessName}Options.value.push(data); - }); -} - -// 鍙栨秷鎸夐挳 -function cancel() { - open.value = false; - reset(); -} - -// 琛ㄥ崟閲嶇疆 -function reset() { - form.value = { -#foreach ($column in $columns) -#if($column.htmlType == "checkbox") - $column.javaField: []#if($foreach.count != $columns.size()),#end -#else - $column.javaField: null#if($foreach.count != $columns.size()),#end -#end -#end - }; - proxy.resetForm("${businessName}Ref"); -} - -/** 鎼滅储鎸夐挳鎿嶄綔 */ -function handleQuery() { - getList(); -} - -/** 閲嶇疆鎸夐挳鎿嶄綔 */ -function resetQuery() { -#foreach ($column in $columns) -#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - daterange${AttrName}.value = []; -#end -#end - proxy.resetForm("queryRef"); - handleQuery(); -} - -/** 鏂板鎸夐挳鎿嶄綔 */ -function handleAdd(row) { - reset(); - getTreeselect(); - if (row != null && row.${treeCode}) { - form.value.${treeParentCode} = row.${treeCode}; - } else { - form.value.${treeParentCode} = 0; - } - open.value = true; - title.value = "娣诲姞${functionName}"; -} - -/** 灞曞紑/鎶樺彔鎿嶄綔 */ -function toggleExpandAll() { - refreshTable.value = false; - isExpandAll.value = !isExpandAll.value; - nextTick(() => { - refreshTable.value = true; - }); -} - -/** 淇敼鎸夐挳鎿嶄綔 */ -async function handleUpdate(row) { - reset(); - await getTreeselect(); - if (row != null) { - form.value.${treeParentCode} = row.${treeParentCode}; - } - get${BusinessName}(row.${pkColumn.javaField}).then(response => { - form.value = response.data; -#foreach ($column in $columns) -#if($column.htmlType == "checkbox") - form.value.$column.javaField = form.value.${column.javaField}.split(","); -#end -#end - open.value = true; - title.value = "淇敼${functionName}"; - }); -} - -/** 鎻愪氦鎸夐挳 */ -function submitForm() { - proxy.#[[$]]#refs["${businessName}Ref"].validate(valid => { - if (valid) { -#foreach ($column in $columns) -#if($column.htmlType == "checkbox") - form.value.$column.javaField = form.value.${column.javaField}.join(","); -#end -#end - if (form.value.${pkColumn.javaField} != null) { - update${BusinessName}(form.value).then(response => { - proxy.#[[$modal]]#.msgSuccess("淇敼鎴愬姛"); - open.value = false; - getList(); - }); - } else { - add${BusinessName}(form.value).then(response => { - proxy.#[[$modal]]#.msgSuccess("鏂板鎴愬姛"); - open.value = false; - getList(); - }); - } - } - }); -} - -/** 鍒犻櫎鎸夐挳鎿嶄綔 */ -function handleDelete(row) { - proxy.#[[$modal]]#.confirm('鏄惁纭鍒犻櫎${functionName}缂栧彿涓�"' + row.${pkColumn.javaField} + '"鐨勬暟鎹」锛�').then(function() { - return del${BusinessName}(row.${pkColumn.javaField}); - }).then(() => { - getList(); - proxy.#[[$modal]]#.msgSuccess("鍒犻櫎鎴愬姛"); - }).catch(() => {}); -} - -getList(); -</script> diff --git a/zhitan-generator/target/classes/vm/vue/v3/index.vue.vm b/zhitan-generator/target/classes/vm/vue/v3/index.vue.vm deleted file mode 100644 index 8b25665..0000000 --- a/zhitan-generator/target/classes/vm/vue/v3/index.vue.vm +++ /dev/null @@ -1,590 +0,0 @@ -<template> - <div class="app-container"> - <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px"> -#foreach($column in $columns) -#if($column.query) -#set($dictType=$column.dictType) -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end -#if($column.htmlType == "input") - <el-form-item label="${comment}" prop="${column.javaField}"> - <el-input - v-model="queryParams.${column.javaField}" - placeholder="璇疯緭鍏�${comment}" - clearable - @keyup.enter="handleQuery" - /> - </el-form-item> -#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && "" != $dictType) - <el-form-item label="${comment}" prop="${column.javaField}"> - <el-select v-model="queryParams.${column.javaField}" placeholder="璇烽�夋嫨${comment}" clearable> - <el-option - v-for="dict in ${dictType}" - :key="dict.value" - :label="dict.label" - :value="dict.value" - /> - </el-select> - </el-form-item> -#elseif(($column.htmlType == "select" || $column.htmlType == "radio") && $dictType) - <el-form-item label="${comment}" prop="${column.javaField}"> - <el-select v-model="queryParams.${column.javaField}" placeholder="璇烽�夋嫨${comment}" clearable> - <el-option label="璇烽�夋嫨瀛楀吀鐢熸垚" value="" /> - </el-select> - </el-form-item> -#elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN") - <el-form-item label="${comment}" prop="${column.javaField}"> - <el-date-picker clearable - v-model="queryParams.${column.javaField}" - type="date" - value-format="YYYY-MM-DD" - placeholder="璇烽�夋嫨${comment}"> - </el-date-picker> - </el-form-item> -#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN") - <el-form-item label="${comment}" style="width: 308px"> - <el-date-picker - v-model="daterange${AttrName}" - value-format="YYYY-MM-DD" - type="daterange" - range-separator="-" - start-placeholder="寮�濮嬫棩鏈�" - end-placeholder="缁撴潫鏃ユ湡" - ></el-date-picker> - </el-form-item> -#end -#end -#end - <el-form-item> - <el-button type="primary" icon="Search" @click="handleQuery">鎼滅储</el-button> - <el-button icon="Refresh" @click="resetQuery">閲嶇疆</el-button> - </el-form-item> - </el-form> - - <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button - type="primary" - plain - icon="Plus" - @click="handleAdd" - v-hasPermi="['${moduleName}:${businessName}:add']" - >鏂板</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="success" - plain - icon="Edit" - :disabled="single" - @click="handleUpdate" - v-hasPermi="['${moduleName}:${businessName}:edit']" - >淇敼</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="danger" - plain - icon="Delete" - :disabled="multiple" - @click="handleDelete" - v-hasPermi="['${moduleName}:${businessName}:remove']" - >鍒犻櫎</el-button> - </el-col> - <el-col :span="1.5"> - <el-button - type="warning" - plain - icon="Download" - @click="handleExport" - v-hasPermi="['${moduleName}:${businessName}:export']" - >瀵煎嚭</el-button> - </el-col> - <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar> - </el-row> - - <el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange"> - <el-table-column type="selection" width="55" align="center" /> -#foreach($column in $columns) -#set($javaField=$column.javaField) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end -#if($column.pk) - <el-table-column label="${comment}" align="center" prop="${javaField}" /> -#elseif($column.list && $column.htmlType == "datetime") - <el-table-column label="${comment}" align="center" prop="${javaField}" width="180"> - <template #default="scope"> - <span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}</span> - </template> - </el-table-column> -#elseif($column.list && $column.htmlType == "imageUpload") - <el-table-column label="${comment}" align="center" prop="${javaField}" width="100"> - <template #default="scope"> - <image-preview :src="scope.row.${javaField}" :width="50" :height="50"/> - </template> - </el-table-column> -#elseif($column.list && "" != $column.dictType) - <el-table-column label="${comment}" align="center" prop="${javaField}"> - <template #default="scope"> -#if($column.htmlType == "checkbox") - <dict-tag :options="${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/> -#else - <dict-tag :options="${column.dictType}" :value="scope.row.${javaField}"/> -#end - </template> - </el-table-column> -#elseif($column.list && "" != $javaField) - <el-table-column label="${comment}" align="center" prop="${javaField}" /> -#end -#end - <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> - <template #default="scope"> - <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['${moduleName}:${businessName}:edit']">淇敼</el-button> - <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['${moduleName}:${businessName}:remove']">鍒犻櫎</el-button> - </template> - </el-table-column> - </el-table> - - <pagination - v-show="total>0" - :total="total" - v-model:page="queryParams.pageNum" - v-model:limit="queryParams.pageSize" - @pagination="getList" - /> - - <!-- 娣诲姞鎴栦慨鏀�${functionName}瀵硅瘽妗� --> - <el-dialog :title="title" v-model="open" width="500px" append-to-body> - <el-form ref="${businessName}Ref" :model="form" :rules="rules" label-width="80px"> -#foreach($column in $columns) -#set($field=$column.javaField) -#if($column.insert && !$column.pk) -#if(($column.usableColumn) || (!$column.superColumn)) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end -#set($dictType=$column.dictType) -#if($column.htmlType == "input") - <el-form-item label="${comment}" prop="${field}"> - <el-input v-model="form.${field}" placeholder="璇疯緭鍏�${comment}" /> - </el-form-item> -#elseif($column.htmlType == "imageUpload") - <el-form-item label="${comment}" prop="${field}"> - <image-upload v-model="form.${field}"/> - </el-form-item> -#elseif($column.htmlType == "fileUpload") - <el-form-item label="${comment}" prop="${field}"> - <file-upload v-model="form.${field}"/> - </el-form-item> -#elseif($column.htmlType == "editor") - <el-form-item label="${comment}"> - <editor v-model="form.${field}" :min-height="192"/> - </el-form-item> -#elseif($column.htmlType == "select" && "" != $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-select v-model="form.${field}" placeholder="璇烽�夋嫨${comment}"> - <el-option - v-for="dict in ${dictType}" - :key="dict.value" - :label="dict.label" -#if($column.javaType == "Integer" || $column.javaType == "Long") - :value="parseInt(dict.value)" -#else - :value="dict.value" -#end - ></el-option> - </el-select> - </el-form-item> -#elseif($column.htmlType == "select" && $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-select v-model="form.${field}" placeholder="璇烽�夋嫨${comment}"> - <el-option label="璇烽�夋嫨瀛楀吀鐢熸垚" value="" /> - </el-select> - </el-form-item> -#elseif($column.htmlType == "checkbox" && "" != $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-checkbox-group v-model="form.${field}"> - <el-checkbox - v-for="dict in ${dictType}" - :key="dict.value" - :label="dict.value"> - {{dict.label}} - </el-checkbox> - </el-checkbox-group> - </el-form-item> -#elseif($column.htmlType == "checkbox" && $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-checkbox-group v-model="form.${field}"> - <el-checkbox>璇烽�夋嫨瀛楀吀鐢熸垚</el-checkbox> - </el-checkbox-group> - </el-form-item> -#elseif($column.htmlType == "radio" && "" != $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-radio-group v-model="form.${field}"> - <el-radio - v-for="dict in ${dictType}" - :key="dict.value" -#if($column.javaType == "Integer" || $column.javaType == "Long") - :label="parseInt(dict.value)" -#else - :label="dict.value" -#end - >{{dict.label}}</el-radio> - </el-radio-group> - </el-form-item> -#elseif($column.htmlType == "radio" && $dictType) - <el-form-item label="${comment}" prop="${field}"> - <el-radio-group v-model="form.${field}"> - <el-radio label="1">璇烽�夋嫨瀛楀吀鐢熸垚</el-radio> - </el-radio-group> - </el-form-item> -#elseif($column.htmlType == "datetime") - <el-form-item label="${comment}" prop="${field}"> - <el-date-picker clearable - v-model="form.${field}" - type="date" - value-format="YYYY-MM-DD" - placeholder="璇烽�夋嫨${comment}"> - </el-date-picker> - </el-form-item> -#elseif($column.htmlType == "textarea") - <el-form-item label="${comment}" prop="${field}"> - <el-input v-model="form.${field}" type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" /> - </el-form-item> -#end -#end -#end -#end -#if($table.sub) - <el-divider content-position="center">${subTable.functionName}淇℃伅</el-divider> - <el-row :gutter="10" class="mb8"> - <el-col :span="1.5"> - <el-button type="primary" icon="Plus" @click="handleAdd${subClassName}">娣诲姞</el-button> - </el-col> - <el-col :span="1.5"> - <el-button type="danger" icon="Delete" @click="handleDelete${subClassName}">鍒犻櫎</el-button> - </el-col> - </el-row> - <el-table :data="${subclassName}List" :row-class-name="row${subClassName}Index" @selection-change="handle${subClassName}SelectionChange" ref="${subclassName}"> - <el-table-column type="selection" width="50" align="center" /> - <el-table-column label="搴忓彿" align="center" prop="index" width="50"/> -#foreach($column in $subTable.columns) -#set($javaField=$column.javaField) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end -#if($column.pk || $javaField == ${subTableFkclassName}) -#elseif($column.list && $column.htmlType == "input") - <el-table-column label="$comment" prop="${javaField}" width="150"> - <template #default="scope"> - <el-input v-model="scope.row.$javaField" placeholder="璇疯緭鍏�$comment" /> - </template> - </el-table-column> -#elseif($column.list && $column.htmlType == "datetime") - <el-table-column label="$comment" prop="${javaField}" width="240"> - <template #default="scope"> - <el-date-picker clearable - v-model="scope.row.$javaField" - type="date" - value-format="YYYY-MM-DD" - placeholder="璇烽�夋嫨$comment"> - </el-date-picker> - </template> - </el-table-column> -#elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" != $column.dictType) - <el-table-column label="$comment" prop="${javaField}" width="150"> - <template #default="scope"> - <el-select v-model="scope.row.$javaField" placeholder="璇烽�夋嫨$comment"> - <el-option - v-for="dict in $column.dictType" - :key="dict.value" - :label="dict.label" - :value="dict.value" - ></el-option> - </el-select> - </template> - </el-table-column> -#elseif($column.list && ($column.htmlType == "select" || $column.htmlType == "radio") && "" == $column.dictType) - <el-table-column label="$comment" prop="${javaField}" width="150"> - <template #default="scope"> - <el-select v-model="scope.row.$javaField" placeholder="璇烽�夋嫨$comment"> - <el-option label="璇烽�夋嫨瀛楀吀鐢熸垚" value="" /> - </el-select> - </template> - </el-table-column> -#end -#end - </el-table> -#end - </el-form> - <template #footer> - <div class="dialog-footer"> - <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> - <el-button @click="cancel">鍙� 娑�</el-button> - </div> - </template> - </el-dialog> - </div> -</template> - -<script setup name="${BusinessName}"> -import { list${BusinessName}, get${BusinessName}, del${BusinessName}, add${BusinessName}, update${BusinessName} } from "@/api/${moduleName}/${businessName}"; - -const { proxy } = getCurrentInstance(); -#if(${dicts} != '') -#set($dictsNoSymbol=$dicts.replace("'", "")) -const { ${dictsNoSymbol} } = proxy.useDict(${dicts}); -#end - -const ${businessName}List = ref([]); -#if($table.sub) -const ${subclassName}List = ref([]); -#end -const open = ref(false); -const loading = ref(true); -const showSearch = ref(true); -const ids = ref([]); -#if($table.sub) -const checked${subClassName} = ref([]); -#end -const single = ref(true); -const multiple = ref(true); -const total = ref(0); -const title = ref(""); -#foreach ($column in $columns) -#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) -const daterange${AttrName} = ref([]); -#end -#end - -const data = reactive({ - form: {}, - queryParams: { - pageNum: 1, - pageSize: 10, - #foreach ($column in $columns) -#if($column.query) - $column.javaField: null#if($foreach.count != $columns.size()),#end -#end -#end - }, - rules: { - #foreach ($column in $columns) -#if($column.required) -#set($parentheseIndex=$column.columnComment.indexOf("锛�")) -#if($parentheseIndex != -1) -#set($comment=$column.columnComment.substring(0, $parentheseIndex)) -#else -#set($comment=$column.columnComment) -#end - $column.javaField: [ - { required: true, message: "$comment涓嶈兘涓虹┖", trigger: #if($column.htmlType == "select" || $column.htmlType == "radio")"change"#else"blur"#end } - ]#if($foreach.count != $columns.size()),#end -#end -#end - } -}); - -const { queryParams, form, rules } = toRefs(data); - -/** 鏌ヨ${functionName}鍒楄〃 */ -function getList() { - loading.value = true; -#foreach ($column in $columns) -#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") - queryParams.value.params = {}; -#break -#end -#end -#foreach ($column in $columns) -#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - if (null != daterange${AttrName} && '' != daterange${AttrName}) { - queryParams.value.params["begin${AttrName}"] = daterange${AttrName}.value[0]; - queryParams.value.params["end${AttrName}"] = daterange${AttrName}.value[1]; - } -#end -#end - list${BusinessName}(queryParams.value).then(response => { - ${businessName}List.value = response.rows; - total.value = response.total; - loading.value = false; - }); -} - -// 鍙栨秷鎸夐挳 -function cancel() { - open.value = false; - reset(); -} - -// 琛ㄥ崟閲嶇疆 -function reset() { - form.value = { -#foreach ($column in $columns) -#if($column.htmlType == "checkbox") - $column.javaField: []#if($foreach.count != $columns.size()),#end -#else - $column.javaField: null#if($foreach.count != $columns.size()),#end -#end -#end - }; -#if($table.sub) - ${subclassName}List.value = []; -#end - proxy.resetForm("${businessName}Ref"); -} - -/** 鎼滅储鎸夐挳鎿嶄綔 */ -function handleQuery() { - queryParams.value.pageNum = 1; - getList(); -} - -/** 閲嶇疆鎸夐挳鎿嶄綔 */ -function resetQuery() { -#foreach ($column in $columns) -#if($column.htmlType == "datetime" && $column.queryType == "BETWEEN") -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) - daterange${AttrName}.value = []; -#end -#end - proxy.resetForm("queryRef"); - handleQuery(); -} - -// 澶氶�夋閫変腑鏁版嵁 -function handleSelectionChange(selection) { - ids.value = selection.map(item => item.${pkColumn.javaField}); - single.value = selection.length != 1; - multiple.value = !selection.length; -} - -/** 鏂板鎸夐挳鎿嶄綔 */ -function handleAdd() { - reset(); - open.value = true; - title.value = "娣诲姞${functionName}"; -} - -/** 淇敼鎸夐挳鎿嶄綔 */ -function handleUpdate(row) { - reset(); - const _${pkColumn.javaField} = row.${pkColumn.javaField} || ids.value - get${BusinessName}(_${pkColumn.javaField}).then(response => { - form.value = response.data; -#foreach ($column in $columns) -#if($column.htmlType == "checkbox") - form.value.$column.javaField = form.value.${column.javaField}.split(","); -#end -#end -#if($table.sub) - ${subclassName}List.value = response.data.${subclassName}List; -#end - open.value = true; - title.value = "淇敼${functionName}"; - }); -} - -/** 鎻愪氦鎸夐挳 */ -function submitForm() { - proxy.#[[$]]#refs["${businessName}Ref"].validate(valid => { - if (valid) { -#foreach ($column in $columns) -#if($column.htmlType == "checkbox") - form.value.$column.javaField = form.value.${column.javaField}.join(","); -#end -#end -#if($table.sub) - form.value.${subclassName}List = ${subclassName}List.value; -#end - if (form.value.${pkColumn.javaField} != null) { - update${BusinessName}(form.value).then(response => { - proxy.#[[$modal]]#.msgSuccess("淇敼鎴愬姛"); - open.value = false; - getList(); - }); - } else { - add${BusinessName}(form.value).then(response => { - proxy.#[[$modal]]#.msgSuccess("鏂板鎴愬姛"); - open.value = false; - getList(); - }); - } - } - }); -} - -/** 鍒犻櫎鎸夐挳鎿嶄綔 */ -function handleDelete(row) { - const _${pkColumn.javaField}s = row.${pkColumn.javaField} || ids.value; - proxy.#[[$modal]]#.confirm('鏄惁纭鍒犻櫎${functionName}缂栧彿涓�"' + _${pkColumn.javaField}s + '"鐨勬暟鎹」锛�').then(function() { - return del${BusinessName}(_${pkColumn.javaField}s); - }).then(() => { - getList(); - proxy.#[[$modal]]#.msgSuccess("鍒犻櫎鎴愬姛"); - }).catch(() => {}); -} - -#if($table.sub) -/** ${subTable.functionName}搴忓彿 */ -function row${subClassName}Index({ row, rowIndex }) { - row.index = rowIndex + 1; -} - -/** ${subTable.functionName}娣诲姞鎸夐挳鎿嶄綔 */ -function handleAdd${subClassName}() { - let obj = {}; -#foreach($column in $subTable.columns) -#if($column.pk || $column.javaField == ${subTableFkclassName}) -#elseif($column.list && "" != $javaField) - obj.$column.javaField = ""; -#end -#end - ${subclassName}List.value.push(obj); -} - -/** ${subTable.functionName}鍒犻櫎鎸夐挳鎿嶄綔 */ -function handleDelete${subClassName}() { - if (checked${subClassName}.value.length == 0) { - proxy.#[[$modal]]#.msgError("璇峰厛閫夋嫨瑕佸垹闄ょ殑${subTable.functionName}鏁版嵁"); - } else { - const ${subclassName}s = ${subclassName}List.value; - const checked${subClassName}s = checked${subClassName}.value; - ${subclassName}List.value = ${subclassName}s.filter(function(item) { - return checked${subClassName}s.indexOf(item.index) == -1 - }); - } -} - -/** 澶嶉�夋閫変腑鏁版嵁 */ -function handle${subClassName}SelectionChange(selection) { - checked${subClassName}.value = selection.map(item => item.index) -} - -#end -/** 瀵煎嚭鎸夐挳鎿嶄綔 */ -function handleExport() { - proxy.download('${moduleName}/${businessName}/export', { - ...queryParams.value - }, `${businessName}_#[[${new Date().getTime()}]]#.xlsx`) -} - -getList(); -</script> diff --git a/zhitan-generator/target/classes/vm/xml/mapper.xml.vm b/zhitan-generator/target/classes/vm/xml/mapper.xml.vm deleted file mode 100644 index 6559b8a..0000000 --- a/zhitan-generator/target/classes/vm/xml/mapper.xml.vm +++ /dev/null @@ -1,126 +0,0 @@ -<?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="${packageName}.mapper.${ClassName}Mapper"> - - <resultMap type="${ClassName}" id="${ClassName}Result"> -#foreach ($column in $columns) - <result property="${column.javaField}" column="${column.columnName}" /> -#end - </resultMap> -#if($table.sub) - - <resultMap id="${ClassName}${subClassName}Result" type="${ClassName}" extends="${ClassName}Result"> - <collection property="${subclassName}List" notNullColumn="sub_${subTable.pkColumn.columnName}" javaType="java.util.List" resultMap="${subClassName}Result" /> - </resultMap> - - <resultMap type="${subClassName}" id="${subClassName}Result"> -#foreach ($column in $subTable.columns) - <result property="${column.javaField}" column="sub_${column.columnName}" /> -#end - </resultMap> -#end - - <sql id="select${ClassName}Vo"> - select#foreach($column in $columns) $column.columnName#if($foreach.count != $columns.size()),#end#end from ${tableName} - </sql> - - <select id="select${ClassName}List" parameterType="${ClassName}" resultMap="${ClassName}Result"> - <include refid="select${ClassName}Vo"/> - <where> -#foreach($column in $columns) -#set($queryType=$column.queryType) -#set($javaField=$column.javaField) -#set($javaType=$column.javaType) -#set($columnName=$column.columnName) -#set($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)}) -#if($column.query) -#if($column.queryType == "EQ") - <if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName = #{$javaField}</if> -#elseif($queryType == "NE") - <if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName != #{$javaField}</if> -#elseif($queryType == "GT") - <if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName > #{$javaField}</if> -#elseif($queryType == "GTE") - <if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName >= #{$javaField}</if> -#elseif($queryType == "LT") - <if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName < #{$javaField}</if> -#elseif($queryType == "LTE") - <if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName <= #{$javaField}</if> -#elseif($queryType == "LIKE") - <if test="$javaField != null #if($javaType == 'String' ) and $javaField.trim() != ''#end"> and $columnName like concat('%', #{$javaField}, '%')</if> -#elseif($queryType == "BETWEEN") - <if test="params.begin$AttrName != null and params.begin$AttrName != '' and params.end$AttrName != null and params.end$AttrName != ''"> and $columnName between #{params.begin$AttrName} and #{params.end$AttrName}</if> -#end -#end -#end - </where> - </select> - - <select id="select${ClassName}By${pkColumn.capJavaField}" parameterType="${pkColumn.javaType}" resultMap="#if($table.sub)${ClassName}${subClassName}Result#else${ClassName}Result#end"> - <include refid="select${ClassName}Vo"/> - where ${pkColumn.columnName} = #{${pkColumn.javaField}} - </select> - - <insert id="insert${ClassName}" parameterType="${ClassName}"#if($pkColumn.increment) useGeneratedKeys="true" keyProperty="$pkColumn.javaField"#end> - insert into ${tableName} - <trim prefix="(" suffix=")" suffixOverrides=","> -#foreach($column in $columns) -#if($column.columnName != $pkColumn.columnName || !$pkColumn.increment) - <if test="$column.javaField != null#if($column.javaType == 'String' && $column.required) and $column.javaField != ''#end">$column.columnName,</if> -#end -#end - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> -#foreach($column in $columns) -#if($column.columnName != $pkColumn.columnName || !$pkColumn.increment) - <if test="$column.javaField != null#if($column.javaType == 'String' && $column.required) and $column.javaField != ''#end">#{$column.javaField},</if> -#end -#end - </trim> - </insert> - - <update id="update${ClassName}" parameterType="${ClassName}"> - update ${tableName} - <trim prefix="SET" suffixOverrides=","> -#foreach($column in $columns) -#if($column.columnName != $pkColumn.columnName) - <if test="$column.javaField != null#if($column.javaType == 'String' && $column.required) and $column.javaField != ''#end">$column.columnName = #{$column.javaField},</if> -#end -#end - </trim> - where ${pkColumn.columnName} = #{${pkColumn.javaField}} - </update> - - <delete id="delete${ClassName}By${pkColumn.capJavaField}" parameterType="${pkColumn.javaType}"> - delete from ${tableName} where ${pkColumn.columnName} = #{${pkColumn.javaField}} - </delete> - - <delete id="delete${ClassName}By${pkColumn.capJavaField}s" parameterType="String"> - delete from ${tableName} where ${pkColumn.columnName} in - <foreach item="${pkColumn.javaField}" collection="array" open="(" separator="," close=")"> - #{${pkColumn.javaField}} - </foreach> - </delete> -#if($table.sub) - - <delete id="delete${subClassName}By${subTableFkClassName}s" parameterType="String"> - delete from ${subTableName} where ${subTableFkName} in - <foreach item="${subTableFkclassName}" collection="array" open="(" separator="," close=")"> - #{${subTableFkclassName}} - </foreach> - </delete> - - <delete id="delete${subClassName}By${subTableFkClassName}" parameterType="${pkColumn.javaType}"> - delete from ${subTableName} where ${subTableFkName} = #{${subTableFkclassName}} - </delete> - - <insert id="batch${subClassName}"> - insert into ${subTableName}(#foreach($column in $subTable.columns) $column.columnName#if($foreach.count != $subTable.columns.size()),#end#end) values - <foreach item="item" index="index" collection="list" separator=","> - (#foreach($column in $subTable.columns) #{item.$column.javaField}#if($foreach.count != $subTable.columns.size()),#end#end) - </foreach> - </insert> -#end -</mapper> \ No newline at end of file diff --git a/zhitan-quartz/target/classes/mapper/quartz/SysJobLogMapper.xml b/zhitan-quartz/target/classes/mapper/quartz/SysJobLogMapper.xml deleted file mode 100644 index 7c1192b..0000000 --- a/zhitan-quartz/target/classes/mapper/quartz/SysJobLogMapper.xml +++ /dev/null @@ -1,94 +0,0 @@ -<?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.zhitan.quartz.mapper.SysJobLogMapper"> - - <resultMap type="SysJobLog" id="SysJobLogResult"> - <id property="jobLogId" column="job_log_id" /> - <result property="jobName" column="job_name" /> - <result property="jobGroup" column="job_group" /> - <result property="invokeTarget" column="invoke_target" /> - <result property="jobMessage" column="job_message" /> - <result property="status" column="status" /> - <result property="exceptionInfo" column="exception_info" /> - <result property="createTime" column="create_time" /> - </resultMap> - - <sql id="selectJobLogVo"> - select job_log_id, job_name, job_group, invoke_target, job_message, status, exception_info, create_time - from sys_job_log - </sql> - - <select id="selectJobLogList" parameterType="SysJobLog" resultMap="SysJobLogResult"> - <include refid="selectJobLogVo"/> - <where> - <if test="jobName != null and jobName != ''"> - AND job_name like concat('%', #{jobName}, '%') - </if> - <if test="jobGroup != null and jobGroup != ''"> - AND job_group = #{jobGroup} - </if> - <if test="status != null and status != ''"> - AND status = #{status} - </if> - <if test="invokeTarget != null and invokeTarget != ''"> - AND invoke_target like concat('%', #{invokeTarget}, '%') - </if> - <if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� --> - and date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') - </if> - <if test="params.endTime != null and params.endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� --> - and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') - </if> - </where> - order by create_time desc - </select> - - <select id="selectJobLogAll" resultMap="SysJobLogResult"> - <include refid="selectJobLogVo"/> - </select> - - <select id="selectJobLogById" parameterType="Long" resultMap="SysJobLogResult"> - <include refid="selectJobLogVo"/> - where job_log_id = #{jobLogId} - </select> - - <delete id="deleteJobLogById" parameterType="Long"> - delete from sys_job_log where job_log_id = #{jobLogId} - </delete> - - <delete id="deleteJobLogByIds" parameterType="Long"> - delete from sys_job_log where job_log_id in - <foreach collection="array" item="jobLogId" open="(" separator="," close=")"> - #{jobLogId} - </foreach> - </delete> - - <update id="cleanJobLog"> - truncate table sys_job_log - </update> - - <insert id="insertJobLog" parameterType="SysJobLog"> - insert into sys_job_log( - <if test="jobLogId != null and jobLogId != 0">job_log_id,</if> - <if test="jobName != null and jobName != ''">job_name,</if> - <if test="jobGroup != null and jobGroup != ''">job_group,</if> - <if test="invokeTarget != null and invokeTarget != ''">invoke_target,</if> - <if test="jobMessage != null and jobMessage != ''">job_message,</if> - <if test="status != null and status != ''">status,</if> - <if test="exceptionInfo != null and exceptionInfo != ''">exception_info,</if> - create_time - )values( - <if test="jobLogId != null and jobLogId != 0">#{jobLogId},</if> - <if test="jobName != null and jobName != ''">#{jobName},</if> - <if test="jobGroup != null and jobGroup != ''">#{jobGroup},</if> - <if test="invokeTarget != null and invokeTarget != ''">#{invokeTarget},</if> - <if test="jobMessage != null and jobMessage != ''">#{jobMessage},</if> - <if test="status != null and status != ''">#{status},</if> - <if test="exceptionInfo != null and exceptionInfo != ''">#{exceptionInfo},</if> - now() - ) - </insert> - -</mapper> \ No newline at end of file diff --git a/zhitan-quartz/target/classes/mapper/quartz/SysJobMapper.xml b/zhitan-quartz/target/classes/mapper/quartz/SysJobMapper.xml deleted file mode 100644 index 2dfdd8d..0000000 --- a/zhitan-quartz/target/classes/mapper/quartz/SysJobMapper.xml +++ /dev/null @@ -1,111 +0,0 @@ -<?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.zhitan.quartz.mapper.SysJobMapper"> - - <resultMap type="SysJob" id="SysJobResult"> - <id property="jobId" column="job_id" /> - <result property="jobName" column="job_name" /> - <result property="jobGroup" column="job_group" /> - <result property="invokeTarget" column="invoke_target" /> - <result property="cronExpression" column="cron_expression" /> - <result property="misfirePolicy" column="misfire_policy" /> - <result property="concurrent" column="concurrent" /> - <result property="status" column="status" /> - <result property="createBy" column="create_by" /> - <result property="createTime" column="create_time" /> - <result property="updateBy" column="update_by" /> - <result property="updateTime" column="update_time" /> - <result property="remark" column="remark" /> - </resultMap> - - <sql id="selectJobVo"> - select job_id, job_name, job_group, invoke_target, cron_expression, misfire_policy, concurrent, status, create_by, create_time, remark - from sys_job - </sql> - - <select id="selectJobList" parameterType="SysJob" resultMap="SysJobResult"> - <include refid="selectJobVo"/> - <where> - <if test="jobName != null and jobName != ''"> - AND job_name like concat('%', #{jobName}, '%') - </if> - <if test="jobGroup != null and jobGroup != ''"> - AND job_group = #{jobGroup} - </if> - <if test="status != null and status != ''"> - AND status = #{status} - </if> - <if test="invokeTarget != null and invokeTarget != ''"> - AND invoke_target like concat('%', #{invokeTarget}, '%') - </if> - </where> - </select> - - <select id="selectJobAll" resultMap="SysJobResult"> - <include refid="selectJobVo"/> - </select> - - <select id="selectJobById" parameterType="Long" resultMap="SysJobResult"> - <include refid="selectJobVo"/> - where job_id = #{jobId} - </select> - - <delete id="deleteJobById" parameterType="Long"> - delete from sys_job where job_id = #{jobId} - </delete> - - <delete id="deleteJobByIds" parameterType="Long"> - delete from sys_job where job_id in - <foreach collection="array" item="jobId" open="(" separator="," close=")"> - #{jobId} - </foreach> - </delete> - - <update id="updateJob" parameterType="SysJob"> - update sys_job - <set> - <if test="jobName != null and jobName != ''">job_name = #{jobName},</if> - <if test="jobGroup != null and jobGroup != ''">job_group = #{jobGroup},</if> - <if test="invokeTarget != null and invokeTarget != ''">invoke_target = #{invokeTarget},</if> - <if test="cronExpression != null and cronExpression != ''">cron_expression = #{cronExpression},</if> - <if test="misfirePolicy != null and misfirePolicy != ''">misfire_policy = #{misfirePolicy},</if> - <if test="concurrent != null and concurrent != ''">concurrent = #{concurrent},</if> - <if test="status !=null">status = #{status},</if> - <if test="remark != null and remark != ''">remark = #{remark},</if> - <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> - update_time = now() - </set> - where job_id = #{jobId} - </update> - - <insert id="insertJob" parameterType="SysJob" useGeneratedKeys="true" keyProperty="jobId"> - insert into sys_job( - <if test="jobId != null and jobId != 0">job_id,</if> - <if test="jobName != null and jobName != ''">job_name,</if> - <if test="jobGroup != null and jobGroup != ''">job_group,</if> - <if test="invokeTarget != null and invokeTarget != ''">invoke_target,</if> - <if test="cronExpression != null and cronExpression != ''">cron_expression,</if> - <if test="misfirePolicy != null and misfirePolicy != ''">misfire_policy,</if> - <if test="concurrent != null and concurrent != ''">concurrent,</if> - <if test="status != null and status != ''">status,</if> - <if test="remark != null and remark != ''">remark,</if> - <if test="createBy != null and createBy != ''">create_by,</if> - create_time - )values( - <if test="jobId != null and jobId != 0">#{jobId},</if> - <if test="jobName != null and jobName != ''">#{jobName},</if> - <if test="jobGroup != null and jobGroup != ''">#{jobGroup},</if> - <if test="invokeTarget != null and invokeTarget != ''">#{invokeTarget},</if> - <if test="cronExpression != null and cronExpression != ''">#{cronExpression},</if> - <if test="misfirePolicy != null and misfirePolicy != ''">#{misfirePolicy},</if> - <if test="concurrent != null and concurrent != ''">#{concurrent},</if> - <if test="status != null and status != ''">#{status},</if> - <if test="remark != null and remark != ''">#{remark},</if> - <if test="createBy != null and createBy != ''">#{createBy},</if> - now() - ) - </insert> - -</mapper> \ No newline at end of file diff --git a/zhitan-system/target/classes/mapper/alarm/AlarmItemMapper.xml b/zhitan-system/target/classes/mapper/alarm/AlarmItemMapper.xml deleted file mode 100644 index 9ff1f59..0000000 --- a/zhitan-system/target/classes/mapper/alarm/AlarmItemMapper.xml +++ /dev/null @@ -1,226 +0,0 @@ -<?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.zhitan.alarm.mapper.AlarmItemMapper"> - - <resultMap type="AlarmItem" id="AlarmItemResult"> - <result property="id" column="id"/> - <result property="createTime" column="create_time"/> - <result property="createBy" column="create_by"/> - <result property="updateTime" column="update_time"/> - <result property="updateBy" column="update_by"/> - <result property="dwid" column="dwid"/> - <result property="startStop" column="start_stop"/> - <result property="timeSlot" column="time_slot"/> - <result property="limitType" column="limit_type"/> - <result property="limitVal" column="limit_val"/> - <result property="alarmLevel" column="alarm_level"/> - <result property="nodeId" column="node_id"/> - <result property="indexCode" column="index_code"/> - <result property="alarmCode" column="alarm_code"/> - </resultMap> - - <sql id="selectAlarmItemVo"> - select id, - create_time, - create_by, - update_time, - update_by, - dwid, - start_stop, - time_slot, - limit_type, - limit_val, - alarm_level, - node_id - from alarm_item - </sql> - - <select id="selectAlarmItemList" parameterType="AlarmItem" resultMap="AlarmItemResult"> - <include refid="selectAlarmItemVo"/> - <where> - </where> - </select> - - <select id="selectAlarmItemById" parameterType="String" resultMap="AlarmItemResult"> - <include refid="selectAlarmItemVo"/> - where id = #{id} - </select> - - <insert id="insertAlarmItem" parameterType="AlarmItem"> - insert into alarm_item - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="id != null and id != ''">id,</if> - <if test="createTime != null ">create_time,</if> - <if test="createBy != null and createBy != ''">create_by,</if> - <if test="updateTime != null ">update_time,</if> - <if test="updateBy != null and updateBy != ''">update_by,</if> - <if test="dwid != null and dwid != ''">dwid,</if> - <if test="startStop != null and startStop != ''">start_stop,</if> - <if test="timeSlot != null and timeSlot != ''">time_slot,</if> - <if test="limit_type != null and limit_type != ''">limit_type,</if> - <if test="limitVal != null and limitVal != ''">limit_val,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="id != null and id != ''">#{id},</if> - <if test="createTime != null ">#{createTime},</if> - <if test="createBy != null and createBy != ''">#{createBy},</if> - <if test="updateTime != null ">#{updateTime},</if> - <if test="updateBy != null and updateBy != ''">#{updateBy},</if> - <if test="dwid != null and dwid != ''">#{dwid},</if> - <if test="startStop != null and startStop != ''">#{startStop},</if> - <if test="timeSlot != null and timeSlot != ''">#{timeSlot},</if> - <if test="limitType != null and limitType != ''">#{limitType},</if> - <if test="limitVal != null and limitVal != ''">#{limitVal},</if> - </trim> - </insert> - - <update id="updateAlarmItem" parameterType="AlarmItem"> - update alarm_item - <trim prefix="SET" suffixOverrides=","> - <if test="createTime != null ">create_time = #{createTime},</if> - <if test="createBy != null and createBy != ''">create_by = #{createBy},</if> - <if test="updateTime != null ">update_time = #{updateTime},</if> - <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> - <if test="dwid != null and dwid != ''">dwid = #{dwid},</if> - <if test="startStop != null and startStop != ''">start_stop = #{startStop},</if> - <if test="timeSlot != null and timeSlot != ''">time_slot = #{timeSlot},</if> - <if test="limitType != null and limitType != ''">limit = #{limitType},</if> - <if test="limitVal != null and limitVal != ''">limit_val = #{limitVal},</if> - </trim> - where id = #{id} - </update> - - <delete id="deleteAlarmItemById" parameterType="String"> - delete - from alarm_item - where id = #{id} - </delete> - - <delete id="deleteAlarmItemByIds" parameterType="String"> - delete from alarm_item where id in - <foreach item="id" collection="array" open="(" separator="," close=")"> - #{id} - </foreach> - </delete> - - <select id="selectAlarmItemtingById" parameterType="String" resultMap="AlarmItemResult"> - <include refid="selectAlarmItemVo"/> - where dwid = #{id} - </select> - - <update id="updateStartStop"> - update alarm_item SET start_stop=#{flag},update_time=now(),update_by=#{update_by} where dwid in - <foreach item="id" collection="ids" open="(" separator="," close=")"> - #{id} - </foreach> - </update> - <select id="getStartStop" resultType="String"> - select DISTINCT start_stop - from alarm_item - where dwid = #{indexid}; - </select> - - <update id="updateLimitVal"> - delete from alarm_item where dwid = #{id}; - <foreach collection="data" item="item" index="index" separator=";"> - insert into alarm_item - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="id != null and id != ''">id,</if> - <if test="item.indexId != null and item.indexId != ''">dwid,</if> - <if test="item.state != null and item.state != ''">start_stop,</if> - <if test="item.timeSlotVal != null and item.timeSlotVal != ''">time_slot,</if> - <if test="item.limitTypeVal != null and item.limitTypeVal != ''">limit_type,</if> - <if test="item.limitVal != null and item.limitVal != ''">limit_val,</if> - <if test="item.alarmLevel != null and item.alarmLevel != ''">alarm_level,</if> - <if test="item.nodeId != null and item.nodeId != ''">node_id,</if> - <if test="id != null and id != ''">update_time,</if> - <if test="id != null and id != ''">create_time,</if> - <if test="id != null and id != ''">update_by,</if> - <if test="id != null and id != ''">create_by,</if> - <if test="id != null and id != ''">alarm_code,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="id != null and id != ''">#{item.id},</if> - <if test="item.indexId != null and item.indexId != ''">#{item.indexId},</if> - <if test="item.state != null and item.state != ''">#{item.state},</if> - <if test="item.timeSlotVal != null and item.timeSlotVal != ''">#{item.timeSlotVal},</if> - <if test="item.limitTypeVal != null and item.limitTypeVal != ''">#{item.limitTypeVal},</if> - <if test="item.limitVal != null and item.limitVal != ''">#{item.limitVal},</if> - <if test="item.alarmLevel != null and item.alarmLevel != ''">#{item.alarmLevel},</if> - <if test="item.nodeId != null and item.nodeId != ''">#{item.nodeId},</if> - <if test="id != null and id != ''">now(),</if> - <if test="id != null and id != ''">now(),</if> - <if test="id != null and id != ''">#{username},</if> - <if test="id != null and id != ''">#{username},</if> - <if test="id != null and id != ''">#{item.alarmCode},</if> - </trim> - </foreach> - </update> -<!-- <insert id="updateLimitValNoDel">--> -<!-- <foreach collection="data" item="item" index="index" separator=";">--> -<!-- insert into alarm_item--> -<!-- <trim prefix="(" suffix=")" suffixOverrides=",">--> -<!-- <if test="id != null and id != ''">id,</if>--> -<!-- <if test="item.indexId != null and item.indexId != ''">dwid,</if>--> -<!-- <if test="item.state != null and item.state != ''">start_stop,</if>--> -<!-- <if test="item.timeSlotVal != null and item.timeSlotVal != ''">time_slot,</if>--> -<!-- <if test="item.limitTypeVal != null and item.limitTypeVal != ''">limit_type,</if>--> -<!-- <if test="item.limitVal != null and item.limitVal != ''">limit_val,</if>--> -<!-- <if test="item.alarmLevel != null and item.alarmLevel != ''">alarm_level,</if>--> -<!-- <if test="item.nodeId != null and item.nodeId != ''">node_id,</if>--> -<!-- <if test="id != null and id != ''">update_time,</if>--> -<!-- <if test="id != null and id != ''">create_time,</if>--> -<!-- <if test="id != null and id != ''">update_by,</if>--> -<!-- <if test="id != null and id != ''">create_by,</if>--> -<!-- <if test="id != null and id != ''">alarm_code,</if>--> -<!-- </trim>--> -<!-- <trim prefix="values (" suffix=")" suffixOverrides=",">--> -<!-- <if test="id != null and id != ''">#{item.id},</if>--> -<!-- <if test="item.indexId != null and item.indexId != ''">#{item.indexId},</if>--> -<!-- <if test="item.state != null and item.state != ''">#{item.state},</if>--> -<!-- <if test="item.timeSlotVal != null and item.timeSlotVal != ''">#{item.timeSlotVal},</if>--> -<!-- <if test="item.limitTypeVal != null and item.limitTypeVal != ''">#{item.limitTypeVal},</if>--> -<!-- <if test="item.limitVal != null and item.limitVal != ''">#{item.limitVal},</if>--> -<!-- <if test="item.alarmLevel != null and item.alarmLevel != ''">#{item.alarmLevel},</if>--> -<!-- <if test="item.nodeId != null and item.nodeId != ''">#{item.nodeId},</if>--> -<!-- <if test="id != null and id != ''">now(),</if>--> -<!-- <if test="id != null and id != ''">now(),</if>--> -<!-- <if test="id != null and id != ''">#{username},</if>--> -<!-- <if test="id != null and id != ''">#{username},</if>--> -<!-- <if test="id != null and id != ''">#{item.alarm_code},</if>--> -<!-- </trim>--> -<!-- </foreach>--> -<!-- </insert>--> - <insert id="updateLimitValNoDel"> - insert into alarm_item (id, create_time, create_by, update_time, update_by, dwid, start_stop, time_slot, - limit_type, limit_val, alarm_level, node_id, alarm_code) - values - <foreach collection="data" item="item" index="index" separator=","> - (#{item.id},now(),#{username},now(),#{username},#{item.indexId},#{item.state},#{item.timeSlotVal}, - #{item.limitTypeVal},#{item.limitVal},#{item.alarmLevel},#{item.nodeId},#{item.alarmCode}) - </foreach> - </insert> - <select id="selectCountById" resultType="int"> - select count(id) - from alarm_item - where dwid = #{id}; - </select> - <delete id="deleteAllLimitVal"> - delete - from alarm_item - where dwid = #{id}; - </delete> - <select id="getSettingCount" resultType="int"> - select count(id) - from alarm_item - where dwid = #{id}; - </select> - <select id="getAllAlarmItem" resultMap="AlarmItemResult"> - select ai.*, ei.code as index_code - from alarm_item ai - left join energy_index ei on ai.dwid = ei.index_id - where start_stop = '1'; - </select> -</mapper> diff --git a/zhitan-system/target/classes/mapper/alarm/AlarmLimitTypeMapper.xml b/zhitan-system/target/classes/mapper/alarm/AlarmLimitTypeMapper.xml deleted file mode 100644 index 42f3d6e..0000000 --- a/zhitan-system/target/classes/mapper/alarm/AlarmLimitTypeMapper.xml +++ /dev/null @@ -1,92 +0,0 @@ -<?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.zhitan.alarm.mapper.AlarmLimitTypeMapper"> - - <resultMap type="LimitType" id="LimitTypeResult"> - <result property="id" column="id"/> - <result property="limitName" column="limit_name"/> - <result property="limitCode" column="limit_code"/> - <result property="colorNumber" column="color_number"/> - <result property="comparatorOperator" column="comparator_operator"/> - <result property="createTime" column="create_time"/> - <result property="createBy" column="create_by"/> - <result property="updateTime" column="update_time"/> - <result property="updateBy" column="update_by" /> - <result property="alarmType" column="alarm_type" /> - </resultMap> - - <sql id="selectLimitTypeVo"> - select id, limit_name, limit_code, color_number,comparator_operator,alarm_type,create_time, create_by, update_time, update_by from limit_type - </sql> - - <select id="selectLimitTypeList" parameterType="LimitType" resultMap="LimitTypeResult"> - <include refid="selectLimitTypeVo"/> - <where> - <if test="limitName != null and limitName != ''"> and limit_name like concat('%', #{limitName}, '%')</if> - </where> - order by limit_code - </select> - - <select id="selectLimitTypeById" parameterType="String" resultMap="LimitTypeResult"> - <include refid="selectLimitTypeVo"/> - where id = #{id} - </select> - - <insert id="insertLimitType" parameterType="LimitType"> - insert into limit_type - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="id != null and id != ''">id,</if> - <if test="limitName != null and limitName != ''">limit_name,</if> - <if test="limitCode != null and limitCode != ''">limit_code,</if> - <if test="colorNumber != null and colorNumber != ''">color_number,</if> - <if test="createTime != null ">create_time,</if> - <if test="createBy != null and createBy != ''">create_by,</if> - <if test="updateTime != null ">update_time,</if> - <if test="updateBy != null and updateBy != ''">update_by,</if> - <if test="comparatorOperator != null and comparatorOperator != ''">comparator_operator,</if> - <if test="alarmType != null and alarmType != ''">alarm_type,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="id != null and id != ''">#{id},</if> - <if test="limitName != null and limitName != ''">#{limitName},</if> - <if test="limitCode != null and limitCode != ''">#{limitCode},</if> - <if test="colorNumber != null and colorNumber != ''">#{colorNumber},</if> - <if test="createTime != null ">#{createTime},</if> - <if test="createBy != null and createBy != ''">#{createBy},</if> - <if test="updateTime != null ">#{updateTime},</if> - <if test="updateBy != null and updateBy != ''">#{updateBy},</if> - <if test="comparatorOperator != null and comparatorOperator != ''">#{comparatorOperator},</if> - <if test="alarmType != null and alarmType != ''">#{alarmType},</if> - </trim> - </insert> - - <update id="updateLimitType" parameterType="LimitType"> - update limit_type - <trim prefix="SET" suffixOverrides=","> - <if test="limitName != null and limitName != ''">limit_name = #{limitName},</if> - <if test="limitCode != null and limitCode != ''">limit_code = #{limitCode},</if> - <if test="colorNumber != null and colorNumber != ''">color_number = #{colorNumber},</if> - <if test="createTime != null ">create_time = #{createTime},</if> - <if test="createBy != null and createBy != ''">create_by = #{createBy},</if> - <if test="updateTime != null ">update_time = #{updateTime},</if> - <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> - <if test="comparatorOperator != null and comparatorOperator != ''">comparator_operator = #{comparatorOperator},</if> - <if test="alarmType != null and alarmType != ''">alarm_type = #{alarmType},</if> - </trim> - where id = #{id} - </update> - - <delete id="deleteLimitTypeById" parameterType="String"> - delete from limit_type where id = #{id} - </delete> - - <delete id="deleteLimitTypeByIds" parameterType="String"> - delete from limit_type where id in - <foreach item="id" collection="array" open="(" separator="," close=")"> - #{id} - </foreach> - </delete> - -</mapper> diff --git a/zhitan-system/target/classes/mapper/alarm/HistoryAlarmMapper.xml b/zhitan-system/target/classes/mapper/alarm/HistoryAlarmMapper.xml deleted file mode 100644 index d7d6f6e..0000000 --- a/zhitan-system/target/classes/mapper/alarm/HistoryAlarmMapper.xml +++ /dev/null @@ -1,339 +0,0 @@ -<?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.zhitan.alarm.mapper.HistoryAlarmMapper"> - - <resultMap type="HistoryAlarm" id="HistoryAlarmResult"> - <result property="id" column="id"/> - <result property="endTime" column="end_time"/> - <result property="indexId" column="index_id"/> - <result property="indexName" column="index_name"/> - <result property="itemId" column="item_id"/> - <result property="limitingValue" column="limiting_value"/> - <result property="alarmValue" column="alarm_value"/> - <result property="alarmValueQuality" column="alarm_value_quality"/> - <result property="beginTime" column="begin_time"/> - <result property="duration" column="duration"/> - <result property="content" column="content"/> - </resultMap> - - <resultMap type="JkHistoryAlarm" id="JkHistoryAlarmResult"> - <result property="modelName" column="modelname"/> - <result property="code" column="code"/> - <result property="indexName" column="indexname"/> - <result property="unitId" column="unit_id"/> - <result property="alarmLevel" column="alarm_level"/> - <result property="limitType" column="limit_type"/> - <result property="limitingValue" column="limiting_value"/> - <result property="alarmBeginTime" column="begin_time"/> - <result property="alarmValue" column="alarm_value"/> - <result property="indexId" column="index_id"/> - <result property="nodeId" column="node_id"/> - <result property="duration" column="duration"/> - <result property="alarmBeginTime" column="begin_time"/> - <result property="alarmEndTime" column="end_time"/> - </resultMap> - - <sql id="selectHistoryAlarmVo"> - select id, - index_id, - index_name, - item_id, - limiting_value, - alarm_value, - alarm_value_quality, - begin_time, - end_time, - duration, - content - from history_alarm - </sql> - - <select id="selectHistoryAlarmList" parameterType="HistoryAlarm" resultMap="HistoryAlarmResult"> - <include refid="selectHistoryAlarmVo"/> - <where> - <if test="indexName != null and indexName != ''">and index_name like concat('%', - #{indexName}, '%') - </if> - <if test="itemId != null and itemId != ''">and item_id like concat('%', #{itemId}, '%')</if> - <if test="limitingValue != null ">and limiting_value like concat('%', #{limitingValue}, '%') - </if> - <if test="alarmValue != null ">and alarm_value like concat('%', #{alarmValue}, '%')</if> - <if test="alarmValueQuality != null and alarmValueQuality != ''">and alarm_value_quality like - concat('%', #{alarmValueQuality}, '%') - </if> - <if test="beginTime != null ">and begin_time like concat('%', #{beginTime}, '%')</if> - <if test="endTime != null ">and end_time like concat('%', #{endTime}, '%')</if> - <if test="duration != null ">and duration like concat('%', #{duration}, '%')</if> - <if test="content != null and content != ''">and content like concat('%', #{content}, '%') - </if> - </where> - </select> - - <select id="selectHistoryAlarmById" parameterType="String" resultMap="HistoryAlarmResult"> - <include refid="selectHistoryAlarmVo"/> - where id = #{id} - </select> - - - <update id="updateHistoryAlarm" parameterType="HistoryAlarm"> - delete from realtime_alarm where alarm_code = #{alarmCode}; - insert into history_alarm - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="historyAlarm.id != null and historyAlarm.id != ''">id,</if> - <if test="historyAlarm.indexId != null and historyAlarm.indexId != ''">index_id,</if> - <if test="historyAlarm.indexName != null and historyAlarm.indexName != ''">index_name,</if> - <if test="historyAlarm.itemId != null and historyAlarm.itemId != ''">item_id,</if> - <if test="historyAlarm.limitingValue != null ">limiting_value,</if> - <if test="historyAlarm.alarmValue != null ">alarm_value,</if> - <if test="historyAlarm.alarmValueQuality != null">alarm_value_quality,</if> - <if test="historyAlarm.beginTime != null ">begin_time,</if> - <if test="historyAlarm.endTime != null ">end_time,</if> - <if test="historyAlarm.duration != null ">duration,</if> - <if test="historyAlarm.content != null and historyAlarm.content != ''">content,</if> - <if test="historyAlarm.timeCode != null and historyAlarm.timeCode != ''">time_code,</if> - <if test="historyAlarm.alarmCode != null and historyAlarm.alarmCode != ''">alarm_code,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="historyAlarm.id != null and historyAlarm.id != ''">#{historyAlarm.id},</if> - <if test="historyAlarm.indexId != null and historyAlarm.indexId != ''">#{historyAlarm.indexId},</if> - <if test="historyAlarm.indexName != null and historyAlarm.indexName != ''">#{historyAlarm.indexName},</if> - <if test="historyAlarm.itemId != null and historyAlarm.itemId != ''">#{historyAlarm.itemId},</if> - <if test="historyAlarm.limitingValue != null ">#{historyAlarm.limitingValue},</if> - <if test="historyAlarm.alarmValue != null ">#{historyAlarm.alarmValue},</if> - <if test="historyAlarm.alarmValueQuality != null">#{historyAlarm.alarmValueQuality},</if> - <if test="historyAlarm.beginTime != null ">#{historyAlarm.beginTime},</if> - <if test="historyAlarm.endTime != null ">#{historyAlarm.endTime},</if> - <if test="historyAlarm.duration != null ">#{historyAlarm.duration},</if> - <if test="historyAlarm.content != null and historyAlarm.content != ''">#{historyAlarm.content},</if> - <if test="historyAlarm.timeCode != null and historyAlarm.timeCode != ''">#{historyAlarm.timeCode},</if> - <if test="historyAlarm.alarmCode != null and historyAlarm.alarmCode != ''">#{historyAlarm.alarmCode},</if> - </trim> - ; - </update> - - <delete id="deleteHistoryAlarmById" parameterType="String"> - delete - from history_alarm - where id = #{id} - </delete> - - <delete id="deleteHistoryAlarmByIds" parameterType="String"> - delete from history_alarm where id in - <foreach item="id" collection="array" open="(" separator="," close=")"> - #{id} - </foreach> - </delete> - - <!--鍘嗗彶 鎶ヨ鍒楄〃椤甸潰 閲囬泦鐐� 涓婚〉闈㈠垪琛ㄦ煡璇�--> - <select id="selectJkHistoryAlarmList" parameterType="JkHistoryAlarm" - resultMap="JkHistoryAlarmResult"> - SELECT - mo."name" AS modelname, - ei.code, - ei.NAME AS indexname, - ei.unit_id, - alit.alarm_level, - alit.limit_type, - bj.limiting_value, - bj.begin_time, - bj.end_time, - bj.alarm_value, - bj.duration, - ei.index_id, - ei.index_type, - mo.node_id - FROM - energy_index ei, - node_index ni, - model_node mo, - history_alarm bj , - alarm_item alit - WHERE - ni.node_id IN ( - SELECT node_id FROM model_node WHERE address LIKE ( - SELECT address FROM model_node WHERE node_id = #{nodeId} ) - <if test='eierarchyFlag=="ALL"'> - || '%' - </if> - ) - AND ei.index_id = ni.index_id - AND mo.node_id = ni.node_id - AND bj.index_id = ei.index_id - AND alit.alarm_code = bj.alarm_code - AND alit.time_slot='LIVE' - <if test="indexType != null and indexType != ''"> - AND ei.index_type=#{indexType} - </if> - <if test="indexName != null and indexName != ''">and ei.name like concat('%', #{indexName}, - '%') - </if> - <if test="limitType != null and limitType != ''">and alit.limit_type=#{limitType}</if> - <if test="alarmLevel != null and alarmLevel != ''">and alit.alarm_level=#{alarmLevel}</if> - <if test="beginTime != null and beginTime != ''">and begin_time >= - to_timestamp(#{beginTime},'yyyy-mm-dd hh24:mi:ss') - </if> - <if test="endTime != null and endTime != ''">and begin_time <= - to_timestamp(#{endTime},'yyyy-mm-dd hh24:mi:ss') - </if> - order by alarm_level,mo.node_id,limit_type asc - </select> - - <select id="selectJkHistoryAlarmListExcel" parameterType="JkHistoryAlarm" - resultMap="JkHistoryAlarmResult"> - SELECT - mo."name" AS modelname, - ei.code, - ei.NAME AS indexname, - fun_getdicedata('sys_unit',ei.unit_id) as unit_id, - fun_getdicedata('alarm_level',alit.alarm_level) as alarm_level, - lt.limit_name as limit_type, - bj.limiting_value, - bj.begin_time, - bj.end_time, - bj.alarm_value, - bj.duration, - ei.index_id, - mo.node_id - FROM - energy_index ei, - node_index ni, - model_node mo, - history_alarm bj , - alarm_item alit, - limit_type lt - WHERE - ni.node_id IN ( - SELECT node_id FROM model_node WHERE address LIKE ( - SELECT address FROM model_node WHERE node_id = #{nodeId} ) - <if test='eierarchyFlag=="ALL"'> - || '%' - </if> - ) - AND ei.index_id = ni.index_id - AND mo.node_id = ni.node_id - AND bj.index_id = ei.index_id - AND alit.alarm_code = bj.alarm_code - AND alit.time_slot='LIVE' - AND ei.index_type=#{indexType} - AND lt.limit_code=alit.limit_type - <if test="indexName != null and indexName != ''">and ei.name like concat('%', #{indexName}, - '%') - </if> - <if test="limitType != null and limitType != ''">and alit.limit_type=#{limitType}</if> - <if test="alarmLevel != null and alarmLevel != ''">and alit.alarm_level=#{alarmLevel}</if> - <if test="beginTime != null and beginTime != '' ">and begin_time >= - to_timestamp(#{beginTime},'yyyy-mm-dd hh24:mi:ss') - </if> - <if test="endTime != null and endTime != ''">and begin_time <= - to_timestamp(#{endTime},'yyyy-mm-dd hh24:mi:ss') - </if> - order by alarm_level,mo.node_id,limit_type asc - </select> - - <select id="selectHistoryAlarmNoteList" parameterType="JkHistoryAlarm" - resultMap="JkHistoryAlarmResult"> - SELECT - ei.code, - ei.NAME AS indexname, - fun_getdicedata('sys_unit',ei.unit_id) as unit_id, - fun_getdicedata('alarm_level',alit.alarm_level) as alarm_level, - lt.limit_name as limit_type, - bj.limiting_value, - bj.begin_time, - bj.end_time, - bj.alarm_value, - bj.duration, - ei.index_id - FROM - energy_index ei, - history_alarm bj , - sys_svg_info svg, - alarm_item alit, - limit_type lt - WHERE - svg.node_id=#{nodeId} - AND ei.code = svg.tag - AND bj.index_id = ei.index_id - AND alit.alarm_code = bj.alarm_code - AND alit.time_slot='LIVE' - AND ei.index_type=#{indexType} - AND lt.limit_code=alit.limit_type - <if test="indexName != null and indexName != ''">and ei.name like concat('%', #{indexName}, - '%') - </if> - <if test="limitType != null and limitType != ''">and alit.limit_type=#{limitType}</if> - <if test="alarmLevel != null and alarmLevel != ''">and alit.alarm_level=#{alarmLevel}</if> - <if test="beginTime != null and beginTime != '' ">and begin_time >= - to_timestamp(#{beginTime},'yyyy-mm-dd hh24:mi:ss') - </if> - <if test="endTime != null and endTime != ''">and begin_time <= - to_timestamp(#{endTime},'yyyy-mm-dd hh24:mi:ss') - </if> - order by alarm_level,limit_type asc - </select> - <select id="selectJkHistoryAlarmPage" resultType="JkHistoryAlarm"> - SELECT - mo."name" AS modelname, - ei.code, - ei.NAME AS indexname, - ei.unit_id, - alit.alarm_level, - alit.limit_type, - bj.limiting_value, - bj.begin_time, - bj.end_time, - bj.alarm_value, - bj.duration, - ei.index_id, - ei.index_type, - ei.energy_id, - mo.node_id - FROM - energy_index ei, - node_index ni, - model_node mo, - history_alarm bj , - alarm_item alit - WHERE - ni.node_id IN ( - SELECT node_id FROM model_node WHERE address LIKE ( - SELECT address FROM model_node WHERE node_id = #{jkHistoryAlarm.nodeId} ) - <if test='jkHistoryAlarm.eierarchyFlag=="ALL"'> - || '%' - </if> - ) - AND ei.index_id = ni.index_id - AND mo.node_id = ni.node_id - AND bj.index_id = ei.index_id - AND alit.alarm_code = bj.alarm_code - AND alit.time_slot='LIVE' - AND ei.index_type=#{jkHistoryAlarm.indexType} - <if test="jkHistoryAlarm.indexName != null and jkHistoryAlarm.indexName != ''">and ei.name like concat('%', #{jkHistoryAlarm.indexName}, - '%') - </if> - <if test="jkHistoryAlarm.limitType != null and jkHistoryAlarm.limitType != ''">and alit.limit_type=#{jkHistoryAlarm.limitType}</if> - <if test="jkHistoryAlarm.alarmLevel != null and jkHistoryAlarm.alarmLevel != ''">and alit.alarm_level=#{jkHistoryAlarm.alarmLevel}</if> - <if test="jkHistoryAlarm.beginTime != null and jkHistoryAlarm.beginTime != ''">and begin_time >= - to_timestamp(#{jkHistoryAlarm.beginTime},'yyyy-mm-dd hh24:mi:ss') - </if> - <if test="jkHistoryAlarm.endTime != null and jkHistoryAlarm.endTime != ''">and begin_time <= - to_timestamp(#{jkHistoryAlarm.endTime},'yyyy-mm-dd hh24:mi:ss') - </if> - order by alarm_level,mo.node_id,limit_type asc - </select> - <select id="selectCountByTime" resultType="java.lang.Integer"> - select count(0) - from history_alarm - <where> - <if test="beginTime != null "> - and begin_time >= #{beginTime} - </if> - <if test="endTime != null "> - and begin_time <= #{endTime} - </if> - </where> - </select> - -</mapper> diff --git a/zhitan-system/target/classes/mapper/alarm/RealtimeAlarmMapper.xml b/zhitan-system/target/classes/mapper/alarm/RealtimeAlarmMapper.xml deleted file mode 100644 index 01c252d..0000000 --- a/zhitan-system/target/classes/mapper/alarm/RealtimeAlarmMapper.xml +++ /dev/null @@ -1,238 +0,0 @@ -<?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.zhitan.alarm.mapper.RealtimeAlarmMapper"> - - - <resultMap type="com.zhitan.alarm.domain.RealTimeAlarm" - id="RealTimeAlarmResult"> - <result property="id" column="id"/> - <result property="indexId" column="index_id"/> - <result property="indexName" column="index_name"/> - <result property="itemId" column="item_id"/> - <result property="limitingValue" column="limiting_value"/> - <result property="alarmValue" column="alarm_value"/> - <result property="alarmValueQuality" column="alarm_value_quality"/> - <result property="beginTime" column="begin_time"/> - <result property="content" column="content"/> - <result property="timeCode" column="time_code"/> - <result property="alarmCode" column="alarm_code"/> - <association property="alarmItem" - javaType="com.zhitan.alarm.domain.AlarmItem"> - <result property="id" column="itemId"/> - <result property="timeSlot" column="time_slot"/> - <result property="limitType" column="limit_type"/> - <result property="alarmLevel" column="alarm_level"/> - </association> - </resultMap> - - <resultMap type="JkRealTimeAlarmList" id="JkRealTimeAlarmListResult"> - <result property="modelName" column="modelname"/> - <result property="code" column="code"/> - <result property="indexName" column="indexname"/> - <result property="unitId" column="unit_id"/> - <result property="alarmLevel" column="alarm_level"/> - <result property="limitType" column="limit_type"/> - <result property="limitingValue" column="limiting_value"/> - <result property="alarmBeginTime" column="begin_time"/> - <result property="alarmValue" column="alarm_value"/> - <result property="indexId" column="index_id"/> - <result property="nodeId" column="node_id"/> - </resultMap> - - - <select id="selectRealtimeAlarmList" parameterType="RealTimeAlarm" - resultMap="RealTimeAlarmResult"> - select id, index_id, index_name, item_id, limiting_value, alarm_value, alarm_value_quality, - begin_time, content from realtime_alarm - <where> - <if test="indexName != null and indexName != ''">and index_name like concat('%', - #{indexName}, '%') - </if> - <if test="itemId != null and itemId != ''">and item_id like concat('%', #{itemId}, '%')</if> - <if test="limitingValue != null ">and limiting_value like concat('%', #{limitingValue}, '%') - </if> - <if test="alarmValue != null ">and alarm_value like concat('%', #{alarmValue}, '%')</if> - <if test="alarmValueQuality != null">and alarm_value_quality like - concat('%', #{alarmValueQuality}, '%') - </if> - <if test="beginTime != null ">and begin_time like concat('%', #{beginTime}, '%')</if> - <if test="content != null and content != ''">and content like concat('%', #{content}, '%') - </if> - </where> - </select> - - <select id="selectRealtimeAlarmById" parameterType="String" resultMap="RealTimeAlarmResult"> - select id, - index_id, - index_name, - item_id, - limiting_value, - alarm_value, - alarm_value_quality, - begin_time, - content - from realtime_alarm - where id = #{id} - </select> - - <insert id="insertRealtimeAlarm" parameterType="RealTimeAlarm"> - insert into realtime_alarm - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="id != null and id != ''">id,</if> - <if test="indexId != null and indexId != ''">index_id,</if> - <if test="indexName != null and indexName != ''">index_name,</if> - <if test="itemId != null and itemId != ''">item_id,</if> - <if test="limitingValue != null ">limiting_value,</if> - <if test="alarmValue != null ">alarm_value,</if> - <if test="alarmValueQuality != null">alarm_value_quality,</if> - <if test="beginTime != null ">begin_time,</if> - <if test="content != null and content != ''">content,</if> - <if test="timeCode != null and timeCode != ''">time_code,</if> - <if test="alarmCode != null and alarmCode != ''">alarm_code,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="id != null and id != ''">#{id},</if> - <if test="indexId != null and indexId != ''">#{indexId},</if> - <if test="indexName != null and indexName != ''">#{indexName},</if> - <if test="itemId != null and itemId != ''">#{itemId},</if> - <if test="limitingValue != null ">#{limitingValue},</if> - <if test="alarmValue != null ">#{alarmValue},</if> - <if test="alarmValueQuality != null">#{alarmValueQuality},</if> - <if test="beginTime != null ">#{beginTime},</if> - <if test="content != null and content != ''">#{content},</if> - <if test="timeCode != null and timeCode != ''">#{timeCode},</if> - <if test="alarmCode != null and alarmCode != ''">#{alarmCode},</if> - </trim> - </insert> - - <update id="updateRealtimeAlarm" parameterType="RealTimeAlarm"> - update realtime_alarm - <trim prefix="SET" suffixOverrides=","> - <if test="indexId != null and indexId != ''">index_id = #{indexId},</if> - <if test="indexName != null and indexName != ''">index_name = #{indexName},</if> - <if test="itemId != null and itemId != ''">item_id = #{itemId},</if> - <if test="limitingValue != null ">limiting_value = #{limitingValue},</if> - <if test="alarmValue != null ">alarm_value = #{alarmValue},</if> - <if test="alarmValueQuality != null">alarm_value_quality = - #{alarmValueQuality}, - </if> - <if test="beginTime != null ">begin_time = #{beginTime},</if> - <if test="content != null and content != ''">content = #{content},</if> - </trim> - where id = #{id} - </update> - - <delete id="deleteRealtimeAlarmById" parameterType="String"> - delete - from realtime_alarm - where id = #{id} - </delete> - - <delete id="deleteRealtimeAlarmByIds" parameterType="String"> - delete from realtime_alarm where id in - <foreach item="id" collection="array" open="(" separator="," close=")"> - #{id} - </foreach> - </delete> - - <!--瀹炴椂鎶ヨ鍒楄〃椤甸潰 閲囬泦鐐� 涓婚〉闈㈠垪琛ㄦ煡璇�--> - <select id="selectRealtimeAlarmJkList" parameterType="JkRealTimeAlarmList" - resultMap="JkRealTimeAlarmListResult"> - SELECT - mo."name" AS modelname, - ei.code, - ei.NAME AS indexname, - ei.unit_id, - alit.alarm_level, - alit.limit_type, - bj.limiting_value, - bj.begin_time, - round(cast(bj.alarm_value as numeric ),2) as alarm_value, - ei.index_id, - mo.node_id - FROM - energy_index ei, - node_index ni, - model_node mo, - realtime_alarm bj , - alarm_item alit - WHERE - ni.node_id IN ( - SELECT node_id FROM model_node WHERE address LIKE ( - SELECT address FROM model_node WHERE node_id = #{nodeId} ) - <if test='eierarchyFlag=="ALL"'> - || '%' - </if> - ) - AND ei.index_id = ni.index_id - AND mo.node_id = ni.node_id - AND bj.index_id = ei.index_id - AND alit.alarm_code = bj.alarm_code - AND alit.time_slot='LIVE' - AND ei.index_type=#{indexType} - <if test="indexName != null and indexName != ''">and ei.name like concat('%', #{indexName}, - '%') - </if> - <if test="limitType != null and limitType != ''">and alit.limit_type=#{limitType}</if> - <if test="alarmLevel != null and alarmLevel != ''">and alit.alarm_level=#{alarmLevel}</if> - order by alarm_level,mo.node_id,limit_type asc - </select> - <select id="getRealTimeAlarmByAlarmCode" resultMap="RealTimeAlarmResult"> - select * - from realtime_alarm - where alarm_code = #{itemId} - </select> - <select id="getRealTimeAlarm" resultMap="RealTimeAlarmResult"> - select * - from realtime_alarm ra - </select> - <select id="getAlarmByItemIdAndTimeCode" resultMap="RealTimeAlarmResult"> - select * - from realtime_alarm - where item_id = #{itemId} - and time_code = #{timeCode} - </select> - <select id="selectRealtimeAlarmJkPage" resultMap="JkRealTimeAlarmListResult"> - SELECT - mo."name" AS modelname, - ei.code, - ei.NAME AS indexname, - ei.unit_id, - alit.alarm_level, - alit.limit_type, - bj.limiting_value, - bj.begin_time, - round(cast(bj.alarm_value as numeric ),2) as alarm_value, - ei.index_id, - mo.node_id - FROM - energy_index ei, - node_index ni, - model_node mo, - realtime_alarm bj , - alarm_item alit - WHERE - ni.node_id IN ( - SELECT node_id FROM model_node WHERE address LIKE ( - SELECT address FROM model_node WHERE node_id = #{realTimeAlarmList.nodeId} ) - <if test='realTimeAlarmList.eierarchyFlag=="ALL"'> - || '%' - </if> - ) - AND ei.index_id = ni.index_id - AND mo.node_id = ni.node_id - AND bj.index_id = ei.index_id - AND alit.alarm_code = bj.alarm_code - AND alit.time_slot='LIVE' - AND ei.index_type=#{realTimeAlarmList.indexType} - <if test="realTimeAlarmList.indexName != null and realTimeAlarmList.indexName != ''">and ei.name like concat('%', #{realTimeAlarmList.indexName}, - '%') - </if> - <if test="realTimeAlarmList.limitType != null and realTimeAlarmList.limitType != ''">and alit.limit_type=#{realTimeAlarmList.limitType}</if> - <if test="realTimeAlarmList.alarmLevel != null and realTimeAlarmList.alarmLevel != ''">and alit.alarm_level=#{realTimeAlarmList.alarmLevel}</if> - order by alarm_level,mo.node_id,limit_type asc - </select> - -</mapper> diff --git a/zhitan-system/target/classes/mapper/auxiliaryinput/ProductOutputMapper.xml b/zhitan-system/target/classes/mapper/auxiliaryinput/ProductOutputMapper.xml deleted file mode 100644 index b195d5a..0000000 --- a/zhitan-system/target/classes/mapper/auxiliaryinput/ProductOutputMapper.xml +++ /dev/null @@ -1,121 +0,0 @@ -<?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.zhitan.productoutput.mapper.ProductOutputMapper"> - - <resultMap type="ProductOutput" id="ProductOutputResult"> - <result property="productOutputId" column="product_output_id" /> - <result property="nodeId" column="node_id" /> - <result property="nodeName" column="node_name" /> - <result property="timeType" column="time_type" /> - <result property="dataTime" column="data_time" /> - <result property="name" column="name" /> - <result property="number" column="number" /> - <result property="unit" column="unit" /> - <result property="delFlag" column="del_flag" /> - <result property="createBy" column="create_by" /> - <result property="createTime" column="create_time" /> - <result property="updateBy" column="update_by" /> - <result property="updateTime" column="update_time" /> - <result property="remark" column="remark" /> - <result property="dataType" column="data_type" /> - <result property="productType" column="product_type" /> - </resultMap> - - <sql id="selectProductOutputVo"> - select product_output_id, node_name, node_id, time_type, data_time, name, number, unit, del_flag, create_by, create_time, update_by, update_time, remark, data_type,product_type from product_output - </sql> - - <select id="selectProductOutputList" parameterType="ProductOutput" resultMap="ProductOutputResult"> - <include refid="selectProductOutputVo"/> - <where> - <if test="productOutputId != null and productOutputId != ''"> and product_output_id = #{productOutputId}</if> - <if test="nodeId != null and nodeId != ''"> and node_id = #{nodeId}</if> - <if test="nodeName != null and nodeName != ''"> and node_name = #{nodeName}</if> - <if test="timeType != null and timeType != ''"> and time_type = #{timeType}</if> - <if test="dataTime != null "> and data_time = #{dataTime}</if> - <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> - <if test="number != null and number != ''"> and number = #{number}</if> - <if test="unit != null and unit != ''"> and unit = #{unit}</if> - <if test="dataType != null and dataType != ''"> and data_type = #{dataType}</if> - <if test="productType != null and productType != ''"> and product_type = #{productType}</if> - </where> - </select> - - <select id="selectProductOutputById" parameterType="String" resultMap="ProductOutputResult"> - <include refid="selectProductOutputVo"/> - where product_output_id = #{productOutputId} - </select> - - <insert id="insertProductOutput" parameterType="ProductOutput"> - insert into product_output - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="productOutputId != null">product_output_id,</if> - <if test="nodeId != null">node_id,</if> - <if test="nodeName != null">node_name,</if> - <if test="timeType != null">time_type,</if> - <if test="dataTime != null">data_time,</if> - <if test="name != null">name,</if> - <if test="number != null">number,</if> - <if test="unit != null">unit,</if> - <if test="delFlag != null">del_flag,</if> - <if test="createBy != null">create_by,</if> - <if test="createTime != null">create_time,</if> - <if test="updateBy != null">update_by,</if> - <if test="updateTime != null">update_time,</if> - <if test="remark != null">remark,</if> - <if test="dataType != null">data_type,</if> - <if test="productType != null">product_type,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="productOutputId != null">#{productOutputId},</if> - <if test="nodeId != null">#{nodeId},</if> - <if test="nodeName != null">#{nodeName},</if> - <if test="timeType != null">#{timeType},</if> - <if test="dataTime != null">#{dataTime},</if> - <if test="name != null">#{name},</if> - <if test="number != null">#{number},</if> - <if test="unit != null">#{unit},</if> - <if test="delFlag != null">#{delFlag},</if> - <if test="createBy != null">#{createBy},</if> - <if test="createTime != null">#{createTime},</if> - <if test="updateBy != null">#{updateBy},</if> - <if test="updateTime != null">#{updateTime},</if> - <if test="remark != null">#{remark},</if> - <if test="dataType != null">#{dataType},</if> - <if test="productType != null">#{productType},</if> - </trim> - </insert> - - <update id="updateProductOutput" parameterType="ProductOutput"> - update product_output - <trim prefix="SET" suffixOverrides=","> - <if test="timeType != null">time_type = #{timeType},</if> - <if test="dataTime != null">data_time = #{dataTime},</if> - <if test="name != null">name = #{name},</if> - <if test="number != null">number = #{number},</if> - <if test="unit != null">unit = #{unit},</if> - <if test="delFlag != null">del_flag = #{delFlag},</if> - <if test="createBy != null">create_by = #{createBy},</if> - <if test="createTime != null">create_time = #{createTime},</if> - <if test="updateBy != null">update_by = #{updateBy},</if> - <if test="updateTime != null">update_time = #{updateTime},</if> - <if test="remark != null">remark = #{remark},</if> - <if test="dataType != null">data_type = #{dataType},</if> - <if test="productType != null">product_type = #{productType},</if> - </trim> - where product_output_id = #{productOutputId} - </update> - - <delete id="deleteProductOutputById" parameterType="String"> - delete from product_output where product_output_id = #{productOutputId} - </delete> - - <delete id="deleteProductOutputByIds" parameterType="String"> - delete from product_output where product_output_id in - <foreach item="productOutputId" collection="array" open="(" separator="," close=")"> - #{productOutputId} - </foreach> - </delete> -</mapper> diff --git a/zhitan-system/target/classes/mapper/basicdata/FacilityAnnexMapper.xml b/zhitan-system/target/classes/mapper/basicdata/FacilityAnnexMapper.xml deleted file mode 100644 index fb8f4ef..0000000 --- a/zhitan-system/target/classes/mapper/basicdata/FacilityAnnexMapper.xml +++ /dev/null @@ -1,95 +0,0 @@ -<?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.zhitan.basicdata.mapper.FacilityAnnexMapper"> - - <resultMap type="FacilityAnnex" id="FacilityAnnexResult"> - <result property="createTime" column="create_time" /> - <result property="createBy" column="create_by" /> - <result property="updateTime" column="update_time" /> - <result property="updateBy" column="update_by" /> - <result property="id" column="id" /> - <result property="facilityId" column="facility_id" /> - <result property="fileName" column="file_name" /> - <result property="filesuffix" column="file_suffix" /> - <result property="filePath" column="file_path" /> - <result property="delFlage" column="del_flage" /> - </resultMap> - - <sql id="selectFacilityAnnexVo"> - select create_time, create_by, update_time, update_by, id, facility_id, file_name, file_suffix, file_path, del_flage from facility_annex - </sql> - - <select id="selectFacilityAnnexList" parameterType="FacilityAnnex" resultMap="FacilityAnnexResult"> - <include refid="selectFacilityAnnexVo"/> - <where> - del_flage='N' - <if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if> - <if test="facilityId != null and facilityId != ''"> and facility_id=#{facilityId}</if> - </where> - </select> - - <select id="selectFacilityAnnexById" parameterType="Date" resultMap="FacilityAnnexResult"> - <include refid="selectFacilityAnnexVo"/> - where id = #{id} - </select> - - <insert id="insertFacilityAnnex" parameterType="FacilityAnnex"> - insert into facility_annex - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="createTime != null ">create_time,</if> - <if test="createBy != null and createBy != ''">create_by,</if> - <if test="updateTime != null ">update_time,</if> - <if test="updateBy != null and updateBy != ''">update_by,</if> - <if test="id != null and id != ''">id,</if> - <if test="facilityId != null and facilityId != ''">facility_id,</if> - <if test="fileName != null and fileName != ''">file_name,</if> - <if test="filesuffix != null and filesuffix != ''">file_suffix,</if> - <if test="filePath != null and filePath != ''">file_path,</if> - <if test="delFlage != null and delFlage != ''">del_flage,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="createTime != null ">#{createTime},</if> - <if test="createBy != null and createBy != ''">#{createBy},</if> - <if test="updateTime != null ">#{updateTime},</if> - <if test="updateBy != null and updateBy != ''">#{updateBy},</if> - <if test="id != null and id != ''">#{id},</if> - <if test="facilityId != null and facilityId != ''">#{facilityId},</if> - <if test="fileName != null and fileName != ''">#{fileName},</if> - <if test="filesuffix != null and filesuffix != ''">#{filesuffix},</if> - <if test="filePath != null and filePath != ''">#{filePath},</if> - <if test="delFlage != null and delFlage != ''">#{delFlage},</if> - </trim> - </insert> - - <update id="updateFacilityAnnex" parameterType="FacilityAnnex"> - update facility_annex - <trim prefix="SET" suffixOverrides=","> - <if test="createBy != null and createBy != ''">create_by = #{createBy},</if> - <if test="updateTime != null ">update_time = #{updateTime},</if> - <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> - <if test="id != null and id != ''">id = #{id},</if> - <if test="facilityId != null and facilityId != ''">facility_id = #{facilityId},</if> - <if test="fileName != null and fileName != ''">file_name = #{fileName},</if> - <if test="filesuffix != null and filesuffix != ''">file_suffix = #{filesuffix},</if> - <if test="filePath != null and filePath != ''">file_path = #{filePath},</if> - <if test="delFlage != null and delFlage != ''">del_flage = #{delFlage},</if> - </trim> - where id = #{id} - </update> - - <delete id="deleteFacilityAnnexById" parameterType="Date"> - <!--delete from facility_annex where create_time = #{createTime}--> - update facility_annex set del_flage='Y',update_time=now() where id = #{id} - </delete> - - <delete id="deleteFacilityAnnexByIds" parameterType="String"> - <!--delete from facility_annex where create_time in--> - update facility_annex set del_flage='Y',update_time=now() where id in - <foreach item="id" collection="array" open="(" separator="," close=")"> - #{id} - </foreach> - </delete> - -</mapper> diff --git a/zhitan-system/target/classes/mapper/basicdata/FacilityArchivesMapper.xml b/zhitan-system/target/classes/mapper/basicdata/FacilityArchivesMapper.xml deleted file mode 100644 index bdebaaf..0000000 --- a/zhitan-system/target/classes/mapper/basicdata/FacilityArchivesMapper.xml +++ /dev/null @@ -1,183 +0,0 @@ -<?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.zhitan.basicdata.mapper.FacilityArchivesMapper"> - - <resultMap type="FacilityArchives" id="FacilityArchivesResult"> - <result property="id" column="id" /> - <result property="code" column="code" /> - <result property="facilityName" column="facility_name" /> - <result property="facilityType" column="facility_type" /> - <result property="branchFactory" column="branch_factory" /> - <result property="istallationLocationn" column="installation_location" /> - <result property="facilityGrade" column="facility_grade" /> - <result property="ratedPower" column="rated_power" /> - <result property="productionDate" column="production_date" /> - <result property="putrunDate" column="putrun_date" /> - <result property="manufacturer" column="manufacturer" /> - <result property="personCharge" column="person_charge" /> - <result property="technicalData" column="technical_data" /> - <result property="startTime" column="start_time" /> - <result property="checkCycle" column="check_cycle" /> - <result property="reminderCycle" column="reminder_cycle" /> - <result property="remark" column="remark" /> - <result property="createTime" column="create_time" /> - <result property="createBy" column="create_by" /> - <result property="updateTime" column="update_time" /> - <result property="updateBy" column="update_by" /> - <result property="txflage" column="txflage" /> - <result property="pointFlag" column="point_flag" /> - </resultMap> - - <sql id="selectFacilityArchivesVo"> - select id, code, facility_name, facility_type, branch_factory, installation_location, facility_grade, rated_power, production_date, putrun_date, manufacturer, person_charge, technical_data, start_time, check_cycle, reminder_cycle, remark, create_time, create_by, update_time, update_by,point_flag,(start_time+check_cycle-reminder_cycle)<=current_date as txflage from facility_archives - </sql> - - <select id="selectFacilityArchivesList" parameterType="FacilityArchives" resultMap="FacilityArchivesResult"> - <include refid="selectFacilityArchivesVo"/> - <where> - <if test="code != null and code != ''"> and code like concat('%', #{code}, '%')</if> - <if test="facilityName != null and facilityName != ''"> and facility_name like concat('%', #{facilityName}, '%')</if> - <if test="manufacturer != null and manufacturer != ''"> and manufacturer like concat('%', #{manufacturer}, '%')</if> - <if test="facilityType != null and facilityType != ''"> and facility_type = #{facilityType}</if> - <if test="branchFactory != null and branchFactory != ''"> and branch_factory = #{branchFactory}</if> - <if test="istallationLocationn != null and istallationLocationn != ''"> and installation_location like concat('%', #{istallationLocationn}, '%')</if> - <if test="facilityGrade != null and facilityGrade != ''"> and facility_grade = #{facilityGrade}</if> - <if test="ratedPower != null and ratedPower != ''"> and to_number(rated_power,'9999999999') >= to_number(#{ratedPower},'9999999999')</if> - </where> - order by code - </select> - - <select id="selectFacilityArchivesById" parameterType="String" resultMap="FacilityArchivesResult"> - <include refid="selectFacilityArchivesVo"/> - where id = #{id} - </select> - - <insert id="insertFacilityArchives" parameterType="FacilityArchives"> - insert into facility_archives - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="id != null and id != ''">id,</if> - <if test="code != null and code != ''">code,</if> - <if test="facilityName != null and facilityName != ''">facility_name,</if> - <if test="facilityType != null and facilityType != ''">facility_type,</if> - <if test="branchFactory != null and branchFactory != ''">branch_factory,</if> - <if test="istallationLocationn != null and istallationLocationn != ''">installation_location,</if> - <if test="facilityGrade != null and facilityGrade != ''">facility_grade,</if> - <if test="ratedPower != null and ratedPower != ''">rated_power,</if> - <if test="productionDate != null ">production_date,</if> - <if test="putrunDate != null ">putrun_date,</if> - <if test="manufacturer != null and manufacturer != ''">manufacturer,</if> - <if test="personCharge != null and personCharge != ''">person_charge,</if> - <if test="technicalData != null and technicalData != ''">technical_data,</if> - <if test="startTime != null ">start_time,</if> - <if test="checkCycle != null ">check_cycle,</if> - <if test="reminderCycle != null ">reminder_cycle,</if> - <if test="remark != null and remark != ''">remark,</if> - <if test="createTime != null ">create_time,</if> - <if test="createBy != null and createBy != ''">create_by,</if> - <if test="updateTime != null ">update_time,</if> - <if test="updateBy != null and updateBy != ''">update_by,</if> - <if test="pointFlag != null and pointFlag != ''">point_flag,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="id != null and id != ''">#{id},</if> - <if test="code != null and code != ''">#{code},</if> - <if test="facilityName != null and facilityName != ''">#{facilityName},</if> - <if test="facilityType != null and facilityType != ''">#{facilityType},</if> - <if test="branchFactory != null and branchFactory != ''">#{branchFactory},</if> - <if test="istallationLocationn != null and istallationLocationn != ''">#{istallationLocationn},</if> - <if test="facilityGrade != null and facilityGrade != ''">#{facilityGrade},</if> - <if test="ratedPower != null and ratedPower != ''">#{ratedPower},</if> - <if test="productionDate != null ">#{productionDate},</if> - <if test="putrunDate != null ">#{putrunDate},</if> - <if test="manufacturer != null and manufacturer != ''">#{manufacturer},</if> - <if test="personCharge != null and personCharge != ''">#{personCharge},</if> - <if test="technicalData != null and technicalData != ''">#{technicalData},</if> - <if test="startTime != null ">#{startTime},</if> - <if test="checkCycle != null ">#{checkCycle},</if> - <if test="reminderCycle != null ">#{reminderCycle},</if> - <if test="remark != null and remark != ''">#{remark},</if> - <if test="createTime != null ">#{createTime},</if> - <if test="createBy != null and createBy != ''">#{createBy},</if> - <if test="updateTime != null ">#{updateTime},</if> - <if test="updateBy != null and updateBy != ''">#{updateBy},</if> - <if test="pointFlag != null and pointFlag != ''">#{pointFlag},</if> - </trim> - </insert> - - <update id="updateFacilityArchives" parameterType="FacilityArchives"> - update facility_archives - <trim prefix="SET" suffixOverrides=","> - <if test="code != null and code != ''">code = #{code},</if> - <if test="facilityName != null and facilityName != ''">facility_name = #{facilityName},</if> - <if test="facilityType != null and facilityType != ''">facility_type = #{facilityType},</if> - <if test="branchFactory != null and branchFactory != ''">branch_factory = #{branchFactory},</if> - <if test="istallationLocationn != null and istallationLocationn != ''">installation_location = #{istallationLocationn},</if> - <if test="facilityGrade != null and facilityGrade != ''">facility_grade = #{facilityGrade},</if> - <if test="ratedPower != null and ratedPower != ''">rated_power = #{ratedPower},</if> - <if test="productionDate != null ">production_date = #{productionDate},</if> - <if test="putrunDate != null ">putrun_date = #{putrunDate},</if> - <if test="manufacturer != null and manufacturer != ''">manufacturer = #{manufacturer},</if> - <if test="personCharge != null and personCharge != ''">person_charge = #{personCharge},</if> - <if test="technicalData != null and technicalData != ''">technical_data = #{technicalData},</if> - <if test="startTime != null ">start_time = #{startTime},</if> - <if test="checkCycle != null ">check_cycle = #{checkCycle},</if> - <if test="reminderCycle != null ">reminder_cycle = #{reminderCycle},</if> - <if test="remark != null and remark != ''">remark = #{remark},</if> - <if test="createTime != null ">create_time = #{createTime},</if> - <if test="createBy != null and createBy != ''">create_by = #{createBy},</if> - <if test="updateTime != null ">update_time = #{updateTime},</if> - <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> - <if test="pointFlag != null and pointFlag != ''">point_flag = #{pointFlag},</if> - </trim> - where id = #{id} - </update> - - <delete id="deleteFacilityArchivesById" parameterType="String"> - delete from facility_archives where id = #{id} - </delete> - - <delete id="deleteFacilityArchivesByIds" parameterType="String"> - delete from facility_archives where id in - <foreach item="id" collection="array" open="(" separator="," close=")"> - #{id} - </foreach> - </delete> - - - <update id="resetFacilityArchivesByIds" parameterType="String" > - update facility_archives - set start_time = NOW() - where id in - <foreach item="id" collection="array" open="(" separator="," close=")"> - #{id} - </foreach> - </update> - - <select id="selectFacilityArchivesByCode" parameterType="FacilityArchives" resultMap="FacilityArchivesResult"> - <include refid="selectFacilityArchivesVo"/> - where code = #{code} - <if test="id != null and id != ''"> and id != #{id} or id is null</if> - </select> - <select id="excelFacilityArchivesList" parameterType="FacilityArchives" resultMap="FacilityArchivesResult"> - select id, code, facility_name, fun_getDiceData('facility_type',facility_type) as facility_type, - fun_getDiceData('branch_factory',branch_factory) as branch_factory, installation_location, - fun_getDiceData('facility_grade',facility_grade) as facility_grade, rated_power, to_char(production_date,'YYYY-MM-DD') as production_date, - to_char(putrun_date,'YYYY-MM-DD') as putrun_date, manufacturer, person_charge, - technical_data, start_time, check_cycle, reminder_cycle, remark, create_time, create_by, - update_time, update_by - from facility_archives - <where> - <if test="code != null and code != ''"> and code like concat('%', #{code}, '%')</if> - <if test="facilityName != null and facilityName != ''"> and facility_name like concat('%', #{facilityName}, '%')</if> - <if test="manufacturer != null and manufacturer != ''"> and manufacturer like concat('%', #{manufacturer}, '%')</if> - <if test="facilityType != null and facilityType != ''"> and facility_type = #{facilityType}</if> - <if test="branchFactory != null and branchFactory != ''"> and branch_factory = #{branchFactory}</if> - <if test="istallationLocationn != null and istallationLocationn != ''"> and installation_location like concat('%', #{istallationLocationn}, '%')</if> - <if test="facilityGrade != null and facilityGrade != ''"> and facility_grade = #{facilityGrade}</if> - <if test="ratedPower != null and ratedPower != ''"> and to_number(rated_power,'9999999999') >= #{ratedPower}</if> - </where> - order by code - </select> -</mapper> diff --git a/zhitan-system/target/classes/mapper/basicdata/MeterAnnexMapper.xml b/zhitan-system/target/classes/mapper/basicdata/MeterAnnexMapper.xml deleted file mode 100644 index 915eb5f..0000000 --- a/zhitan-system/target/classes/mapper/basicdata/MeterAnnexMapper.xml +++ /dev/null @@ -1,95 +0,0 @@ -<?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.zhitan.basicdata.mapper.MeterAnnexMapper"> - - <resultMap type="MeterAnnex" id="MeterAnnexResult"> - <result property="id" column="id" /> - <result property="implementId" column="implement_id" /> - <result property="fileName" column="file_name" /> - <result property="fileSuffix" column="file_suffix" /> - <result property="filePath" column="file_path" /> - <result property="delFlage" column="del_flage" /> - <result property="createTime" column="create_time" /> - <result property="createBy" column="create_by" /> - <result property="updateTime" column="update_time" /> - <result property="updateBy" column="update_by" /> - </resultMap> - - <sql id="selectMeterAnnexVo"> - select id, implement_id, file_name, file_suffix, file_path, del_flage, create_time, create_by, update_time, update_by from meter_annex - </sql> - - <select id="selectMeterAnnexList" parameterType="MeterAnnex" resultMap="MeterAnnexResult"> - <include refid="selectMeterAnnexVo"/> - <where> - del_flage='N' - <if test="fileName != null and fileName != ''"> and file_name like concat('%', #{fileName}, '%')</if> - <if test="implementId != null and implementId != ''"> and implement_id=#{implementId}</if> - </where> - </select> - - <select id="selectMeterAnnexById" parameterType="String" resultMap="MeterAnnexResult"> - <include refid="selectMeterAnnexVo"/> - where id = #{id} - </select> - - <insert id="insertMeterAnnex" parameterType="MeterAnnex"> - insert into meter_annex - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="id != null and id != ''">id,</if> - <if test="implementId != null and implementId != ''">implement_id,</if> - <if test="fileName != null and fileName != ''">file_name,</if> - <if test="fileSuffix != null and fileSuffix != ''">file_suffix,</if> - <if test="filePath != null and filePath != ''">file_path,</if> - <if test="delFlage != null and delFlage != ''">del_flage,</if> - <if test="createTime != null ">create_time,</if> - <if test="createBy != null and createBy != ''">create_by,</if> - <if test="updateTime != null ">update_time,</if> - <if test="updateBy != null and updateBy != ''">update_by,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="id != null and id != ''">#{id},</if> - <if test="implementId != null and implementId != ''">#{implementId},</if> - <if test="fileName != null and fileName != ''">#{fileName},</if> - <if test="fileSuffix != null and fileSuffix != ''">#{fileSuffix},</if> - <if test="filePath != null and filePath != ''">#{filePath},</if> - <if test="delFlage != null and delFlage != ''">#{delFlage},</if> - <if test="createTime != null ">#{createTime},</if> - <if test="createBy != null and createBy != ''">#{createBy},</if> - <if test="updateTime != null ">#{updateTime},</if> - <if test="updateBy != null and updateBy != ''">#{updateBy},</if> - </trim> - </insert> - - <update id="updateMeterAnnex" parameterType="MeterAnnex"> - update meter_annex - <trim prefix="SET" suffixOverrides=","> - <if test="implementId != null and implementId != ''">implement_id = #{implementId},</if> - <if test="fileName != null and fileName != ''">file_name = #{fileName},</if> - <if test="fileSuffix != null and fileSuffix != ''">file_suffix = #{fileSuffix},</if> - <if test="filePath != null and filePath != ''">file_path = #{filePath},</if> - <if test="delFlage != null and delFlage != ''">del_flage = #{delFlage},</if> - <if test="createTime != null ">create_time = #{createTime},</if> - <if test="createBy != null and createBy != ''">create_by = #{createBy},</if> - <if test="updateTime != null ">update_time = #{updateTime},</if> - <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> - </trim> - where id = #{id} - </update> - - <delete id="deleteMeterAnnexById" parameterType="String"> - <!--delete from meter_annex where id = #{id}--> - update meter_annex set del_flage='Y' where id = #{id} - </delete> - - <delete id="deleteMeterAnnexByIds" parameterType="String"> - <!--delete from meter_annex where id in --> - update meter_annex set del_flage='Y' where id in - <foreach item="id" collection="array" open="(" separator="," close=")"> - #{id} - </foreach> - </delete> - -</mapper> diff --git a/zhitan-system/target/classes/mapper/basicdata/MeterImplementCountMapper.xml b/zhitan-system/target/classes/mapper/basicdata/MeterImplementCountMapper.xml deleted file mode 100644 index 9563b33..0000000 --- a/zhitan-system/target/classes/mapper/basicdata/MeterImplementCountMapper.xml +++ /dev/null @@ -1,143 +0,0 @@ -<?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.zhitan.basicdata.mapper.MeterImplementCountMapper"> - - <resultMap type="MeterImplementCount" id="MeterImplementCountResult"> - <result property="code" column="code" /> - <result property="meterName" column="meter_name" /> - <result property="meterType" column="meter_type" /> - <result property="modelNumber" column="model_number" /> - <result property="measureRange" column="measure_range" /> - <result property="id" column="id" /> - <result property="manufacturer" column="manufacturer" /> - <result property="personCharge" column="person_charge" /> - <result property="installactionLocation" column="installaction_location" /> - <result property="startTime" column="start_time" /> - <result property="checkCycle" column="check_cycle" /> - <result property="reminderCycle" column="reminder_cycle" /> - <result property="meterStatus" column="meter_status" /> - <result property="delFlage" column="del_flage" /> - <result property="remark" column="remark" /> - <result property="createTime" column="create_time" /> - <result property="createBy" column="create_by" /> - <result property="updateTime" column="update_time" /> - <result property="updateBy" column="update_by" /> - <result property="txflage" column="txflage" /> - <result property="putrunTime" column="putrun_time" /> - </resultMap> - - <sql id="selectMeterImplementCountVo"> - select id, code, meter_name, meter_type, model_number, measure_range, manufacturer, person_charge, installaction_location, start_time, check_cycle, reminder_cycle, meter_status, del_flage, remark, putrun_time, create_time, create_by, update_time, update_by,(start_time+check_cycle-reminder_cycle)<=current_date as txflage from meter_implement - </sql> - - <select id="selectMeterImplementCountList" parameterType="MeterImplementCount" resultMap="MeterImplementCountResult"> - <include refid="selectMeterImplementCountVo"/> - <where> - <if test="code != null and code != ''"> and code like concat('%', #{code}, '%')</if> - <if test="meterName != null and meterName != ''"> and meter_name like concat('%', #{meterName}, '%')</if> - <if test="meterType != null and meterType != ''"> and meter_type = #{meterType}</if> - <if test="measureRange != null and measureRange != ''"> and measure_range like concat('%', #{measureRange}, '%')</if> - <if test="manufacturer != null and manufacturer != ''"> and manufacturer like concat('%', #{manufacturer}, '%')</if> - <if test="installactionLocation != null and installactionLocation != ''"> and installaction_location like concat('%', #{installactionLocation}, '%')</if> - </where> - </select> - - <select id="selectMeterImplementCountById" parameterType="String" resultMap="MeterImplementCountResult"> - <include refid="selectMeterImplementCountVo"/> - where code = #{code} - </select> - - <insert id="insertMeterImplementCount" parameterType="MeterImplementCount"> - insert into meter_implement - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="code != null and code != ''">code,</if> - <if test="meterName != null and meterName != ''">meter_name,</if> - <if test="meterType != null and meterType != ''">meter_type,</if> - <if test="modelNumber != null and modelNumber != ''">model_number,</if> - <if test="measureRange != null and measureRange != ''">measure_range,</if> - <if test="id != null and id != ''">id,</if> - <if test="manufacturer != null and manufacturer != ''">manufacturer,</if> - <if test="personCharge != null and personCharge != ''">person_charge,</if> - <if test="installactionLocation != null and installactionLocation != ''">installaction_location,</if> - <if test="startTime != null ">start_time,</if> - <if test="checkCycle != null ">check_cycle,</if> - <if test="reminderCycle != null ">reminder_cycle,</if> - <if test="meterStatus != null and meterStatus != ''">meter_status,</if> - <if test="delFlage != null and delFlage != ''">del_flage,</if> - <if test="remark != null and remark != ''">remark,</if> - <if test="createTime != null ">create_time,</if> - <if test="createBy != null and createBy != ''">create_by,</if> - <if test="updateTime != null ">update_time,</if> - <if test="updateBy != null and updateBy != ''">update_by,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="code != null and code != ''">#{code},</if> - <if test="meterName != null and meterName != ''">#{meterName},</if> - <if test="meterType != null and meterType != ''">#{meterType},</if> - <if test="modelNumber != null and modelNumber != ''">#{modelNumber},</if> - <if test="measureRange != null and measureRange != ''">#{measureRange},</if> - <if test="id != null and id != ''">#{id},</if> - <if test="manufacturer != null and manufacturer != ''">#{manufacturer},</if> - <if test="personCharge != null and personCharge != ''">#{personCharge},</if> - <if test="installactionLocation != null and installactionLocation != ''">#{installactionLocation},</if> - <if test="startTime != null ">#{startTime},</if> - <if test="checkCycle != null ">#{checkCycle},</if> - <if test="reminderCycle != null ">#{reminderCycle},</if> - <if test="meterStatus != null and meterStatus != ''">#{meterStatus},</if> - <if test="delFlage != null and delFlage != ''">#{delFlage},</if> - <if test="remark != null and remark != ''">#{remark},</if> - <if test="createTime != null ">#{createTime},</if> - <if test="createBy != null and createBy != ''">#{createBy},</if> - <if test="updateTime != null ">#{updateTime},</if> - <if test="updateBy != null and updateBy != ''">#{updateBy},</if> - </trim> - </insert> - - <update id="updateMeterImplementCount" parameterType="MeterImplementCount"> - update meter_implement - <trim prefix="SET" suffixOverrides=","> - <if test="meterName != null and meterName != ''">meter_name = #{meterName},</if> - <if test="meterType != null and meterType != ''">meter_type = #{meterType},</if> - <if test="modelNumber != null and modelNumber != ''">model_number = #{modelNumber},</if> - <if test="measureRange != null and measureRange != ''">measure_range = #{measureRange},</if> - <if test="id != null and id != ''">id = #{id},</if> - <if test="manufacturer != null and manufacturer != ''">manufacturer = #{manufacturer},</if> - <if test="personCharge != null and personCharge != ''">person_charge = #{personCharge},</if> - <if test="installactionLocation != null and installactionLocation != ''">installaction_location = #{installactionLocation},</if> - <if test="startTime != null ">start_time = #{startTime},</if> - <if test="checkCycle != null ">check_cycle = #{checkCycle},</if> - <if test="reminderCycle != null ">reminder_cycle = #{reminderCycle},</if> - <if test="meterStatus != null and meterStatus != ''">meter_status = #{meterStatus},</if> - <if test="delFlage != null and delFlage != ''">del_flage = #{delFlage},</if> - <if test="remark != null and remark != ''">remark = #{remark},</if> - <if test="createTime != null ">create_time = #{createTime},</if> - <if test="createBy != null and createBy != ''">create_by = #{createBy},</if> - <if test="updateTime != null ">update_time = #{updateTime},</if> - <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> - </trim> - where code = #{code} - </update> - - <delete id="deleteMeterImplementCountById" parameterType="String"> - delete from meter_implement where code = #{code} - </delete> - - <!-- <delete id="deleteMeterImplementCountByIds" parameterType="String"> - delete from meter_implement where code in - <foreach item="code" collection="array" open="(" separator="," close=")"> - #{code} - </foreach> - </delete>--> - - <update id="deleteMeterImplementCountByIds" parameterType="String" > - update meter_implement - set start_time = NOW() - where code in - <foreach item="code" collection="array" open="(" separator="," close=")"> - #{code} - </foreach> - </update> - -</mapper> diff --git a/zhitan-system/target/classes/mapper/basicdata/MeterImplementMapper.xml b/zhitan-system/target/classes/mapper/basicdata/MeterImplementMapper.xml deleted file mode 100644 index 9635b86..0000000 --- a/zhitan-system/target/classes/mapper/basicdata/MeterImplementMapper.xml +++ /dev/null @@ -1,239 +0,0 @@ -<?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.zhitan.basicdata.mapper.MeterImplementMapper"> - - <resultMap type="MeterImplement" id="MeterImplementResult"> - <result property="id" column="id" /> - <result property="code" column="code" /> - <result property="meterName" column="meter_name" /> - <result property="meterType" column="meter_type" /> - <result property="modelNumber" column="model_number" /> - <result property="measureRange" column="measure_range" /> - <result property="manufacturer" column="manufacturer" /> - <result property="personCharge" column="person_charge" /> - <result property="installactionLocation" column="installaction_location" /> - <result property="startTime" column="start_time" /> - <result property="checkCycle" column="check_cycle" /> - <result property="reminderCycle" column="reminder_cycle" /> - <result property="meterStatus" column="meter_status" /> - <result property="delFlage" column="del_flage" /> - <result property="remark" column="remark" /> - <result property="createTime" column="create_time" /> - <result property="createBy" column="create_by" /> - <result property="updateTime" column="update_time" /> - <result property="updateBy" column="update_by" /> - <result property="txflage" column="txflage" /> - <result property="putrunTime" column="putrun_time" /> - <result property="wireDiameter" column="wire_diameter" /> - <result property="maxAllowablePower" column="max_allowable_power" /> - <result property="gatewayId" column="gateway_id" /> - <result property="gatewayName" column="gateway_name" /> - </resultMap> - <resultMap type="MeterImplementExcel" id="MeterImplementResultExcel"> - <result property="id" column="id" /> - <result property="code" column="code" /> - <result property="meterName" column="meter_name" /> - <result property="meterType" column="meter_type" /> - <result property="modelNumber" column="model_number" /> - <result property="measureRange" column="measure_range" /> - <result property="manufacturer" column="manufacturer" /> - <result property="personCharge" column="person_charge" /> - <result property="installactionLocation" column="installaction_location" /> - <result property="startTime" column="start_time" /> - <result property="checkCycle" column="check_cycle" /> - <result property="reminderCycle" column="reminder_cycle" /> - <result property="meterStatus" column="meter_status" /> - <result property="delFlage" column="del_flage" /> - <result property="remark" column="remark" /> - <result property="createTime" column="create_time" /> - <result property="createBy" column="create_by" /> - <result property="updateTime" column="update_time" /> - <result property="updateBy" column="update_by" /> - <result property="energyType" column="energy_type" /> - <result property="wireDiameter" column="wire_diameter" /> - <result property="maxAllowablePower" column="max_allowable_power" /> - </resultMap> - <sql id="selectMeterImplementVo"> - select id,energy_type, code, meter_name, meter_type, model_number, measure_range, manufacturer, person_charge, installaction_location, start_time, check_cycle, reminder_cycle, meter_status, del_flage, remark, putrun_time,create_time, create_by, update_time, update_by,(start_time+check_cycle-reminder_cycle)<=current_date as txflage,wire_diameter,max_allowable_power,gateway_id,gateway_name from meter_implement - </sql> - - <select id="selectMeterImplementList" parameterType="MeterImplement" resultMap="MeterImplementResult"> - <include refid="selectMeterImplementVo"/> - <where> - del_flage='N' - <if test="code != null and code != ''"> and code like concat('%', #{code}, '%')</if> - <if test="meterName != null and meterName != ''"> and meter_name like concat('%', #{meterName}, '%')</if> - <if test="meterType != null and meterType != ''"> and meter_type = #{meterType}</if> - <if test="measureRange != null and measureRange != ''"> and measure_range like concat('%', #{measureRange}, '%')</if> - <if test="manufacturer != null and manufacturer != ''"> and manufacturer like concat('%', #{manufacturer}, '%')</if> - <if test="installactionLocation != null and installactionLocation != ''"> and installaction_location like concat('%', #{installactionLocation}, '%')</if> - </where> - order by code - </select> - - <select id="exectMeterImplementList" parameterType="MeterImplement" resultMap="MeterImplementResultExcel"> - select id,energy_type, code, meter_name, fun_getDiceData('sys_device_type',meter_status) as meter_type, model_number, measure_range, manufacturer, - person_charge, installaction_location, to_char(start_time,'YYYY-MM-DD') start_time, check_cycle, reminder_cycle, fun_getDiceData('meter_status',meter_status) as meter_status, - del_flage, remark, create_time, create_by, update_time, update_by,wire_diameter,max_allowable_power,gateway_name - from meter_implement - <where> - del_flage='N' - <if test="code != null and code != ''"> and code like concat('%', #{code}, '%')</if> - <if test="meterName != null and meterName != ''"> and meter_name like concat('%', #{meterName}, '%')</if> - <if test="meterType != null and meterType != ''"> and meter_type = #{meterType}</if> - <if test="measureRange != null and measureRange != ''"> and measure_range like concat('%', #{measureRange}, '%')</if> - <if test="manufacturer != null and manufacturer != ''"> and manufacturer like concat('%', #{manufacturer}, '%')</if> - <if test="installactionLocation != null and installactionLocation != ''"> and installaction_location like concat('%', #{installactionLocation}, '%')</if> - </where> - order by code - </select> - - <select id="selectMeterImplementById" parameterType="String" resultMap="MeterImplementResult"> - <include refid="selectMeterImplementVo"/> - where id = #{id} - </select> - - <select id="selectMeterImplementByCode" parameterType="MeterImplement" resultMap="MeterImplementResult"> - <include refid="selectMeterImplementVo"/> - where code = #{code} - <if test="id != null and id != ''"> and id != #{id} or id is null</if> - </select> - - <select id="listMeterImplementByIds" resultMap="MeterImplementResult"> - SELECT - "id", - energy_type, - code, - meter_name, - meter_type, - meter_status, - installaction_location, - wire_diameter, - max_allowable_power - FROM - "meter_implement" - WHERE - id IN - <foreach collection="meterIdList" item="id" open="(" separator="," close=")"> - #{id} - </foreach> - </select> - <select id="selectByNodeIdIndexId" resultType="com.zhitan.basicdata.domain.MeterImplement"> - <include refid="selectMeterImplementVo"/> - mi - JOIN node_device nd ON mi.id = nd.device_id - JOIN node_index ni ON ni.node_id = nd.node_id - where ni.node_id= #{nodeId} and index_id= #{indexId} - </select> - <select id="listMeterImplByInstallLocation" resultType="com.zhitan.basicdata.domain.MeterImplement"> - <include refid="selectMeterImplementVo"/> - <where> - installaction_location = #{installactionLocation} - </where> - </select> - - <insert id="insertMeterImplement" parameterType="MeterImplement"> - insert into meter_implement - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="id != null and id != ''">id,</if> - <if test="energyType != null and energyType != ''">energy_type,</if> - <if test="code != null and code != ''">code,</if> - <if test="meterName != null and meterName != ''">meter_name,</if> - <if test="meterType != null and meterType != ''">meter_type,</if> - <if test="modelNumber != null and modelNumber != ''">model_number,</if> - <if test="measureRange != null and measureRange != ''">measure_range,</if> - <if test="manufacturer != null and manufacturer != ''">manufacturer,</if> - <if test="personCharge != null and personCharge != ''">person_charge,</if> - <if test="installactionLocation != null and installactionLocation != ''">installaction_location,</if> - <if test="startTime != null ">start_time,</if> - <if test="putrunTime != null ">putrun_time,</if> - <if test="checkCycle != null ">check_cycle,</if> - <if test="reminderCycle != null ">reminder_cycle,</if> - <if test="meterStatus != null and meterStatus != ''">meter_status,</if> - <if test="delFlage != null and delFlage != ''">del_flage,</if> - <if test="remark != null and remark != ''">remark,</if> - <if test="createTime != null ">create_time,</if> - <if test="createBy != null and createBy != ''">create_by,</if> - <if test="updateTime != null ">update_time,</if> - <if test="updateBy != null and updateBy != ''">update_by,</if> - <if test="wireDiameter != null and wireDiameter != ''">wire_diameter,</if> - <if test="maxAllowablePower != null and maxAllowablePower != ''">max_allowable_power,</if> - <if test="gatewayId != null and gatewayId != ''">gateway_id,</if> - <if test="gatewayName != null and gatewayName != ''">gateway_name,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="id != null and id != ''">#{id},</if> - <if test="energyType != null and energyType != ''">#{energyType},</if> - <if test="code != null and code != ''">#{code},</if> - <if test="meterName != null and meterName != ''">#{meterName},</if> - <if test="meterType != null and meterType != ''">#{meterType},</if> - <if test="modelNumber != null and modelNumber != ''">#{modelNumber},</if> - <if test="measureRange != null and measureRange != ''">#{measureRange},</if> - <if test="manufacturer != null and manufacturer != ''">#{manufacturer},</if> - <if test="personCharge != null and personCharge != ''">#{personCharge},</if> - <if test="installactionLocation != null and installactionLocation != ''">#{installactionLocation},</if> - <if test="startTime != null ">#{startTime},</if> - <if test="putrunTime != null ">#{putrunTime},</if> - <if test="checkCycle != null ">#{checkCycle},</if> - <if test="reminderCycle != null ">#{reminderCycle},</if> - <if test="meterStatus != null and meterStatus != ''">#{meterStatus},</if> - <if test="delFlage != null and delFlage != ''">#{delFlage},</if> - <if test="remark != null and remark != ''">#{remark},</if> - <if test="createTime != null ">#{createTime},</if> - <if test="createBy != null and createBy != ''">#{createBy},</if> - <if test="updateTime != null ">#{updateTime},</if> - <if test="updateBy != null and updateBy != ''">#{updateBy},</if> - <if test="wireDiameter != null and wireDiameter != ''">#{wire_diameter},</if> - <if test="maxAllowablePower != null and maxAllowablePower != ''">#{max_allowable_power},</if> - <if test="gatewayId != null and gatewayId != ''">#{gatewayId},</if> - <if test="gatewayName != null and gatewayName != ''">#{gatewayName},</if> - </trim> - </insert> - - <update id="updateMeterImplement" parameterType="MeterImplement"> - update meter_implement - <trim prefix="SET" suffixOverrides=","> - <if test="code != null and code != ''">code = #{code},</if> - <if test="energyType != null and energyType != ''">energy_type = #{energyType},</if> - <if test="meterName != null and meterName != ''">meter_name = #{meterName},</if> - <if test="meterType != null and meterType != ''">meter_type = #{meterType},</if> - <if test="modelNumber != null and modelNumber != ''">model_number = #{modelNumber},</if> - <if test="measureRange != null and measureRange != ''">measure_range = #{measureRange},</if> - <if test="manufacturer != null and manufacturer != ''">manufacturer = #{manufacturer},</if> - <if test="personCharge != null and personCharge != ''">person_charge = #{personCharge},</if> - <if test="installactionLocation != null and installactionLocation != ''">installaction_location = #{installactionLocation},</if> - <if test="startTime != null ">start_time = #{startTime},</if> - <if test="putrunTime != null ">putrun_time = #{putrunTime},</if> - <if test="checkCycle != null ">check_cycle = #{checkCycle},</if> - <if test="reminderCycle != null ">reminder_cycle = #{reminderCycle},</if> - <if test="meterStatus != null and meterStatus != ''">meter_status = #{meterStatus},</if> - <if test="delFlage != null and delFlage != ''">del_flage = #{delFlage},</if> - <if test="remark != null and remark != ''">remark = #{remark},</if> - <if test="createTime != null ">create_time = #{createTime},</if> - <if test="createBy != null and createBy != ''">create_by = #{createBy},</if> - <if test="updateTime != null ">update_time = #{updateTime},</if> - <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> - <if test="wireDiameter != null and wireDiameter != ''">wire_diameter = #{wireDiameter},</if> - <if test="maxAllowablePower != null and maxAllowablePower != ''">max_allowable_power = #{maxAllowablePower},</if> - <if test="gatewayId != null and gatewayId != ''">gateway_id = #{gatewayId},</if> - <if test="gatewayName != null and gatewayName != ''">gateway_name = #{gatewayName},</if> - </trim> - where id = #{id} - </update> - - <delete id="deleteMeterImplementById" parameterType="String"> - <!--update meter_implement set del_flage='Y' where id = #{id} 鍏堢敤鐗╃悊鍒犻櫎锛屽悗鏈熸湁蹇呰鍐嶆墦寮�閫昏緫鍒犻櫎--> - delete from meter_implement where id = #{id} - </delete> - - <delete id="deleteMeterImplementByIds" parameterType="String"> - <!--update meter_implement set del_flage='Y' where id in 鍏堢敤鐗╃悊鍒犻櫎锛屽悗鏈熸湁蹇呰鍐嶆墦寮�閫昏緫鍒犻櫎--> - delete from meter_implement where id in - <foreach item="id" collection="array" open="(" separator="," close=")"> - #{id} - </foreach> - </delete> - -</mapper> diff --git a/zhitan-system/target/classes/mapper/basicdata/SysEnerclassMapper.xml b/zhitan-system/target/classes/mapper/basicdata/SysEnerclassMapper.xml deleted file mode 100644 index 42996bd..0000000 --- a/zhitan-system/target/classes/mapper/basicdata/SysEnerclassMapper.xml +++ /dev/null @@ -1,96 +0,0 @@ -<?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.zhitan.basicdata.mapper.SysEnerclassMapper"> - - <resultMap type="SysEnerclass" id="SysEnerclassResult"> - <result property="enerclassid" column="enerclassid"/> - <result property="enerclassname" column="enerclassname"/> - <result property="oprMan" column="opr_man"/> - <result property="oprTime" column="opr_time"/> - <result property="modMan" column="mod_man"/> - <result property="modTime" column="mod_time"/> - <result property="note" column="note"/> - </resultMap> - - <sql id="selectSysEnerclassVo"> - select enerclassid, enerclassname, opr_man, opr_time, mod_man, mod_time, note from sys_enerclass - </sql> - - <select id="selectSysEnerclassList" parameterType="SysEnerclass" resultMap="SysEnerclassResult"> - <include refid="selectSysEnerclassVo"/> - <where> - <if test="enerclassname != null and enerclassname != ''"> and enerclassname like concat('%', #{enerclassname}, '%')</if> - </where> - </select> - - <select id="selectSysEnerclassById" parameterType="Integer" resultMap="SysEnerclassResult"> - <include refid="selectSysEnerclassVo"/> - where enerclassid = #{enerclassid} - </select> - - <insert id="insertSysEnerclass" parameterType="SysEnerclass"> - insert into sys_enerclass - <trim prefix="(" suffix=")" suffixOverrides=","> - mod_time, - opr_time, - <if test="note != null and note != ''">note,</if> - <if test="enerclassid != null ">enerclassid,</if> - <if test="enerclassname != null and enerclassname != ''">enerclassname,</if> - <if test="oprMan != null and oprMan != ''">opr_man,</if> - <if test="modMan != null and modMan != ''">mod_man,</if> - <if test="remark != null and remark != ''">remark,</if> - <if test="createTime != null ">create_time,</if> - <if test="createBy != null and createBy != ''">create_by,</if> - <if test="updateTime != null ">update_time,</if> - <if test="updateBy != null and updateBy != ''">update_by,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - now(), - now(), - <if test="note != null and note != ''">#{note},</if> - <if test="enerclassid != null ">#{enerclassid},</if> - <if test="enerclassname != null and enerclassname != ''">#{enerclassname},</if> - <if test="oprMan != null and oprMan != ''">#{oprMan},</if> - <if test="modMan != null and modMan != ''">#{modMan},</if> - <if test="remark != null and remark != ''">#{remark},</if> - <if test="createTime != null ">#{createTime},</if> - <if test="createBy != null and createBy != ''">#{createBy},</if> - <if test="updateTime != null ">#{updateTime},</if> - <if test="updateBy != null and updateBy != ''">#{updateBy},</if> - </trim> - </insert> - - <update id="updateSysEnerclass" parameterType="SysEnerclass"> - update sys_enerclass - <trim prefix="SET" suffixOverrides=","> - mod_time = now(), - update_time = now(), - <if test="enerclassname != null and enerclassname != ''">enerclassname = #{enerclassname},</if> - <if test="modMan != null and modMan != ''">mod_man = #{modMan},</if> - <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> - <if test="note != null and note != ''">note = #{note},</if> - </trim> - where enerclassid = #{enerclassid} - </update> - - <delete id="deleteSysEnerclassById" parameterType="Integer"> - delete from sys_enerclass where enerclassid = #{enerclassid} - </delete> - - <delete id="deleteSysEnerclassByIds" parameterType="String"> - delete from sys_enerclass where enerclassid in - <foreach item="enerclassid" collection="array" open="(" separator="," close=")"> - #{enerclassid} - </foreach> - </delete> - - <select id="selectSameEnergyNameNum" parameterType="String" resultType="Integer"> - select COUNT(enerclassid) from sys_enerclass where enerclassname = #{enerclassname} - </select> - - <select id="selectIdByName" parameterType="String" resultType="Integer"> - select enerclassid from sys_enerclass where enerclassname = #{enerclassname} - </select> -</mapper> diff --git a/zhitan-system/target/classes/mapper/basicdata/SysEnergyMapper.xml b/zhitan-system/target/classes/mapper/basicdata/SysEnergyMapper.xml deleted file mode 100644 index 9d17b9e..0000000 --- a/zhitan-system/target/classes/mapper/basicdata/SysEnergyMapper.xml +++ /dev/null @@ -1,263 +0,0 @@ -<?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.zhitan.basicdata.mapper.SysEnergyMapper"> - - <resultMap type="SysEnergy" id="SysEnergyResult"> - <result property="enername" column="enername" /> - <result property="muid" column="muid" /> - <result property="enerclassid" column="enerclassid" /> - <result property="enerclassname" column="enerclassname" /> - <result property="enersno" column="enersno" /> - <result property="isstorage" column="isstorage" /> - <result property="oprMan" column="opr_man" /> - <result property="oprTime" column="opr_time" /> - <result property="modMan" column="mod_man" /> - <result property="modTime" column="mod_time" /> - <result property="note" column="note" /> - <result property="enerid" column="enerid" /> - <result property="coefficient" column="coefficient" /> - <result property="execdate" column="execdate" /> - <result property="price" column="price" /> - <result property="emissionFactors" column="emission_factors" /> - <result property="createBy" column="create_by" /> - <result property="createTime" column="create_time" /> - <result property="updateBy" column="update_by" /> - <result property="updateTime" column="update_time" /> - <result property="remark" column="remark" /> - </resultMap> - - <sql id="selectSysEnergyVo"> - select enername, muid, enerclassid, enersno, isstorage, opr_man, opr_time, mod_man, mod_time, note, enerid, coefficient, execdate, price, emission_factors, create_by, create_time, update_by, update_time, remark from sys_energy - </sql> - <select id="getenerclassname" resultType="SysEnerclass"> - select enerclassid,enerclassname from sys_enerclass order by create_time - </select> - - <select id="selectSysEnergyList" parameterType="SysEnergy" resultMap="SysEnergyResult"> - <include refid="selectSysEnergyVo"/> - <where> - <if test="enername != null and enername != ''"> and enername like concat('%', #{enername}, '%')</if> - <if test="muid != null and muid != ''"> and muid = #{muid}</if> - <if test="enerclassid != null and enerclassid != ''"> and enerclassid = #{enerclassid}</if> - <if test="enersno != null and enersno != ''"> and enersno = #{enersno}</if> - <if test="isstorage != null and isstorage != ''"> and isstorage = #{isstorage}</if> - <if test="oprMan != null and oprMan != ''"> and opr_man = #{oprMan}</if> - <if test="oprTime != null "> and opr_time = #{oprTime}</if> - <if test="modMan != null and modMan != ''"> and mod_man = #{modMan}</if> - <if test="modTime != null "> and mod_time = #{modTime}</if> - <if test="note != null and note != ''"> and note = #{note}</if> - <if test="enerid != null and enerid != ''"> and enerid = #{enerid}</if> - <if test="coefficient != null and coefficient != ''"> and coefficient = #{coefficient}</if> - <if test="execdate != null "> and execdate = #{execdate}</if> - <if test="price != null and price != ''"> and price = #{price}</if> - <if test="emissionFactors != null and emissionFactors != ''"> and emission_factors = #{emissionFactors}</if> - </where> - order by create_time - </select> - - <select id="selectSysEnergyById" parameterType="Integer" resultMap="SysEnergyResult"> - <include refid="selectSysEnergyVo"/> - where enerid = #{enerid} - </select> - - <insert id="insertSysEnergy" parameterType="SysEnergy"> - insert into sys_energy - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="enername != null">enername,</if> - <if test="muid != null">muid,</if> - <if test="enerclassid != null">enerclassid,</if> - <if test="enersno != null">enersno,</if> - <if test="isstorage != null">isstorage,</if> - <if test="oprMan != null and oprMan != ''">opr_man,</if> - <if test="oprTime != null">opr_time,</if> - <if test="modMan != null">mod_man,</if> - <if test="modTime != null">mod_time,</if> - <if test="note != null">note,</if> - <if test="enerid != null and enerid != ''">enerid,</if> - <if test="coefficient != null">coefficient,</if> - <if test="execdate != null">execdate,</if> - <if test="price != null">price,</if> - <if test="emissionFactors != null">emission_factors,</if> - <if test="createBy != null">create_by,</if> - <if test="createTime != null">create_time,</if> - <if test="updateBy != null">update_by,</if> - <if test="updateTime != null">update_time,</if> - <if test="remark != null">remark,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="enername != null">#{enername},</if> - <if test="muid != null">#{muid},</if> - <if test="enerclassid != null">#{enerclassid},</if> - <if test="enersno != null">#{enersno},</if> - <if test="isstorage != null">#{isstorage},</if> - <if test="oprMan != null and oprMan != ''">#{oprMan},</if> - <if test="oprTime != null">now(),</if> - <if test="modMan != null">#{modMan},</if> - <if test="modTime != null">now(),,</if> - <if test="note != null">#{note},</if> - <if test="enerid != null and enerid != ''">#{enerid},</if> - <if test="coefficient != null">#{coefficient},</if> - <if test="execdate != null">#{execdate},</if> - <if test="price != null">#{price},</if> - <if test="emissionFactors != null">#{emissionFactors},</if> - <if test="createBy != null">#{createBy},</if> - <if test="createTime != null">#{createTime},</if> - <if test="updateBy != null">#{updateBy},</if> - <if test="updateTime != null">#{updateTime},</if> - <if test="remark != null">#{remark},</if> - </trim> - </insert> - - <update id="updateSysEnergy" parameterType="SysEnergy"> - update sys_energy - <trim prefix="SET" suffixOverrides=","> - <if test="muid != null">muid = #{muid},</if> - <if test="enerclassid != null">enerclassid = #{enerclassid},</if> - <if test="enername != null">enername = #{enername},</if> - <if test="enersno != null">enersno = #{enersno},</if> - <if test="isstorage != null">isstorage = #{isstorage},</if> - <if test="oprMan != null and oprMan != ''">opr_man = #{oprMan},</if> - <if test="oprTime != null">opr_time = now(),</if> - <if test="modMan != null">mod_man = #{modMan},</if> - <if test="modTime != null">mod_time = now(),</if> - <if test="note != null">note = #{note},</if> - <if test="enerid != null and enerid != ''">enerid = #{enerid},</if> - <if test="coefficient != null">coefficient = #{coefficient},</if> - <if test="execdate != null">execdate = #{execdate},</if> - <if test="price != null">price = #{price},</if> - <if test="emissionFactors != null">emission_factors = #{emissionFactors},</if> - <if test="createBy != null">create_by = #{createBy},</if> - <if test="createTime != null">create_time = #{createTime},</if> - <if test="updateBy != null">update_by = #{updateBy},</if> - <if test="updateTime != null">update_time = #{updateTime},</if> - <if test="remark != null">remark = #{remark},</if> - </trim> - where enerid = #{enerid} - </update> - - <delete id="deleteSysEnergyById" parameterType="String"> - delete from sys_energy where enerid = #{enerid} - </delete> - - <delete id="deleteSysEnergyByIds" parameterType="String"> - delete from sys_energy where enerid in - <foreach item="enerid" collection="array" open="(" separator="," close=")"> - #{enerid} - </foreach> - </delete> - - <select id="getEnerClassid" parameterType="String" resultType="Integer"> - select enerclassid from sys_enerclass where enerclassname = #{enerclassname} - </select> - - <select id="selectSameEnergyNameNum" parameterType="String" resultType="Integer"> - select COUNT(enerid) from sys_energy where enername = #{enername} - </select> - - <select id="selectIdByName" parameterType="String" resultType="Integer"> - select enerid from sys_energy where enername = #{enername} - </select> - - <select id="getPriceCountByEnerid" parameterType="SysEnergy" resultType="Integer"> - select COUNT(objectid) from sys_price where objectid = #{enerid} and objecttype = 1 and execdate = #{execdate} - </select> - - <insert id="insertEnergyPrice" parameterType="SysEnergy"> - insert into sys_price - <trim prefix="(" suffix=")" suffixOverrides=","> - mod_time, - opr_time, - <if test="oprMan != null and oprMan != ''">opr_man,</if> - <if test="modMan != null and modMan != ''">mod_man,</if> - objectid, - objecttype, - price, - execdate, - <if test="note != null and note != ''">note,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - now(), - now(), - <if test="oprMan != null and oprMan != ''">#{oprMan},</if> - <if test="modMan != null and modMan != ''">#{modMan},</if> - <if test="enerid != null ">#{enerid},</if> - 1, - #{price}, - #{execdate}, - <if test="note != null and note != ''">#{pricenote},</if> - </trim> - </insert> - - <update id="updateEnergyPrice" parameterType="SysEnergy" > - update sys_price - <trim prefix="SET" suffixOverrides=","> - mod_time = now(), - <if test="modMan != null and modMan != ''">mod_man = #{modMan},</if> - price = #{price}, - execdate = #{execdate}, - <if test="note != null and note != ''">note = #{pricenote},</if> - </trim> - </update> - - <select id="getCoefficientCountByEnerid" parameterType="Integer" resultType="Integer"> - select COUNT(enerid) from sys_enercoefficient where enerid = #{enerid} - </select> - - <select id="listAllEnergyType" resultType="EnergyTypeModel"> - select enername, enersno from sys_energy - </select> - - <insert id="insertEnergyCoefficient" parameterType="SysEnergy"> - insert into sys_enercoefficient - <trim prefix="(" suffix=")" suffixOverrides=","> - mod_time, - opr_time, - <if test="oprMan != null and oprMan != ''">opr_man,</if> - <if test="modMan != null and modMan != ''">mod_man,</if> - enerid, - coefficient, - coefficient2, - carbon_emission_coefficient, - execdate, - <if test="note != null and note != ''">note,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - now(), - now(), - <if test="oprMan != null and oprMan != ''">#{oprMan},</if> - <if test="modMan != null and modMan != ''">#{modMan},</if> - <if test="enerid != null ">#{enerid},</if> - #{coefficient}, - #{coefficient2}, - #{carbonEmissionCoefficient}, - #{coefficientexecdate}, - <if test="note != null and note != ''">#{coefficientnote},</if> - </trim> - </insert> - - <update id="updateEnergyCoefficient" parameterType="SysEnergy" > - update sys_enercoefficient - <trim prefix="SET" suffixOverrides=","> - mod_time = now(), - <if test="modMan != null and modMan != ''">mod_man = #{modMan},</if> - coefficient = #{coefficient}, - coefficient2 = #{coefficient2}, - execdate = #{coefficientexecdate}, - carbon_emission_coefficient = #{carbonEmissionCoefficient}, - <if test="note != null and note != ''">note = #{coefficientnote},</if> - </trim> - where enerid = #{enerid} - </update> - - - <select id="selectSysEnergyPage" resultMap="SysEnergyResult"> - select a.*,b.enerclassname from sys_energy a left join sys_enerclass b on a.enerclassid = b.enerclassid - <where> - <if test="sysEnergy.enername != null and sysEnergy.enername != ''"> and a.enername like concat('%', #{sysEnergy.enername}, '%')</if> - <if test="sysEnergy.enerclassid != null and sysEnergy.enerclassid != ''"> and a.enerclassid = #{sysEnergy.enerclassid}</if> - </where> - order by a.create_time - </select> -</mapper> diff --git a/zhitan-system/target/classes/mapper/comprehensivestatistics/ComprehensiveStatisticsMapper.xml b/zhitan-system/target/classes/mapper/comprehensivestatistics/ComprehensiveStatisticsMapper.xml deleted file mode 100644 index 9ace200..0000000 --- a/zhitan-system/target/classes/mapper/comprehensivestatistics/ComprehensiveStatisticsMapper.xml +++ /dev/null @@ -1,172 +0,0 @@ -<?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.zhitan.comprehensivestatistics.mapper.ComprehensiveStatisticsMapper"> - <resultMap id="dataItemMap" type="com.zhitan.comprehensivestatistics.domain.ComprehensiveStatistics"> - <id column="index_id" property="indexId"/> - <id column="time_code" property="timeCode"/> - <id column="index_code" property="indexCode"/> - <id column="index_name" property="indexName"/> - <result column="begin_time" property="beginTime"/> - <result column="end_time" property="endTime"/> - <result column="data_time" property="dataTime"/> - <result column="value" property="value"/> - <result column="time_type" property="timeType"/> - <result column="quality" property="quality"/> - <result column="unit_id" property="unitId"/> - <result column="create_time" property="createTime"/> - <result column="update_time" property="updateTime"/> - <result column="remark" property="remark"/> - <result column="name" property="name"/> - <result column="index_type" property="indexType"/> - <result column="facility_name" property="facilityName"/> - </resultMap> - <resultMap id="comprehensiveMap" type="com.zhitan.comprehensivestatistics.domain.Comprehensive"> - <result column="index_id" property="indexId"/> - <result column="index_name" property="indexName"/> - <result column="time_type" property="timeType"/> - <result column="value1" property="value1"/> - <result column="value2" property="value2"/> - <result column="value3" property="value3"/> - <result column="value4" property="value4"/> - <result column="value5" property="value5"/> - <result column="value6" property="value6"/> - <result column="value7" property="value7"/> - <result column="value8" property="value8"/> - <result column="value9" property="value9"/> - <result column="value10" property="value10"/> - <result column="value11" property="value11"/> - <result column="value12" property="value12"/> - <result column="value13" property="value13"/> - <result column="value14" property="value14"/> - <result column="value15" property="value15"/> - <result column="value16" property="value16"/> - <result column="value17" property="value17"/> - <result column="value18" property="value18"/> - <result column="value19" property="value19"/> - <result column="value20" property="value20"/> - <result column="value21" property="value21"/> - <result column="value22" property="value22"/> - <result column="value23" property="value23"/> - <result column="value24" property="value24"/> - <result column="value25" property="value25"/> - <result column="value26" property="value26"/> - <result column="value27" property="value27"/> - <result column="value28" property="value28"/> - <result column="value29" property="value29"/> - <result column="value30" property="value30"/> - <result column="value31" property="value31"/> - </resultMap> - - <sql id="itemHead"> - SELECT di.index_id, - di.time_code, - di.time_type, - di.begin_time, - di.end_time, - di.data_time, - di.value, - di.quality, - di.create_time, - di.update_time, - ci.code AS "index_code", - ci.name AS "index_name", - ci.unit_id AS unitId, - f.facility_name AS facilityName - FROM data_item di - LEFT JOIN energy_index ci ON di.index_id = ci.index_id - LEFT JOIN facility_archives f ON f."id"=ci.equipment - </sql> - <select id="getStatisticsEnergy" resultType="com.zhitan.basicdata.domain.SysEnergy"> - select enerid, enersno, enername,( SELECT d.dict_label FROM sys_dict_data d WHERE dict_type = 'sys_unit' AND d.dict_code = e.muid) muidName - from sys_energy e - left join node_energy ne on e.enerid = ne.energy_id - where ne.node_id = #{nodeId}; - </select> - <select id="getDatasByIndex" resultMap="dataItemMap"> - SELECT - e.NAME, - e.index_code, - di.index_id, - di.time_code, - di.time_type, - di.begin_time, - di.end_time, - di.data_time, - di.VALUE, - di.quality, - di.create_time, - di.update_time - FROM - data_item di - LEFT JOIN energy_statistics e ON di.index_id = e.index_id - where di.time_code = #{timeCode} - AND di.index_id in - <foreach item="indexId" index="index" collection="indexIds" open="(" separator="," close=")"> - #{indexId} - </foreach> - </select> - <select id="getEnergyByIndex" resultMap="dataItemMap"> - select "name",index_id from energy_statistics where index_type=#{indexType} - </select> - <select id="getFacilityArchives" resultType="com.zhitan.basicdata.domain.FacilityArchives"> - SELECT ID,code,facility_name AS facilityName FROM facility_archives - </select> - - <select id="getDatasIndex" resultMap="dataItemMap"> - SELECT di.index_id, - di.time_code, - di.time_type, - di.begin_time, - di.end_time, - di.data_time, - di.value, - di.quality, - di.create_time, - di.update_time, - ci.code AS "index_code", - ci.name AS "index_name", - ci.unit_id AS unitId, - f.facility_name AS "facility_name" - FROM data_item di - LEFT JOIN energy_index ci ON di.index_id = ci.index_id - LEFT JOIN facility_archives f ON f."id"=ci.equipment - where di.time_code = #{timeCode} - AND di.index_id in - <foreach item="indexId" index="index" collection="indexIds" - open="(" separator="," close=")"> - #{indexId} - </foreach> - and ci.equipment is not null - ORDER BY di."value" desc - </select> - - <select id="getDatasByList" resultMap="dataItemMap"> - SELECT - e.NAME, - e.index_code, - di.index_id, - di.time_code, - di.time_type, - di.begin_time, - di.end_time, - di.data_time, - di.VALUE, - di.quality, - di.create_time, - di.update_time - FROM - data_item di - LEFT JOIN energy_statistics e ON di.index_id = e.index_id - where di.time_type = #{timeType} - AND di.data_time >= #{beginTime} - AND di.data_time < #{endTime} - AND di.index_id in - <foreach item="indexId" index="index" collection="indexIds" - open="(" separator="," close=")"> - #{indexId} - </foreach> - ORDER BY di."value" desc - </select> -</mapper> \ No newline at end of file diff --git a/zhitan-system/target/classes/mapper/comprehensivestatistics/DailyComprehensiveMapper.xml b/zhitan-system/target/classes/mapper/comprehensivestatistics/DailyComprehensiveMapper.xml deleted file mode 100644 index 0380045..0000000 --- a/zhitan-system/target/classes/mapper/comprehensivestatistics/DailyComprehensiveMapper.xml +++ /dev/null @@ -1,93 +0,0 @@ -<?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.zhitan.comprehensivestatistics.mapper.DailyComprehensiveMapper"> - <resultMap id="dataItemMap" type="com.zhitan.comprehensivestatistics.domain.DailyComprehensive"> - <result column="index_id" property="indexId"/> - <result column="index_name" property="indexName"/> - <result column="time_type" property="timeType"/> - <result column="time_code" property="timeCode"/> - <result column="unit_id" property="unitId"/> - <result column="value1" property="value1"/> - <result column="value2" property="value2"/> - <result column="value3" property="value3"/> - <result column="value4" property="value4"/> - <result column="value5" property="value5"/> - <result column="value6" property="value6"/> - <result column="value7" property="value7"/> - <result column="value8" property="value8"/> - <result column="value9" property="value9"/> - <result column="value10" property="value10"/> - <result column="value11" property="value11"/> - <result column="value12" property="value12"/> - <result column="value13" property="value13"/> - <result column="value14" property="value14"/> - <result column="value15" property="value15"/> - <result column="value16" property="value16"/> - <result column="value17" property="value17"/> - <result column="value18" property="value18"/> - <result column="value19" property="value19"/> - <result column="value20" property="value20"/> - <result column="value21" property="value21"/> - <result column="value22" property="value22"/> - <result column="value23" property="value23"/> - <result column="value0" property="value0"/> - </resultMap> - <!--鍏ㄥ巶鑳借�楃粺璁�--> - <select id="getdailyComprehensiveList" resultMap="dataItemMap"> - SELECT - aa.index_id, - aa.index_name, - <foreach item="item" index="index" collection="dataList"> - COALESCE ( MAX ( CASE WHEN data_time = #{item.dataTime} THEN "value" END ), null ) AS ${item.value}, - </foreach> - aa.time_type, - aa.order_num orderNum - FROM - ( - SELECT - ni.index_id, - ei."name" AS "index_name", - di."value", - di.data_time, - di.time_type, - mn.order_num - FROM - model_node mn - LEFT JOIN node_index ni ON ni.node_id = mn.node_id - LEFT JOIN energy_index ei ON ei.index_id = ni.index_id - LEFT JOIN data_item di ON ni.index_id = di.index_id - WHERE - mn.parent_id = #{nodeId} - AND di.data_time >= #{beginTime} - AND di.data_time < #{endTime} - AND di.time_type = #{timeType} - <if test="indexStorageId !='' and indexStorageId !=null"> - and ei.energy_id=#{indexStorageId} - </if> - ) aa - GROUP BY - aa.index_id, aa.index_name, aa.time_type, aa.order_num - ORDER BY aa.order_num ASC - </select> - - <select id="getListChart" resultMap="dataItemMap"> - SELECT - di.index_id, - ci.name AS "index_name", - ci.unit_id, - di."value", - di.data_time, - di.time_type, - di.time_code - FROM - data_item di LEFT JOIN energy_index ci ON di.index_id = ci.index_id - WHERE - di.index_id =#{indexId} - AND di.data_time < #{endTime} - AND di.data_time >= #{beginTime} - AND di.time_type = #{timeType} - ORDER BY data_time ASC - </select> -</mapper> diff --git a/zhitan-system/target/classes/mapper/dataitem/DataItemMapper.xml b/zhitan-system/target/classes/mapper/dataitem/DataItemMapper.xml deleted file mode 100644 index d64ec15..0000000 --- a/zhitan-system/target/classes/mapper/dataitem/DataItemMapper.xml +++ /dev/null @@ -1,202 +0,0 @@ -<?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.zhitan.dataitem.mapper.DataItemMapper"> - <resultMap type="StagseDataEntry" id="stagseDataEntryResult"> - <result property="code" column="code"/> - <result property="name" column="name"/> - <result property="indexId" column="index_id"/> - <result property="timeType" column="time_type"/> - <result property="unitId" column="unit_id"/> - <result property="calcType" column="calc_type"/> - <result property="value" column="value"/> - <result property="timeCode" column="time_code"/> - <result property="dataTime" column="data_time"/> - </resultMap> - - <select id="getSettingIndex" parameterType="StagseDataEntry" resultMap="stagseDataEntryResult"> - - SELECT - ei.index_id, - code, - NAME, - si.time_type, - ei.unit_id - FROM - energy_index ei - LEFT JOIN node_index ni ON ei.index_id = ni.index_id - LEFT JOIN index_storage si ON si.index_id = ei.index_id - WHERE - not EXISTS ( SELECT index_id FROM data_item WHERE index_id =ei.index_id and data_time >= #{beginTime} AND data_time <= #{endTime}) AND - ni.node_id = #{nodeId} - and si.time_type = #{timeType} - AND si.calc_type = #{calcType} - </select> - <select id="getSettingEdit" parameterType="StagseDataEntry" resultMap="stagseDataEntryResult"> - SELECT - ei.index_id, - code, - NAME, - si.time_type, - ei.unit_id, - di.value, - di.data_time - FROM - energy_index ei - LEFT JOIN node_index ni ON ei.index_id = ni.index_id - LEFT JOIN index_storage si ON si.index_id = ei.index_id - LEFT JOIN data_item di on di.index_id=ei.index_id - WHERE - ni.node_id = #{nodeId} - and si.time_type = #{timeType} - AND si.calc_type = #{calcType} - AND data_time >= #{beginTime} - AND data_time <= #{endTime} - </select> - <select id="stagseDataByCode" parameterType="StagseDataEntry" resultMap="stagseDataEntryResult"> - SELECT - ei.index_id, - code, - NAME, - ei.unit_id, - di.value, - di.data_time, - di.time_type - FROM - energy_index ei - LEFT JOIN node_index ni ON ei.index_id = ni.index_id - LEFT JOIN data_item di on di.index_id=ei.index_id - WHERE - ni.node_id = #{nodeId} - and ei.code IN - <foreach item="indexCode" index="index" collection="indexCodes" - open="(" separator="," close=")"> - #{indexCode} - </foreach> - and di.time_type = #{timeType} - AND di.data_time >= #{beginTime} - AND di.data_time <= #{endTime} - </select> - - <select id="getDataItemTimeRangeInforByIndexIds" resultType="com.zhitan.realtimedata.domain.DataItem"> - SELECT - index_id indexId, - data_time dataTime, - "value" - FROM - "data_item" - WHERE - index_id IN - <foreach collection="indexIds" item="indexId" open="(" separator="," close=")"> - #{indexId} - </foreach> - AND ( data_time >= #{beginTime} AND data_time < #{endTime} ) - AND time_type = #{timeType} - </select> - - <select id="getDataItemTimeRangeValueByIndexIds" resultType="java.math.BigDecimal"> - SELECT - COALESCE (SUM ( "value" ), 0) - FROM - "data_item" - WHERE - index_id IN - <foreach collection="indexIds" item="indexId" open="(" separator="," close=")"> - #{indexId} - </foreach> - AND ( data_time >= #{beginTime} AND data_time < #{endTime} ) - AND time_type = #{timeType} - </select> - - <select id="getDataItemInforByIndexIds" resultType="com.zhitan.realtimedata.domain.DataItem"> - SELECT - index_id indexId, - data_time dataTime, - "value" - FROM - "data_item" - WHERE - index_id IN - <foreach collection="indexIds" item="indexId" open="(" separator="," close=")"> - #{indexId} - </foreach> - AND time_code = #{timeCode} - </select> - - <select id="getDataItemValueByIndexIds" resultType="java.math.BigDecimal"> - SELECT - COALESCE (SUM ( "value" ), 0) - FROM - "data_item" - WHERE - index_id IN - <foreach collection="indexIds" item="indexId" open="(" separator="," close=")"> - #{indexId} - </foreach> - AND time_code = #{timeCode} - </select> - <select id="getUpCarbonEmission" resultType="com.zhitan.carbonemission.domain.CarbonEmission"> - SELECT - di.index_id, - di.data_time, - di.value, - ei.energy_id - FROM - data_item di - JOIN energy_index ei ON di.index_id = ei.index_id - WHERE - ei.energy_id != '' and - di.index_id IN ( SELECT index_id FROM node_index WHERE node_id = #{indexId}) - AND di.data_time BETWEEN #{beginTime} AND #{endTime} - AND di.time_type = #{timeType} - </select> - <select id="getMiddleCarbonEmission" resultType="com.zhitan.carbonemission.domain.CarbonEmission"> - SELECT - di.index_id, - di.data_time, - CASE - WHEN di.time_type = 'MONTH' THEN - TO_CHAR( di.create_time, 'MM' ) - WHEN di.time_type = 'DAY' THEN - TO_CHAR( di.create_time, 'DD' ) - WHEN di.time_type = 'HOUR' THEN - TO_CHAR( di.data_time, 'HH' ) - ELSE TO_CHAR( di.data_time, 'YYMMDD' ) - END AS dataTimeStr, - di.value, - ei.energy_id, - di.time_type - FROM - data_item di - JOIN energy_index ei ON di.index_id = ei.index_id - WHERE - di.index_id IN ( SELECT index_id FROM node_index WHERE node_id = #{indexId}) - <if test="emissionType !='' and emissionType !=null and emissionType =='allType'"> - AND ei.energy_id != '' - </if> - <if test="emissionType !='' and emissionType !=null and emissionType !='allType'"> - AND ei.energy_id = #{emissionType} - </if> - AND di.data_time BETWEEN #{beginTime} AND #{endTime} - AND di.time_type = #{timeType} - </select> - <select id="getDownCarbonEmission" resultType="com.zhitan.carbonemission.domain.CarbonEmission"> - SELECT - di.index_id, - di.data_time, - di.value, - ei.energy_id, - mn.name as nodeName - FROM - model_node mn - LEFT JOIN node_index ni ON mn.node_id = ni.node_id - LEFT JOIN data_item di ON di.index_id = ni.index_id - LEFT JOIN energy_index ei ON di.index_id = ei.index_id - WHERE - ei.energy_id != '' - AND mn.parent_id = #{indexId} - AND di.data_time BETWEEN #{beginTime} AND #{endTime} - AND di.time_type = #{timeType} - </select> -</mapper> \ No newline at end of file diff --git a/zhitan-system/target/classes/mapper/energyIndicators/EnergyIndicatorsMapper.xml b/zhitan-system/target/classes/mapper/energyIndicators/EnergyIndicatorsMapper.xml deleted file mode 100644 index 1f377ad..0000000 --- a/zhitan-system/target/classes/mapper/energyIndicators/EnergyIndicatorsMapper.xml +++ /dev/null @@ -1,124 +0,0 @@ -<?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.zhitan.energyIndicators.mapper.EnergyIndicatorsMapper"> - - <resultMap type="EnergyIndicators" id="EnergyIndicatorsResult"> - <result property="nodeId" column="node_id" /> - <result property="timeType" column="time_type" /> - <result property="dataTime" column="data_time" /> - <result property="name" column="name" /> - <result property="number" column="number" /> - <result property="unit" column="unit" /> - <result property="delFlag" column="del_flag" /> - <result property="createBy" column="create_by" /> - <result property="createTime" column="create_time" /> - <result property="updateBy" column="update_by" /> - <result property="updateTime" column="update_time" /> - <result property="remark" column="remark" /> - <result property="energyType" column="energy_type" /> - <result property="indicatorsType" column="indicators_type" /> - <result property="energyIndicatorsId" column="energy_indicators_id" /> - <result property="nodeName" column="node_name" /> - </resultMap> - - <sql id="selectEnergyIndicatorsVo"> - select node_id, time_type, data_time, name, number, unit, del_flag, create_by, create_time, update_by, update_time, remark, - energy_type, indicators_type, energy_indicators_id, node_name from energy_indicators - </sql> - - <select id="selectEnergyIndicatorsList" parameterType="EnergyIndicators" resultMap="EnergyIndicatorsResult"> - <include refid="selectEnergyIndicatorsVo"/> - <where> - <if test="nodeId != null and nodeId != ''"> and node_id = #{nodeId}</if> - <if test="timeType != null and timeType != ''"> and time_type = #{timeType}</if> - <if test="dataTime != null and dataTime != ''"> and data_time = #{dataTime}</if> - <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> - <if test="number != null "> and number = #{number}</if> - <if test="unit != null and unit != ''"> and unit = #{unit}</if> - <if test="energyType != null and energyType != ''"> and energy_type = #{energyType}</if> - <if test="indicatorsType != null and indicatorsType != ''"> and indicators_type = #{indicatorsType}</if> - <if test="energyIndicatorsId != null and energyIndicatorsId != ''"> and energy_indicators_id = #{energyIndicatorsId}</if> - <if test="nodeName != null and nodeName != ''"> and node_name like concat('%', #{nodeName}, '%')</if> - </where> - </select> - - <select id="selectEnergyIndicatorsByNodeId" parameterType="String" resultMap="EnergyIndicatorsResult"> - <include refid="selectEnergyIndicatorsVo"/> - where energy_indicators_id = #{nodeId} - </select> - - <insert id="insertEnergyIndicators" parameterType="EnergyIndicators"> - insert into energy_indicators - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="nodeId != null">node_id,</if> - <if test="timeType != null">time_type,</if> - <if test="dataTime != null">data_time,</if> - <if test="name != null">name,</if> - <if test="number != null">number,</if> - <if test="unit != null">unit,</if> - <if test="delFlag != null">del_flag,</if> - <if test="createBy != null">create_by,</if> - <if test="createTime != null">create_time,</if> - <if test="updateBy != null">update_by,</if> - <if test="updateTime != null">update_time,</if> - <if test="remark != null">remark,</if> - <if test="energyType != null">energy_type,</if> - <if test="indicatorsType != null">indicators_type,</if> - <if test="energyIndicatorsId != null and energyIndicatorsId != ''">energy_indicators_id,</if> - <if test="nodeName != null">node_name,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="nodeId != null">#{nodeId},</if> - <if test="timeType != null">#{timeType},</if> - <if test="dataTime != null">#{dataTime},</if> - <if test="name != null">#{name},</if> - <if test="number != null">#{number},</if> - <if test="unit != null">#{unit},</if> - <if test="delFlag != null">#{delFlag},</if> - <if test="createBy != null">#{createBy},</if> - <if test="createTime != null">#{createTime},</if> - <if test="updateBy != null">#{updateBy},</if> - <if test="updateTime != null">#{updateTime},</if> - <if test="remark != null">#{remark},</if> - <if test="energyType != null">#{energyType},</if> - <if test="indicatorsType != null">#{indicatorsType},</if> - <if test="energyIndicatorsId != null and energyIndicatorsId != ''">#{energyIndicatorsId},</if> - <if test="nodeName != null">#{nodeName},</if> - </trim> - </insert> - - <update id="updateEnergyIndicators" parameterType="EnergyIndicators"> - update energy_indicators - <trim prefix="SET" suffixOverrides=","> - <if test="timeType != null">time_type = #{timeType},</if> - <if test="dataTime != null">data_time = #{dataTime},</if> - <if test="name != null">name = #{name},</if> - <if test="number != null">number = #{number},</if> - <if test="unit != null">unit = #{unit},</if> - <if test="delFlag != null">del_flag = #{delFlag},</if> - <if test="createBy != null">create_by = #{createBy},</if> - <if test="createTime != null">create_time = #{createTime},</if> - <if test="updateBy != null">update_by = #{updateBy},</if> - <if test="updateTime != null">update_time = #{updateTime},</if> - <if test="remark != null">remark = #{remark},</if> - <if test="energyType != null">energy_type = #{energyType},</if> - <if test="indicatorsType != null">indicators_type = #{indicatorsType},</if> - <if test="energyIndicatorsId != null and energyIndicatorsId != ''">energy_indicators_id = #{energyIndicatorsId},</if> - <if test="nodeName != null">node_name = #{nodeName},</if> - </trim> - where energy_indicators_id = #{energyIndicatorsId} - </update> - - <delete id="deleteEnergyIndicatorsByEnergyIndicatorsId" parameterType="String"> - delete from energy_indicators where energy_indicators_id = #{energyIndicatorsId} - </delete> - - <delete id="deleteEnergyIndicatorsByEnergyIndicatorsIds" parameterType="String"> - delete from energy_indicators where energy_indicators_id in - <foreach item="energyIndicatorsId" collection="array" open="(" separator="," close=")"> - #{energyIndicatorsId} - </foreach> - </delete> -</mapper> diff --git a/zhitan-system/target/classes/mapper/gatewaysetting/GatewaySettingMapper.xml b/zhitan-system/target/classes/mapper/gatewaysetting/GatewaySettingMapper.xml deleted file mode 100644 index 0b19ef1..0000000 --- a/zhitan-system/target/classes/mapper/gatewaysetting/GatewaySettingMapper.xml +++ /dev/null @@ -1,160 +0,0 @@ -<?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.zhitan.gatewaysetting.mapper.GatewaySettingMapper"> - - <resultMap type="GatewaySetting" id="GatewaySettingResult"> - <result property="id" column="id" /> - <result property="gatewayNum" column="gateway_num" /> - <result property="gatewayName" column="gateway_name" /> - <result property="specsModel" column="specs_model" /> - <result property="installLocation" column="install_location" /> - <result property="ipAdd" column="ip_add" /> - <result property="runStatus" column="run_status" /> - <result property="hbtTime" column="hbt_time" /> - <result property="deviceNum" column="device_num" /> - <result property="ptNum" column="pt_num" /> - <result property="createBy" column="create_by" /> - <result property="createTime" column="create_time" /> - <result property="updateBy" column="update_by" /> - <result property="updateTime" column="update_time" /> - </resultMap> - - <sql id="selectGatewaySettingVo"> - select id, gateway_num, gateway_name, specs_model, install_location, ip_add, run_status, hbt_time, device_num, pt_num, create_by, create_time, update_by, update_time from gateway_setting - </sql> - - <select id="selectGatewaySettingList" parameterType="GatewaySetting" resultMap="GatewaySettingResult"> - <include refid="selectGatewaySettingVo"/> - <where> - <if test="gatewayNum != null and gatewayNum != ''"> and gateway_num = #{gatewayNum}</if> - <if test="gatewayName != null and gatewayName != ''"> and gateway_name like concat('%', #{gatewayName}, '%')</if> - <if test="specsModel != null and specsModel != ''"> and specs_model = #{specsModel}</if> - <if test="installLocation != null and installLocation != ''"> and install_location = #{installLocation}</if> - <if test="ipAdd != null and ipAdd != ''"> and ip_add = #{ipAdd}</if> - <if test="runStatus != null and runStatus != ''"> and run_status = #{runStatus}</if> - <if test="hbtTime != null "> and hbt_time = #{hbtTime}</if> - <if test="deviceNum != null and deviceNum != ''"> and device_num = #{deviceNum}</if> - <if test="ptNum != null and ptNum != ''"> and pt_num = #{ptNum}</if> - </where> - </select> - - <select id="selectGatewaySettingById" parameterType="String" resultMap="GatewaySettingResult"> - <include refid="selectGatewaySettingVo"/> - where id = #{id} - </select> - - <insert id="insertGatewaySetting" parameterType="GatewaySetting"> - insert into gateway_setting - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="id != null and id != ''">id,</if> - <if test="gatewayNum != null">gateway_num,</if> - <if test="gatewayName != null">gateway_name,</if> - <if test="specsModel != null">specs_model,</if> - <if test="installLocation != null">install_location,</if> - <if test="ipAdd != null">ip_add,</if> - <if test="runStatus != null">run_status,</if> - <if test="hbtTime != null">hbt_time,</if> - <if test="deviceNum != null">device_num,</if> - <if test="ptNum != null">pt_num,</if> - <if test="createBy != null">create_by,</if> - <if test="createTime != null">create_time,</if> - <if test="updateBy != null">update_by,</if> - <if test="updateTime != null">update_time,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="id != null and id != ''">#{id},</if> - <if test="gatewayNum != null">#{gatewayNum},</if> - <if test="gatewayName != null">#{gatewayName},</if> - <if test="specsModel != null">#{specsModel},</if> - <if test="installLocation != null">#{installLocation},</if> - <if test="ipAdd != null">#{ipAdd},</if> - <if test="runStatus != null">#{runStatus},</if> - <if test="hbtTime != null">#{hbtTime},</if> - <if test="deviceNum != null">#{deviceNum},</if> - <if test="ptNum != null">#{ptNum},</if> - <if test="createBy != null">#{createBy},</if> - <if test="createTime != null">#{createTime},</if> - <if test="updateBy != null">#{updateBy},</if> - <if test="updateTime != null">#{updateTime},</if> - </trim> - </insert> - - <update id="updateGatewaySetting" parameterType="GatewaySetting"> - update gateway_setting - <trim prefix="SET" suffixOverrides=","> - <if test="gatewayNum != null">gateway_num = #{gatewayNum},</if> - <if test="gatewayName != null">gateway_name = #{gatewayName},</if> - <if test="specsModel != null">specs_model = #{specsModel},</if> - <if test="installLocation != null">install_location = #{installLocation},</if> - <if test="ipAdd != null">ip_add = #{ipAdd},</if> - <if test="runStatus != null">run_status = #{runStatus},</if> - <if test="hbtTime != null">hbt_time = #{hbtTime},</if> - <if test="deviceNum != null">device_num = #{deviceNum},</if> - <if test="ptNum != null">pt_num = #{ptNum},</if> - <if test="createBy != null">create_by = #{createBy},</if> - <if test="createTime != null">create_time = #{createTime},</if> - <if test="updateBy != null">update_by = #{updateBy},</if> - <if test="updateTime != null">update_time = #{updateTime},</if> - </trim> - where id = #{id} - </update> - - <delete id="deleteGatewaySettingById" parameterType="String"> - delete from gateway_setting where id = #{id} - </delete> - - <delete id="deleteGatewaySettingByIds" parameterType="String"> - delete from gateway_setting where id in - <foreach item="id" collection="array" open="(" separator="," close=")"> - #{id} - </foreach> - </delete> - - <select id="checkOne" resultType="int" parameterType="GatewaySetting"> - select count(1) from gateway_setting - where - gateway_num=#{gatewayNum} - <if test="id!=null and id !=''"> - and id != #{id} - </if> - - </select> - - <select id="ptNum" resultType="com.zhitan.gatewaysetting.domain.GatewaySetting" parameterType="GatewaySetting"> - select sum(device_num) device_num,sum(pt_num) pt_num from gateway_setting - <where> - <if test="gatewayNum != null and gatewayNum != ''"> and gateway_num = #{gatewayNum}</if> - <if test="gatewayName != null and gatewayName != ''"> and gateway_name like concat('%', #{gatewayName}, '%')</if> - <if test="specsModel != null and specsModel != ''"> and specs_model = #{specsModel}</if> - <if test="installLocation != null and installLocation != ''"> and install_location = #{installLocation}</if> - <if test="ipAdd != null and ipAdd != ''"> and ip_add = #{ipAdd}</if> - <if test="runStatus != null and runStatus != ''"> and run_status = #{runStatus}</if> - <if test="hbtTime != null "> and hbt_time = #{hbtTime}</if> - <if test="deviceNum != null and deviceNum != ''"> and device_num = #{deviceNum}</if> - <if test="ptNum != null and ptNum != ''"> and pt_num = #{ptNum}</if> - </where> - </select> - - <update id="addNum" parameterType="GatewaySetting"> - update gateway_setting set device_num = COALESCE(NULLIF(device_num,null),'0')+ #{deviceNum}, pt_num = COALESCE(NULLIF(pt_num,null),'0')+#{ptNum},update_time=now(),update_by=#{updateBy} - where id = #{id} - </update> - - <update id="subNum" parameterType="GatewaySetting"> - update gateway_setting set device_num = - CASE - - WHEN COALESCE(NULLIF(device_num,null),'0')- #{deviceNum} > 0 THEN - COALESCE(NULLIF(device_num,null),'0')- #{deviceNum} ELSE 0 - END - , pt_num = - CASE - - WHEN COALESCE(NULLIF(pt_num,null),'0')-#{ptNum} > 0 THEN - COALESCE(NULLIF(pt_num,null),'0')-#{ptNum} ELSE 0 - END,update_time=now(),update_by=#{updateBy} - where id = #{id} - </update> -</mapper> diff --git a/zhitan-system/target/classes/mapper/keyequipment/DailyKeyEquipmentMapper.xml b/zhitan-system/target/classes/mapper/keyequipment/DailyKeyEquipmentMapper.xml deleted file mode 100644 index 22c3ec2..0000000 --- a/zhitan-system/target/classes/mapper/keyequipment/DailyKeyEquipmentMapper.xml +++ /dev/null @@ -1,93 +0,0 @@ -<?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.zhitan.keyequipment.mapper.DailyKeyEquipmentMapper"> - <resultMap id="dataItemMap" type="com.zhitan.keyequipment.domain.DailyKeyEquipment"> - <result column="index_id" property="indexId"/> - <result column="index_name" property="indexName"/> - <result column="time_type" property="timeType"/> - <result column="time_code" property="timeCode"/> - <result column="unit_id" property="unitId"/> - <result column="value1" property="value1"/> - <result column="value2" property="value2"/> - <result column="value3" property="value3"/> - <result column="value4" property="value4"/> - <result column="value5" property="value5"/> - <result column="value6" property="value6"/> - <result column="value7" property="value7"/> - <result column="value8" property="value8"/> - <result column="value9" property="value9"/> - <result column="value10" property="value10"/> - <result column="value11" property="value11"/> - <result column="value12" property="value12"/> - <result column="value13" property="value13"/> - <result column="value14" property="value14"/> - <result column="value15" property="value15"/> - <result column="value16" property="value16"/> - <result column="value17" property="value17"/> - <result column="value18" property="value18"/> - <result column="value19" property="value19"/> - <result column="value20" property="value20"/> - <result column="value21" property="value21"/> - <result column="value22" property="value22"/> - <result column="value23" property="value23"/> - <result column="value0" property="value0"/> - </resultMap> - <select id="getdailyKeyEquipmentList" resultMap="dataItemMap"> - SELECT - aa.index_id, - aa.index_name, - <foreach item="item" index="index" collection="dataList"> - MAX ( CASE WHEN data_time = #{item.dataTime} THEN "value" END ) AS ${item.value}, - </foreach> - aa.time_type - FROM - ( - SELECT - ci.index_id, - ci.NAME AS "index_name", - di."value", - di.data_time, - di.time_type - FROM - data_item di LEFT JOIN energy_index ci ON di.index_id = ci.index_id - LEFT JOIN facility_archives f ON f."id"=ci.equipment - WHERE - di.data_time >= #{beginTime} - AND di.data_time < #{endTime} - AND di.index_id IN <foreach item="indexId" index="index" collection="indexIds" open="(" separator="," close=")">#{indexId} </foreach> - AND di.time_type = #{timeType} - <if test="indexStorageId !='' and indexStorageId !=null"> - and ci.equipment=#{indexStorageId} - </if> - ) aa - GROUP BY - aa.index_id,aa.index_name,aa.time_type - </select> - - <select id="getListChart" resultMap="dataItemMap"> - SELECT - di.index_id, - ci.name AS "index_name", - ci.unit_id, - di."value", - di.data_time, - di.time_type, - di.time_code - FROM - data_item di LEFT JOIN energy_index ci ON di.index_id = ci.index_id - WHERE - di.index_id =#{indexId} - AND di.data_time < #{endTime} - AND di.data_time >= #{beginTime} - AND di.time_type = #{timeType} - order by di.data_time - </select> - <select id="getFacilityArchives" resultType="com.zhitan.basicdata.domain.FacilityArchives"> - SELECT ID,code,facility_name AS facilityName FROM facility_archives - </select> - <select id="getPointFacility" resultType="com.zhitan.basicdata.domain.FacilityArchives"> - SELECT ID,code,facility_name AS facilityName FROM facility_archives where point_flag='Y' - </select> -</mapper> diff --git a/zhitan-system/target/classes/mapper/keyequipment/MonthlyKeyEquipmentMapper.xml b/zhitan-system/target/classes/mapper/keyequipment/MonthlyKeyEquipmentMapper.xml deleted file mode 100644 index 19f8a86..0000000 --- a/zhitan-system/target/classes/mapper/keyequipment/MonthlyKeyEquipmentMapper.xml +++ /dev/null @@ -1,95 +0,0 @@ -<?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.zhitan.keyequipment.mapper.MonthlyKeyEquipmentMapper"> - <resultMap id="dataItemMap" type="com.zhitan.keyequipment.domain.MonthlyKeyEquipment"> - <result column="index_id" property="indexId"/> - <result column="index_name" property="indexName"/> - <result column="time_type" property="timeType"/> - <result column="time_code" property="timeCode"/> - <result column="unit_id" property="unitId"/> - <result column="value1" property="value1"/> - <result column="value2" property="value2"/> - <result column="value3" property="value3"/> - <result column="value4" property="value4"/> - <result column="value5" property="value5"/> - <result column="value6" property="value6"/> - <result column="value7" property="value7"/> - <result column="value8" property="value8"/> - <result column="value9" property="value9"/> - <result column="value10" property="value10"/> - <result column="value11" property="value11"/> - <result column="value12" property="value12"/> - <result column="value13" property="value13"/> - <result column="value14" property="value14"/> - <result column="value15" property="value15"/> - <result column="value16" property="value16"/> - <result column="value17" property="value17"/> - <result column="value18" property="value18"/> - <result column="value19" property="value19"/> - <result column="value20" property="value20"/> - <result column="value21" property="value21"/> - <result column="value22" property="value22"/> - <result column="value23" property="value23"/> - <result column="value24" property="value24"/> - <result column="value25" property="value25"/> - <result column="value26" property="value26"/> - <result column="value27" property="value27"/> - <result column="value28" property="value28"/> - <result column="value29" property="value29"/> - <result column="value30" property="value30"/> - <result column="value31" property="value31"/> - </resultMap> - <!--鍏ㄥ巶鑳借�楃粺璁�--> - <select id="getMonthlyKeyEquipmentList" resultMap="dataItemMap"> - SELECT - aa.index_id, - aa.index_name, - <foreach item="item" index="index" collection="dataList"> - MAX ( CASE WHEN data_time = #{item.dataTime} THEN "value" END ) AS ${item.value}, - </foreach> - aa.time_type - FROM - ( - SELECT - ci.index_id, - ci.NAME AS "index_name", - di."value", - di.data_time, - di.time_type - FROM - data_item di LEFT JOIN energy_index ci ON di.index_id = ci.index_id - LEFT JOIN facility_archives f ON f."id"=ci.equipment - WHERE - di.data_time >= #{beginTime} - AND di.data_time < #{endTime} - AND di.index_id IN <foreach item="indexId" index="index" collection="indexIds" open="(" separator="," close=")">#{indexId} </foreach> - AND di.time_type = #{timeType} - <if test="indexStorageId !='' and indexStorageId !=null"> - and ci.equipment=#{indexStorageId} - </if> - ) aa - GROUP BY - aa.index_id,aa.index_name,aa.time_type - </select> - - <select id="getListChart" resultMap="dataItemMap"> - SELECT - di.index_id, - ci.name AS "index_name", - ci.unit_id, - di."value", - di.data_time, - di.time_type, - di.time_code - FROM - data_item di LEFT JOIN energy_index ci ON di.index_id = ci.index_id - WHERE - di.index_id =#{indexId} - AND di.data_time >= #{beginTime} - AND di.data_time < #{endTime} - AND di.time_type = #{timeType} - order by di.data_time - </select> -</mapper> diff --git a/zhitan-system/target/classes/mapper/keyequipment/YearKeyEquipmentMapper.xml b/zhitan-system/target/classes/mapper/keyequipment/YearKeyEquipmentMapper.xml deleted file mode 100644 index 6a2316e..0000000 --- a/zhitan-system/target/classes/mapper/keyequipment/YearKeyEquipmentMapper.xml +++ /dev/null @@ -1,76 +0,0 @@ -<?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.zhitan.keyequipment.mapper.YearKeyEquipmentMapper"> - <resultMap id="dataItemMap" type="com.zhitan.keyequipment.domain.YearKeyEquipment"> - <result column="index_id" property="indexId"/> - <result column="index_name" property="indexName"/> - <result column="time_type" property="timeType"/> - <result column="time_code" property="timeCode"/> - <result column="unit_id" property="unitId"/> - <result column="value1" property="value1"/> - <result column="value2" property="value2"/> - <result column="value3" property="value3"/> - <result column="value4" property="value4"/> - <result column="value5" property="value5"/> - <result column="value6" property="value6"/> - <result column="value7" property="value7"/> - <result column="value8" property="value8"/> - <result column="value9" property="value9"/> - <result column="value10" property="value10"/> - <result column="value11" property="value11"/> - <result column="value12" property="value12"/> - </resultMap> - <!--鍏ㄥ巶鑳借�楃粺璁�--> - <select id="getYearKeyEquipmentList" resultMap="dataItemMap"> - SELECT - aa.index_id, - aa.index_name, - <foreach item="item" index="index" collection="dataList"> - MAX ( CASE WHEN data_time = #{item.dataTime} THEN "value" END ) AS ${item.value}, - </foreach> - aa.time_type - FROM - ( - SELECT - ci.index_id, - ci.NAME AS "index_name", - di."value", - di.data_time, - di.time_type - FROM - data_item di LEFT JOIN energy_index ci ON di.index_id = ci.index_id - LEFT JOIN facility_archives f ON f."id"=ci.equipment - WHERE - di.data_time >= #{beginTime} - AND di.data_time < #{endTime} - AND di.index_id IN <foreach item="indexId" index="index" collection="indexIds" open="(" separator="," close=")">#{indexId} </foreach> - AND di.time_type = #{timeType} - <if test="indexStorageId !='' and indexStorageId !=null"> - and ci.equipment=#{indexStorageId} - </if> - ) aa - GROUP BY - aa.index_id,aa.index_name,aa.time_type - </select> - - <select id="getListChart" resultMap="dataItemMap"> - SELECT - di.index_id, - ci.name AS "index_name", - ci.unit_id, - di."value", - di.data_time, - di.time_type, - di.time_code - FROM - data_item di LEFT JOIN energy_index ci ON di.index_id = ci.index_id - WHERE - di.index_id =#{indexId} - AND di.data_time < #{endTime} - AND di.data_time >= #{beginTime} - AND di.time_type = #{timeType} - order by di.data_time - </select> -</mapper> diff --git a/zhitan-system/target/classes/mapper/meter/MeterImplementMapper.xml b/zhitan-system/target/classes/mapper/meter/MeterImplementMapper.xml deleted file mode 100644 index 3116319..0000000 --- a/zhitan-system/target/classes/mapper/meter/MeterImplementMapper.xml +++ /dev/null @@ -1,89 +0,0 @@ -<?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.zhitan.meter.mapper.MetersMapper"> - - <resultMap type="MeterImplements" id="MeterImplementResult"> - <result property="id" column="id" /> - <result property="code" column="code" /> - <result property="meterName" column="meter_name" /> - <result property="meterType" column="meter_type" /> - <result property="modelNumber" column="model_number" /> - <result property="measureRange" column="measure_range" /> - <result property="manufacturer" column="manufacturer" /> - <result property="personCharge" column="person_charge" /> - <result property="installactionLocation" column="installaction_location" /> - <result property="startTime" column="start_time" /> - <result property="checkCycle" column="check_cycle" /> - <result property="reminderCycle" column="reminder_cycle" /> - <result property="meterStatus" column="meter_status" /> - <result property="delFlage" column="del_flage" /> - <result property="remark" column="remark" /> - <result property="createTime" column="create_time" /> - <result property="createBy" column="create_by" /> - <result property="updateTime" column="update_time" /> - <result property="updateBy" column="update_by" /> - <result property="txflage" column="txflage" /> - <result property="putrunTime" column="putrun_time" /> - </resultMap> - - - <sql id="selectMeterImplementVo"> - SELECT - mi.meter_name - FROM - meter_implement mi - - </sql> - - <select id="listMeterData" resultType="com.zhitan.meter.domain.MeterImplements"> - <include refid="selectMeterImplementVo"/> - WHERE - mi.meter_type = #{meterType} - GROUP BY - meter_name - - </select> - - <sql id="selectMeterConfigurationVo"> - SELECT - mi."id", - mi.meter_name, - ei.index_id, - ei.code, - ei."name" - FROM - meter_implement mi - LEFT JOIN - energy_index ei - ON mi."id" = ei.meter_id - - </sql> - <select id="listConfigurationData" resultType="com.zhitan.meter.domain.MeterParam" parameterType="string"> - <include refid="selectMeterConfigurationVo"/> - WHERE - mi.meter_type = #{meterType} - AND ei.index_type = #{indexType} - </select> - - - <select id="listConfigData" resultType="com.zhitan.meter.domain.MeterConfig" parameterType="string"> - SELECT - mc.id, - mc.table_name, - mc.step_min, - mc.step_max, - mc.max_value, - mc.min_value, - mc.index_type, - mc.table_value - FROM - meter_config mc - WHERE - mc.index_type = #{indexType} - - </select> - - -</mapper> \ No newline at end of file diff --git a/zhitan-system/target/classes/mapper/model/CalcFunctionMapper.xml b/zhitan-system/target/classes/mapper/model/CalcFunctionMapper.xml deleted file mode 100644 index d9c32f5..0000000 --- a/zhitan-system/target/classes/mapper/model/CalcFunctionMapper.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?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.zhitan.model.mapper.CalcFunctionMapper"> - - <resultMap type="com.zhitan.model.domain.CalcFunction" id="CalcFunctionResult"> - <result property="id" column="id"/> - <result property="info" column="info"/> - <result property="funcName" column="func_name"/> - <result property="funcText" column="func_text"/> - </resultMap> - - <sql id="selectCalcFunctionVo"> - select id, func_name, func_text, info - from calc_function - </sql> - - <select id="selectCalcFunctionList" parameterType="com.zhitan.model.domain.CalcFunction" resultMap="CalcFunctionResult"> - <include refid="selectCalcFunctionVo"/> - <where> - <if test="funcName != null and funcName != ''">and func_name like concat('%', #{funcName}, '%')</if> - </where> - </select> - - <select id="selectCalcFunctionById" parameterType="String" resultMap="CalcFunctionResult"> - <include refid="selectCalcFunctionVo"/> - where id = #{id} - </select> - - <insert id="insertCalcFunction" parameterType="com.zhitan.model.domain.CalcFunction"> - insert into calc_function - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="id != null and id != ''">id,</if> - <if test="funcName != null and funcName != ''">func_name,</if> - <if test="funcText != null and funcText != ''">func_text,</if> - <if test="info != null and info != ''">info,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="id != null and id != ''">#{id},</if> - <if test="funcName != null and funcName != ''">#{funcName},</if> - <if test="funcText != null and funcText != ''">#{funcText},</if> - <if test="info != null and info != ''">#{info},</if> - </trim> - </insert> - - <update id="updateCalcFunction" parameterType="com.zhitan.model.domain.CalcFunction"> - update calc_function - <trim prefix="SET" suffixOverrides=","> - <if test="info != null and info != ''">info = #{info},</if> - <if test="funcName != null and funcName != ''">func_name = #{funcName},</if> - <if test="funcText != null and funcText != ''">func_text = #{funcText},</if> - </trim> - where id = #{id} - </update> - - <delete id="deleteCalcFunctionById" parameterType="String"> - delete - from calc_function - where id = #{id} - </delete> - - <delete id="deleteCalcFunctionByIds" parameterType="String"> - delete from calc_function where id in - <foreach item="id" collection="array" open="(" separator="," close=")"> - #{id} - </foreach> - </delete> - -</mapper> diff --git a/zhitan-system/target/classes/mapper/model/DaqTemplateMapper.xml b/zhitan-system/target/classes/mapper/model/DaqTemplateMapper.xml deleted file mode 100644 index 7259945..0000000 --- a/zhitan-system/target/classes/mapper/model/DaqTemplateMapper.xml +++ /dev/null @@ -1,93 +0,0 @@ -<?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.zhitan.model.mapper.DaqTemplateMapper"> - - <resultMap type="com.zhitan.model.domain.DaqTemplate" id="DaqTemplateResult"> - <result property="id" column="id"/> - <result property="code" column="code"/> - <result property="name" column="name"/> - <result property="deviceType" column="device_type"/> - <result property="unit" column="unit"/> - </resultMap> - - <sql id="selectDaqTemplateVo"> - select id, code, name, device_type, unit - from daq_template - </sql> - - <select id="selectDaqTemplateList" parameterType="com.zhitan.model.domain.DaqTemplate" resultMap="DaqTemplateResult"> - <include refid="selectDaqTemplateVo"/> - <where> - <if test="code != null and code != ''">and code = #{code}</if> - <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if> - <if test="deviceType != null and deviceType != ''">and device_type = #{deviceType}</if> - </where> - order by device_type, code - </select> - - <select id="selectDaqTemplateById" parameterType="String" resultMap="DaqTemplateResult"> - <include refid="selectDaqTemplateVo"/> - where id = #{id} - </select> - <select id="dapHasExist" resultType="java.lang.Integer"> - SELECT COUNT(*) - FROM daq_template - WHERE code = #{code} - AND device_type = #{deviceType} - </select> - <select id="dapHasExistWhenUpdate" resultType="java.lang.Integer"> - SELECT COUNT(*) - FROM daq_template - WHERE code = #{code} - AND device_type = #{deviceType} - AND id != #{id} - </select> - <select id="listTemplate" resultType="com.zhitan.model.domain.DaqTemplate"> - <include refid="selectDaqTemplateVo"/> - </select> - - <insert id="insertDaqTemplate" parameterType="com.zhitan.model.domain.DaqTemplate"> - insert into daq_template - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="id != null and id != ''">id,</if> - <if test="code != null and code != ''">code,</if> - <if test="name != null and name != ''">name,</if> - <if test="deviceType != null and deviceType != ''">device_type,</if> - <if test="unit != null and unit != ''">unit,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="id != null and id != ''">#{id},</if> - <if test="code != null and code != ''">#{code},</if> - <if test="name != null and name != ''">#{name},</if> - <if test="deviceType != null and deviceType != ''">#{deviceType},</if> - <if test="unit != null and unit != ''">#{unit},</if> - </trim> - </insert> - - <update id="updateDaqTemplate" parameterType="com.zhitan.model.domain.DaqTemplate"> - update daq_template - <trim prefix="SET" suffixOverrides=","> - <if test="code != null and code != ''">code = #{code},</if> - <if test="name != null and name != ''">name = #{name},</if> - <if test="deviceType != null and deviceType != ''">device_type = #{deviceType},</if> - <if test="unit != null and unit != ''">unit = #{unit},</if> - </trim> - where id = #{id} - </update> - - <delete id="deleteDaqTemplateById" parameterType="String"> - delete - from daq_template - where id = #{id} - </delete> - - <delete id="deleteDaqTemplateByIds" parameterType="String"> - delete from daq_template where id in - <foreach item="id" collection="array" open="(" separator="," close=")"> - #{id} - </foreach> - </delete> - -</mapper> diff --git a/zhitan-system/target/classes/mapper/model/EnergyIndexMapper.xml b/zhitan-system/target/classes/mapper/model/EnergyIndexMapper.xml deleted file mode 100644 index 3ea43ac..0000000 --- a/zhitan-system/target/classes/mapper/model/EnergyIndexMapper.xml +++ /dev/null @@ -1,394 +0,0 @@ -<?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.zhitan.model.mapper.EnergyIndexMapper"> - - <resultMap type="EnergyIndex" id="EnergyIndexResult"> - <result property="indexId" column="index_id"/> - <result property="name" column="name"/> - <result property="code" column="code"/> - <result property="indexType" column="index_type"/> - <result property="indexCategory" column="index_category"/> - <result property="remark" column="remark"/> - <result property="unitId" column="unit_id"/> - <result property="meterId" column="meter_id"/> - <result property="orderNum" column="order_num"/> - <result property="equipment" column="equipment"/> - <result property="energyId" column="energy_id"/> - <result property="meterName" column="meter_name"/> - </resultMap> - - <sql id="selectEnergyIndexVo"> - select index_id, - name, - code, - index_type, - index_category, - remark, - unit_id, - meter_id, - order_num, - equipment, - energy_id - from energy_index - </sql> - - <select id="selectEnergyIndexList" parameterType="EnergyIndex" resultMap="EnergyIndexResult"> - select ni.index_id, name, code, index_type, remark, unit_id, index_category - from energy_index ei left join node_index ni on ei.index_id = ni.index_id - <where> - <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if> - <if test="code != null and code != ''">and code like concat('%', #{code}, '%')</if> - <if test="indexType != null">and index_type = #{indexType}</if> - <if test="nodeId != null and nodeId != ''">and node_id = #{nodeId}</if> - <if test="indexCategory != null and indexCategory != ''">and index_category = - #{indexCategory} - </if> - </where> - order by ei.order_num - </select> - - <select id="selectEnergyIndexById" parameterType="String" resultMap="EnergyIndexResult"> - <include refid="selectEnergyIndexVo"/> - where index_id = #{indexId} - order by order_num - </select> - - <select id="selectEnergyIndexByIds" resultType="com.zhitan.model.domain.EnergyIndex"> - <include refid="selectEnergyIndexVo"/> - where - index_id IN - <foreach collection="list" item="indexId" open="(" separator="," close=")"> - #{indexId} - </foreach> - </select> - - <select id="energyIndexHasExist" resultType="java.lang.Integer"> - select count(*) - from energy_index - where code = #{code}; - </select> - <select id="energyIndexHasExistWhenUpdate" resultType="java.lang.Integer"> - select count(*) - from energy_index - where code = #{code} - AND index_id != #{indexId}; - </select> - <select id="getMeterIndex" resultMap="EnergyIndexResult"> - <include refid="selectEnergyIndexVo"/> - where meter_id = #{meterId} - order by order_num - </select> - <select id="modelHasConfig" resultType="java.lang.Integer"> - select count(*) - from model_node - where model_code = #{modelCode}; - </select> - <select id="selectCollectIndex" resultMap="EnergyIndexResult"> - <include refid="selectEnergyIndexVo"/> - where meter_id = #{deviceId} - order by order_num - </select> - <select id="getEnergyIndexByIds" resultMap="EnergyIndexResult"> - <include refid="selectEnergyIndexVo"/> - where index_id in - <foreach item="indexId" collection="list" open="(" separator="," close=")"> - #{indexId} - </foreach> - order by order_num - </select> - <select id="getEnergyIndexByCodes" resultMap="EnergyIndexResult"> - <include refid="selectEnergyIndexVo"/> - where code in - <foreach item="indexCode" collection="list" open="(" separator="," close=")"> - #{indexCode} - </foreach> - order by order_num - </select> - <select id="getIndexByNodeAndChildrenNode" resultMap="EnergyIndexResult"> - select ei.* - from energy_index ei - left join node_index ni on ei.index_id = ni.index_id - where ni.node_id in (select node_id - from model_node - where address like (select address - from model_node - where node_id = #{nodeId}) || '%') - order by ei.order_num - </select> - <select id="searchIndexByNodeAndChildrenNode" resultMap="EnergyIndexResult"> - select ei.* - from energy_index ei - left join node_index ni on ei.index_id = ni.index_id - where ni.node_id in (select node_id - from model_node - where address like (select address - from model_node - where node_id = #{nodeId}) || '%') - and (ei.code like concat('%', #{filter}, '%') or ei.name like concat('%', #{filter}, '%')) - order by ei.order_num - </select> - <select id="selectEnergyIndex" resultMap="EnergyIndexResult"> - select ni.index_id, name, code, index_type, remark, unit_id, index_category - from energy_index ei left join node_index ni on ei.index_id = ni.index_id - <where> - <if test="codeOrName != null and codeOrName != ''">and (name like concat('%', #{codeOrName}, - '%') or code like concat('%', #{codeOrName}, '%')) - </if> - <if test="nodeId != null and nodeId != ''">and node_id = #{nodeId}</if> - <if test="indexType != null">and index_type = #{indexType}</if> - <if test="indexCategory != null and indexCategory != ''">and index_category = - #{indexCategory} - </if> - </where> - order by ei.order_num - </select> - - <insert id="insertEnergyIndex" parameterType="EnergyIndex"> - insert into energy_index - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="indexId != null and indexId != ''">index_id,</if> - <if test="name != null and name != ''">name,</if> - <if test="code != null and code != ''">code,</if> - <if test="indexType != null">index_type,</if> - <if test="indexCategory != null and indexCategory != ''"> - index_category, - </if> - <if test="remark != null and remark != ''">remark,</if> - <if test="unitId != null and unitId != ''">unit_id,</if> - <if test="orderNum != null">order_num,</if> - <if test="equipment != null">equipment,</if> - <if test="energyId != null">energy_id,</if> - </trim> - <trim prefix="values (" suffix=");" suffixOverrides=","> - <if test="indexId != null and indexId != ''"> - #{indexId}, - </if> - <if test="name != null and name != ''">#{name},</if> - <if test="code != null and code != ''">#{code},</if> - <if test="indexType != null"> - #{indexType}, - </if> - <if test="indexCategory != null and indexCategory != ''"> - #{indexCategory}, - </if> - <if test="remark != null and remark != ''">#{remark}, - </if> - <if test="unitId != null and unitId != ''">#{unitId}, - </if> - <if test="orderNum != null">#{orderNum}, - </if> - <if test="equipment != null">#{equipment}, - </if> - <if test="energyId != null">#{energyId}, - </if> - </trim> - - </insert> - <insert id="insertNodeIndex"> - insert into node_index (node_id, index_id) values (#{nodeId}, #{indexId}); - </insert> - <insert id="insertEnergyIndices"> - <foreach collection="energyIndices" item="energyIndex" separator=";"> - insert into energy_index - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="energyIndex.indexId != null and energyIndex.indexId != ''">index_id,</if> - <if test="energyIndex.name != null and energyIndex.name != ''">name,</if> - <if test="energyIndex.code != null and energyIndex.code != ''">code,</if> - <if test="energyIndex.indexType != null">index_type,</if> - <if test="energyIndex.indexCategory != null and energyIndex.indexCategory != ''"> - index_category, - </if> - <if test="energyIndex.remark != null and energyIndex.remark != ''">remark,</if> - <if test="energyIndex.unitId != null and energyIndex.unitId != ''">unit_id,</if> - <if test="energyIndex.meterId != null and energyIndex.meterId != ''">meter_id,</if> - <if test="energyIndex.orderNum != null">order_num,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="energyIndex.indexId != null and energyIndex.indexId != ''"> - #{energyIndex.indexId}, - </if> - <if test="energyIndex.name != null and energyIndex.name != ''">#{energyIndex.name},</if> - <if test="energyIndex.code != null and energyIndex.code != ''">#{energyIndex.code},</if> - <if test="energyIndex.indexType != null"> - #{energyIndex.indexType}, - </if> - <if test="energyIndex.indexCategory != null and energyIndex.indexCategory != ''"> - #{energyIndex.indexCategory}, - </if> - <if test="energyIndex.remark != null and energyIndex.remark != ''">#{energyIndex.remark}, - </if> - <if test="energyIndex.unitId != null and energyIndex.unitId != ''">#{energyIndex.unitId}, - </if> - <if test="energyIndex.meterId != null and energyIndex.meterId != ''"> - #{energyIndex.meterId}, - </if> - <if test="energyIndex.orderNum != null">#{energyIndex.orderNum},</if> - </trim> - </foreach> - </insert> - <insert id="saveEnergyIndex"> - <foreach collection="list" item="energyIndex" separator=";"> - insert into energy_index - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="energyIndex.indexId != null and energyIndex.indexId != ''">index_id,</if> - <if test="energyIndex.name != null and energyIndex.name != ''">name,</if> - <if test="energyIndex.code != null and energyIndex.code != ''">code,</if> - <if test="energyIndex.indexType != null">index_type,</if> - <if test="energyIndex.indexCategory != null and energyIndex.indexCategory != ''"> - index_category, - </if> - <if test="energyIndex.remark != null and energyIndex.remark != ''">remark,</if> - <if test="energyIndex.unitId != null and energyIndex.unitId != ''">unit_id,</if> - <if test="energyIndex.meterId != null and energyIndex.meterId != ''">meter_id,</if> - <if test="energyIndex.orderNum != null">order_num,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="energyIndex.indexId != null and energyIndex.indexId != ''"> - #{energyIndex.indexId}, - </if> - <if test="energyIndex.name != null and energyIndex.name != ''">#{energyIndex.name},</if> - <if test="energyIndex.code != null and energyIndex.code != ''">#{energyIndex.code},</if> - <if test="energyIndex.indexType != null"> - #{energyIndex.indexType}, - </if> - <if test="energyIndex.indexCategory != null and energyIndex.indexCategory != ''"> - #{energyIndex.indexCategory}, - </if> - <if test="energyIndex.remark != null and energyIndex.remark != ''">#{energyIndex.remark}, - </if> - <if test="energyIndex.unitId != null and energyIndex.unitId != ''">#{energyIndex.unitId}, - </if> - <if test="energyIndex.meterId != null and energyIndex.meterId != ''"> - #{energyIndex.meterId}, - </if> - <if test="energyIndex.orderNum != null">#{energyIndex.orderNum},</if> - </trim> - ; - insert into node_index (node_id, index_id) values (#{energyIndex.nodeId}, - #{energyIndex.indexId}); - </foreach> - </insert> - - <update id="updateEnergyIndex" parameterType="EnergyIndex"> - update energy_index - <trim prefix="SET" suffixOverrides=","> - <if test="name != null and name != ''">name = #{name},</if> - <if test="code != null and code != ''">code = #{code},</if> - <if test="indexType != null">index_type = #{indexType},</if> - <if test="indexCategory != null and indexCategory != ''">index_category = #{indexCategory}, - </if> - <if test="remark != null and remark != ''">remark = #{remark},</if> - <if test="unitId != null and unitId != ''">unit_id = #{unitId},</if> - <if test="orderNum != null">order_num = #{orderNum},</if> - <if test="equipment != null">equipment = #{equipment},</if> - <if test="energyId != null">energy_id=#{energyId},</if> - </trim> - where index_id = #{indexId} - </update> - - <delete id="deleteEnergyIndexByIds" parameterType="String"> - delete from energy_index where index_id in - <foreach item="indexId" collection="indexIds" open="(" separator="," close=")"> - #{indexId} - </foreach>; - delete from node_index where node_id = #{nodeId} and index_id in - <foreach item="indexId" collection="indexIds" open="(" separator="," close=")"> - #{indexId} - </foreach>; - </delete> - <delete id="deleteIndexByMeterId"> - delete - from energy_index - where meter_id = #{meterId} - </delete> - <delete id="removeNodeIndex"> - delete from node_index where node_id = #{nodeId} and index_id in - <foreach item="indexId" collection="indexIds" open="(" separator="," close=")"> - #{indexId} - </foreach>; - </delete> - - <select id="getEnergyIndexMeterByCodes" resultMap="EnergyIndexResult"> - select ei.index_id, - ei.name, - ei.code, - ei.index_type, - ei.index_category, - ei.remark, - ei.unit_id, - ei.meter_id, - ei.order_num, - ei.equipment, - ei.energy_id, - meter_name - from energy_index as ei,meter_implement as me - where ei.code in - <foreach item="indexCode" collection="list" open="(" separator="," close=")"> - #{indexCode} - </foreach> - and ei.meter_id = me.id - order by ei.order_num - </select> - - <select id="selectEnergyIndexPage" resultMap="EnergyIndexResult"> - select ni.index_id, name, code, index_type, remark, unit_id, index_category - from energy_index ei left join node_index ni on ei.index_id = ni.index_id - <where> - <if test="query.codeOrName != null and query.codeOrName != ''">and (name like concat('%', #{query.codeOrName}, - '%') or code like concat('%', #{query.codeOrName}, '%')) - </if> - <if test="query.indexType != null">and index_type = #{query.indexType}</if> - <if test="query.nodeId != null and query.nodeId != ''">and ni.node_id = #{query.nodeId}</if> - <if test="query.indexCategory != null and query.indexCategory != ''">and index_category = - #{query.indexCategory} - </if> - </where> - order by ei.order_num - - </select> - <select id="listIndexByMeterIds" resultType="com.zhitan.model.domain.EnergyIndex"> - select ei.index_id, - name, - code, - index_type, - index_category, - remark, - unit_id, - meter_id, - order_num, - equipment, - energy_id - from energy_index ei - left join node_index ni on ei.index_id = ni.index_id - <where> - - <if test="nodeId != null and nodeId != ''">and ni.node_id = #{nodeId}</if> - <if test="meterIds != null"> - and ei.meter_id in - <foreach collection="meterIds" item="meterId" open="(" separator="," close=")"> - #{meterId} - </foreach> - </if> - </where> - </select> - <select id="getiEnergyIndexByCode" resultType="com.zhitan.model.domain.EnergyIndex"> - <include refid="selectEnergyIndexVo"/> - where code = #{cdoe} - </select> - <select id="getIndexByCode" resultType="com.zhitan.model.domain.EnergyIndex"> - SELECT ei.code,mi.meter_name||'_'||ei.name as name from energy_index ei - LEFT JOIN node_device nd on ei.meter_id = nd.device_id - LEFT JOIN meter_implement mi on mi."id" = nd.device_id - <where> - <if test="nodeId != null and nodeId != ''">and nd.node_id = #{nodeId}</if> - <if test="code != null and code != ''"> - and (mi.meter_name like concat('%', #{code}, '%') - or ei.code like concat('%', #{code}, '%') - or ei.name like concat('%', #{code}, '%') - ) - </if> - </where> - </select> -</mapper> diff --git a/zhitan-system/target/classes/mapper/model/IndexFormulaMapper.xml b/zhitan-system/target/classes/mapper/model/IndexFormulaMapper.xml deleted file mode 100644 index a2faccc..0000000 --- a/zhitan-system/target/classes/mapper/model/IndexFormulaMapper.xml +++ /dev/null @@ -1,47 +0,0 @@ -<?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.zhitan.model.mapper.IndexFormulaMapper"> - <resultMap id="formulaMap" type="com.zhitan.model.domain.IndexFormula"> - <result property="id" column="id"/> - <result property="indexId" column="index_id"/> - <result property="formulaText" column="formula_text"/> - <result property="isPvCalc" column="is_pv_calc"/> - </resultMap> - <resultMap id="formulaParamMap" type="com.zhitan.model.domain.IndexFormulaParam"> - <result property="formulaId" column="formula_id"/> - <result property="paramName" column="param_name"/> - <result property="paramValue" column="param_value"/> - </resultMap> - <insert id="insertIndexFormula"> - insert into index_formula (id, index_id, formula_text,is_pv_calc) - values (#{id}, #{indexId}, #{formulaText},#{isPvCalc}); - </insert> - <insert id="saveIndexFormulaParam"> - delete - from index_formula_param - where index_id = #{indexId}; - <foreach collection="indexFormulaParams" item="formulaParam" separator=";"> - insert into index_formula_param (id, formula_id,index_id, param_name, param_value) values - (#{formulaParam.id}, #{formulaParam.formulaId}, #{formulaParam.indexId}, - #{formulaParam.paramName}, - #{formulaParam.paramValue}) - </foreach> - </insert> - <update id="updateIndexFormula"> - update index_formula - set formula_text = #{formulaText},is_pv_calc = #{isPvCalc} - where id = #{id} - </update> - <select id="getFormula" resultMap="formulaMap"> - select * - from index_formula - where index_id = #{indexId} - </select> - <select id="getFormulaParam" resultMap="formulaParamMap"> - select * - from index_formula_param - where index_id = #{indexId} - </select> -</mapper> diff --git a/zhitan-system/target/classes/mapper/model/IndexStorageMapper.xml b/zhitan-system/target/classes/mapper/model/IndexStorageMapper.xml deleted file mode 100644 index a69666a..0000000 --- a/zhitan-system/target/classes/mapper/model/IndexStorageMapper.xml +++ /dev/null @@ -1,58 +0,0 @@ -<?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.zhitan.model.mapper.IndexStorageMapper"> - <resultMap id="indexStorageMap" type="com.zhitan.model.domain.IndexStorage"> - <result property="id" column="id"/> - <result property="indexId" column="index_id"/> - <result property="timeType" column="time_type"/> - <result property="calcType" column="calc_type"/> - <result property="calcText" column="calc_text"/> - <result property="updateTime" column="update_time"/> - <result property="createTime" column="create_time"/> - <result property="isPvCalc" column="is_pv_calc"/> - </resultMap> - <insert id="insertIndexStorage"> - insert into index_storage (id, index_id, time_type, calc_type, calc_text, create_time, - update_time,is_pv_calc) - values (#{id}, #{indexId}, #{timeType}, #{calcType}, #{calcText}, now(), now(),#{isPvCalc}); - </insert> - <insert id="saveParams"> - delete from storage_parameter where storage_id = #{storageId}; - <foreach collection="parameterIds" item="paramId" separator=";"> - insert into storage_parameter (storage_id, index_id) - values (#{storageId}, #{paramId}); - </foreach> - </insert> - <update id="updateIndexStorage"> - update index_storage - set index_id = #{indexId}, - calc_type = #{calcType}, - calc_text = #{calcText}, - update_time = now(), - is_pv_calc = #{isPvCalc} - where id = #{id}; - </update> - <select id="getIndexStorage" resultMap="indexStorageMap"> - select * - from index_storage - where index_id = #{indexId}; - </select> - <select id="getAllCalcIndexStorage" resultMap="indexStorageMap"> - select * - from index_storage - where calc_type = #{calcType} - </select> - <select id="getAllParameter" - resultType="com.zhitan.model.domain.IndexStorageParam"> - select storage_id as storageId, index_id as indexId - from storage_parameter - </select> - <select id="getWithTimetype" resultMap="indexStorageMap"> - select * - from index_storage - where index_id = #{indexId} - AND time_type = #{timeType}; - </select> -</mapper> diff --git a/zhitan-system/target/classes/mapper/model/ModelInfoMapper.xml b/zhitan-system/target/classes/mapper/model/ModelInfoMapper.xml deleted file mode 100644 index 2b70da4..0000000 --- a/zhitan-system/target/classes/mapper/model/ModelInfoMapper.xml +++ /dev/null @@ -1,72 +0,0 @@ -<?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.zhitan.model.mapper.ModelInfoMapper"> - - <resultMap type="com.zhitan.model.domain.ModelInfo" id="ModelInfoResult"> - <result property="modelCode" column="model_code"/> - <result property="modelName" column="model_name"/> - <result property="isShow" column="is_show"/> - <result property="modelType" column="model_type"/> - </resultMap> - - <sql id="selectModelInfoVo"> - select model_code, model_name, is_show, model_type - from model_info - </sql> - - <select id="selectModelInfoList" parameterType="com.zhitan.model.domain.ModelInfo" - resultMap="ModelInfoResult"> - <include refid="selectModelInfoVo"/> - <where> - <if test="modelCode != null and modelCode != ''">and model_code like concat('%', #{modelCode}, '%')</if> - <if test="modelName != null and modelName != ''">and model_name like concat('%', #{modelName}, '%')</if> - <if test="isShow != null">and is_show = #{isShow}</if> - </where> - order by model_code; - </select> - - <select id="selectModelInfoById" parameterType="String" resultMap="ModelInfoResult"> - <include refid="selectModelInfoVo"/> - where model_code = #{modelCode} - </select> - - <insert id="insertModelInfo" parameterType="ModelInfo"> - insert into model_info - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="modelCode != null and modelCode != ''">model_code,</if> - <if test="modelName != null and modelName != ''">model_name,</if> - <if test="modelType != null and modelType != ''">model_type,</if> - is_show, - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="modelCode != null and modelCode != ''">#{modelCode},</if> - <if test="modelName != null and modelName != ''">#{modelName},</if> - <if test="modelType != null and modelType != ''">#{modelType},</if> - 1, - </trim> - </insert> - - <update id="updateModelInfo" parameterType="ModelInfo"> - update model_info - <trim prefix="SET" suffixOverrides=","> - <if test="modelName != null and modelName != ''">model_name = #{modelName},</if> - <if test="isShow != null ">is_show = #{isShow},</if> - </trim> - where model_code = #{modelCode} - </update> - - <delete id="deleteModelInfoById" parameterType="String"> - delete - from model_info - where model_code = #{modelCode} - </delete> - - <delete id="deleteModelInfoByCode" parameterType="String"> - delete - from model_info - where model_code = #{modelCode}; - </delete> - -</mapper> diff --git a/zhitan-system/target/classes/mapper/model/ModelNodeMapper.xml b/zhitan-system/target/classes/mapper/model/ModelNodeMapper.xml deleted file mode 100644 index c704454..0000000 --- a/zhitan-system/target/classes/mapper/model/ModelNodeMapper.xml +++ /dev/null @@ -1,430 +0,0 @@ -<?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.zhitan.model.mapper.ModelNodeMapper"> - - <resultMap type="com.zhitan.model.domain.ModelNode" id="ModelNodeResult"> - <result property="nodeId" column="node_id"/> - <result property="code" column="code"/> - <result property="name" column="name"/> - <result property="parentId" column="parent_id"/> - <result property="address" column="address"/> - <result property="modelCode" column="model_code"/> - <result property="nodeCategory" column="node_category"/> - </resultMap> - - <sql id="selectModelNodeVo"> - select node_id, code, name, parent_id, address, model_code, node_category - from model_node - </sql> - - <select id="selectModelNodeList" - parameterType="com.zhitan.model.domain.ModelNode" - resultMap="ModelNodeResult"> - <include refid="selectModelNodeVo"/> - <where> - <if test="code != null and code != ''">and code like concat('%', #{code}, '%')</if> - <if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if> - </where> - order by order_num - </select> - - <select id="selectModelNodeById" parameterType="String" resultMap="ModelNodeResult"> - <include refid="selectModelNodeVo"/> - where node_id = #{nodeId} - </select> - <select id="getModelNodeByModelCode" resultMap="ModelNodeResult"> - <include refid="selectModelNodeVo"/> - where model_code = #{modelCode} - order by order_num - </select> - <select id="getMaxOrder" resultType="java.lang.Integer"> - select COALESCE(max(order_num), 0) - from model_node - where parent_id = #{parentId} - </select> - <select id="modelNodeHasExist" resultType="java.lang.Integer"> - select count(*) - from model_node - where code = #{code} - and model_code = #{modelCode}; - </select> - <select id="modelNodeHasExistWhenUpdate" resultType="java.lang.Integer"> - select count(*) - from model_node - where code = #{code} - and model_code = #{modelCode} - AND node_id != #{nodeId}; - </select> - <select id="getSettingDevice" - resultType="com.zhitan.basicdata.domain.MeterImplement"> - select id, code, meter_name as meterName - from meter_implement m - left join node_device nd on m.id = nd.device_id - where nd.node_id = #{nodeId}; - </select> - <select id="getSettingIndex" - resultType="com.zhitan.model.domain.EnergyIndex"> - select ei.index_id as indexId, code, name, index_type as indexType - from energy_index ei - left join node_index ni on ei.index_id = ni.index_id - where ni.node_id = #{nodeId} - </select> - <select id="getSettingEnergy" - resultType="com.zhitan.basicdata.domain.SysEnergy"> - select enerid, enersno, enername - from sys_energy e - left join node_energy ne on e.enerid = ne.energy_id - where ne.node_id = #{nodeId}; - </select> - <select id="getSettingProduct" - resultType="com.zhitan.basicdata.domain.SysProduct"> - select productid, productsno, productname - from sys_product p - left join node_product np on p.productid = np.product_id - where np.node_id = #{nodeId}; - </select> - <select id="getSettingIndexByType" - resultType="com.zhitan.model.domain.EnergyIndex"> - select ei.index_id as indexId, code, name, index_type as indexType - from energy_index ei - left join node_index ni on ei.index_id = ni.index_id - where ni.node_id = #{nodeId} - and ei.index_type = #{indexType} - <if test="code != null and code != ''"> - and code like concat('%', #{code}, '%') - </if> - <if test="name != null and name != ''"> - and name like concat('%', #{name}, '%') - </if> - </select> - <select id="getModelNodeByNodeCodes" resultMap="ModelNodeResult"> - <include refid="selectModelNodeVo"/> - where code in - <foreach item="nodeCode" collection="list" open="(" separator="," close=")"> - #{nodeCode} - </foreach> - order by order_num - </select> - <select id="getModelNodeByModelCodeWithAuth" resultMap="ModelNodeResult"> - <include refid="selectModelNodeVo"/> - where model_code = #{modelCode} - and ( - node_id in ( - select node_id from data_auth_user where user_id = #{userId} and model_code = #{modelCode} - ) - or node_id in ( - select node_id from data_auth_role where role_id in ( - select cast(r.role_id as varchar) from sys_role r - left join sys_user_role ur on ur.role_id = r.role_id - left join sys_user u on u.user_id = ur.user_id - where cast(u.user_id as VARCHAR) = #{userId} - ) and model_code = #{modelCode} - ) - ) - order by order_num - </select> - - <insert id="insertModelNode" - parameterType="com.zhitan.model.domain.ModelNode"> - insert into model_node - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="nodeId != null and nodeId != ''">node_id,</if> - <if test="code != null and code != ''">code,</if> - <if test="name != null and name != ''">name,</if> - <if test="parentId != null and parentId != ''">parent_id,</if> - <if test="address != null and address != ''">address,</if> - <if test="modelCode != null and modelCode != ''">model_code,</if> - <if test="nodeCategory != null and nodeCategory != ''">node_category,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="nodeId != null and nodeId != ''">#{nodeId},</if> - <if test="code != null and code != ''">#{code},</if> - <if test="name != null and name != ''">#{name},</if> - <if test="parentId != null and parentId != ''">#{parentId},</if> - <if test="address != null and address != ''">#{address},</if> - <if test="modelCode != null and modelCode != ''">#{modelCode},</if> - <if test="nodeCategory != null and nodeCategory != ''">#{nodeCategory},</if> - </trim> - </insert> - <insert id="setDevice"> - delete - from node_device - where node_id = #{nodeId}; - <foreach collection="deviceIds" item="deviceId" separator=";"> - insert into node_device (node_id, device_id) - values (#{nodeId}, #{deviceId}) - </foreach> - </insert> - <insert id="setEnergy"> - delete - from node_energy - where node_id = #{nodeId}; - <foreach collection="energyIds" item="energyId" separator=";"> - insert into node_energy (node_id, energy_id) - values (#{nodeId}, #{energyId}) - </foreach> - </insert> - <insert id="setProduct"> - delete - from node_product - where node_id = #{nodeId}; - <foreach collection="productIds" item="productId" separator=";"> - insert into node_product (node_id, product_id) - values (#{nodeId}, #{productId}) - </foreach> - </insert> - - <update id="updateModelNode" - parameterType="com.zhitan.model.domain.ModelNode"> - update model_node - <trim prefix="SET" suffixOverrides=","> - <if test="code != null and code != ''">code = #{code},</if> - <if test="name != null and name != ''">name = #{name},</if> - <if test="parentId != null and parentId != ''">parent_id = #{parentId},</if> - <if test="address != null and address != ''">address = #{address},</if> - <if test="modelCode != null and modelCode != ''">model_code = #{modelCode},</if> - <if test="nodeCategory != null and nodeCategory != ''">node_category = #{nodeCategory},</if> - </trim> - where node_id = #{nodeId} - </update> - <update id="updateModelNodeParent"> - update model_node - set parent_id = #{parentId} - where node_id = #{nodeId}; - - update model_node - set address = replace(address, (select address from model_node where node_id = #{nodeId}), - (select address || - (select code from model_node where node_id = #{nodeId}) || - ',' - from model_node - where node_id = #{parentId})) - where parent_id = #{nodeId} - or node_id = #{nodeId}; - </update> - <update id="updateModelNodeOrder"> - <foreach collection="orders" index="id" item="order" separator=";"> - update model_node - set order_num = #{order} - where node_id = #{id} - </foreach> - </update> - <update id="setIndex"> - delete - from node_index - where node_id = #{nodeId} and index_id in (select ni.index_id - from node_index ni left join energy_index ei on ni.index_id = ei.index_id - where node_id = #{nodeId} and ei.index_type = #{indexType}); - <foreach collection="indexIds" item="indexId" separator=";"> - insert into node_index (node_id, index_id) - values (#{nodeId}, #{indexId}) - </foreach> - </update> - - <delete id="deleteModelNodeById" parameterType="String"> - delete - from model_node - where node_id = #{nodeId} - </delete> - - <delete id="deleteModelNodeByIds" parameterType="String"> - delete from model_node where node_id in - <foreach item="nodeId" collection="array" open="(" separator="," close=")"> - #{nodeId} - </foreach> - </delete> - <delete id="delDevice"> - delete - from node_device - where node_id = #{nodeId} and device_id in - <foreach item="deviceId" collection="deviceIds" open="(" separator="," close=")"> - #{deviceId} - </foreach> - </delete> - <delete id="delEnergy"> - delete - from node_energy - where node_id = #{nodeId} and energy_id in - <foreach item="energyId" collection="energyIds" open="(" separator="," close=")"> - #{energyId} - </foreach> - </delete> - <delete id="delProduct"> - delete - from node_product - where node_id = #{nodeId} and product_id in - <foreach item="productId" collection="productIds" open="(" separator="," close=")"> - #{productId} - </foreach> - </delete> - <delete id="delIndex"> - delete - from node_index - where node_id = #{nodeId} and index_id in - <foreach item="indexId" collection="indexIds" open="(" separator="," close=")"> - #{indexId} - </foreach> - </delete> - - <select id="getSettingIndexByWhere" - resultType="com.zhitan.model.domain.EnergyIndex"> - select ei.index_id as indexId, code, name, index_type as indexType - from energy_index ei - left join node_index ni on ei.index_id = ni.index_id - where ni.node_id = #{nodeId} - <if test="indexName!=null and indexName!=''"> - and ei.name like concat('%', #{indexName}, '%') - </if> - </select> - - <select id="listIndesxByCodeList" resultType="java.lang.String"> - SELECT - index_id - FROM - "node_index" - WHERE - node_id IN - <foreach item="nodeId" collection="nodeIds" open="(" separator="," close=")"> - #{nodeId} - </foreach> - </select> - - <select id="getModelNodeIndexIdRelationInforByCode" - resultType="com.zhitan.model.domain.vo.ModelNodeIndexInfor"> - SELECT mn.node_id nodeId, - mn."name" "name", - ni.index_id indexId - FROM "model_node" mn - LEFT JOIN "node_index" ni ON mn.node_id = ni.node_id - WHERE mn.model_code = #{code} - AND mn.parent_id IS NOT NULL - </select> - - <select id="listModelNodeIndexIdRelationInforByParentId" - resultType="com.zhitan.model.domain.vo.ModelNodeIndexInfor"> - SELECT mn.node_id nodeId, - mn."name" "name", - ni.index_id indexId - FROM "model_node" mn - LEFT JOIN "node_index" ni ON mn.node_id = ni.node_id - WHERE mn.parent_id = #{parentId} - </select> - - <select id="getModelNodeIndexIdRelationInforByNodeId" - resultType="com.zhitan.model.domain.vo.ModelNodeIndexInfor"> - SELECT mn.node_id nodeId, - mn."name" "name", - ni.index_id indexId - FROM "model_node" mn - LEFT JOIN "node_index" ni ON mn.node_id = ni.node_id - WHERE mn.node_id = #{nodeId} - </select> - - <select id="getModelNodeByModelCodeByIndexCode" resultType="com.zhitan.model.domain.ModelNode"> - SELECT node_id nodeId, - code, - "name", - parent_id parentId, - address, - model_code modelCode, - node_category nodeCategory - FROM "model_node" - WHERE model_code = #{indexCode} - AND parent_id IS NULL LIMIT 1; - </select> - <select id="selectIndexByModelCodeAndNodeId" - resultType="com.zhitan.model.domain.vo.ModelNodeIndexInfor"> - SELECT mn.node_id nodeId, - mn."name", - ni.index_id indexId - FROM model_node mn - LEFT JOIN node_index ni ON ni.node_id = mn.node_id - WHERE mn.model_code = #{modelCode} - AND mn.node_id = #{nodeId} - </select> - - <select id="getSettingDeviceIndex" resultType="com.zhitan.basicdata.domain.MeterImplement"> - SELECT distinct - m."id", - m.code, - m.meter_name AS meterName, - m.meter_type meterType, - m.wire_diameter wireDiameter, - m.max_allowable_power maxAllowablePower - FROM meter_implement m - LEFT JOIN energy_index ei ON ei.meter_id = m."id" - LEFT JOIN node_index ni ON ni.index_id = ei.index_id - WHERE ni.node_id = #{nodeId} - <if test="energyType!=null and energyType!=''"> - AND M.energy_type = #{energyType} - </if> - </select> - - <delete id="delIndexNodeIdAndIndexType"> - delete - from node_index - where node_id = #{nodeId} and index_id in ( - select ni.index_id - from node_index ni left join energy_index ei on ni.index_id = ei.index_id - where node_id = #{nodeId} and ei.index_type = #{indexType} - ); - </delete> - <insert id="setIndexAndNodeId"> - <foreach collection="indexIds" item="indexId" separator=";"> - insert into node_index (node_id, index_id) - values (#{nodeId}, #{indexId}) - </foreach> - </insert> - - <select id="getModelNodeIndexIdByNodeId" resultType="com.zhitan.model.domain.vo.ModelNodeIndexInfor"> - SELECT mn.node_id nodeId, - mn."name" "name", - ni.index_id indexId, - ei.energy_id energyId - FROM "model_node" mn - LEFT JOIN "node_index" ni ON mn.node_id = ni.node_id - LEFT JOIN energy_index ei on ni.index_id = ei.index_id - WHERE ni.node_id = #{nodeId} - <if test="energyType!=null and energyType!=''"> - and ei.energy_id = #{energyType} - </if> - </select> - <select id="getModelNodeByParentId" resultType="com.zhitan.model.domain.vo.ModelNodeIndexInfor"> - SELECT mn.node_id nodeId, - mn."name" "name", - ni.index_id indexId, - ei.energy_id - FROM "model_node" mn - LEFT JOIN "node_index" ni ON mn.node_id = ni.node_id - left join energy_index ei on ni.index_id = ei.index_id - WHERE mn.parent_id = #{parentId} and ei.index_type = 'STATISTIC' - </select> - <select id="getFirstModeNodeInfo" resultType="com.zhitan.model.domain.ModelNode"> - <include refid="selectModelNodeVo"/> - where model_code = #{modelCode} AND parent_id is null - order by order_num - </select> - <select id="selectIndexByNodeIds" resultType="com.zhitan.model.domain.vo.ModelNodeIndexInfor"> - SELECT mn.node_id nodeId, - mn."name" "name", - ni.index_id indexId, - ei.energy_id - FROM "model_node" mn - LEFT JOIN "node_index" ni ON mn.node_id = ni.node_id - left join energy_index ei on ni.index_id = ei.index_id - <where> - mn.model_code = #{modelCode} - AND mn.node_id in - <foreach collection="nodeIds" index="index" item="item" open="(" separator="," close=")"> - #{item} - </foreach> - <if test="modelCode!=null and modelCode!='' and nodeIds.size>0"> - and ei.index_type='STATISTIC' - </if> - - </where> - - </select> -</mapper> diff --git a/zhitan-system/target/classes/mapper/peakvalley/ElectricityDataItemMapper.xml b/zhitan-system/target/classes/mapper/peakvalley/ElectricityDataItemMapper.xml deleted file mode 100644 index 2676c7d..0000000 --- a/zhitan-system/target/classes/mapper/peakvalley/ElectricityDataItemMapper.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?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.zhitan.peakvalley.mapper.PeakValleyMapper"> - - - <select id="getDataStatistics" - resultType="com.zhitan.peakvalley.domain.ElectricityDataItem"> - SELECT - index_code indexCode, - time_code timeCode, - electricity_type electricityType, - data_time dataTime, - electricity, - "cost", - time_type timeType, - price, - remark - FROM - "electricity_data_item" - WHERE - index_id IN - <foreach collection="indexIdSet" item="indexId" open="(" separator="," close=")"> - #{indexId} - </foreach> - AND (data_time BETWEEN #{startTime} AND #{endTime}) - AND time_type = #{timeType} - </select> - <select id="getDataStatisticsDeviationAnalysis" - resultType="com.zhitan.peakvalley.domain.ElectricityDataItem"> - SELECT - index_code indexCode, - time_code timeCode, - electricity_type electricityType, - data_time dataTime, - electricity, - "cost", - time_type timeType, - price, - remark - FROM - "electricity_data_item" - WHERE - index_id IN - <foreach collection="indexIdSet" item="indexId" open="(" separator="," close=")"> - #{indexId} - </foreach> - - AND time_type = #{timeType} - </select> -</mapper> \ No newline at end of file diff --git a/zhitan-system/target/classes/mapper/peakvalley/ElectricityPriceDateMapper.xml b/zhitan-system/target/classes/mapper/peakvalley/ElectricityPriceDateMapper.xml deleted file mode 100644 index 2672b6b..0000000 --- a/zhitan-system/target/classes/mapper/peakvalley/ElectricityPriceDateMapper.xml +++ /dev/null @@ -1,89 +0,0 @@ -<?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.zhitan.peakvalley.mapper.ElectricityPriceDateMapper"> - - <resultMap type="com.zhitan.peakvalley.domain.ElectricityPriceDate" id="ElectricityPriceDateResult"> - <result property="id" column="id" /> - <result property="beginDate" column="begin_date" /> - <result property="endDate" column="end_date" /> - <result property="createBy" column="create_by" /> - <result property="createTime" column="create_time" /> - <result property="updateBy" column="update_by" /> - <result property="updateTime" column="update_time" /> - <result property="remark" column="remark" /> - </resultMap> - - <sql id="selectElectricityPriceDateVo"> - select id, begin_date, end_date, create_by, create_time, update_by, update_time, remark from electricity_price_date - </sql> - - <select id="selectElectricityPriceDateList" parameterType="com.zhitan.peakvalley.domain.ElectricityPriceDate" resultMap="ElectricityPriceDateResult"> - <include refid="selectElectricityPriceDateVo"/> - <where> - <if test="beginDate != null "> and begin_date = #{beginDate}</if> - <if test="endDate != null "> and end_date = #{endDate}</if> - </where> - </select> - - <select id="selectElectricityPriceDateById" parameterType="String" resultMap="ElectricityPriceDateResult"> - <include refid="selectElectricityPriceDateVo"/> - where id = #{id} - </select> - - <insert id="insertElectricityPriceDate" parameterType="com.zhitan.peakvalley.domain.ElectricityPriceDate"> - insert into electricity_price_date - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="id != null and id != ''">id,</if> - <if test="beginDate != null">begin_date,</if> - <if test="endDate != null">end_date,</if> - <if test="createBy != null">create_by,</if> - <if test="createTime != null">create_time,</if> - <if test="updateBy != null">update_by,</if> - <if test="updateTime != null">update_time,</if> - <if test="remark != null">remark,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="id != null and id != ''">#{id},</if> - <if test="beginDate != null">#{beginDate},</if> - <if test="endDate != null">#{endDate},</if> - <if test="createBy != null">#{createBy},</if> - <if test="createTime != null">#{createTime},</if> - <if test="updateBy != null">#{updateBy},</if> - <if test="updateTime != null">#{updateTime},</if> - <if test="remark != null">#{remark},</if> - </trim> - </insert> - - <update id="updateElectricityPriceDate" parameterType="com.zhitan.peakvalley.domain.ElectricityPriceDate"> - update electricity_price_date - <trim prefix="SET" suffixOverrides=","> - <if test="beginDate != null">begin_date = #{beginDate},</if> - <if test="endDate != null">end_date = #{endDate},</if> - <if test="createBy != null">create_by = #{createBy},</if> - <if test="createTime != null">create_time = #{createTime},</if> - <if test="updateBy != null">update_by = #{updateBy},</if> - <if test="updateTime != null">update_time = #{updateTime},</if> - <if test="remark != null">remark = #{remark},</if> - </trim> - where id = #{id} - </update> - - <delete id="deleteElectricityPriceDateById" parameterType="String"> - delete from electricity_price_date where id = #{id} - </delete> - - <delete id="deleteElectricityPriceDateByIds" parameterType="String"> - delete from electricity_price_date where id in - <foreach item="id" collection="array" open="(" separator="," close=")"> - #{id} - </foreach> - </delete> - - <select id="selectElectricityPriceDatePageTacticsAll" resultMap="ElectricityPriceDateResult"> - <include refid="selectElectricityPriceDateVo"/> - WHERE begin_date < CURRENT_TIMESTAMP - AND end_date > CURRENT_TIMESTAMP - </select> -</mapper> \ No newline at end of file diff --git a/zhitan-system/target/classes/mapper/peakvalley/EletricityPriceMapper.xml b/zhitan-system/target/classes/mapper/peakvalley/EletricityPriceMapper.xml deleted file mode 100644 index 8ef89e6..0000000 --- a/zhitan-system/target/classes/mapper/peakvalley/EletricityPriceMapper.xml +++ /dev/null @@ -1,98 +0,0 @@ -<?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.zhitan.peakvalley.mapper.ElectricityPriceMapper"> - - <resultMap type="ElectricityPrice" id="ElectricityPriceResult"> - <result property="id" column="id" /> - <result property="parentId" column="parent_id" /> - <result property="type" column="type" /> - <result property="startTime" column="start_time" /> - <result property="stopTime" column="stop_time" /> - <result property="effecticityPrice" column="effecticity_price" /> - <result property="createBy" column="create_by" /> - <result property="createTime" column="create_time" /> - <result property="updateBy" column="update_by" /> - <result property="updateTime" column="update_time" /> - <result property="remark" column="remark" /> - </resultMap> - - <sql id="selectElectricityPriceVo"> - select id, parent_id, type, start_time, stop_time, effecticity_price, create_by, create_time, update_by, update_time, remark from electricity_price - </sql> - - <select id="selectElectricityPriceList" parameterType="ElectricityPrice" resultMap="ElectricityPriceResult"> - <include refid="selectElectricityPriceVo"/> - <where> - <if test="parentId != null and parentId != ''"> and parent_id = #{parentId}</if> - <if test="type != null and type != ''"> and type = #{type}</if> - <if test="startTime != null "> and start_time = #{startTime}</if> - <if test="stopTime != null "> and stop_time = #{stopTime}</if> - <if test="effecticityPrice != null and effecticityPrice != ''"> and effecticity_price = #{effecticityPrice}</if> - </where> - </select> - - <select id="selectElectricityPriceById" parameterType="String" resultMap="ElectricityPriceResult"> - <include refid="selectElectricityPriceVo"/> - where id = #{id} - </select> - - <insert id="insertElectricityPrice" parameterType="ElectricityPrice"> - insert into electricity_price - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="id != null and id != ''">id,</if> - <if test="parentId != null and parentId != ''">parent_id,</if> - <if test="type != null">type,</if> - <if test="startTime != null">start_time,</if> - <if test="stopTime != null">stop_time,</if> - <if test="effecticityPrice != null">effecticity_price,</if> - <if test="createBy != null">create_by,</if> - <if test="createTime != null">create_time,</if> - <if test="updateBy != null">update_by,</if> - <if test="updateTime != null">update_time,</if> - <if test="remark != null">remark,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="id != null and id != ''">#{id},</if> - <if test="parentId != null and parentId != ''">#{parentId},</if> - <if test="type != null">#{type},</if> - <if test="startTime != null">#{startTime},</if> - <if test="stopTime != null">#{stopTime},</if> - <if test="effecticityPrice != null">#{effecticityPrice},</if> - <if test="createBy != null">#{createBy},</if> - <if test="createTime != null">#{createTime},</if> - <if test="updateBy != null">#{updateBy},</if> - <if test="updateTime != null">#{updateTime},</if> - <if test="remark != null">#{remark},</if> - </trim> - </insert> - - <update id="updateElectricityPrice" parameterType="ElectricityPrice"> - update electricity_price - <trim prefix="SET" suffixOverrides=","> - <if test="parentId != null and parentId != ''">parent_id = #{parentId},</if> - <if test="type != null">type = #{type},</if> - <if test="startTime != null">start_time = #{startTime},</if> - <if test="stopTime != null">stop_time = #{stopTime},</if> - <if test="effecticityPrice != null">effecticity_price = #{effecticityPrice},</if> - <if test="createBy != null">create_by = #{createBy},</if> - <if test="createTime != null">create_time = #{createTime},</if> - <if test="updateBy != null">update_by = #{updateBy},</if> - <if test="updateTime != null">update_time = #{updateTime},</if> - <if test="remark != null">remark = #{remark},</if> - </trim> - where id = #{id} - </update> - - <delete id="deleteElectricityPriceById" parameterType="String"> - delete from electricity_price where id = #{id} - </delete> - - <delete id="deleteElectricityPriceByIds" parameterType="String"> - delete from electricity_price where id in - <foreach item="id" collection="array" open="(" separator="," close=")"> - #{id} - </foreach> - </delete> -</mapper> \ No newline at end of file diff --git a/zhitan-system/target/classes/mapper/realtimedata/PeriodDataMapper.xml b/zhitan-system/target/classes/mapper/realtimedata/PeriodDataMapper.xml deleted file mode 100644 index f878bf7..0000000 --- a/zhitan-system/target/classes/mapper/realtimedata/PeriodDataMapper.xml +++ /dev/null @@ -1,501 +0,0 @@ -<?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.zhitan.realtimedata.mapper.PeriodDataMapper"> - <resultMap id="dataItemMap" type="com.zhitan.realtimedata.domain.DataItem"> - <id column="index_id" property="indexId"/> - <id column="time_code" property="timeCode"/> - <id column="index_code" property="indexCode"/> - <id column="index_name" property="indexName"/> - <result column="begin_time" property="beginTime"/> - <result column="end_time" property="endTime"/> - <result column="data_time" property="dataTime"/> - <result column="value" property="value"/> - <result column="time_type" property="timeType"/> - <result column="quality" property="quality"/> - <result column="unit_id" property="unitId"/> - <result column="create_time" property="createTime"/> - <result column="update_time" property="updateTime"/> - <result column="remark" property="remark"/> - </resultMap> - - <resultMap id="statisticResultMap" type="com.zhitan.realtimedata.domain.StatisticResult"> - <id column="index_id" property="indexId"/> - <id column="index_code" property="indexCode"/> - <id column="index_name" property="indexName"/> - <result column="unit_id" property="unitId"/> - <result column="maxvalue" property="maxValue"/> - <result column="minvalue" property="minValue"/> - <result column="avgvalue" property="avgValue"/> - </resultMap> - <delete id="delete"> - DELETE - FROM data_item - WHERE index_id = #{indexId} - AND time_type = #{timeType} - AND data_time >= #{beginTime} - AND data_time <= #{endTime} - </delete> - - <sql id="itemHead"> - SELECT di.index_id, - di.time_code, - di.time_type, - di.begin_time, - di.end_time, - di.data_time, - di.value, - di.quality, - di.create_time, - di.update_time, - ci.code AS "index_code", - ci.name AS "index_name" - FROM data_item di - LEFT JOIN energy_index ci ON di.index_id = ci.index_id - </sql> - - <select id="getDataByIndex" resultMap="dataItemMap"> - <include refid="itemHead"/> - WHERE di.index_id = #{indexId} - AND di.time_code = #{timeCode} - </select> - <select id="hasExist" resultType="java.lang.String"> - SELECT index_id - FROM data_item - WHERE index_id = #{indexId} - AND time_code = #{timeCode} - </select> - <select id="getDatasByIndex" resultMap="dataItemMap"> - <include refid="itemHead"/> - where di.time_code = #{timeCode} - AND di.index_id in - <foreach item="indexId" index="index" collection="indexIds" - open="(" separator="," close=")"> - #{indexId} - </foreach> - </select> - <select id="getPeriodDatasByIndex" resultMap="dataItemMap"> - <include refid="itemHead"/> - WHERE di.index_id in - <foreach item="indexId" index="index" collection="indexIds" - open="(" separator="," close=")"> - #{indexId} - </foreach> - AND di.time_type = #{timeType} - AND di.data_time >= #{beginTime} - AND di.data_time < #{endTime} - </select> - <select id="dataStatisticsByIndex" resultType="java.lang.Double"> - SELECT - <if test="statisticType.name() == 'Sum'"> - sum(value) - </if> - <if test="statisticType.name() == 'Max'"> - max(value) - </if> - <if test="statisticType.name() == 'Min'"> - min(value) - </if> - <if test="statisticType.name() == 'Average'"> - avg(value) - </if> - FROM data_item - WHERE index_id = #{indexId} - AND time_type = #{timeType} - AND data_time >= #{beginTime} - AND data_time < #{endTime} - </select> - - <select id="dataStatisticsByIndexs" resultMap="dataItemMap"> - SELECT - <if test="statisticType.name() == 'Sum'"> - sum(value) - </if> - <if test="statisticType.name() == 'Max'"> - max(value) - </if> - <if test="statisticType.name() == 'Min'"> - min(value) - </if> - <if test="statisticType.name() == 'Average'"> - avg(value) - </if> - AS value, - i.code as index_code, - i.name as index_name, - i.unit_id, - d.index_id - FROM data_item d - LEFT JOIN energy_index i ON d.index_id = i.index_id - WHERE d.index_id in - <foreach item="indexId" index="index" collection="indexIds" - open="(" separator="," close=")"> - #{indexId} - </foreach> - AND time_type = #{timeType} - AND data_time >= #{beginTime} - AND data_time < #{endTime} - GROUP BY d.index_id, i.code, i.unit_id, i.name - </select> - - <select id="dataStatisticsByCodes" resultMap="dataItemMap"> - SELECT - <if test="statisticType.name() == 'Sum'"> - sum(value) - </if> - <if test="statisticType.name() == 'Max'"> - max(value) - </if> - <if test="statisticType.name() == 'Min'"> - min(value) - </if> - <if test="statisticType.name() == 'Average'"> - avg(value) - </if> - AS value, - i.code as index_code, - i.name as index_name, - i.unit_id, - d.index_id - FROM data_item d - LEFT JOIN energy_index i ON d.index_id = i.index_id - WHERE - i.code IN - <foreach item="indexCode" index="index" collection="indexCodes" - open="(" separator="," close=")"> - #{indexCode} - </foreach> - AND time_type = #{timeType} - AND data_time >= #{beginTime} - AND data_time < #{endTime} - GROUP BY d.index_id, i.code, i.unit_id, i.name - </select> - - <select id="dataStatisticsFilterByCodes" resultMap="dataItemMap"> - SELECT - <if test="statisticType.name() == 'Sum'"> - sum(value) - </if> - <if test="statisticType.name() == 'Max'"> - max(value) - </if> - <if test="statisticType.name() == 'Min'"> - min(value) - </if> - <if test="statisticType.name() == 'Average'"> - avg(value) - </if> - AS value, - i.code as index_code, - i.name as index_name, - i.unit_id, - d.index_id - FROM data_item d - LEFT JOIN energy_index i ON d.index_id = i.index_id - WHERE - i.code IN - <foreach item="indexCode" index="index" collection="indexCodes" - open="(" separator="," close=")"> - #{indexCode} - </foreach> - AND time_type = #{timeType} - AND data_time >= #{beginTime} - AND data_time < #{endTime} - <if test="isFilter == true"> - AND value > 0 - </if> - GROUP BY d.index_id, i.code, i.unit_id, i.name - </select> - - <select id="statistic" resultMap="dataItemMap"> - SELECT - d.index_id, - time_code, - data_time, - i.code as index_code, - i.name as index_name, - i.unit_id, - VALUE - FROM - data_item d - LEFT JOIN energy_index i ON d.index_id = i.index_id - WHERE - d.index_id in - <foreach item="indexId" index="index" collection="indexIds" - open="(" separator="," close=")"> - #{indexId} - </foreach> - AND data_time >= #{beginTime} - AND data_time < #{endTime} - AND time_type = #{timeType} - GROUP BY - d.index_id, time_code, data_time, value, i.code, i.unit_id, i.name - </select> - - <select id="statisticByCode" resultMap="dataItemMap"> - SELECT - d.index_id, - time_code, - data_time, - i.code as index_code, - i.name as index_name, - i.unit_id, - value - FROM - data_item d - LEFT JOIN energy_index i ON d.index_id = i.index_id - WHERE - i.code IN - <foreach item="indexCode" index="index" collection="indexCodes" - open="(" separator="," close=")"> - #{indexCode} - </foreach> - AND data_time >= #{beginTime} - AND data_time <= #{endTime} - AND time_type = #{timeType} - GROUP BY - d.index_id, time_code, data_time, value, i.code, i.unit_id, i.name - </select> - - <select id="getStatisticDatasById" resultMap="statisticResultMap"> - SELECT - d.index_id, - i.code as index_code, - i.unit_id, - i.name as index_name, - MAX(value) as "maxvalue", - min(value) as minvalue, - avg(value) as avgvalue - FROM - data_item d - LEFT JOIN energy_index i ON d.index_id = i.index_id - WHERE - d.index_id in - <foreach item="indexId" index="index" collection="indexIds" - open="(" separator="," close=")"> - #{indexId} - </foreach> - AND time_type = #{timeType} - GROUP BY - d.index_id, i.code, i.unit_id, i.name - </select> - - <select id="getStatisticDatasByCode" resultMap="statisticResultMap"> - SELECT - d.index_id, - i.code as index_code, - i.name as index_name, - i.unit_id, - MAX(value) as "maxvalue", - min(value) as minvalue, - avg(value) as avgvalue - FROM - data_item d - LEFT JOIN energy_index i ON d.index_id = i.index_id - WHERE - i.code IN - <foreach item="indexCode" index="index" collection="indexCodes" - open="(" separator="," close=")"> - #{indexCode} - </foreach> - AND time_type = #{timeType} - GROUP BY - d.index_id, i.code, i.unit_id, i.name - </select> - - <insert id="insert"> - INSERT INTO data_item (index_id, - time_code, - time_type, - begin_time, - end_time, - data_time, - value, - quality, - create_time) - VALUES (#{dataItem.indexId}, - #{dataItem.timeCode}, - #{dataItem.timeType}, - #{dataItem.beginTime}, - #{dataItem.endTime}, - #{dataItem.dataTime}, - #{dataItem.value, jdbcType = DOUBLE}, - #{dataItem.quality}, - now()) - </insert> - - <insert id="save"> - insert into data_item (index_id, - time_code, - time_type, - begin_time, - end_time, - data_time, - value, - quality, - create_time) - select #{dataItem.indexId}, - #{dataItem.timeCode}, - #{dataItem.timeType}, - #{dataItem.beginTime}, - #{dataItem.endTime}, - #{dataItem.dataTime}, - #{dataItem.value, jdbcType = DOUBLE}, - #{dataItem.quality}, - now() - on conflict - (index_id,time_code) - do update - set value = #{dataItem.value, jdbcType = DOUBLE}, - quality = #{dataItem.quality}, - update_time = now(); - - </insert> - <insert id="saveDataList" parameterType="java.util.List"> - <foreach item="dataItem" collection="dataItemVlues"> - <if test="dataItem != null"> - insert into data_item (index_id, - time_code, - time_type, - begin_time, - end_time, - data_time, - value, - quality, - create_time) - select #{dataItem.indexId}, - #{dataItem.timeCode}, - #{dataItem.timeType}, - #{dataItem.beginTime}, - #{dataItem.endTime}, - #{dataItem.dataTime}, - #{dataItem.value, jdbcType = DOUBLE}, - #{dataItem.quality}, - now() - on conflict(index_id,time_code) - do update - set value= #{dataItem.value, jdbcType = DOUBLE}, - quality = #{dataItem.quality}, - update_time = now(); - </if> - </foreach> - </insert> - <insert id="insertDataList"> - insert into data_item (index_id, time_code, - time_type, - begin_time, - end_time, - data_time, - value, - quality, - create_time) - values - <foreach collection="list" item="dataItem" index="index" separator=","> - (#{dataItem.indexId}, - #{dataItem.timeCode}, - #{dataItem.timeType}, - #{dataItem.beginTime}, - #{dataItem.endTime}, - #{dataItem.dataTime}, - #{dataItem.value, jdbcType = DOUBLE}, - #{dataItem.quality}, - now()) - </foreach> - </insert> - <insert id="insertTOUData"> - insert into electricity_data_item (index_id, time_code, - electricity_type, - index_code, - data_time, - begin_time, - end_time, - electricity, - cost, - price, - create_time, - time_type) - values (#{dataItem.indexId}, - #{dataItem.timeCode}, - #{dataItem.electricityType}, - #{dataItem.indexCode}, - #{dataItem.dataTime}, - #{dataItem.beginTime}, - #{dataItem.endTime}, - #{dataItem.electricity, jdbcType = DOUBLE}, - #{dataItem.cost, jdbcType = DOUBLE}, - #{dataItem.price, jdbcType = DOUBLE}, - now(), - #{dataItem.timeType}) - ON CONFLICT (index_id, time_code,electricity_type) - DO UPDATE SET electricity = EXCLUDED.electricity,cost = EXCLUDED.cost,price = EXCLUDED.price; - </insert> - <insert id="insertTOUDataItems"> - insert into electricity_data_item (index_id, time_code, - electricity_type, - index_code, - data_time, - begin_time, - end_time, - electricity, - cost, - price, - create_time, - time_type) - values - <foreach collection="dataItems" item="dataItem" index="index" separator=","> - values (#{dataItem.indexId}, - #{dataItem.timeCode}, - #{dataItem.electricityType}, - #{dataItem.indexCode}, - #{dataItem.dataTime}, - #{dataItem.beginTime}, - #{dataItem.endTime}, - #{dataItem.electricity, jdbcType = DOUBLE}, - #{dataItem.cost, jdbcType = DOUBLE}, - #{dataItem.price, jdbcType = DOUBLE}, - now(), - #{dataItem.timeType}) - </foreach> - ON CONFLICT (index_id, time_code,electricity_type) - DO UPDATE SET electricity = EXCLUDED.electricity,cost = EXCLUDED.cost,price = EXCLUDED.price; - </insert> - - <update id="update"> - UPDATE data_item - SET value = #{dataItem.value, jdbcType = DOUBLE}, - quality = #{dataItem.quality}, - update_time = now() - WHERE index_id = #{dataItem.indexId} - AND time_code = #{dataItem.timeCode} - </update> - <select id="getPeriodDatasByIndexAndQuality" resultMap="dataItemMap"> - SELECT index_id, time_code, time_type, begin_time, end_time, data_time, `value`, quality, - create_time, update_time - FROM data_item - WHERE index_id in - <foreach item="indexId" index="index" collection="indexIds" - open="(" separator="," close=")"> - #{indexId} - </foreach> - AND time_type = #{timeType} - AND data_time >= #{beginTime} - AND data_time < #{endTime} - AND quality = #{quality} - </select> - <select id="getDataByIndexCode" resultMap="dataItemMap"> - <include refid="itemHead"/> - WHERE ci.code = #{indexCode} - AND di.time_code = #{timeCode} - </select> - <select id="queryDataItemIsExist" resultType="java.lang.String"> - select concat(time_code, ':', index_id) - from data_item where - <foreach collection="queryMap.keys" index="index" item="key" separator="or"> - (time_code = #{key} and index_id in - <foreach collection="queryMap[key]" item="id" separator="," open="(" close=")"> - #{id} - </foreach> - ) - </foreach> - </select> -</mapper> diff --git a/zhitan-system/target/classes/mapper/realtimedata/SysEquipmentFileMapper.xml b/zhitan-system/target/classes/mapper/realtimedata/SysEquipmentFileMapper.xml deleted file mode 100644 index 43c7d9f..0000000 --- a/zhitan-system/target/classes/mapper/realtimedata/SysEquipmentFileMapper.xml +++ /dev/null @@ -1,48 +0,0 @@ -<?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.zhitan.realtimedata.mapper.SysEquipmentFileMapper"> - <resultMap id="SysEquipmentFile" - type="com.zhitan.realtimedata.domain.SysEquipmentFile"> - <result property="nodeId" column="node_id"/> - <result property="filePath" column="filepath"/> - </resultMap> - <resultMap id="SysSvgInfo" - type="com.zhitan.realtimedata.domain.SysSvgInfo"> - <result property="id" column="id"/> - <result property="param" column="param"/> - <result property="tag" column="tag"/> - </resultMap> - - <insert id="saveSettingInfo"> - delete - from sys_svg_info - where node_id = #{nodeId}; - - <foreach collection="svgInfo" item="info" separator=";"> - insert into sys_svg_info (id, node_id, param, tag) - values (#{info.id}, #{nodeId}, #{info.param}, #{info.tag}); - </foreach> - </insert> - - <insert id="saveEquipmentFile"> - insert into sys_equipmentfile (node_id, filepath) - select #{nodeId}, #{filePath} - on conflict - (node_id) - do update - set filepath = #{filePath} - </insert> - <select id="getConfigure" resultMap="SysEquipmentFile"> - select node_id, filepath - from sys_equipmentfile - where node_id = #{nodeId}; - </select> - <select id="getConfigureTag" resultMap="SysSvgInfo"> - select id, param, tag - from sys_svg_info - where node_id = #{nodeId} - </select> - -</mapper> diff --git a/zhitan-system/target/classes/mapper/system/SysConfigMapper.xml b/zhitan-system/target/classes/mapper/system/SysConfigMapper.xml deleted file mode 100644 index afb865f..0000000 --- a/zhitan-system/target/classes/mapper/system/SysConfigMapper.xml +++ /dev/null @@ -1,112 +0,0 @@ -<?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.zhitan.system.mapper.SysConfigMapper"> - - <resultMap type="SysConfig" id="SysConfigResult"> - <id property="configId" column="config_id" /> - <result property="configName" column="config_name" /> - <result property="configKey" column="config_key" /> - <result property="configValue" column="config_value" /> - <result property="configType" column="config_type" /> - <result property="createBy" column="create_by" /> - <result property="createTime" column="create_time" /> - <result property="updateBy" column="update_by" /> - <result property="updateTime" column="update_time" /> - </resultMap> - - <sql id="selectConfigVo"> - select config_id, config_name, config_key, config_value, config_type, create_by, create_time, update_by, update_time, remark - from sys_config - </sql> - - <!-- 鏌ヨ鏉′欢 --> - <sql id="sqlwhereSearch"> - <where> - <if test="configId !=null"> - and config_id = #{configId} - </if> - <if test="configKey !=null and configKey != ''"> - and config_key = #{configKey} - </if> - </where> - </sql> - - <select id="selectConfig" parameterType="SysConfig" resultMap="SysConfigResult"> - <include refid="selectConfigVo"/> - <include refid="sqlwhereSearch"/> - </select> - - <select id="selectConfigList" parameterType="SysConfig" resultMap="SysConfigResult"> - <include refid="selectConfigVo"/> - <where> - <if test="configName != null and configName != ''"> - AND config_name like concat('%', #{configName}, '%') - </if> - <if test="configType != null and configType != ''"> - AND config_type = #{configType} - </if> - <if test="configKey != null and configKey != ''"> - AND config_key like concat('%', #{configKey}, '%') - </if> - <if test="beginTime != null and beginTime != ''"><!-- 寮�濮嬫椂闂存绱� --> - and create_time >= to_date(#{beginTime},'yyyy-mm-dd hh24:mi:ss') - </if> - <if test="endTime != null and endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� --> - and create_time <= to_date(#{endTime},'yyyy-mm-dd hh24:mi:ss') - </if> - </where> - </select> - - <select id="checkConfigKeyUnique" parameterType="String" resultMap="SysConfigResult"> - <include refid="selectConfigVo"/> - where config_key = #{configKey} - </select> - - <insert id="insertConfig" parameterType="SysConfig"> - insert into sys_config ( - <if test="configName != null and configName != '' ">config_name,</if> - <if test="configKey != null and configKey != '' ">config_key,</if> - <if test="configValue != null and configValue != '' ">config_value,</if> - <if test="configType != null and configType != '' ">config_type,</if> - <if test="createBy != null and createBy != ''">create_by,</if> - <if test="remark != null and remark != ''">remark,</if> - create_time - )values( - <if test="configName != null and configName != ''">#{configName},</if> - <if test="configKey != null and configKey != ''">#{configKey},</if> - <if test="configValue != null and configValue != ''">#{configValue},</if> - <if test="configType != null and configType != ''">#{configType},</if> - <if test="createBy != null and createBy != ''">#{createBy},</if> - <if test="remark != null and remark != ''">#{remark},</if> - now() - ) - </insert> - - <update id="updateConfig" parameterType="SysConfig"> - update sys_config - <set> - <if test="configName != null and configName != ''">config_name = #{configName},</if> - <if test="configKey != null and configKey != ''">config_key = #{configKey},</if> - <if test="configValue != null and configValue != ''">config_value = #{configValue},</if> - <if test="configType != null and configType != ''">config_type = #{configType},</if> - <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> - <if test="remark != null">remark = #{remark},</if> - update_time = now() - </set> - where config_id = #{configId} - </update> - - <delete id="deleteConfigById" parameterType="Long"> - delete from sys_config where config_id = #{configId} - </delete> - - <delete id="deleteConfigByIds" parameterType="Long"> - delete from sys_config where config_id in - <foreach item="configId" collection="array" open="(" separator="," close=")"> - #{configId} - </foreach> - </delete> - -</mapper> diff --git a/zhitan-system/target/classes/mapper/system/SysDeptMapper.xml b/zhitan-system/target/classes/mapper/system/SysDeptMapper.xml deleted file mode 100644 index 5d8823d..0000000 --- a/zhitan-system/target/classes/mapper/system/SysDeptMapper.xml +++ /dev/null @@ -1,182 +0,0 @@ -<?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.zhitan.system.mapper.SysDeptMapper"> - - <resultMap type="SysDept" id="SysDeptResult"> - <id property="deptId" column="dept_id"/> - <result property="parentId" column="parent_id"/> - <result property="ancestors" column="ancestors"/> - <result property="deptName" column="dept_name"/> - <result property="orderNum" column="order_num"/> - <result property="leader" column="leader"/> - <result property="phone" column="phone"/> - <result property="email" column="email"/> - <result property="status" column="status"/> - <result property="delFlag" column="del_flag"/> - <result property="parentName" column="parent_name"/> - <result property="createBy" column="create_by"/> - <result property="createTime" column="create_time"/> - <result property="updateBy" column="update_by"/> - <result property="updateTime" column="update_time"/> - </resultMap> - - <sql id="selectDeptVo"> - select d.dept_id, - d.parent_id, - d.ancestors, - d.dept_name, - d.order_num, - d.leader, - d.phone, - d.email, - d.status, - d.del_flag, - d.create_by, - d.create_time - from sys_dept d - </sql> - - <select id="selectDeptList" parameterType="SysDept" resultMap="SysDeptResult"> - <include refid="selectDeptVo"/> - where d.del_flag = '0' - <if test="deptId != null and deptId != 0"> - AND dept_id = #{deptId} - </if> - <if test="parentId != null and parentId != 0"> - AND parent_id = #{parentId} - </if> - <if test="deptName != null and deptName != ''"> - AND dept_name like concat('%', #{deptName}, '%') - </if> - <if test="status != null and status != ''"> - AND status = #{status} - </if> - <!-- 鏁版嵁鑼冨洿杩囨护 --> - ${params.dataScope} - order by d.parent_id, d.order_num - </select> - - <select id="selectDeptListByRoleId" resultType="Long"> - select d.dept_id - from sys_dept d - left join sys_role_dept rd on d.dept_id = rd.dept_id - where rd.role_id = #{roleId} - <if test="deptCheckStrictly"> - and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id = rd.dept_id and rd.role_id = #{roleId}) - </if> - order by d.parent_id, d.order_num - </select> - - <select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult"> - <include refid="selectDeptVo"/> - where dept_id = #{deptId} - </select> - - <select id="checkDeptExistUser" parameterType="Long" resultType="int"> - select count(1) - from sys_user - where dept_id = #{deptId} - and del_flag = '0' - </select> - - <select id="hasChildByDeptId" parameterType="Long" resultType="int"> - select count(1) - from sys_dept - where del_flag = '0' and parent_id = #{deptId} limit 1 - </select> - - <select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult"> - select * - from sys_dept - where ancestors = (select ancestors from sys_dept where dept_id = #{deptId}) || #{deptId} - </select> - - <select id="checkDeptNameUnique" resultMap="SysDeptResult"> - <include refid="selectDeptVo"/> - where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1 - </select> - - <insert id="insertDept" parameterType="SysDept"> - insert into sys_dept( - <if test="deptId != null and deptId != 0">dept_id,</if> - <if test="parentId != null and parentId != 0">parent_id,</if> - <if test="deptName != null and deptName != ''">dept_name,</if> - <if test="ancestors != null and ancestors != ''">ancestors,</if> - <if test="orderNum != null and orderNum != ''">order_num,</if> - <if test="leader != null and leader != ''">leader,</if> - <if test="phone != null and phone != ''">phone,</if> - <if test="email != null and email != ''">email,</if> - <if test="status != null">status,</if> - <if test="createBy != null and createBy != ''">create_by,</if> - create_time - )values( - <if test="deptId != null and deptId != 0">#{deptId},</if> - <if test="parentId != null and parentId != 0">#{parentId},</if> - <if test="deptName != null and deptName != ''">#{deptName},</if> - <if test="ancestors != null and ancestors != ''">#{ancestors},</if> - <if test="orderNum != null and orderNum != ''">#{orderNum},</if> - <if test="leader != null and leader != ''">#{leader},</if> - <if test="phone != null and phone != ''">#{phone},</if> - <if test="email != null and email != ''">#{email},</if> - <if test="status != null">#{status},</if> - <if test="createBy != null and createBy != ''">#{createBy},</if> - now() - ) - </insert> - - <update id="updateDept" parameterType="SysDept"> - update sys_dept - <set> - <if test="parentId != null and parentId != 0">parent_id = #{parentId},</if> - <if test="deptName != null and deptName != ''">dept_name = #{deptName},</if> - <if test="ancestors != null and ancestors != ''">ancestors = #{ancestors},</if> - <if test="orderNum != null and orderNum != ''">order_num = #{orderNum},</if> - <if test="leader != null">leader = #{leader},</if> - <if test="phone != null">phone = #{phone},</if> - <if test="email != null">email = #{email},</if> - <if test="status != null and status != ''">status = #{status},</if> - <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> - update_time = now() - </set> - where dept_id = #{deptId} - </update> - - <update id="updateDeptChildren" parameterType="java.util.List"> - update sys_dept set ancestors = - <foreach collection="depts" item="item" index="index" - separator=" " open="case dept_id" close="end"> - when #{item.deptId} then #{item.ancestors} - </foreach> - where dept_id in - <foreach collection="depts" item="item" index="index" - separator="," open="(" close=")"> - #{item.deptId} - </foreach> - </update> - - <update id="updateDeptStatusNormal" parameterType="Long"> - update sys_dept set status = '0' where dept_id in - <foreach collection="depts" item="deptId" open="(" separator="," close=")"> - #{deptId} - </foreach> - </update> - - <update id="updateDeptStatus" parameterType="SysDept"> - update sys_dept - <set> - <if test="status != null and status != ''">status = #{status},</if> - <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> - update_time = now() - </set> - where dept_id in (${ancestors}) - </update> - - <delete id="deleteDeptById" parameterType="Long"> - update sys_dept - set del_flag = '2' - where dept_id = #{deptId} - </delete> - -</mapper> diff --git a/zhitan-system/target/classes/mapper/system/SysDictDataMapper.xml b/zhitan-system/target/classes/mapper/system/SysDictDataMapper.xml deleted file mode 100644 index 4397173..0000000 --- a/zhitan-system/target/classes/mapper/system/SysDictDataMapper.xml +++ /dev/null @@ -1,124 +0,0 @@ -<?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.zhitan.system.mapper.SysDictDataMapper"> - - <resultMap type="SysDictData" id="SysDictDataResult"> - <id property="dictCode" column="dict_code" /> - <result property="dictSort" column="dict_sort" /> - <result property="dictLabel" column="dict_label" /> - <result property="dictValue" column="dict_value" /> - <result property="dictType" column="dict_type" /> - <result property="cssClass" column="css_class" /> - <result property="listClass" column="list_class" /> - <result property="isDefault" column="is_default" /> - <result property="status" column="status" /> - <result property="createBy" column="create_by" /> - <result property="createTime" column="create_time" /> - <result property="updateBy" column="update_by" /> - <result property="updateTime" column="update_time" /> - </resultMap> - - <sql id="selectDictDataVo"> - select dict_code, dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, remark - from sys_dict_data - </sql> - - <select id="selectDictDataList" parameterType="SysDictData" resultMap="SysDictDataResult"> - <include refid="selectDictDataVo"/> - <where> - <if test="dictType != null and dictType != ''"> - AND dict_type = #{dictType} - </if> - <if test="dictLabel != null and dictLabel != ''"> - AND dict_label like concat('%', #{dictLabel}, '%') - </if> - <if test="status != null and status != ''"> - AND status = #{status} - </if> - order by dict_sort - </where> - </select> - - <select id="selectDictDataByType" parameterType="SysDictData" resultMap="SysDictDataResult"> - <include refid="selectDictDataVo"/> - where status = '0' and dict_type = #{dictType} order by dict_sort asc - </select> - - <select id="selectDictLabel" resultType="String"> - select dict_label from sys_dict_data - where dict_type = #{dictType} and dict_value = #{dictValue} - </select> - - <select id="selectDictDataById" parameterType="Long" resultMap="SysDictDataResult"> - <include refid="selectDictDataVo"/> - where dict_code = #{dictCode} - </select> - - <select id="countDictDataByType" resultType="Integer"> - select count(1) from sys_dict_data where dict_type=#{dictType} - </select> - - <delete id="deleteDictDataById" parameterType="Long"> - delete from sys_dict_data where dict_code = #{dictCode} - </delete> - - <delete id="deleteDictDataByIds" parameterType="Long"> - delete from sys_dict_data where dict_code in - <foreach collection="array" item="dictCode" open="(" separator="," close=")"> - #{dictCode} - </foreach> - </delete> - - <update id="updateDictData" parameterType="SysDictData"> - update sys_dict_data - <set> - <if test="dictSort != null and dictSort != ''">dict_sort = #{dictSort},</if> - <if test="dictLabel != null and dictLabel != ''">dict_label = #{dictLabel},</if> - <if test="dictValue != null and dictValue != ''">dict_value = #{dictValue},</if> - <if test="dictType != null and dictType != ''">dict_type = #{dictType},</if> - <if test="cssClass != null">css_class = #{cssClass},</if> - <if test="listClass != null">list_class = #{listClass},</if> - <if test="isDefault != null and isDefault != ''">is_default = #{isDefault},</if> - <if test="status != null">status = #{status},</if> - <if test="remark != null">remark = #{remark},</if> - <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> - update_time = now() - </set> - where dict_code = #{dictCode} - </update> - - <update id="updateDictDataType" parameterType="String"> - update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType} - </update> - - <insert id="insertDictData" parameterType="SysDictData"> - insert into sys_dict_data( - <if test="dictSort != null and dictSort != ''">dict_sort,</if> - <if test="dictLabel != null and dictLabel != ''">dict_label,</if> - <if test="dictValue != null and dictValue != ''">dict_value,</if> - <if test="dictType != null and dictType != ''">dict_type,</if> - <if test="cssClass != null and cssClass != ''">css_class,</if> - <if test="listClass != null and listClass != ''">list_class,</if> - <if test="isDefault != null and isDefault != ''">is_default,</if> - <if test="status != null">status,</if> - <if test="remark != null and remark != ''">remark,</if> - <if test="createBy != null and createBy != ''">create_by,</if> - create_time - )values( - <if test="dictSort != null and dictSort != ''">#{dictSort},</if> - <if test="dictLabel != null and dictLabel != ''">#{dictLabel},</if> - <if test="dictValue != null and dictValue != ''">#{dictValue},</if> - <if test="dictType != null and dictType != ''">#{dictType},</if> - <if test="cssClass != null and cssClass != ''">#{cssClass},</if> - <if test="listClass != null and listClass != ''">#{listClass},</if> - <if test="isDefault != null and isDefault != ''">#{isDefault},</if> - <if test="status != null">#{status},</if> - <if test="remark != null and remark != ''">#{remark},</if> - <if test="createBy != null and createBy != ''">#{createBy},</if> - now() - ) - </insert> - -</mapper> diff --git a/zhitan-system/target/classes/mapper/system/SysDictTypeMapper.xml b/zhitan-system/target/classes/mapper/system/SysDictTypeMapper.xml deleted file mode 100644 index cffebc5..0000000 --- a/zhitan-system/target/classes/mapper/system/SysDictTypeMapper.xml +++ /dev/null @@ -1,105 +0,0 @@ -<?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.zhitan.system.mapper.SysDictTypeMapper"> - - <resultMap type="SysDictType" id="SysDictTypeResult"> - <id property="dictId" column="dict_id" /> - <result property="dictName" column="dict_name" /> - <result property="dictType" column="dict_type" /> - <result property="status" column="status" /> - <result property="createBy" column="create_by" /> - <result property="createTime" column="create_time" /> - <result property="updateBy" column="update_by" /> - <result property="updateTime" column="update_time" /> - </resultMap> - - <sql id="selectDictTypeVo"> - select dict_id, dict_name, dict_type, status, create_by, create_time, remark - from sys_dict_type - </sql> - - <select id="selectDictTypeList" parameterType="SysDictType" resultMap="SysDictTypeResult"> - <include refid="selectDictTypeVo"/> - <where> - <if test="dictName != null and dictName != ''"> - AND dict_name like concat('%', #{dictName}, '%') - </if> - <if test="status != null and status != ''"> - AND status = #{status} - </if> - <if test="dictType != null and dictType != ''"> - AND dict_type like concat('%', #{dictType}, '%') - </if> - <if test="beginTime != null and beginTime != ''"><!-- 寮�濮嬫椂闂存绱� --> - and to_char(create_time,'yyyymmdd') >= to_char(to_date(#{beginTime}, 'yyyy-mm-dd'),'yyyymmdd') - </if> - <if test="endTime != null and endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� --> - and to_char(create_time,'yyyymmdd') <= to_char(to_date(#{endTime}, 'yyyy-mm-dd'),'yyyymmdd') - </if> - </where> - </select> - - <select id="selectDictTypeAll" resultMap="SysDictTypeResult"> - <include refid="selectDictTypeVo"/> - </select> - - <select id="selectDictTypeById" parameterType="Long" resultMap="SysDictTypeResult"> - <include refid="selectDictTypeVo"/> - where dict_id = #{dictId} - </select> - - <select id="selectDictTypeByType" parameterType="String" resultMap="SysDictTypeResult"> - <include refid="selectDictTypeVo"/> - where dict_type = #{dictType} - </select> - - <select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult"> - <include refid="selectDictTypeVo"/> - where dict_type = #{dictType} - </select> - - <delete id="deleteDictTypeById" parameterType="Long"> - delete from sys_dict_type where dict_id = #{dictId} - </delete> - - <delete id="deleteDictTypeByIds" parameterType="Long"> - delete from sys_dict_type where dict_id in - <foreach collection="array" item="dictId" open="(" separator="," close=")"> - #{dictId} - </foreach> - </delete> - - <update id="updateDictType" parameterType="SysDictType"> - update sys_dict_type - <set> - <if test="dictName != null and dictName != ''">dict_name = #{dictName},</if> - <if test="dictType != null and dictType != ''">dict_type = #{dictType},</if> - <if test="status != null">status = #{status},</if> - <if test="remark != null">remark = #{remark},</if> - <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> - update_time = now() - </set> - where dict_id = #{dictId} - </update> - - <insert id="insertDictType" parameterType="SysDictType"> - insert into sys_dict_type( - <if test="dictName != null and dictName != ''">dict_name,</if> - <if test="dictType != null and dictType != ''">dict_type,</if> - <if test="status != null">status,</if> - <if test="remark != null and remark != ''">remark,</if> - <if test="createBy != null and createBy != ''">create_by,</if> - create_time - )values( - <if test="dictName != null and dictName != ''">#{dictName},</if> - <if test="dictType != null and dictType != ''">#{dictType},</if> - <if test="status != null">#{status},</if> - <if test="remark != null and remark != ''">#{remark},</if> - <if test="createBy != null and createBy != ''">#{createBy},</if> - now() - ) - </insert> - -</mapper> diff --git a/zhitan-system/target/classes/mapper/system/SysLoginInfoMapper.xml b/zhitan-system/target/classes/mapper/system/SysLoginInfoMapper.xml deleted file mode 100644 index 093d852..0000000 --- a/zhitan-system/target/classes/mapper/system/SysLoginInfoMapper.xml +++ /dev/null @@ -1,57 +0,0 @@ -<?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.zhitan.system.mapper.SysLoginInfoMapper"> - - <resultMap type="SysLoginInfo" id="SysSysLoginInfoResult"> - <id property="infoId" column="info_id" /> - <result property="userName" column="user_name" /> - <result property="status" column="status" /> - <result property="ipaddr" column="ipaddr" /> - <result property="loginLocation" column="login_location" /> - <result property="browser" column="browser" /> - <result property="os" column="os" /> - <result property="msg" column="msg" /> - <result property="loginTime" column="login_time" /> - </resultMap> - - <insert id="insertLoginInfo" parameterType="SysLoginInfo"> - insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time) - values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, now()) - </insert> - - <select id="selectLoginInfoList" parameterType="SysLoginInfo" resultMap="SysSysLoginInfoResult"> - select info_id, user_name, ipaddr, login_location, browser, os, status, msg, login_time from sys_logininfor - <where> - <if test="ipaddr != null and ipaddr != ''"> - AND ipaddr like concat('%', #{ipaddr}, '%') - </if> - <if test="status != null and status != ''"> - AND status = #{status} - </if> - <if test="userName != null and userName != ''"> - AND user_name like concat('%', #{userName}, '%') - </if> - <if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� --> - AND login_time >= #{params.beginTime} - </if> - <if test="params.endTime != null and params.endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� --> - AND login_time <= #{params.endTime} - </if> - </where> - order by info_id desc - </select> - - <delete id="deleteLoginInfoByIds" parameterType="Long"> - delete from sys_logininfor where info_id in - <foreach collection="array" item="infoId" open="(" separator="," close=")"> - #{infoId} - </foreach> - </delete> - - <update id="cleanLoginInfo"> - truncate table sys_logininfor - </update> - -</mapper> \ No newline at end of file diff --git a/zhitan-system/target/classes/mapper/system/SysMenuMapper.xml b/zhitan-system/target/classes/mapper/system/SysMenuMapper.xml deleted file mode 100644 index dc49256..0000000 --- a/zhitan-system/target/classes/mapper/system/SysMenuMapper.xml +++ /dev/null @@ -1,206 +0,0 @@ -<?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.zhitan.system.mapper.SysMenuMapper"> - - <resultMap type="SysMenu" id="SysMenuResult"> - <id property="menuId" column="menu_id" /> - <result property="menuName" column="menu_name" /> - <result property="parentName" column="parent_name" /> - <result property="parentId" column="parent_id" /> - <result property="orderNum" column="order_num" /> - <result property="path" column="path" /> - <result property="component" column="component" /> - <result property="query" column="query" /> - <result property="isFrame" column="is_frame" /> - <result property="isCache" column="is_cache" /> - <result property="menuType" column="menu_type" /> - <result property="visible" column="visible" /> - <result property="status" column="status" /> - <result property="perms" column="perms" /> - <result property="icon" column="icon" /> - <result property="createBy" column="create_by" /> - <result property="createTime" column="create_time" /> - <result property="updateTime" column="update_time" /> - <result property="updateBy" column="update_by" /> - <result property="remark" column="remark" /> - <result property="parameter" column="page_parameter" /> - </resultMap> - - <sql id="selectMenuVo"> - select menu_id, menu_name, parent_id, order_num, path, component, query, is_frame, is_cache, menu_type, visible, status, COALESCE(perms,'') as perms, icon, create_time,page_parameter - from sys_menu - </sql> - - <select id="selectMenuList" parameterType="SysMenu" resultMap="SysMenuResult"> - <include refid="selectMenuVo"/> - <where> - <if test="menuName != null and menuName != ''"> - AND menu_name like concat('%', #{menuName}, '%') - </if> - <if test="visible != null and visible != ''"> - AND visible = #{visible} - </if> - <if test="status != null and status != ''"> - AND status = #{status} - </if> - </where> - order by parent_id, order_num - </select> - - <select id="selectMenuTreeAll" resultMap="SysMenuResult"> - select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query,m.visible, m.status, COALESCE(m.perms,'') as perms, m.is_frame, m.is_cache,m.menu_type, m.icon, m.order_num, m.create_time,m.page_parameter - from sys_menu m where m.menu_type in ('M', 'C') and m.status = '0' - order by m.parent_id, m.order_num - </select> - - <select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult"> - select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.visible, m.status, COALESCE(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time - from sys_menu m - left join sys_role_menu rm on m.menu_id = rm.menu_id - left join sys_user_role ur on rm.role_id = ur.role_id - left join sys_role ro on ur.role_id = ro.role_id - where ur.user_id = #{params.userId} - <if test="menuName != null and menuName != ''"> - AND m.menu_name like concat('%', #{menuName}, '%') - </if> - <if test="visible != null and visible != ''"> - AND m.visible = #{visible} - </if> - <if test="status != null and status != ''"> - AND m.status = #{status} - </if> - order by m.parent_id, m.order_num - </select> - - <select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult"> - select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component,m.query, m.visible, m.status, COALESCE(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time,m.page_parameter - from sys_menu m - left join sys_role_menu rm on m.menu_id = rm.menu_id - left join sys_user_role ur on rm.role_id = ur.role_id - left join sys_role ro on ur.role_id = ro.role_id - left join sys_user u on ur.user_id = u.user_id - where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status = '0' AND ro.status = '0' - order by m.parent_id, m.order_num - </select> - - <select id="selectMenuListByRoleId" resultType="Long"> - select m.menu_id - from sys_menu m - left join sys_role_menu rm on m.menu_id = rm.menu_id - where rm.role_id = #{roleId} - <if test="menuCheckStrictly"> - and m.menu_id not in (select m.parent_id from sys_menu m inner join sys_role_menu rm on m.menu_id = rm.menu_id and rm.role_id = #{roleId}) - </if> - order by m.parent_id, m.order_num - </select> - - <select id="selectMenuPerms" resultType="String"> - select distinct m.perms - from sys_menu m - left join sys_role_menu rm on m.menu_id = rm.menu_id - left join sys_user_role ur on rm.role_id = ur.role_id - </select> - - <select id="selectMenuPermsByUserId" parameterType="Long" resultType="String"> - select distinct m.perms - from sys_menu m - left join sys_role_menu rm on m.menu_id = rm.menu_id - left join sys_user_role ur on rm.role_id = ur.role_id - left join sys_role r on r.role_id = ur.role_id - where m.status = '0' and r.status = '0' and ur.user_id = #{userId} - </select> - - <select id="selectMenuPermsByRoleId" parameterType="Long" resultType="String"> - select distinct m.perms - from sys_menu m - left join sys_role_menu rm on m.menu_id = rm.menu_id - where m.status = '0' and rm.role_id = #{roleId} - </select> - - <select id="selectMenuById" parameterType="Long" resultMap="SysMenuResult"> - <include refid="selectMenuVo"/> - where menu_id = #{menuId} - </select> - - <select id="hasChildByMenuId" resultType="Integer"> - select count(1) from sys_menu where parent_id = #{menuId} - </select> - - <select id="checkMenuNameUnique" parameterType="SysMenu" resultMap="SysMenuResult"> - <include refid="selectMenuVo"/> - where menu_name=#{menuName} and parent_id = #{parentId} limit 1 - </select> - - <update id="updateMenu" parameterType="SysMenu"> - update sys_menu - <set> - <if test="menuName != null and menuName != ''">menu_name = #{menuName},</if> - <if test="parentId != null and parentId != 0">parent_id = #{parentId},</if> - <if test="orderNum != null and orderNum != ''">order_num = #{orderNum},</if> - <if test="path != null and path != ''">path = #{path},</if> - <if test="component != null">component = #{component},</if> - <if test="query != null">query = #{query},</if> - <if test="isFrame != null and isFrame != ''">is_frame = #{isFrame},</if> - <if test="isCache != null and isCache != ''">is_cache = #{isCache},</if> - <if test="menuType != null and menuType != ''">menu_type = #{menuType},</if> - <if test="visible != null">visible = #{visible},</if> - <if test="status != null">status = #{status},</if> - <if test="perms !=null">perms = #{perms},</if> - <if test="icon !=null and icon != ''">icon = #{icon},</if> - <if test="remark != null and remark != ''">remark = #{remark},</if> - <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> - <if test="parameter != null and parameter != ''">page_parameter = #{parameter},</if> - update_time = now() - </set> - where menu_id = #{menuId} - </update> - - <insert id="insertMenu" parameterType="SysMenu"> - insert into sys_menu( - <if test="menuId != null and menuId != 0">menu_id,</if> - <if test="parentId != null and parentId != 0">parent_id,</if> - <if test="menuName != null and menuName != ''">menu_name,</if> - <if test="orderNum != null and orderNum != ''">order_num,</if> - <if test="path != null and path != ''">path,</if> - <if test="component != null and component != ''">component,</if> - <if test="query != null and query != ''">query,</if> - <if test="isFrame != null and isFrame != ''">is_frame,</if> - <if test="isCache != null and isCache != ''">is_cache,</if> - <if test="menuType != null and menuType != ''">menu_type,</if> - <if test="visible != null">visible,</if> - <if test="status != null">status,</if> - <if test="perms !=null and perms != ''">perms,</if> - <if test="icon != null and icon != ''">icon,</if> - <if test="remark != null and remark != ''">remark,</if> - <if test="createBy != null and createBy != ''">create_by,</if> - <if test="parameter != null and parameter != ''">page_parameter,</if> - create_time - )values( - <if test="menuId != null and menuId != 0">#{menuId},</if> - <if test="parentId != null and parentId != 0">#{parentId},</if> - <if test="menuName != null and menuName != ''">#{menuName},</if> - <if test="orderNum != null and orderNum != ''">#{orderNum},</if> - <if test="path != null and path != ''">#{path},</if> - <if test="component != null and component != ''">#{component},</if> - <if test="query != null and query != ''">#{query},</if> - <if test="isFrame != null and isFrame != ''">#{isFrame},</if> - <if test="isCache != null and isCache != ''">#{isCache},</if> - <if test="menuType != null and menuType != ''">#{menuType},</if> - <if test="visible != null">#{visible},</if> - <if test="status != null">#{status},</if> - <if test="perms !=null and perms != ''">#{perms},</if> - <if test="icon != null and icon != ''">#{icon},</if> - <if test="remark != null and remark != ''">#{remark},</if> - <if test="createBy != null and createBy != ''">#{createBy},</if> - <if test="parameter != null and parameter != ''">#{parameter},</if> - now() - ) - </insert> - - <delete id="deleteMenuById" parameterType="Long"> - delete from sys_menu where menu_id = #{menuId} - </delete> - -</mapper> diff --git a/zhitan-system/target/classes/mapper/system/SysNameConfigMapper.xml b/zhitan-system/target/classes/mapper/system/SysNameConfigMapper.xml deleted file mode 100644 index 0817d3d..0000000 --- a/zhitan-system/target/classes/mapper/system/SysNameConfigMapper.xml +++ /dev/null @@ -1,93 +0,0 @@ -<?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.zhitan.system.mapper.SysNameConfigMapper"> - - <resultMap type="SysNameConfig" id="SysNameConfigResult"> - <result property="systemName" column="system_name" /> - <result property="leftLogo" column="left_logo" /> - <result property="copyRight" column="copy_right" /> - <result property="createBy" column="create_by" /> - <result property="createTime" column="create_time" /> - <result property="updateBy" column="update_by" /> - <result property="updateTime" column="update_time" /> - <result property="remark" column="remark" /> - <result property="id" column="id" /> - <result property="homeLogo" column="home_logo" /> - </resultMap> - - <sql id="selectSysNameConfigVo"> - select system_name, left_logo, copy_right, create_by, create_time, update_by, update_time, remark, id, home_logo from sys_name_config - </sql> - - <select id="selectSysNameConfigList" parameterType="SysNameConfig" resultMap="SysNameConfigResult"> - <include refid="selectSysNameConfigVo"/> - <where> - <if test="systemName != null and systemName != ''"> and system_name like concat('%', #{systemName}, '%')</if> - <if test="leftLogo != null and leftLogo != ''"> and left_logo = #{leftLogo}</if> - <if test="copyRight != null and copyRight != ''"> and copy_right = #{copyRight}</if> - <if test="homeLogo != null and homeLogo != ''"> and home_logo = #{homeLogo}</if> - </where> - </select> - - <select id="selectSysNameConfigBySystemName" parameterType="String" resultMap="SysNameConfigResult"> - <include refid="selectSysNameConfigVo"/> - where system_name = #{systemName} - </select> - - <insert id="insertSysNameConfig" parameterType="SysNameConfig"> - insert into sys_name_config - <trim prefix="(" suffix=")" suffixOverrides=","> - <if test="systemName != null">system_name,</if> - <if test="leftLogo != null">left_logo,</if> - <if test="copyRight != null">copy_right,</if> - <if test="createBy != null">create_by,</if> - <if test="createTime != null">create_time,</if> - <if test="updateBy != null">update_by,</if> - <if test="updateTime != null">update_time,</if> - <if test="remark != null">remark,</if> - <if test="id != null and id != ''">id,</if> - <if test="homeLogo != null">home_logo,</if> - </trim> - <trim prefix="values (" suffix=")" suffixOverrides=","> - <if test="systemName != null">#{systemName},</if> - <if test="leftLogo != null">#{leftLogo},</if> - <if test="copyRight != null">#{copyRight},</if> - <if test="createBy != null">#{createBy},</if> - <if test="createTime != null">#{createTime},</if> - <if test="updateBy != null">#{updateBy},</if> - <if test="updateTime != null">#{updateTime},</if> - <if test="remark != null">#{remark},</if> - <if test="id != null and id != ''">#{id},</if> - <if test="homeLogo != null">#{homeLogo},</if> - </trim> - </insert> - - <update id="updateSysNameConfig" parameterType="SysNameConfig"> - update sys_name_config - <trim prefix="SET" suffixOverrides=","> - <if test="leftLogo != null">left_logo = #{leftLogo},</if> - <if test="copyRight != null">copy_right = #{copyRight},</if> - <if test="createBy != null">create_by = #{createBy},</if> - <if test="createTime != null">create_time = #{createTime},</if> - <if test="updateBy != null">update_by = #{updateBy},</if> - <if test="updateTime != null">update_time = #{updateTime},</if> - <if test="remark != null">remark = #{remark},</if> - <if test="id != null and id != ''">id = #{id},</if> - <if test="homeLogo != null">home_logo = #{homeLogo},</if> - </trim> - where system_name = #{systemName} - </update> - - <delete id="deleteSysNameConfigBySystemName" parameterType="String"> - delete from sys_name_config where system_name = #{systemName} - </delete> - - <delete id="deleteSysNameConfigBySystemNames" parameterType="String"> - delete from sys_name_config where system_name in - <foreach item="systemName" collection="array" open="(" separator="," close=")"> - #{systemName} - </foreach> - </delete> -</mapper> \ No newline at end of file diff --git a/zhitan-system/target/classes/mapper/system/SysNoticeMapper.xml b/zhitan-system/target/classes/mapper/system/SysNoticeMapper.xml deleted file mode 100644 index 2241e39..0000000 --- a/zhitan-system/target/classes/mapper/system/SysNoticeMapper.xml +++ /dev/null @@ -1,89 +0,0 @@ -<?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.zhitan.system.mapper.SysNoticeMapper"> - - <resultMap type="SysNotice" id="SysNoticeResult"> - <result property="noticeId" column="notice_id" /> - <result property="noticeTitle" column="notice_title" /> - <result property="noticeType" column="notice_type" /> - <result property="noticeContent" column="notice_content" /> - <result property="status" column="status" /> - <result property="createBy" column="create_by" /> - <result property="createTime" column="create_time" /> - <result property="updateBy" column="update_by" /> - <result property="updateTime" column="update_time" /> - <result property="remark" column="remark" /> - </resultMap> - - <sql id="selectNoticeVo"> - select notice_id, notice_title, notice_type, notice_content, status, create_by, create_time, update_by, update_time, remark - from sys_notice - </sql> - - <select id="selectNoticeById" parameterType="Long" resultMap="SysNoticeResult"> - <include refid="selectNoticeVo"/> - where notice_id = #{noticeId} - </select> - - <select id="selectNoticeList" parameterType="SysNotice" resultMap="SysNoticeResult"> - <include refid="selectNoticeVo"/> - <where> - <if test="noticeTitle != null and noticeTitle != ''"> - AND notice_title like concat('%', #{noticeTitle}, '%') - </if> - <if test="noticeType != null and noticeType != ''"> - AND notice_type = #{noticeType} - </if> - <if test="createBy != null and createBy != ''"> - AND create_by like concat('%', #{createBy}, '%') - </if> - </where> - </select> - - <insert id="insertNotice" parameterType="SysNotice"> - insert into sys_notice ( - <if test="noticeTitle != null and noticeTitle != '' ">notice_title, </if> - <if test="noticeType != null and noticeType != '' ">notice_type, </if> - <if test="noticeContent != null and noticeContent != '' ">notice_content, </if> - <if test="status != null and status != '' ">status, </if> - <if test="remark != null and remark != ''">remark,</if> - <if test="createBy != null and createBy != ''">create_by,</if> - create_time - )values( - <if test="noticeTitle != null and noticeTitle != ''">#{noticeTitle}, </if> - <if test="noticeType != null and noticeType != ''">#{noticeType}, </if> - <if test="noticeContent != null and noticeContent != ''">#{noticeContent}, </if> - <if test="status != null and status != ''">#{status}, </if> - <if test="remark != null and remark != ''">#{remark},</if> - <if test="createBy != null and createBy != ''">#{createBy},</if> - now() - ) - </insert> - - <update id="updateNotice" parameterType="SysNotice"> - update sys_notice - <set> - <if test="noticeTitle != null and noticeTitle != ''">notice_title = #{noticeTitle}, </if> - <if test="noticeType != null and noticeType != ''">notice_type = #{noticeType}, </if> - <if test="noticeContent != null">notice_content = #{noticeContent}, </if> - <if test="status != null and status != ''">status = #{status}, </if> - <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> - update_time = now() - </set> - where notice_id = #{noticeId} - </update> - - <delete id="deleteNoticeById" parameterType="Long"> - delete from sys_notice where notice_id = #{noticeId} - </delete> - - <delete id="deleteNoticeByIds" parameterType="Long"> - delete from sys_notice where notice_id in - <foreach item="noticeId" collection="array" open="(" separator="," close=")"> - #{noticeId} - </foreach> - </delete> - -</mapper> diff --git a/zhitan-system/target/classes/mapper/system/SysOperLogMapper.xml b/zhitan-system/target/classes/mapper/system/SysOperLogMapper.xml deleted file mode 100644 index 7b55d6a..0000000 --- a/zhitan-system/target/classes/mapper/system/SysOperLogMapper.xml +++ /dev/null @@ -1,87 +0,0 @@ -<?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.zhitan.system.mapper.SysOperLogMapper"> - - <resultMap type="SysOperLog" id="SysOperLogResult"> - <id property="operId" column="oper_id" /> - <result property="title" column="title" /> - <result property="businessType" column="business_type" /> - <result property="method" column="method" /> - <result property="requestMethod" column="request_method" /> - <result property="operatorType" column="operator_type" /> - <result property="operName" column="oper_name" /> - <result property="deptName" column="dept_name" /> - <result property="operUrl" column="oper_url" /> - <result property="operIp" column="oper_ip" /> - <result property="operLocation" column="oper_location" /> - <result property="operParam" column="oper_param" /> - <result property="jsonResult" column="json_result" /> - <result property="status" column="status" /> - <result property="errorMsg" column="error_msg" /> - <result property="operTime" column="oper_time" /> - <result property="costTime" column="cost_time" /> - </resultMap> - - <sql id="selectOperLogVo"> - select oper_id, title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, oper_time, cost_time - from sys_oper_log - </sql> - - <insert id="insertOperlog" parameterType="SysOperLog"> - insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, cost_time, oper_time) - values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, now()) - </insert> - - <select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult"> - <include refid="selectOperLogVo"/> - <where> - <if test="operIp != null and operIp != ''"> - AND oper_ip like concat('%', #{operIp}, '%') - </if> - <if test="title != null and title != ''"> - AND title like concat('%', #{title}, '%') - </if> - <if test="businessType != null"> - AND business_type = #{businessType} - </if> - <if test="businessTypes != null and businessTypes.length > 0"> - AND business_type in - <foreach collection="businessTypes" item="businessType" open="(" separator="," close=")"> - #{businessType} - </foreach> - </if> - <if test="status != null"> - AND status = #{status} - </if> - <if test="operName != null and operName != ''"> - AND oper_name like concat('%', #{operName}, '%') - </if> - <if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� --> - AND oper_time >= #{params.beginTime} - </if> - <if test="params.endTime != null and params.endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� --> - AND oper_time <= #{params.endTime} - </if> - </where> - order by oper_id desc - </select> - - <delete id="deleteOperLogByIds" parameterType="Long"> - delete from sys_oper_log where oper_id in - <foreach collection="array" item="operId" open="(" separator="," close=")"> - #{operId} - </foreach> - </delete> - - <select id="selectOperLogById" parameterType="Long" resultMap="SysOperLogResult"> - <include refid="selectOperLogVo"/> - where oper_id = #{operId} - </select> - - <update id="cleanOperLog"> - truncate table sys_oper_log - </update> - -</mapper> \ No newline at end of file diff --git a/zhitan-system/target/classes/mapper/system/SysPostMapper.xml b/zhitan-system/target/classes/mapper/system/SysPostMapper.xml deleted file mode 100644 index b3fb9f1..0000000 --- a/zhitan-system/target/classes/mapper/system/SysPostMapper.xml +++ /dev/null @@ -1,123 +0,0 @@ -<?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.zhitan.system.mapper.SysPostMapper"> - - <resultMap type="SysPost" id="SysPostResult"> - <id property="postId" column="post_id" /> - <result property="postCode" column="post_code" /> - <result property="postName" column="post_name" /> - <result property="postSort" column="post_sort" /> - <result property="status" column="status" /> - <result property="createBy" column="create_by" /> - <result property="createTime" column="create_time" /> - <result property="updateBy" column="update_by" /> - <result property="updateTime" column="update_time" /> - <result property="remark" column="remark" /> - </resultMap> - - <sql id="selectPostVo"> - select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark - from sys_post - </sql> - - <select id="selectPostList" parameterType="SysPost" resultMap="SysPostResult"> - <include refid="selectPostVo"/> - <where> - <if test="postCode != null and postCode != ''"> - AND post_code like concat('%', #{postCode}, '%') - </if> - <if test="status != null and status != ''"> - AND status = #{status} - </if> - <if test="postName != null and postName != ''"> - AND post_name like concat('%', #{postName}, '%') - </if> - </where> - order by post_sort - </select> - - <select id="selectPostAll" resultMap="SysPostResult"> - <include refid="selectPostVo"/> - </select> - - <select id="selectPostById" parameterType="Long" resultMap="SysPostResult"> - <include refid="selectPostVo"/> - where post_id = #{postId} - </select> - - <select id="selectPostListByUserId" parameterType="Long" resultType="Integer"> - select p.post_id - from sys_post p - left join sys_user_post up on up.post_id = p.post_id - left join sys_user u on u.user_id = up.user_id - where u.user_id = #{userId} - </select> - - <select id="selectPostsByUserName" parameterType="String" resultMap="SysPostResult"> - select p.post_id, p.post_name, p.post_code - from sys_post p - left join sys_user_post up on up.post_id = p.post_id - left join sys_user u on u.user_id = up.user_id - where u.user_name = #{userName} - </select> - - <select id="checkPostNameUnique" parameterType="String" resultMap="SysPostResult"> - <include refid="selectPostVo"/> - where post_name=#{postName} - </select> - - <select id="checkPostCodeUnique" parameterType="String" resultMap="SysPostResult"> - <include refid="selectPostVo"/> - where post_code=#{postCode} - </select> - - <update id="updatePost" parameterType="SysPost"> - update sys_post - <set> - <if test="postCode != null and postCode != ''">post_code = #{postCode},</if> - <if test="postName != null and postName != ''">post_name = #{postName},</if> - <if test="postSort != null and postSort != ''">post_sort = #{postSort},</if> - <if test="status != null and status != ''">status = #{status},</if> - <if test="remark != null">remark = #{remark},</if> - <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> - update_time = now() - </set> - where post_id = #{postId} - </update> - - <insert id="insertPost" parameterType="SysPost" useGeneratedKeys="true" keyProperty="postId"> - insert into sys_post( - <if test="postId != null and postId != 0">post_id,</if> - <if test="postCode != null and postCode != ''">post_code,</if> - <if test="postName != null and postName != ''">post_name,</if> - <if test="postSort != null and postSort != ''">post_sort,</if> - <if test="status != null and status != ''">status,</if> - <if test="remark != null and remark != ''">remark,</if> - <if test="createBy != null and createBy != ''">create_by,</if> - create_time - )values( - <if test="postId != null and postId != 0">#{postId},</if> - <if test="postCode != null and postCode != ''">#{postCode},</if> - <if test="postName != null and postName != ''">#{postName},</if> - <if test="postSort != null and postSort != ''">#{postSort},</if> - <if test="status != null and status != ''">#{status},</if> - <if test="remark != null and remark != ''">#{remark},</if> - <if test="createBy != null and createBy != ''">#{createBy},</if> - now() - ) - </insert> - - <delete id="deletePostById" parameterType="Long"> - delete from sys_post where post_id = #{postId} - </delete> - - <delete id="deletePostByIds" parameterType="Long"> - delete from sys_post where post_id in - <foreach collection="array" item="postId" open="(" separator="," close=")"> - #{postId} - </foreach> - </delete> - -</mapper> diff --git a/zhitan-system/target/classes/mapper/system/SysRoleDeptMapper.xml b/zhitan-system/target/classes/mapper/system/SysRoleDeptMapper.xml deleted file mode 100644 index ed43ada..0000000 --- a/zhitan-system/target/classes/mapper/system/SysRoleDeptMapper.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?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.zhitan.system.mapper.SysRoleDeptMapper"> - - <resultMap type="SysRoleDept" id="SysRoleDeptResult"> - <result property="roleId" column="role_id" /> - <result property="deptId" column="dept_id" /> - </resultMap> - - <delete id="deleteRoleDeptByRoleId" parameterType="Long"> - delete from sys_role_dept where role_id=#{roleId} - </delete> - - <select id="selectCountRoleDeptByDeptId" resultType="Integer"> - select count(1) from sys_role_dept where dept_id=#{deptId} - </select> - - <delete id="deleteRoleDept" parameterType="Long"> - delete from sys_role_dept where role_id in - <foreach collection="array" item="roleId" open="(" separator="," close=")"> - #{roleId} - </foreach> - </delete> - - <insert id="batchRoleDept"> - insert into sys_role_dept(role_id, dept_id) values - <foreach item="item" index="index" collection="list" separator=","> - (#{item.roleId},#{item.deptId}) - </foreach> - </insert> - -</mapper> diff --git a/zhitan-system/target/classes/mapper/system/SysRoleMapper.xml b/zhitan-system/target/classes/mapper/system/SysRoleMapper.xml deleted file mode 100644 index 8196b75..0000000 --- a/zhitan-system/target/classes/mapper/system/SysRoleMapper.xml +++ /dev/null @@ -1,157 +0,0 @@ -<?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.zhitan.system.mapper.SysRoleMapper"> - - <resultMap type="SysRole" id="SysRoleResult"> - <id property="roleId" column="role_id" /> - <result property="roleName" column="role_name" /> - <result property="roleKey" column="role_key" /> - <result property="roleSort" column="role_sort" /> - <result property="dataScope" column="data_scope" /> - <result property="menuCheckStrictly" column="menu_check_strictly" /> - <result property="deptCheckStrictly" column="dept_check_strictly" /> - <result property="status" column="status" /> - <result property="delFlag" column="del_flag" /> - <result property="createBy" column="create_by" /> - <result property="createTime" column="create_time" /> - <result property="updateBy" column="update_by" /> - <result property="updateTime" column="update_time" /> - <result property="remark" column="remark" /> - </resultMap> - - <sql id="selectRoleVo"> - select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope,r.menu_check_strictly, r.dept_check_strictly, - r.status, r.del_flag, r.create_time, r.remark - from sys_role r - left join sys_user_role ur on ur.role_id = r.role_id - left join sys_user u on u.user_id = ur.user_id - left join sys_dept d on u.dept_id = d.dept_id - </sql> - - <select id="selectRoleList" parameterType="SysRole" resultMap="SysRoleResult"> - <include refid="selectRoleVo"/> - where r.del_flag = '0' - <if test="roleId != null and roleId != 0"> - AND r.role_id = #{roleId} - </if> - <if test="roleName != null and roleName != ''"> - AND r.role_name like concat('%', #{roleName}, '%') - </if> - <if test="status != null and status != ''"> - AND r.status = #{status} - </if> - <if test="roleKey != null and roleKey != ''"> - AND r.role_key like concat('%', #{roleKey}, '%') - </if> - <if test="beginTime != null and beginTime != ''"><!-- 寮�濮嬫椂闂存绱� --> - and to_char(r.create_time,'yyyymmdd') >= to_char(to_date(#{beginTime}, 'yyyy-mm-dd'),'yyyymmdd') - </if> - <if test="endTime != null and endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� --> - and to_char(r.create_time,'yyyymmdd') <= to_char(to_date(#{endTime}, 'yyyy-mm-dd'),'yyyymmdd') - </if> - <!-- 鏁版嵁鑼冨洿杩囨护 --> - ${params.dataScope} - order by r.role_sort - </select> - - <select id="selectRolePermissionByUserId" parameterType="Long" resultMap="SysRoleResult"> - <include refid="selectRoleVo"/> - WHERE r.del_flag = '0' and ur.user_id = #{userId} - </select> - - <select id="selectRoleAll" resultMap="SysRoleResult"> - <include refid="selectRoleVo"/> - order by r.role_sort - </select> - - <select id="selectRoleListByUserId" parameterType="Long" resultType="Integer"> - select r.role_id - from sys_role r - left join sys_user_role ur on ur.role_id = r.role_id - left join sys_user u on u.user_id = ur.user_id - where u.user_id = #{userId} - </select> - - <select id="selectRoleById" parameterType="Long" resultMap="SysRoleResult"> - <include refid="selectRoleVo"/> - where r.role_id = #{roleId} - </select> - - <select id="selectRolesByUserName" parameterType="String" resultMap="SysRoleResult"> - <include refid="selectRoleVo"/> - WHERE r.del_flag = '0' and u.user_name = #{userName} - </select> - - <select id="checkRoleNameUnique" parameterType="String" resultMap="SysRoleResult"> - <include refid="selectRoleVo"/> - where r.role_name=#{roleName} and r.del_flag = '0' limit 1 - </select> - - <select id="checkRoleKeyUnique" parameterType="String" resultMap="SysRoleResult"> - <include refid="selectRoleVo"/> - where r.role_key=#{roleKey} and r.del_flag = '0' limit 1 - </select> - - <insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId"> - insert into sys_role( - <if test="roleId != null and roleId != 0">role_id,</if> - <if test="roleName != null and roleName != ''">role_name,</if> - <if test="roleKey != null and roleKey != ''">role_key,</if> - <if test="roleSort != null">role_sort,</if> - <if test="dataScope != null and dataScope != ''">data_scope,</if> - <if test="menuCheckStrictly != null">menu_check_strictly,</if> - <if test="deptCheckStrictly != null">dept_check_strictly,</if> - <if test="status != null and status != ''">status,</if> - <if test="remark != null and remark != ''">remark,</if> - <if test="createBy != null and createBy != ''">create_by,</if> - create_time - )values( - <if test="roleId != null and roleId != 0">#{roleId},</if> - <if test="roleName != null and roleName != ''">#{roleName},</if> - <if test="roleKey != null and roleKey != ''">#{roleKey},</if> - <if test="roleSort != null">#{roleSort},</if> - <if test="dataScope != null and dataScope != ''">#{dataScope},</if> - <if test="menuCheckStrictly != null">#{menuCheckStrictly},</if> - <if test="deptCheckStrictly != null">#{deptCheckStrictly},</if> - <if test="status != null and status != ''">#{status},</if> - <if test="remark != null and remark != ''">#{remark},</if> - <if test="createBy != null and createBy != ''">#{createBy},</if> - now() - ) - </insert> - - <update id="updateRole" parameterType="SysRole"> - update sys_role - <set> - <if test="roleName != null and roleName != ''">role_name = #{roleName},</if> - <if test="roleKey != null and roleKey != ''">role_key = #{roleKey},</if> - <if test="roleSort != null">role_sort = #{roleSort},</if> - <if test="dataScope != null and dataScope != ''">data_scope = #{dataScope},</if> - <if test="menuCheckStrictly != null">menu_check_strictly = #{menuCheckStrictly},</if> - <if test="deptCheckStrictly != null">dept_check_strictly = #{deptCheckStrictly},</if> - <if test="status != null and status != ''">status = #{status},</if> - <if test="remark != null">remark = #{remark},</if> - <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> - update_time = now() - </set> - where role_id = #{roleId} - </update> - - <update id="updateRoleStatus" parameterType="SysRole"> - update sys_user set status = #{status} where user_id = #{userId} - </update> - - <delete id="deleteRoleById" parameterType="Long"> - delete from sys_role where role_id = #{roleId} - </delete> - - <delete id="deleteRoleByIds" parameterType="Long"> - update sys_role set del_flag = '2' where role_id in - <foreach collection="array" item="roleId" open="(" separator="," close=")"> - #{roleId} - </foreach> - </delete> - -</mapper> diff --git a/zhitan-system/target/classes/mapper/system/SysRoleMenuMapper.xml b/zhitan-system/target/classes/mapper/system/SysRoleMenuMapper.xml deleted file mode 100644 index b929cfb..0000000 --- a/zhitan-system/target/classes/mapper/system/SysRoleMenuMapper.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?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.zhitan.system.mapper.SysRoleMenuMapper"> - - <resultMap type="SysRoleMenu" id="SysRoleMenuResult"> - <result property="roleId" column="role_id" /> - <result property="menuId" column="menu_id" /> - </resultMap> - - <select id="checkMenuExistRole" resultType="Integer"> - select count(1) from sys_role_menu where menu_id = #{menuId} - </select> - - <delete id="deleteRoleMenuByRoleId" parameterType="Long"> - delete from sys_role_menu where role_id=#{roleId} - </delete> - - <insert id="batchRoleMenu"> - insert into sys_role_menu(role_id, menu_id) values - <foreach item="item" index="index" collection="list" separator=","> - (#{item.roleId},#{item.menuId}) - </foreach> - </insert> - -</mapper> diff --git a/zhitan-system/target/classes/mapper/system/SysUserMapper.xml b/zhitan-system/target/classes/mapper/system/SysUserMapper.xml deleted file mode 100644 index 68e0991..0000000 --- a/zhitan-system/target/classes/mapper/system/SysUserMapper.xml +++ /dev/null @@ -1,227 +0,0 @@ -<?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.zhitan.system.mapper.SysUserMapper"> - - <resultMap type="SysUser" id="SysUserResult"> - <id property="userId" column="user_id"/> - <result property="deptId" column="dept_id"/> - <result property="userName" column="user_name"/> - <result property="nickName" column="nick_name"/> - <result property="email" column="email"/> - <result property="phoneNumber" column="phone_number"/> - <result property="sex" column="sex"/> - <result property="avatar" column="avatar"/> - <result property="password" column="password"/> - <result property="status" column="status"/> - <result property="delFlag" column="del_flag"/> - <result property="loginIp" column="login_ip"/> - <result property="loginDate" column="login_date"/> - <result property="createBy" column="create_by"/> - <result property="createTime" column="create_time"/> - <result property="updateBy" column="update_by"/> - <result property="updateTime" column="update_time"/> - <result property="remark" column="remark"/> - <result property="singleUser" column="single_user"/> - <association property="dept" javaType="SysDept" resultMap="deptResult" /> - <collection property="roles" javaType="java.util.List" resultMap="RoleResult"/> - </resultMap> - - <resultMap id="deptResult" type="SysDept"> - <id property="deptId" column="dept_id"/> - <result property="parentId" column="parent_id"/> - <result property="deptName" column="dept_name"/> - <result property="ancestors" column="ancestors" /> - <result property="orderNum" column="order_num"/> - <result property="leader" column="leader"/> - <result property="status" column="dept_status"/> - </resultMap> - - <resultMap id="RoleResult" type="SysRole"> - <id property="roleId" column="role_id"/> - <result property="roleName" column="role_name"/> - <result property="roleKey" column="role_key"/> - <result property="roleSort" column="role_sort"/> - <result property="dataScope" column="data_scope"/> - <result property="status" column="role_status"/> - </resultMap> - - <sql id="selectUserVo"> - select u.user_id, - u.dept_id, - u.user_name, - u.nick_name, - u.email, - u.avatar, - u.phone_number, - u.password, - u.sex, - u.status, - u.del_flag, - u.login_ip, - u.login_date, - u.create_by, - u.create_time, - u.remark, - u.single_user, - d.dept_id, - d.parent_id, - d.ancestors, - d.dept_name, - d.order_num, - d.leader, - d.status as dept_status, - r.role_id, - r.role_name, - r.role_key, - r.role_sort, - r.data_scope, - r.status as role_status - from sys_user u - left join sys_dept d on u.dept_id = d.dept_id - left join sys_user_role ur on u.user_id = ur.user_id - left join sys_role r on r.role_id = ur.role_id - </sql> - - <select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult"> - select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phone_number, u.password, u.sex, - u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,u.single_user, d.dept_name, d.leader from - sys_user u - left join sys_dept d on u.dept_id = d.dept_id - where u.del_flag = '0' - <if test="userName != null and userName != ''"> - AND u.user_name like concat('%', #{userName}, '%') - </if> - <if test="status != null and status != ''"> - AND u.status = #{status} - </if> - <if test="phoneNumber != null and phoneNumber != ''"> - AND u.phone_number like concat('%', #{phoneNumber}, '%') - </if> - <if test="beginTime != null and beginTime != ''"><!-- 寮�濮嬫椂闂存绱� --> - AND to_char(u.create_time,'yyyymmdd') >= to_char(to_date(#{beginTime}, 'yyyy-mm-dd'),'yyyymmdd') - </if> - <if test="endTime != null and endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� --> - AND to_char(u.create_time,'yyyymmdd') <= to_char(to_date(#{endTime}, 'yyyy-mm-dd'),'yyyymmdd') - </if> - <if test="deptId != null and deptId != 0"> - AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE ancestors = (select - ancestors from sys_dept where dept_id = #{deptId}) || #{deptId} )) - </if> - <!-- 鏁版嵁鑼冨洿杩囨护 --> - ${dataScope} - </select> - - <select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult"> - <include refid="selectUserVo"/> - where u.user_name = #{userName} and u.del_flag = '0' - </select> - - <select id="selectUserById" parameterType="Long" resultMap="SysUserResult"> - <include refid="selectUserVo"/> - where u.user_id = #{userId} - </select> - - <select id="checkUserNameUnique" parameterType="String" resultMap="SysUserResult"> - select user_id, user_name from sys_user where user_name = #{userName} and del_flag = '0' limit 1 - </select> - - <select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult"> - select user_id, phone_number from sys_user where phone_number = #{phoneNumber} and del_flag = '0' limit 1 - </select> - - <select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult"> - select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1 - </select> - - <insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId"> - insert into sys_user( - <if test="userId != null and userId != 0">user_id,</if> - <if test="deptId != null and deptId != 0">dept_id,</if> - <if test="userName != null and userName != ''">user_name,</if> - <if test="nickName != null and nickName != ''">nick_name,</if> - <if test="email != null and email != ''">email,</if> - <if test="avatar != null and avatar != ''">avatar,</if> - <if test="phoneNumber != null and phoneNumber != ''">phone_number,</if> - <if test="sex != null and sex != ''">sex,</if> - <if test="password != null and password != ''">password,</if> - <if test="status != null and status != ''">status,</if> - <if test="createBy != null and createBy != ''">create_by,</if> - <if test="remark != null and remark != ''">remark,</if> - <if test="singleUser != null and singleUser != ''">single_user,</if> - create_time - )values( - <if test="userId != null and userId != ''">#{userId},</if> - <if test="deptId != null and deptId != ''">#{deptId},</if> - <if test="userName != null and userName != ''">#{userName},</if> - <if test="nickName != null and nickName != ''">#{nickName},</if> - <if test="email != null and email != ''">#{email},</if> - <if test="avatar != null and avatar != ''">#{avatar},</if> - <if test="phoneNumber != null and phoneNumber != ''">#{phoneNumber},</if> - <if test="sex != null and sex != ''">#{sex},</if> - <if test="password != null and password != ''">#{password},</if> - <if test="status != null and status != ''">#{status},</if> - <if test="createBy != null and createBy != ''">#{createBy},</if> - <if test="remark != null and remark != ''">#{remark},</if> - <if test="singleUser != null and singleUser != ''">#{singleUser},</if> - now() - ) - </insert> - - <update id="updateUser" parameterType="SysUser"> - update sys_user - <set> - <if test="deptId != null and deptId != 0">dept_id = #{deptId},</if> - <if test="userName != null and userName != ''">user_name = #{userName},</if> - <if test="nickName != null and nickName != ''">nick_name = #{nickName},</if> - <if test="email != null ">email = #{email},</if> - <if test="phoneNumber != null ">phone_number = #{phoneNumber},</if> - <if test="sex != null and sex != ''">sex = #{sex},</if> - <if test="avatar != null and avatar != ''">avatar = #{avatar},</if> - <if test="password != null and password != ''">password = #{password},</if> - <if test="status != null and status != ''">status = #{status},</if> - <if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if> - <if test="loginDate != null">login_date = #{loginDate},</if> - <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if> - <if test="remark != null">remark = #{remark},</if> - <if test="singleUser != null and singleUser != ''">single_user = #{singleUser},</if> - update_time = now() - </set> - where user_id = #{userId} - </update> - - <update id="updateUserStatus" parameterType="SysUser"> - update sys_user - set status = #{status} - where user_id = #{userId} - </update> - - <update id="updateUserAvatar" parameterType="SysUser"> - update sys_user - set avatar = #{avatar} - where user_name = #{userName} - </update> - - <update id="resetUserPwd" parameterType="SysUser"> - update sys_user - set password = #{password} - where user_name = #{userName} - </update> - - <delete id="deleteUserById" parameterType="Long"> - delete - from sys_user - where user_id = #{userId} - </delete> - - <delete id="deleteUserByIds" parameterType="Long"> - delete - from sys_user - where user_id in - <foreach collection="array" item="userId" open="(" separator="," close=")"> - #{userId} - </foreach> - </delete> - -</mapper> diff --git a/zhitan-system/target/classes/mapper/system/SysUserPostMapper.xml b/zhitan-system/target/classes/mapper/system/SysUserPostMapper.xml deleted file mode 100644 index 0e2afe9..0000000 --- a/zhitan-system/target/classes/mapper/system/SysUserPostMapper.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?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.zhitan.system.mapper.SysUserPostMapper"> - - <resultMap type="SysUserPost" id="SysUserPostResult"> - <result property="userId" column="user_id" /> - <result property="postId" column="post_id" /> - </resultMap> - - <delete id="deleteUserPostByUserId" parameterType="Long"> - delete from sys_user_post where user_id=#{userId} - </delete> - - <select id="countUserPostById" resultType="Integer"> - select count(1) from sys_user_post where post_id=#{postId} - </select> - - <delete id="deleteUserPost" parameterType="Long"> - delete from sys_user_post where user_id in - <foreach collection="array" item="userId" open="(" separator="," close=")"> - #{userId} - </foreach> - </delete> - - <insert id="batchUserPost"> - insert into sys_user_post(user_id, post_id) values - <foreach item="item" index="index" collection="list" separator=","> - (#{item.userId},#{item.postId}) - </foreach> - </insert> - -</mapper> diff --git a/zhitan-system/target/classes/mapper/system/SysUserRoleMapper.xml b/zhitan-system/target/classes/mapper/system/SysUserRoleMapper.xml deleted file mode 100644 index 77b3477..0000000 --- a/zhitan-system/target/classes/mapper/system/SysUserRoleMapper.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?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.zhitan.system.mapper.SysUserRoleMapper"> - - <resultMap type="SysUserRole" id="SysUserRoleResult"> - <result property="userId" column="user_id" /> - <result property="roleId" column="role_id" /> - </resultMap> - - <delete id="deleteUserRoleByUserId" parameterType="Long"> - delete from sys_user_role where user_id=#{userId} - </delete> - - <select id="countUserRoleByRoleId" resultType="Integer"> - select count(1) from sys_user_role where role_id=#{roleId} - </select> - - <delete id="deleteUserRole" parameterType="Long"> - delete from sys_user_role where user_id in - <foreach collection="array" item="userId" open="(" separator="," close=")"> - #{userId} - </foreach> - </delete> - - <insert id="batchUserRole"> - insert into sys_user_role(user_id, role_id) values - <foreach item="item" index="index" collection="list" separator=","> - (#{item.userId},#{item.roleId}) - </foreach> - </insert> - - <delete id="deleteUserRoleInfo" parameterType="SysUserRole"> - delete from sys_user_role where user_id=#{userId} and role_id=#{roleId} - </delete> - - <delete id="deleteUserRoleInfos"> - delete from sys_user_role where role_id=#{roleId} and user_id in - <foreach collection="userIds" item="userId" open="(" separator="," close=")"> - #{userId} - </foreach> - </delete> -</mapper> -- Gitblit v1.9.3