From 8464a983a5eeb1abe88388c761dbd6e6c89c0d4e Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期二, 12 三月 2024 18:31:15 +0800 Subject: [PATCH] 运维点位、合同 --- ycl-pojo/src/main/java/com/ycl/platform/domain/entity/YwPoint.java | 8 ycl-server/src/main/java/com/ycl/platform/service/impl/TContractServiceImpl.java | 94 ++++ ycl-server/src/main/java/com/ycl/platform/service/ITMonitorService.java | 3 ycl-server/src/main/java/com/ycl/platform/mapper/TMonitorMapper.java | 3 ycl-server/src/main/java/com/ycl/platform/mapper/TContractMapper.java | 62 +++ ycl-pojo/src/main/java/com/ycl/platform/domain/vo/YwPointVO.java | 5 ycl-server/src/main/java/com/ycl/platform/service/ITContractService.java | 62 +++ ycl-pojo/src/main/java/com/ycl/platform/domain/vo/TMonitorVO.java | 522 +++++++++++++++++++++++++++ ycl-server/src/main/java/com/ycl/platform/service/impl/TMonitorServiceImpl.java | 3 ycl-server/src/main/resources/mapper/zgyw/TContractMapper.xml | 86 ++++ document/副本1020自贡市局运维考核平台.xlsx | 0 ycl-pojo/src/main/java/com/ycl/platform/domain/entity/TMonitor.java | 11 ycl-server/src/main/java/com/ycl/platform/controller/TContractController.java | 99 +++++ ycl-server/src/main/java/com/ycl/platform/controller/TMonitorController.java | 7 ycl-server/src/main/java/com/ycl/platform/service/impl/YwPointServiceImpl.java | 12 ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml | 13 ycl-pojo/src/main/java/com/ycl/platform/domain/entity/TContract.java | 135 +++++++ 17 files changed, 1,114 insertions(+), 11 deletions(-) diff --git "a/document/\345\211\257\346\234\2541020\350\207\252\350\264\241\345\270\202\345\261\200\350\277\220\347\273\264\350\200\203\346\240\270\345\271\263\345\217\260.xlsx" "b/document/\345\211\257\346\234\2541020\350\207\252\350\264\241\345\270\202\345\261\200\350\277\220\347\273\264\350\200\203\346\240\270\345\271\263\345\217\260.xlsx" index daf2c57..38de50c 100644 --- "a/document/\345\211\257\346\234\2541020\350\207\252\350\264\241\345\270\202\345\261\200\350\277\220\347\273\264\350\200\203\346\240\270\345\271\263\345\217\260.xlsx" +++ "b/document/\345\211\257\346\234\2541020\350\207\252\350\264\241\345\270\202\345\261\200\350\277\220\347\273\264\350\200\203\346\240\270\345\271\263\345\217\260.xlsx" Binary files differ diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/TContract.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/TContract.java new file mode 100644 index 0000000..5c7e9ad --- /dev/null +++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/TContract.java @@ -0,0 +1,135 @@ +package com.ycl.platform.domain.entity; + +import annotation.Excel; +import com.ycl.system.entity.BaseEntity; +import org.apache.commons.lang.builder.ToStringBuilder; +import org.apache.commons.lang.builder.ToStringStyle; + +import java.util.Date; + +/** + * 銆愯濉啓鍔熻兘鍚嶇О銆戝璞� t_contract + * + * @author ruoyi + * @date 2024-03-12 + */ +public class TContract extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 涓婚敭 */ + private Long id; + + /** 鍏徃id */ + @Excel(name = "鍏徃id") + private Long companyId; + + /** 鍏徃鍚� */ + @Excel(name = "鍏徃鍚�") + private String companyName; + + /** 瀵规帴鍏畨閮ㄩ棬id */ + @Excel(name = "瀵规帴鍏畨閮ㄩ棬id") + private Long deptId; + + /** 閮ㄩ棬鍚嶇О */ + @Excel(name = "閮ㄩ棬鍚嶇О") + private String deptName; + + /** 鍚堝悓鏄庣粏json */ + @Excel(name = "鍚堝悓鏄庣粏json") + private String detail; + + /** 寮�濮嬫椂闂� */ + @Excel(name = "寮�濮嬫椂闂�") + private Date startTime; + + /** 鎴鏃堕棿 */ + @Excel(name = "鎴鏃堕棿") + private Date endTime; + + public Date getStartTime() { + return startTime; + } + + public void setStartTime(Date startTime) { + this.startTime = startTime; + } + + public Date getEndTime() { + return endTime; + } + + public void setEndTime(Date endTime) { + this.endTime = endTime; + } + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setCompanyId(Long companyId) + { + this.companyId = companyId; + } + + public Long getCompanyId() + { + return companyId; + } + public void setCompanyName(String companyName) + { + this.companyName = companyName; + } + + public String getCompanyName() + { + return companyName; + } + public void setDeptId(Long deptId) + { + this.deptId = deptId; + } + + public Long getDeptId() + { + return deptId; + } + public void setDeptName(String deptName) + { + this.deptName = deptName; + } + + public String getDeptName() + { + return deptName; + } + public void setDetail(String detail) + { + this.detail = detail; + } + + public String getDetail() + { + return detail; + } + + @Override + public String toString() { + return "TContract{" + + "id=" + id + + ", companyId=" + companyId + + ", companyName='" + companyName + '\'' + + ", deptId=" + deptId + + ", deptName='" + deptName + '\'' + + ", detail='" + detail + '\'' + + ", startTime=" + startTime + + ", endTime=" + endTime + + '}'; + } +} diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/TMonitor.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/TMonitor.java index b60c3a5..f441a3d 100644 --- a/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/TMonitor.java +++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/TMonitor.java @@ -154,6 +154,16 @@ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date recoveryTime; + private Long deptId; + + public Long getDeptId() { + return deptId; + } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + public Long getDefaultOrder() { return defaultOrder; } @@ -506,6 +516,7 @@ ", defaultOrder=" + defaultOrder + ", recovery=" + recovery + ", recoveryTime=" + recoveryTime + + ", deptId=" + deptId + '}'; } } diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/YwPoint.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/YwPoint.java index 1e33e8d..c8b42d2 100644 --- a/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/YwPoint.java +++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/entity/YwPoint.java @@ -47,6 +47,10 @@ @ApiModelProperty("澶囨敞") @TableField("remark") private String remark; - - + @ApiModelProperty("杩愮淮绫诲瀷") + @TableField("category") + private Short category; + @ApiModelProperty("涓婃姤閮ㄩ棬") + @TableField("dept_id") + private Long deptId; } diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/vo/TMonitorVO.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/vo/TMonitorVO.java new file mode 100644 index 0000000..6d3d648 --- /dev/null +++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/vo/TMonitorVO.java @@ -0,0 +1,522 @@ +package com.ycl.platform.domain.vo; + +import annotation.Excel; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.ycl.system.entity.BaseEntity; + +import java.util.Date; + + +/** + * 璁惧璧勪骇瀵硅薄 t_monitor + * + * @author ruoyi + * @date 2024-03-04 + */ +public class TMonitorVO extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + private Long id; + + /** 璁惧缂栫爜 */ + @Excel(name = "璁惧缂栫爜") + private String serialNumber; + + /** 璁惧鍚嶇О */ + @Excel(name = "璁惧鍚嶇О") + private String name; + + /** 鐩戞帶鐐逛綅绫诲瀷 [1.涓�绫昏棰戠洃鎺х偣;2.浜岀被瑙嗛鐩戞帶鐐�;3.涓夌被瑙嗛鐩戞帶鐐�;4.鍏畨鍐呴儴瑙嗛鐩戞帶鐐�;9.鍏朵粬鐐逛綅;] */ + @Excel(name = "鐩戞帶鐐逛綅绫诲瀷 [1.涓�绫昏棰戠洃鎺х偣;2.浜岀被瑙嗛鐩戞帶鐐�;3.涓夌被瑙嗛鐩戞帶鐐�;4.鍏畨鍐呴儴瑙嗛鐩戞帶鐐�;9.鍏朵粬鐐逛綅;]") + private Long siteType; + + /** 鎽勫儚鏈篗ac鍦板潃 */ + @Excel(name = "鎽勫儚鏈篗ac鍦板潃") + private String macAddr; + + /** 鎽勫儚鏈篒PV4鎴朓PV6鍦板潃 */ + @Excel(name = "鎽勫儚鏈篒PV4鎴朓PV6鍦板潃") + private String ip; + + /** 鎽勫儚鏈哄姛鑳界被鍨媅1.瑙嗛鐩戞帶;2.杞﹁締璇嗗埆;3.浜哄憳璇嗗埆;] 鏁版嵁鏍煎紡[濉叆澶氫釜鍊煎苟浠�/闅斿紑銆備緥濡� 1/2] */ + @Excel(name = "鎽勫儚鏈哄姛鑳界被鍨媅1.瑙嗛鐩戞帶;2.杞﹁締璇嗗埆;3.浜哄憳璇嗗埆;] 鏁版嵁鏍煎紡[濉叆澶氫釜鍊煎苟浠�/闅斿紑銆備緥濡� 1/2]") + private String cameraFunType; + + /** 璁惧缁忓害锛岃嚦灏戜繚鐣欏叚浣嶅皬鏁� */ + @Excel(name = "璁惧缁忓害锛岃嚦灏戜繚鐣欏叚浣嶅皬鏁�") + private String longitude; + + /** 璁惧缁村害锛岃嚦灏戜繚鐣欏叚浣嶅皬鏁� */ + @Excel(name = "璁惧缁村害锛岃嚦灏戜繚鐣欏叚浣嶅皬鏁�") + private String latitude; + + /** 鎽勫儚鏈洪噰闆嗗尯鍩熷弬鑰冨瓧鍏歌〃锛屾暟鎹閫変互/闅斿紑 */ + @Excel(name = "鎽勫儚鏈洪噰闆嗗尯鍩熷弬鑰冨瓧鍏歌〃锛屾暟鎹閫変互/闅斿紑") + private String cameraCaptureArea; + + /** 璁惧鐘舵�� 1/2 鍙敤/涓嶅彲鐢� */ + @Excel(name = "璁惧鐘舵�� 1/2 鍙敤/涓嶅彲鐢�") + private Long onState; + + /** 琛屾斂鍖哄煙 */ + @Excel(name = "琛屾斂鍖哄煙") + private String civilCode; + + /** 鏄惁闆嗘垚璁惧锛�0/1 涓嶆槸/鏄� */ + @Excel(name = "鏄惁闆嗘垚璁惧锛�0/1 涓嶆槸/鏄�") + private Long integratedDevice; + + /** 鎽勫儚鏈哄搧鐗� [1.娴峰悍濞佽;2.澶у崕;3.澶╁湴浼熶笟;4.绉戣揪;5.瀹夎澹�;6.鍗氫笘;7.浜氬畨;8.鑻遍鎷�;9.瀹囪;10.娴蜂俊;11.涓槦鐢靛瓙;12.鏄庢櫙;13.鑱旀兂;14.涓叴;15.绱㈠凹;16.涓夋槦;99.鍏跺畠; */ + @Excel(name = "鎽勫儚鏈哄搧鐗� [1.娴峰悍濞佽;2.澶у崕;3.澶╁湴浼熶笟;4.绉戣揪;5.瀹夎澹�;6.鍗氫笘;7.浜氬畨;8.鑻遍鎷�;9.瀹囪;10.娴蜂俊;11.涓槦鐢靛瓙;12.鏄庢櫙;13.鑱旀兂;14.涓叴;15.绱㈠凹;16.涓夋槦;99.鍏跺畠;") + private Long cameraBrand; + + /** 瀹夎鍦板潃 */ + @Excel(name = "瀹夎鍦板潃") + private String address; + + /** 鑱旂綉灞炴�� 0/1 宸茶仈缃�/鏈仈缃� */ + @Excel(name = "鑱旂綉灞炴�� 0/1 宸茶仈缃�/鏈仈缃�") + private Long netWorking; + + /** 鎵�灞炶緰鍖哄叕瀹夋満鍏� */ + @Excel(name = "鎵�灞炶緰鍖哄叕瀹夋満鍏�") + private String publicSecurity; + + /** 瀹夎鏃堕棿 yyyy-MM-dd HH:mm:ss */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Excel(name = "瀹夎鏃堕棿 yyyy-MM-dd HH:mm:ss", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") + private Date installedTime; + + /** 绠$悊鍗曚綅 */ + @Excel(name = "绠$悊鍗曚綅") + private String managementUnit; + + /** 绠$悊鍗曚綅鑱旂郴鏂瑰紡 */ + @Excel(name = "绠$悊鍗曚綅鑱旂郴鏂瑰紡") + private String muContactInfo; + + /** 褰曡薄淇濆瓨澶╂暟 0 - 2147483647 */ + @Excel(name = "褰曡薄淇濆瓨澶╂暟 0 - 2147483647") + private Long storageDays; + + /** 鐩戣鏂逛綅 [1.涓�;2.瑗�;3.鍗�;4.鍖�;5.涓滃崡;6.涓滃寳;7.瑗垮崡;8.瑗垮寳;9.鍏ㄥ悜;] */ + @Excel(name = "鐩戣鏂逛綅 [1.涓�;2.瑗�;3.鍗�;4.鍖�;5.涓滃崡;6.涓滃寳;7.瑗垮崡;8.瑗垮寳;9.鍏ㄥ悜;]") + private Long monitorAzimuth; + + /** 鎽勫儚鏈哄満鏅璁剧収鐗嘦RL */ + @Excel(name = "鎽勫儚鏈哄満鏅璁剧収鐗嘦RL") + private String scenePhotoAddr; + + /** 璁惧鍨嬪彿 */ + @Excel(name = "璁惧鍨嬪彿") + private String model; + + /** 鐐逛綅淇楃О */ + @Excel(name = "鐐逛綅淇楃О") + private String siteVulgo; + + /** 鎽勫儚鏈虹被鍨� [1.鐞冩満;2.鍗婄悆;3.鍥哄畾鏋満;4.閬ユ帶鏋満;5.鍗″彛鏋満;99.鏈煡; */ + @Excel(name = "鎽勫儚鏈虹被鍨� [1.鐞冩満;2.鍗婄悆;3.鍥哄畾鏋満;4.閬ユ帶鏋満;5.鍗″彛鏋満;99.鏈煡;") + private Long cameraType; + + /** 琛ュ厜灞炴�1.鏃犺ˉ鍏�;2.绾㈠琛ュ厜;3.鐧藉厜琛ュ厜;9.鍏朵粬琛ュ厜;] */ + @Excel(name = "琛ュ厜灞炴�1.鏃犺ˉ鍏�;2.绾㈠琛ュ厜;3.鐧藉厜琛ュ厜;9.鍏朵粬琛ュ厜;] ") + private Long cameraLightType; + + /** 鎽勫儚鏈虹紪鐮佹牸寮� [1.MPEG-4;2.H.264;3.SVAC;4.H.265;] */ + @Excel(name = "鎽勫儚鏈虹紪鐮佹牸寮� [1.MPEG-4;2.H.264;3.SVAC;4.H.265;]") + private Long encodedFormat; + + /** 鎵�灞為儴闂�/琛屼笟 鍙栧�艰寖鍥�(澶氶��) : [1.鍏畨鏈哄叧;2.鐜繚閮ㄩ棬;3.鏂囧崥閮ㄩ棬;4.鍖荤枟閮ㄩ棬;5.鏃呮父绠$悊;6.鏂伴椈骞跨數;7.椋熷搧鍖昏嵂鐩戠潱绠$悊閮ㄩ棬;8.鏁欒偛绠$悊閮ㄩ棬;9.妫�瀵熼櫌;10.娉曢櫌;11.閲戣瀺閮ㄩ棬;12.浜ら�氶儴闂�;13.浣忔埧鍜屽煄涔″缓璁鹃儴闂�;14.姘村埄閮ㄩ棬;15.鏋椾笟閮ㄩ棬;16.瀹夊叏鐢熶骇鐩戠潱閮ㄩ棬;17.甯傛斂甯傚濮�;18.鍥藉湡灞�;] 鏁版嵁鏍煎紡[濉叆澶氫釜鍊煎苟浠�/闅斿紑銆備緥濡� 1/2] */ + @Excel(name = "鎵�灞為儴闂�/琛屼笟 鍙栧�艰寖鍥�(澶氶��) : [1.鍏畨鏈哄叧;2.鐜繚閮ㄩ棬;3.鏂囧崥閮ㄩ棬;4.鍖荤枟閮ㄩ棬;5.鏃呮父绠$悊;6.鏂伴椈骞跨數;7.椋熷搧鍖昏嵂鐩戠潱绠$悊閮ㄩ棬;8.鏁欒偛绠$悊閮ㄩ棬;9.妫�瀵熼櫌;10.娉曢櫌;11.閲戣瀺閮ㄩ棬;12.浜ら�氶儴闂�;13.浣忔埧鍜屽煄涔″缓璁鹃儴闂�;14.姘村埄閮ㄩ棬;15.鏋椾笟閮ㄩ棬;16.瀹夊叏鐢熶骇鐩戠潱閮ㄩ棬;17.甯傛斂甯傚濮�;18.鍥藉湡灞�;] 鏁版嵁鏍煎紡[濉叆澶氫釜鍊煎苟浠�/闅斿紑銆備緥濡� 1/2]") + private String cameraDept; + + /** 琛屼笟缂栫爜 [00.绀句細娌诲畨璺潰鎺ュ叆;01.绀句細娌诲畨绀惧尯鎺ュ叆;02.绀句細娌诲畨鍐呴儴鎺ュ叆;03.绀句細娌诲畨鍏朵粬鎺ュ叆;04.浜ら�氳矾闈㈡帴鍏�;05.浜ら�氬崱鍙f帴鍏�;06.浜ら�氬唴閮ㄦ帴鍏�;07.浜ら�氬叾浠栨帴鍏�;08.鍩庡競绠$悊鎺ュ叆;09.鍗敓鐜繚鎺ュ叆;10.鍟嗘娴峰叧鎺ュ叆;11.鏁欒偛閮ㄩ棬鎺ュ叆;] */ + @Excel(name = "琛屼笟缂栫爜 [00.绀句細娌诲畨璺潰鎺ュ叆;01.绀句細娌诲畨绀惧尯鎺ュ叆;02.绀句細娌诲畨鍐呴儴鎺ュ叆;03.绀句細娌诲畨鍏朵粬鎺ュ叆;04.浜ら�氳矾闈㈡帴鍏�;05.浜ら�氬崱鍙f帴鍏�;06.浜ら�氬唴閮ㄦ帴鍏�;07.浜ら�氬叾浠栨帴鍏�;08.鍩庡競绠$悊鎺ュ叆;09.鍗敓鐜繚鎺ュ叆;10.鍟嗘娴峰叧鎺ュ叆;11.鏁欒偛閮ㄩ棬鎺ュ叆;]") + private String hybm; + + /** 绫诲瀷缂栫爜 : [131.鎽勫儚鏈虹紪鐮�;132.缃戠粶鎽勫儚鏈虹紪鐮�;] */ + @Excel(name = "绫诲瀷缂栫爜 : [131.鎽勫儚鏈虹紪鐮�;132.缃戠粶鎽勫儚鏈虹紪鐮�;]") + private Long lxbm; + + @Excel(name = "寮傚父鍘熷洜") + private String reason; + + @Excel(name = "鏄惁鐢熸垚寮傚父宸ュ崟") + private Long defaultOrder; + + @Excel(name ="寮傚父鎭㈠鏍囪瘑") + private Long recovery; + + @Excel(name = "寮傚父鎭㈠鏃堕棿") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date recoveryTime; + + private String deptName; + + public String getDeptName() { + return deptName; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + + public Long getDefaultOrder() { + return defaultOrder; + } + + public void setDefaultOrder(Long defaultOrder) { + this.defaultOrder = defaultOrder; + } + + public void setInstalledTime(Date installedTime) { + this.installedTime = installedTime; + } + + public Date getInstalledTime() { + return installedTime; + } + + public Date getRecoveryTime() { + return recoveryTime; + } + + public void setRecoveryTime(Date recoveryTime) { + this.recoveryTime = recoveryTime; + } + + public Long getRecovery() { + return recovery; + } + + public void setRecovery(Long recovery) { + this.recovery = recovery; + } + + public String getReason() { + return reason; + } + + public void setReason(String reason) { + this.reason = reason; + } + + + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setSerialNumber(String serialNumber) + { + this.serialNumber = serialNumber; + } + + public String getSerialNumber() + { + return serialNumber; + } + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + public void setSiteType(Long siteType) + { + this.siteType = siteType; + } + + public Long getSiteType() + { + return siteType; + } + public void setMacAddr(String macAddr) + { + this.macAddr = macAddr; + } + + public String getMacAddr() + { + return macAddr; + } + public void setIp(String ip) + { + this.ip = ip; + } + + public String getIp() + { + return ip; + } + public void setCameraFunType(String cameraFunType) + { + this.cameraFunType = cameraFunType; + } + + public String getCameraFunType() + { + return cameraFunType; + } + public void setLongitude(String longitude) + { + this.longitude = longitude; + } + + public String getLongitude() + { + return longitude; + } + public void setLatitude(String latitude) + { + this.latitude = latitude; + } + + public String getLatitude() + { + return latitude; + } + public void setCameraCaptureArea(String cameraCaptureArea) + { + this.cameraCaptureArea = cameraCaptureArea; + } + + public String getCameraCaptureArea() + { + return cameraCaptureArea; + } + public void setOnState(Long onState) + { + this.onState = onState; + } + + public Long getOnState() + { + return onState; + } + public void setCivilCode(String civilCode) + { + this.civilCode = civilCode; + } + + public String getCivilCode() + { + return civilCode; + } + public void setIntegratedDevice(Long integratedDevice) + { + this.integratedDevice = integratedDevice; + } + + public Long getIntegratedDevice() + { + return integratedDevice; + } + public void setCameraBrand(Long cameraBrand) + { + this.cameraBrand = cameraBrand; + } + + public Long getCameraBrand() + { + return cameraBrand; + } + public void setAddress(String address) + { + this.address = address; + } + + public String getAddress() + { + return address; + } + public void setNetWorking(Long netWorking) + { + this.netWorking = netWorking; + } + + public Long getNetWorking() + { + return netWorking; + } + public void setPublicSecurity(String publicSecurity) + { + this.publicSecurity = publicSecurity; + } + + public String getPublicSecurity() + { + return publicSecurity; + } + + public void setManagementUnit(String managementUnit) + { + this.managementUnit = managementUnit; + } + + public String getManagementUnit() + { + return managementUnit; + } + public void setMuContactInfo(String muContactInfo) + { + this.muContactInfo = muContactInfo; + } + + public String getMuContactInfo() + { + return muContactInfo; + } + public void setStorageDays(Long storageDays) + { + this.storageDays = storageDays; + } + + public Long getStorageDays() + { + return storageDays; + } + public void setMonitorAzimuth(Long monitorAzimuth) + { + this.monitorAzimuth = monitorAzimuth; + } + + public Long getMonitorAzimuth() + { + return monitorAzimuth; + } + public void setScenePhotoAddr(String scenePhotoAddr) + { + this.scenePhotoAddr = scenePhotoAddr; + } + + public String getScenePhotoAddr() + { + return scenePhotoAddr; + } + public void setModel(String model) + { + this.model = model; + } + + public String getModel() + { + return model; + } + public void setSiteVulgo(String siteVulgo) + { + this.siteVulgo = siteVulgo; + } + + public String getSiteVulgo() + { + return siteVulgo; + } + public void setCameraType(Long cameraType) + { + this.cameraType = cameraType; + } + + public Long getCameraType() + { + return cameraType; + } + public void setCameraLightType(Long cameraLightType) + { + this.cameraLightType = cameraLightType; + } + + public Long getCameraLightType() + { + return cameraLightType; + } + public void setEncodedFormat(Long encodedFormat) + { + this.encodedFormat = encodedFormat; + } + + public Long getEncodedFormat() + { + return encodedFormat; + } + public void setCameraDept(String cameraDept) + { + this.cameraDept = cameraDept; + } + + public String getCameraDept() + { + return cameraDept; + } + public void setHybm(String hybm) + { + this.hybm = hybm; + } + + public String getHybm() + { + return hybm; + } + public void setLxbm(Long lxbm) + { + this.lxbm = lxbm; + } + + public Long getLxbm() + { + return lxbm; + } + + @Override + public String toString() { + return "TMonitorVO{" + + "id=" + id + + ", serialNumber='" + serialNumber + '\'' + + ", name='" + name + '\'' + + ", siteType=" + siteType + + ", macAddr='" + macAddr + '\'' + + ", ip='" + ip + '\'' + + ", cameraFunType='" + cameraFunType + '\'' + + ", longitude='" + longitude + '\'' + + ", latitude='" + latitude + '\'' + + ", cameraCaptureArea='" + cameraCaptureArea + '\'' + + ", onState=" + onState + + ", civilCode='" + civilCode + '\'' + + ", integratedDevice=" + integratedDevice + + ", cameraBrand=" + cameraBrand + + ", address='" + address + '\'' + + ", netWorking=" + netWorking + + ", publicSecurity='" + publicSecurity + '\'' + + ", installedTime=" + installedTime + + ", managementUnit='" + managementUnit + '\'' + + ", muContactInfo='" + muContactInfo + '\'' + + ", storageDays=" + storageDays + + ", monitorAzimuth=" + monitorAzimuth + + ", scenePhotoAddr='" + scenePhotoAddr + '\'' + + ", model='" + model + '\'' + + ", siteVulgo='" + siteVulgo + '\'' + + ", cameraType=" + cameraType + + ", cameraLightType=" + cameraLightType + + ", encodedFormat=" + encodedFormat + + ", cameraDept='" + cameraDept + '\'' + + ", hybm='" + hybm + '\'' + + ", lxbm=" + lxbm + + ", reason='" + reason + '\'' + + ", defaultOrder=" + defaultOrder + + ", recovery=" + recovery + + ", recoveryTime=" + recoveryTime + + ", deptName='" + deptName + '\'' + + '}'; + } +} diff --git a/ycl-pojo/src/main/java/com/ycl/platform/domain/vo/YwPointVO.java b/ycl-pojo/src/main/java/com/ycl/platform/domain/vo/YwPointVO.java index 9b41fcf..56e2a5b 100644 --- a/ycl-pojo/src/main/java/com/ycl/platform/domain/vo/YwPointVO.java +++ b/ycl-pojo/src/main/java/com/ycl/platform/domain/vo/YwPointVO.java @@ -1,5 +1,6 @@ package com.ycl.platform.domain.vo; +import com.baomidou.mybatisplus.annotation.TableField; import com.ycl.platform.base.AbsVo; import com.ycl.platform.domain.entity.YwPoint; @@ -34,12 +35,16 @@ /** 杩愮淮鍗曚綅 */ private Integer unitId; + private String unitName; /** 杩愮淮鐘舵�� */ private String status; /** 澶囨敞 */ private String remark; + private Short category; + + private String deptName; public static YwPointVO getVoByEntity(@NonNull YwPoint entity, YwPointVO vo) { if(vo == null) { vo = new YwPointVO(); diff --git a/ycl-server/src/main/java/com/ycl/platform/controller/TContractController.java b/ycl-server/src/main/java/com/ycl/platform/controller/TContractController.java new file mode 100644 index 0000000..8922753 --- /dev/null +++ b/ycl-server/src/main/java/com/ycl/platform/controller/TContractController.java @@ -0,0 +1,99 @@ +package com.ycl.platform.controller; + +import annotation.Log; +import com.ycl.platform.domain.entity.TContract; +import com.ycl.platform.service.ITContractService; +import com.ycl.system.AjaxResult; +import com.ycl.system.controller.BaseController; +import com.ycl.system.page.TableDataInfo; +import com.ycl.utils.poi.ExcelUtil; +import enumeration.BusinessType; +import jakarta.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.*; + + +import java.util.List; + +/** + * 銆愯濉啓鍔熻兘鍚嶇О銆慍ontroller + * + * @author ruoyi + * @date 2024-03-12 + */ +@RestController +@RequestMapping("/system/contract") +public class TContractController extends BaseController +{ + @Autowired + private ITContractService tContractService; + + /** + * 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆戝垪琛� + */ + @PreAuthorize("@ss.hasPermi('system:contract:list')") + @GetMapping("/list") + public TableDataInfo list(TContract tContract) + { + startPage(); + List<TContract> list = tContractService.selectTContractList(tContract); + return getDataTable(list); + } + + /** + * 瀵煎嚭銆愯濉啓鍔熻兘鍚嶇О銆戝垪琛� + */ + @PreAuthorize("@ss.hasPermi('system:contract:export')") + @Log(title = "銆愯濉啓鍔熻兘鍚嶇О銆�", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, TContract tContract) + { + List<TContract> list = tContractService.selectTContractList(tContract); + ExcelUtil<TContract> util = new ExcelUtil<TContract>(TContract.class); + util.exportExcel(response, list, "銆愯濉啓鍔熻兘鍚嶇О銆戞暟鎹�"); + } + + /** + * 鑾峰彇銆愯濉啓鍔熻兘鍚嶇О銆戣缁嗕俊鎭� + */ + @PreAuthorize("@ss.hasPermi('system:contract:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(tContractService.selectTContractById(id)); + } + + /** + * 鏂板銆愯濉啓鍔熻兘鍚嶇О銆� + */ + @PreAuthorize("@ss.hasPermi('system:contract:add')") + @Log(title = "銆愯濉啓鍔熻兘鍚嶇О銆�", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody TContract tContract) + { + return toAjax(tContractService.insertTContract(tContract)); + } + + /** + * 淇敼銆愯濉啓鍔熻兘鍚嶇О銆� + */ + @PreAuthorize("@ss.hasPermi('system:contract:edit')") + @Log(title = "銆愯濉啓鍔熻兘鍚嶇О銆�", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody TContract tContract) + { + return toAjax(tContractService.updateTContract(tContract)); + } + + /** + * 鍒犻櫎銆愯濉啓鍔熻兘鍚嶇О銆� + */ + @PreAuthorize("@ss.hasPermi('system:contract:remove')") + @Log(title = "銆愯濉啓鍔熻兘鍚嶇О銆�", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(tContractService.deleteTContractByIds(ids)); + } +} diff --git a/ycl-server/src/main/java/com/ycl/platform/controller/TMonitorController.java b/ycl-server/src/main/java/com/ycl/platform/controller/TMonitorController.java index 2ef9630..7591d6e 100644 --- a/ycl-server/src/main/java/com/ycl/platform/controller/TMonitorController.java +++ b/ycl-server/src/main/java/com/ycl/platform/controller/TMonitorController.java @@ -2,6 +2,7 @@ import annotation.Log; import com.ycl.platform.domain.entity.TMonitor; +import com.ycl.platform.domain.vo.TMonitorVO; import com.ycl.platform.service.ITMonitorService; import com.ycl.system.AjaxResult; import com.ycl.system.controller.BaseController; @@ -36,7 +37,7 @@ public TableDataInfo list(TMonitor tMonitor) { startPage(); - List<TMonitor> list = tMonitorService.selectTMonitorList(tMonitor); + List<TMonitorVO> list = tMonitorService.selectTMonitorList(tMonitor); return getDataTable(list); } @@ -48,8 +49,8 @@ @PostMapping("/export") public void export(HttpServletResponse response, TMonitor tMonitor) { - List<TMonitor> list = tMonitorService.selectTMonitorList(tMonitor); - ExcelUtil<TMonitor> util = new ExcelUtil<TMonitor>(TMonitor.class); + List<TMonitorVO> list = tMonitorService.selectTMonitorList(tMonitor); + ExcelUtil<TMonitorVO> util = new ExcelUtil<TMonitorVO>(TMonitorVO.class); util.exportExcel(response, list, "璁惧璧勪骇鏁版嵁"); } diff --git a/ycl-server/src/main/java/com/ycl/platform/mapper/TContractMapper.java b/ycl-server/src/main/java/com/ycl/platform/mapper/TContractMapper.java new file mode 100644 index 0000000..b98b665 --- /dev/null +++ b/ycl-server/src/main/java/com/ycl/platform/mapper/TContractMapper.java @@ -0,0 +1,62 @@ +package com.ycl.platform.mapper; + +import com.ycl.platform.domain.entity.TContract; + +import java.util.List; + +/** + * 銆愯濉啓鍔熻兘鍚嶇О銆慚apper鎺ュ彛 + * + * @author ruoyi + * @date 2024-03-12 + */ +public interface TContractMapper +{ + /** + * 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆� + * + * @param id 銆愯濉啓鍔熻兘鍚嶇О銆戜富閿� + * @return 銆愯濉啓鍔熻兘鍚嶇О銆� + */ + public TContract selectTContractById(Long id); + + /** + * 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆戝垪琛� + * + * @param tContract 銆愯濉啓鍔熻兘鍚嶇О銆� + * @return 銆愯濉啓鍔熻兘鍚嶇О銆戦泦鍚� + */ + public List<TContract> selectTContractList(TContract tContract); + + /** + * 鏂板銆愯濉啓鍔熻兘鍚嶇О銆� + * + * @param tContract 銆愯濉啓鍔熻兘鍚嶇О銆� + * @return 缁撴灉 + */ + public int insertTContract(TContract tContract); + + /** + * 淇敼銆愯濉啓鍔熻兘鍚嶇О銆� + * + * @param tContract 銆愯濉啓鍔熻兘鍚嶇О銆� + * @return 缁撴灉 + */ + public int updateTContract(TContract tContract); + + /** + * 鍒犻櫎銆愯濉啓鍔熻兘鍚嶇О銆� + * + * @param id 銆愯濉啓鍔熻兘鍚嶇О銆戜富閿� + * @return 缁撴灉 + */ + public int deleteTContractById(Long id); + + /** + * 鎵归噺鍒犻櫎銆愯濉啓鍔熻兘鍚嶇О銆� + * + * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎 + * @return 缁撴灉 + */ + public int deleteTContractByIds(Long[] ids); +} diff --git a/ycl-server/src/main/java/com/ycl/platform/mapper/TMonitorMapper.java b/ycl-server/src/main/java/com/ycl/platform/mapper/TMonitorMapper.java index 29c56ee..6b1267f 100644 --- a/ycl-server/src/main/java/com/ycl/platform/mapper/TMonitorMapper.java +++ b/ycl-server/src/main/java/com/ycl/platform/mapper/TMonitorMapper.java @@ -1,6 +1,7 @@ package com.ycl.platform.mapper; import com.ycl.platform.domain.entity.TMonitor; +import com.ycl.platform.domain.vo.TMonitorVO; import java.util.List; @@ -26,7 +27,7 @@ * @param tMonitor 璁惧璧勪骇 * @return 璁惧璧勪骇闆嗗悎 */ - public List<TMonitor> selectTMonitorList(TMonitor tMonitor); + public List<TMonitorVO> selectTMonitorList(TMonitor tMonitor); /** * 鏂板璁惧璧勪骇 diff --git a/ycl-server/src/main/java/com/ycl/platform/service/ITContractService.java b/ycl-server/src/main/java/com/ycl/platform/service/ITContractService.java new file mode 100644 index 0000000..dae7f78 --- /dev/null +++ b/ycl-server/src/main/java/com/ycl/platform/service/ITContractService.java @@ -0,0 +1,62 @@ +package com.ycl.platform.service; + +import com.ycl.platform.domain.entity.TContract; + +import java.util.List; + +/** + * 銆愯濉啓鍔熻兘鍚嶇О銆慡ervice鎺ュ彛 + * + * @author ruoyi + * @date 2024-03-12 + */ +public interface ITContractService +{ + /** + * 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆� + * + * @param id 銆愯濉啓鍔熻兘鍚嶇О銆戜富閿� + * @return 銆愯濉啓鍔熻兘鍚嶇О銆� + */ + public TContract selectTContractById(Long id); + + /** + * 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆戝垪琛� + * + * @param tContract 銆愯濉啓鍔熻兘鍚嶇О銆� + * @return 銆愯濉啓鍔熻兘鍚嶇О銆戦泦鍚� + */ + public List<TContract> selectTContractList(TContract tContract); + + /** + * 鏂板銆愯濉啓鍔熻兘鍚嶇О銆� + * + * @param tContract 銆愯濉啓鍔熻兘鍚嶇О銆� + * @return 缁撴灉 + */ + public int insertTContract(TContract tContract); + + /** + * 淇敼銆愯濉啓鍔熻兘鍚嶇О銆� + * + * @param tContract 銆愯濉啓鍔熻兘鍚嶇О銆� + * @return 缁撴灉 + */ + public int updateTContract(TContract tContract); + + /** + * 鎵归噺鍒犻櫎銆愯濉啓鍔熻兘鍚嶇О銆� + * + * @param ids 闇�瑕佸垹闄ょ殑銆愯濉啓鍔熻兘鍚嶇О銆戜富閿泦鍚� + * @return 缁撴灉 + */ + public int deleteTContractByIds(Long[] ids); + + /** + * 鍒犻櫎銆愯濉啓鍔熻兘鍚嶇О銆戜俊鎭� + * + * @param id 銆愯濉啓鍔熻兘鍚嶇О銆戜富閿� + * @return 缁撴灉 + */ + public int deleteTContractById(Long id); +} diff --git a/ycl-server/src/main/java/com/ycl/platform/service/ITMonitorService.java b/ycl-server/src/main/java/com/ycl/platform/service/ITMonitorService.java index 2e56ddf..b0e9f5b 100644 --- a/ycl-server/src/main/java/com/ycl/platform/service/ITMonitorService.java +++ b/ycl-server/src/main/java/com/ycl/platform/service/ITMonitorService.java @@ -1,6 +1,7 @@ package com.ycl.platform.service; import com.ycl.platform.domain.entity.TMonitor; +import com.ycl.platform.domain.vo.TMonitorVO; import java.util.List; @@ -26,7 +27,7 @@ * @param tMonitor 璁惧璧勪骇 * @return 璁惧璧勪骇闆嗗悎 */ - public List<TMonitor> selectTMonitorList(TMonitor tMonitor); + public List<TMonitorVO> selectTMonitorList(TMonitor tMonitor); /** * 鏂板璁惧璧勪骇 diff --git a/ycl-server/src/main/java/com/ycl/platform/service/impl/TContractServiceImpl.java b/ycl-server/src/main/java/com/ycl/platform/service/impl/TContractServiceImpl.java new file mode 100644 index 0000000..dcf3c45 --- /dev/null +++ b/ycl-server/src/main/java/com/ycl/platform/service/impl/TContractServiceImpl.java @@ -0,0 +1,94 @@ +package com.ycl.platform.service.impl; + +import com.ycl.platform.domain.entity.TContract; +import com.ycl.platform.mapper.TContractMapper; +import com.ycl.platform.service.ITContractService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * 銆愯濉啓鍔熻兘鍚嶇О銆慡ervice涓氬姟灞傚鐞� + * + * @author ruoyi + * @date 2024-03-12 + */ +@Service +public class TContractServiceImpl implements ITContractService +{ + @Autowired + private TContractMapper tContractMapper; + + /** + * 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆� + * + * @param id 銆愯濉啓鍔熻兘鍚嶇О銆戜富閿� + * @return 銆愯濉啓鍔熻兘鍚嶇О銆� + */ + @Override + public TContract selectTContractById(Long id) + { + return tContractMapper.selectTContractById(id); + } + + /** + * 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆戝垪琛� + * + * @param tContract 銆愯濉啓鍔熻兘鍚嶇О銆� + * @return 銆愯濉啓鍔熻兘鍚嶇О銆� + */ + @Override + public List<TContract> selectTContractList(TContract tContract) + { + return tContractMapper.selectTContractList(tContract); + } + + /** + * 鏂板銆愯濉啓鍔熻兘鍚嶇О銆� + * + * @param tContract 銆愯濉啓鍔熻兘鍚嶇О銆� + * @return 缁撴灉 + */ + @Override + public int insertTContract(TContract tContract) + { + return tContractMapper.insertTContract(tContract); + } + + /** + * 淇敼銆愯濉啓鍔熻兘鍚嶇О銆� + * + * @param tContract 銆愯濉啓鍔熻兘鍚嶇О銆� + * @return 缁撴灉 + */ + @Override + public int updateTContract(TContract tContract) + { + return tContractMapper.updateTContract(tContract); + } + + /** + * 鎵归噺鍒犻櫎銆愯濉啓鍔熻兘鍚嶇О銆� + * + * @param ids 闇�瑕佸垹闄ょ殑銆愯濉啓鍔熻兘鍚嶇О銆戜富閿� + * @return 缁撴灉 + */ + @Override + public int deleteTContractByIds(Long[] ids) + { + return tContractMapper.deleteTContractByIds(ids); + } + + /** + * 鍒犻櫎銆愯濉啓鍔熻兘鍚嶇О銆戜俊鎭� + * + * @param id 銆愯濉啓鍔熻兘鍚嶇О銆戜富閿� + * @return 缁撴灉 + */ + @Override + public int deleteTContractById(Long id) + { + return tContractMapper.deleteTContractById(id); + } +} diff --git a/ycl-server/src/main/java/com/ycl/platform/service/impl/TMonitorServiceImpl.java b/ycl-server/src/main/java/com/ycl/platform/service/impl/TMonitorServiceImpl.java index da2d159..b4af1c9 100644 --- a/ycl-server/src/main/java/com/ycl/platform/service/impl/TMonitorServiceImpl.java +++ b/ycl-server/src/main/java/com/ycl/platform/service/impl/TMonitorServiceImpl.java @@ -1,6 +1,7 @@ package com.ycl.platform.service.impl; import com.ycl.platform.domain.entity.TMonitor; +import com.ycl.platform.domain.vo.TMonitorVO; import com.ycl.platform.mapper.TMonitorMapper; import com.ycl.platform.service.ITMonitorService; import org.springframework.beans.factory.annotation.Autowired; @@ -39,7 +40,7 @@ * @return 璁惧璧勪骇 */ @Override - public List<TMonitor> selectTMonitorList(TMonitor tMonitor) + public List<TMonitorVO> selectTMonitorList(TMonitor tMonitor) { return tMonitorMapper.selectTMonitorList(tMonitor); } diff --git a/ycl-server/src/main/java/com/ycl/platform/service/impl/YwPointServiceImpl.java b/ycl-server/src/main/java/com/ycl/platform/service/impl/YwPointServiceImpl.java index 1941582..f63906d 100644 --- a/ycl-server/src/main/java/com/ycl/platform/service/impl/YwPointServiceImpl.java +++ b/ycl-server/src/main/java/com/ycl/platform/service/impl/YwPointServiceImpl.java @@ -3,15 +3,20 @@ import com.ycl.platform.domain.entity.YwPoint; import com.ycl.platform.mapper.YwPointMapper; import com.ycl.platform.service.YwPointService; +import com.ycl.platform.service.YwUnitService; import com.ycl.system.Result; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ycl.platform.domain.form.YwPointForm; import com.ycl.platform.domain.vo.YwPointVO; import com.ycl.platform.domain.query.YwPointQuery; import java.util.List; + +import com.ycl.system.entity.SysDept; +import com.ycl.system.service.ISysDeptService; import org.apache.commons.lang3.StringUtils; import com.baomidou.mybatisplus.core.metadata.IPage; import com.ycl.system.page.PageUtil; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.beans.BeanUtils; @@ -34,6 +39,10 @@ public class YwPointServiceImpl extends ServiceImpl<YwPointMapper, YwPoint> implements YwPointService { private final YwPointMapper ywPointMapper; + @Autowired + private ISysDeptService deptService; + @Autowired + private YwUnitService unitService; /** * 娣诲姞 @@ -121,8 +130,11 @@ List<YwPointVO> vos = page.getRecords().stream() .map( entity -> YwPointVO.getVoByEntity(entity, null) + .setDeptName(deptService.selectDeptById(entity.getDeptId()).getDeptName()) + .setUnitName(unitService.getById(entity.getUnitId()).getUnitName()) ) .collect(Collectors.toList()); + return Result.ok().data(vos).total(page.getTotal()); } diff --git a/ycl-server/src/main/resources/mapper/zgyw/TContractMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/TContractMapper.xml new file mode 100644 index 0000000..712d66b --- /dev/null +++ b/ycl-server/src/main/resources/mapper/zgyw/TContractMapper.xml @@ -0,0 +1,86 @@ +<?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.ycl.platform.mapper.TContractMapper"> + + <resultMap type="com.ycl.platform.domain.entity.TContract" id="TContractResult"> + <result property="id" column="id" /> + <result property="companyId" column="company_id" /> + <result property="companyName" column="company_name" /> + <result property="deptId" column="dept_id" /> + <result property="deptName" column="dept_name" /> + <result property="detail" column="detail" /> + <result property="startTime" column="start_time" /> + <result property="endTime" column="end_time" /> + </resultMap> + + <sql id="selectTContractVo"> + select id, company_id, company_name, dept_id, dept_name, detail ,start_time,end_time from t_contract + </sql> + + <select id="selectTContractList" parameterType="com.ycl.platform.domain.entity.TContract" resultMap="TContractResult"> + <include refid="selectTContractVo"/> + <where> + <if test="companyId != null "> and company_id = #{companyId}</if> + <if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if> + <if test="deptId != null "> and dept_id = #{deptId}</if> + <if test="deptName != null and deptName != ''"> and dept_name like concat('%', #{deptName}, '%')</if> + <if test="detail != null and detail != ''"> and detail = #{detail}</if> + <if test="startTime != null"> and start_time = #{startTime}</if> + <if test="endTime != null"> and end_time = #{endTime}</if> + </where> + </select> + + <select id="selectTContractById" parameterType="Long" resultMap="TContractResult"> + <include refid="selectTContractVo"/> + where id = #{id} + </select> + + <insert id="insertTContract" parameterType="com.ycl.platform.domain.entity.TContract" useGeneratedKeys="true" keyProperty="id"> + insert into t_contract + <trim prefix="(" suffix=")" suffixOverrides=","> + <if test="companyId != null">company_id,</if> + <if test="companyName != null">company_name,</if> + <if test="deptId != null">dept_id,</if> + <if test="deptName != null">dept_name,</if> + <if test="detail != null">detail,</if> + <if test="startTime != null">start_time,</if> + <if test="endTime != null">end_time,</if> + </trim> + <trim prefix="values (" suffix=")" suffixOverrides=","> + <if test="companyId != null">#{companyId},</if> + <if test="companyName != null">#{companyName},</if> + <if test="deptId != null">#{deptId},</if> + <if test="deptName != null">#{deptName},</if> + <if test="detail != null">#{detail},</if> + <if test="startTime != null">#{startTime},</if> + <if test="endTime != null">#{endTime},</if> + </trim> + </insert> + + <update id="updateTContract" parameterType="com.ycl.platform.domain.entity.TContract"> + update t_contract + <trim prefix="SET" suffixOverrides=","> + <if test="companyId != null">company_id = #{companyId},</if> + <if test="companyName != null">company_name = #{companyName},</if> + <if test="deptId != null">dept_id = #{deptId},</if> + <if test="deptName != null">dept_name = #{deptName},</if> + <if test="detail != null">detail = #{detail},</if> + <if test="startTime != null">start_time = #{startTime},</if> + <if test="endTime != null">end_time = #{endTime},</if> + </trim> + where id = #{id} + </update> + + <delete id="deleteTContractById" parameterType="Long"> + delete from t_contract where id = #{id} + </delete> + + <delete id="deleteTContractByIds" parameterType="String"> + delete from t_contract where id in + <foreach item="id" collection="array" open="(" separator="," close=")"> + #{id} + </foreach> + </delete> +</mapper> \ No newline at end of file diff --git a/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml b/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml index 269e060..9fe7ef1 100644 --- a/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml +++ b/ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml @@ -40,14 +40,17 @@ <result property="defaultOrder" column="default_order" /> <result property="recovery" column="recovery" /> <result property="recoveryTime" column="recovery_time" /> + <result property="deptId" column="dept_id" /> </resultMap> <sql id="selectTMonitorVo"> - select id, serial_number, name, site_type, mac_addr, ip, camera_fun_type, longitude, latitude, camera_capture_area, on_state, civil_code, integrated_device, camera_brand, address, net_working, public_security, installed_time, management_unit, mu_contact_info, storage_days, monitor_azimuth, scene_photo_addr, model, site_vulgo, camera_type, camera_light_type, encoded_format, camera_dept, hybm, lxbm, reason, default_order,recovery,recovery_time from t_monitor + select id, serial_number, name, site_type, mac_addr, ip, camera_fun_type, longitude, latitude, camera_capture_area, on_state, civil_code, integrated_device, camera_brand, address, net_working, public_security, installed_time, management_unit, mu_contact_info, storage_days, monitor_azimuth, scene_photo_addr, model, site_vulgo, camera_type, camera_light_type, encoded_format, camera_dept, hybm, lxbm, reason, default_order,recovery,recovery_time,dept_id from t_monitor </sql> - <select id="selectTMonitorList" parameterType="com.ycl.platform.domain.entity.TMonitor" resultMap="TMonitorResult"> - <include refid="selectTMonitorVo"/> + <select id="selectTMonitorList" resultType="com.ycl.platform.domain.vo.TMonitorVO"> + select id, serial_number, name, site_type, mac_addr, ip, camera_fun_type, longitude, latitude, camera_capture_area, on_state, civil_code, integrated_device, camera_brand, address, net_working, public_security, installed_time, management_unit, mu_contact_info, storage_days + , monitor_azimuth, scene_photo_addr, model, site_vulgo, camera_type, camera_light_type, encoded_format, camera_dept, hybm, lxbm, reason, default_order,recovery,recovery_time,sd.dept_name from t_monitor m + left join sys_dept sd on m.dept_id = sd.dept_id <where> <if test="serialNumber != null and serialNumber != ''"> and serial_number = #{serialNumber}</if> <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> @@ -83,6 +86,7 @@ <if test="defaultOrder != null "> and default_order = #{defaultOrder}</if> <if test="recovery != null "> and recovery = #{recovery}</if> <if test="recoveryTime != null "> and recovery_time = #{recoveryTime}</if> + <if test="deptId != null "> and dept_id = #{deptId}</if> </where> </select> @@ -128,6 +132,7 @@ <if test="defaultOrder != null">default_order,</if> <if test="recovery != null">recovery,</if> <if test="recoveryTime != null">recovery_time,</if> + <if test="deptId != null">dept_id,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="serialNumber != null and serialNumber != ''">#{serialNumber},</if> @@ -164,6 +169,7 @@ <if test="defaultOrder != null">#{defaultOrder},</if> <if test="recovery != null">#{recovery},</if> <if test="recoveryTime != null">#{recoveryTime},</if> + <if test="deptId != null">#{deptId},</if> </trim> </insert> @@ -204,6 +210,7 @@ <if test="defaultOrder != null">default_order = #{defaultOrder},</if> <if test="recovery != null">recovery = #{defaultOrder},</if> <if test="recoveryTime != null">recovery_time = #{recoveryTime},</if> + <if test="deptId != null">dept_id = #{deptId},</if> </trim> where id = #{id} </update> -- Gitblit v1.8.0