已重命名15个文件
已添加60个文件
已修改1个文件
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.entity.request.facilityalarmrecord; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 设备报警记录 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | public class ReqCreateFacilityAlarmRecord { |
| | | /** |
| | | * 监控点id |
| | | */ |
| | | private Long pointId; |
| | | /** |
| | | * 监控点名称 |
| | | */ |
| | | private String pointName; |
| | | /** |
| | | * 设备id |
| | | */ |
| | | private Long facilityId; |
| | | /** |
| | | * 设备名称 |
| | | */ |
| | | private String facilityName; |
| | | /** |
| | | * 参数编码 |
| | | */ |
| | | private String columnsCode; |
| | | /** |
| | | * 参数名称 |
| | | */ |
| | | private String columnsName; |
| | | /** |
| | | * 报警描述 |
| | | */ |
| | | private String description; |
| | | /** |
| | | * 报警次数 |
| | | */ |
| | | private Integer alarmCount; |
| | | /** |
| | | * 首次报警时间 |
| | | */ |
| | | private String firstAlarmTime; |
| | | /** |
| | | * 最后报警时间 |
| | | */ |
| | | private String latestAlarmTime; |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.entity.request.facilityalarmrecord; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 设备报警记录 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | public class ReqModifyFacilityAlarmRecord { |
| | | /** |
| | | * 主键id |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 监控点id |
| | | */ |
| | | private Long pointId; |
| | | /** |
| | | * 监控点名称 |
| | | */ |
| | | private String pointName; |
| | | /** |
| | | * 设备id |
| | | */ |
| | | private Long facilityId; |
| | | /** |
| | | * 设备名称 |
| | | */ |
| | | private String facilityName; |
| | | /** |
| | | * 参数编码 |
| | | */ |
| | | private String columnsCode; |
| | | /** |
| | | * 参数名称 |
| | | */ |
| | | private String columnsName; |
| | | /** |
| | | * 报警描述 |
| | | */ |
| | | private String description; |
| | | /** |
| | | * 报警次数 |
| | | */ |
| | | private Integer alarmCount; |
| | | /** |
| | | * 首次报警时间 |
| | | */ |
| | | private String firstAlarmTime; |
| | | /** |
| | | * 最后报警时间 |
| | | */ |
| | | private String latestAlarmTime; |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.entity.request.sendmessagerecord; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 消息发送记录 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | public class ReqCreateSendMessageRecord { |
| | | /** |
| | | * 消息类型(1邮件 2短信) |
| | | */ |
| | | private Integer type; |
| | | /** |
| | | * 收件人id |
| | | */ |
| | | private Long userId; |
| | | /** |
| | | * 收件人名称 |
| | | */ |
| | | private String userName; |
| | | /** |
| | | * 监控点id |
| | | */ |
| | | private Long pointId; |
| | | /** |
| | | * 监控点名称 |
| | | */ |
| | | private String pointName; |
| | | /** |
| | | * 设备id |
| | | */ |
| | | private Long facilityId; |
| | | /** |
| | | * 设备名称 |
| | | */ |
| | | private String facilityName; |
| | | /** |
| | | * 内容 |
| | | */ |
| | | private String content; |
| | | /** |
| | | * 接收时间 |
| | | */ |
| | | private String sendTime; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.entity.request.sendmessagerecord; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 消息发送记录 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | public class ReqModifySendMessageRecord { |
| | | /** |
| | | * 主键id |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 消息类型(1邮件 2短信) |
| | | */ |
| | | private Integer type; |
| | | /** |
| | | * 收件人id |
| | | */ |
| | | private Long userId; |
| | | /** |
| | | * 收件人名称 |
| | | */ |
| | | private String userName; |
| | | /** |
| | | * 监控点id |
| | | */ |
| | | private Long pointId; |
| | | /** |
| | | * 监控点名称 |
| | | */ |
| | | private String pointName; |
| | | /** |
| | | * 设备id |
| | | */ |
| | | private Long facilityId; |
| | | /** |
| | | * 设备名称 |
| | | */ |
| | | private String facilityName; |
| | | /** |
| | | * 内容 |
| | | */ |
| | | private String content; |
| | | /** |
| | | * 接收时间 |
| | | */ |
| | | private String sendTime; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.entity.request.waterfacility; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 设备信息 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | public class ReqCreateWaterFacility { |
| | | /** |
| | | * 设备名称 |
| | | */ |
| | | private String facilityName; |
| | | /** |
| | | * 设备编号 |
| | | */ |
| | | private String facilityCode; |
| | | /** |
| | | * 设备类型 |
| | | */ |
| | | private Long facilityType; |
| | | /** |
| | | * 监控点id |
| | | */ |
| | | private Long pointId; |
| | | /** |
| | | * 是否在线 |
| | | */ |
| | | private Integer isOnline; |
| | | /** |
| | | * 安装地址 |
| | | */ |
| | | private String address; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | /** |
| | | * 设备图片 |
| | | */ |
| | | private String facilityUrl; |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.entity.request.waterfacility; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 设备信息 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | public class ReqModifyWaterFacility { |
| | | /** |
| | | * null |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 设备名称 |
| | | */ |
| | | private String facilityName; |
| | | /** |
| | | * 设备编号 |
| | | */ |
| | | private String facilityCode; |
| | | /** |
| | | * 设备类型 |
| | | */ |
| | | private Long facilityType; |
| | | /** |
| | | * 监控点id |
| | | */ |
| | | private Long pointId; |
| | | /** |
| | | * 是否在线 |
| | | */ |
| | | private Integer isOnline; |
| | | /** |
| | | * 安装地址 |
| | | */ |
| | | private String address; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | /** |
| | | * 设备图片 |
| | | */ |
| | | private String facilityUrl; |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.entity.request.waterfacilityparameter; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 设备设定参数 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | public class ReqCreateWaterFacilityParameter { |
| | | /** |
| | | * 设备id |
| | | */ |
| | | private Long facilityId; |
| | | /** |
| | | * 设备code |
| | | */ |
| | | private String facilityCode; |
| | | /** |
| | | * 参数编码 |
| | | */ |
| | | private String columnsCode; |
| | | /** |
| | | * 参数名称 |
| | | */ |
| | | private String columnsShow; |
| | | /** |
| | | * 参数单位 |
| | | */ |
| | | private String columnsUnits; |
| | | /** |
| | | * 参数值 |
| | | */ |
| | | private String columnValue; |
| | | /** |
| | | * 最后更新时间 |
| | | */ |
| | | private String lastTime; |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.entity.request.waterfacilityparameter; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 设备设定参数 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | public class ReqModifyWaterFacilityParameter { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 设备id |
| | | */ |
| | | private Long facilityId; |
| | | /** |
| | | * 设备code |
| | | */ |
| | | private String facilityCode; |
| | | /** |
| | | * 参数编码 |
| | | */ |
| | | private String columnsCode; |
| | | /** |
| | | * 参数名称 |
| | | */ |
| | | private String columnsShow; |
| | | /** |
| | | * 参数单位 |
| | | */ |
| | | private String columnsUnits; |
| | | /** |
| | | * 参数值 |
| | | */ |
| | | private String columnValue; |
| | | /** |
| | | * 最后更新时间 |
| | | */ |
| | | private String lastTime; |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.entity.request.waterfacilitytype; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 设备类型 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | public class ReqCreateWaterFacilityType { |
| | | /** |
| | | * 编码 |
| | | */ |
| | | private String code; |
| | | /** |
| | | * 名称 |
| | | */ |
| | | private String name; |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.entity.request.waterfacilitytype; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 设备类型 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | public class ReqModifyWaterFacilityType { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 编码 |
| | | */ |
| | | private String code; |
| | | /** |
| | | * 名称 |
| | | */ |
| | | private String name; |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.entity.request.watermonitorypoint; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 监控点 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | public class ReqCreateWaterMonitoryPoint { |
| | | /** |
| | | * 监控点编号 |
| | | */ |
| | | private String pointCode; |
| | | /** |
| | | * 监控点名称 |
| | | */ |
| | | private String pointName; |
| | | /** |
| | | * 详细地址 |
| | | */ |
| | | private String address; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | /** |
| | | * 监控点图片 |
| | | */ |
| | | private String imageRul; |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.entity.request.watermonitorypoint; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 监控点 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | public class ReqModifyWaterMonitoryPoint { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 监控点编号 |
| | | */ |
| | | private String pointCode; |
| | | /** |
| | | * 监控点名称 |
| | | */ |
| | | private String pointName; |
| | | /** |
| | | * 详细地址 |
| | | */ |
| | | private String address; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | /** |
| | | * 监控点图片 |
| | | */ |
| | | private String imageRul; |
| | | } |
对比新文件 |
| | |
| | | package com.fengdu.gas.entity.search; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import com.fengdu.gas.entity.dto.SearchBasicDTO; |
| | | |
| | | /** |
| | | * 设备报警记录 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | public class SearchFacilityAlarmRecord extends SearchBasicDTO { |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.fengdu.gas.entity.search; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import com.fengdu.gas.entity.dto.SearchBasicDTO; |
| | | |
| | | /** |
| | | * 消息发送记录 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | public class SearchSendMessageRecord extends SearchBasicDTO { |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.fengdu.gas.entity.search; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import com.fengdu.gas.entity.dto.SearchBasicDTO; |
| | | |
| | | /** |
| | | * 设备信息 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | public class SearchWaterFacility extends SearchBasicDTO { |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.fengdu.gas.entity.search; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import com.fengdu.gas.entity.dto.SearchBasicDTO; |
| | | |
| | | /** |
| | | * 设备设定参数 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | public class SearchWaterFacilityParameter extends SearchBasicDTO { |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.fengdu.gas.entity.search; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import com.fengdu.gas.entity.dto.SearchBasicDTO; |
| | | |
| | | /** |
| | | * 设备类型 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | public class SearchWaterFacilityType extends SearchBasicDTO { |
| | | |
| | | } |
对比新文件 |
| | |
| | | package com.fengdu.gas.entity.search; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import com.fengdu.gas.entity.dto.SearchBasicDTO; |
| | | |
| | | /** |
| | | * 监控点 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | public class SearchWaterMonitoryPoint extends SearchBasicDTO { |
| | | |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.host.controller; |
| | | |
| | | import com.fengdu.gas.common.ExecutedResult; |
| | | import com.fengdu.gas.common.PagerResult; |
| | | import com.fengdu.gas.common.util.ParameterUtil; |
| | | import com.fengdu.gas.common.validator.ParameterValidateResult; |
| | | import com.fengdu.gas.common.validator.ParameterValidator; |
| | | import com.fengdu.gas.entity.request.ReqListId; |
| | | import com.fengdu.gas.host.BasicController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import java.util.List; |
| | | import com.fengdu.gas.service.FacilityAlarmRecordService; |
| | | import com.fengdu.gas.entity.request.facilityalarmrecord.ReqCreateFacilityAlarmRecord; |
| | | import com.fengdu.gas.entity.request.facilityalarmrecord.ReqModifyFacilityAlarmRecord; |
| | | import com.fengdu.gas.entity.search.SearchFacilityAlarmRecord; |
| | | import com.fengdu.gas.repository.vo.FacilityAlarmRecordVO; |
| | | |
| | | /** |
| | | * 9000.设备报警记录 |
| | | * @author zr |
| | | * @order 9000 |
| | | */ |
| | | @RestController |
| | | @RequestMapping(value = "facilityAlarmRecord") |
| | | public class FacilityAlarmRecordController extends BasicController { |
| | | @Autowired |
| | | private FacilityAlarmRecordService service; |
| | | |
| | | /** |
| | | * 创建[设备报警记录] |
| | | * @author zr |
| | | */ |
| | | @PostMapping(value = "create") |
| | | public ExecutedResult<Long> create(@RequestBody ReqCreateFacilityAlarmRecord request) { |
| | | //#region 参数验证 |
| | | ParameterValidator validator = new ParameterValidator() |
| | | // 非空 |
| | | //.addNotNullOrEmpty(ParameterUtil.named("名称"), request.getName()) |
| | | // 限制最大长度 |
| | | //.addLengthMax(ParameterUtil.named("名称"), request.getName(), ConstantFactory.LENGTH_MAX50) |
| | | ; |
| | | ParameterValidateResult result = validator.validate(); |
| | | if (result.getIsFiled()) { |
| | | return failed(result.getErrorMsg()); |
| | | } |
| | | //#endregion |
| | | return service.create(request); |
| | | } |
| | | |
| | | /** |
| | | * 编辑[设备报警记录] |
| | | * @author zr |
| | | */ |
| | | @PostMapping(value = "modify") |
| | | public ExecutedResult<String> modify(@RequestBody ReqModifyFacilityAlarmRecord request) { |
| | | //#region 参数验证 |
| | | ParameterValidator validator = new ParameterValidator() |
| | | // 必须大于0 |
| | | .addGreater(ParameterUtil.named("[设备报警记录]id"), request.getId(), 0L) |
| | | // 非空 |
| | | //.addNotNullOrEmpty(ParameterUtil.named("名称"), request.getName()) |
| | | // 限制最大长度 |
| | | //.addLengthMax(ParameterUtil.named("名称"), request.getName(), ConstantFactory.LENGTH_MAX50) |
| | | ; |
| | | ParameterValidateResult result = validator.validate(); |
| | | if (result.getIsFiled()) { |
| | | return failed(result.getErrorMsg()); |
| | | } |
| | | //#endregion |
| | | return service.modify(request); |
| | | } |
| | | |
| | | /** |
| | | * 获取[设备报警记录] |
| | | * @author zr |
| | | */ |
| | | @GetMapping(value = "get/{id}") |
| | | public ExecutedResult<FacilityAlarmRecordVO> get(@PathVariable Long id) { |
| | | return service.get(id); |
| | | } |
| | | |
| | | /** |
| | | * 查询[设备报警记录] |
| | | * @author zr |
| | | */ |
| | | @PostMapping(value = "search") |
| | | public ExecutedResult<PagerResult<FacilityAlarmRecordVO>> search(@RequestBody SearchFacilityAlarmRecord request) { |
| | | return service.search(request); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.host.controller; |
| | | |
| | | import com.fengdu.gas.common.ExecutedResult; |
| | | import com.fengdu.gas.common.PagerResult; |
| | | import com.fengdu.gas.common.util.ParameterUtil; |
| | | import com.fengdu.gas.common.validator.ParameterValidateResult; |
| | | import com.fengdu.gas.common.validator.ParameterValidator; |
| | | import com.fengdu.gas.entity.request.ReqListId; |
| | | import com.fengdu.gas.host.BasicController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import java.util.List; |
| | | import com.fengdu.gas.service.SendMessageRecordService; |
| | | import com.fengdu.gas.entity.request.sendmessagerecord.ReqCreateSendMessageRecord; |
| | | import com.fengdu.gas.entity.request.sendmessagerecord.ReqModifySendMessageRecord; |
| | | import com.fengdu.gas.entity.search.SearchSendMessageRecord; |
| | | import com.fengdu.gas.repository.vo.SendMessageRecordVO; |
| | | |
| | | /** |
| | | * 9000.消息发送记录 |
| | | * @author zr |
| | | * @order 9000 |
| | | */ |
| | | @RestController |
| | | @RequestMapping(value = "sendMessageRecord") |
| | | public class SendMessageRecordController extends BasicController { |
| | | @Autowired |
| | | private SendMessageRecordService service; |
| | | |
| | | /** |
| | | * 创建[消息发送记录] |
| | | * @author zr |
| | | */ |
| | | @PostMapping(value = "create") |
| | | public ExecutedResult<Long> create(@RequestBody ReqCreateSendMessageRecord request) { |
| | | //#region 参数验证 |
| | | ParameterValidator validator = new ParameterValidator() |
| | | // 非空 |
| | | //.addNotNullOrEmpty(ParameterUtil.named("名称"), request.getName()) |
| | | // 限制最大长度 |
| | | //.addLengthMax(ParameterUtil.named("名称"), request.getName(), ConstantFactory.LENGTH_MAX50) |
| | | ; |
| | | ParameterValidateResult result = validator.validate(); |
| | | if (result.getIsFiled()) { |
| | | return failed(result.getErrorMsg()); |
| | | } |
| | | //#endregion |
| | | return service.create(request); |
| | | } |
| | | |
| | | /** |
| | | * 编辑[消息发送记录] |
| | | * @author zr |
| | | */ |
| | | @PostMapping(value = "modify") |
| | | public ExecutedResult<String> modify(@RequestBody ReqModifySendMessageRecord request) { |
| | | //#region 参数验证 |
| | | ParameterValidator validator = new ParameterValidator() |
| | | // 必须大于0 |
| | | .addGreater(ParameterUtil.named("[消息发送记录]id"), request.getId(), 0L) |
| | | // 非空 |
| | | //.addNotNullOrEmpty(ParameterUtil.named("名称"), request.getName()) |
| | | // 限制最大长度 |
| | | //.addLengthMax(ParameterUtil.named("名称"), request.getName(), ConstantFactory.LENGTH_MAX50) |
| | | ; |
| | | ParameterValidateResult result = validator.validate(); |
| | | if (result.getIsFiled()) { |
| | | return failed(result.getErrorMsg()); |
| | | } |
| | | //#endregion |
| | | return service.modify(request); |
| | | } |
| | | |
| | | /** |
| | | * 获取[消息发送记录] |
| | | * @author zr |
| | | */ |
| | | @GetMapping(value = "get/{id}") |
| | | public ExecutedResult<SendMessageRecordVO> get(@PathVariable Long id) { |
| | | return service.get(id); |
| | | } |
| | | |
| | | /** |
| | | * 查询[消息发送记录] |
| | | * @author zr |
| | | */ |
| | | @PostMapping(value = "search") |
| | | public ExecutedResult<PagerResult<SendMessageRecordVO>> search(@RequestBody SearchSendMessageRecord request) { |
| | | return service.search(request); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.host.controller; |
| | | |
| | | import com.fengdu.gas.common.ExecutedResult; |
| | | import com.fengdu.gas.common.PagerResult; |
| | | import com.fengdu.gas.common.util.ParameterUtil; |
| | | import com.fengdu.gas.common.validator.ParameterValidateResult; |
| | | import com.fengdu.gas.common.validator.ParameterValidator; |
| | | import com.fengdu.gas.entity.request.ReqListId; |
| | | import com.fengdu.gas.host.BasicController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import java.util.List; |
| | | import com.fengdu.gas.service.WaterFacilityService; |
| | | import com.fengdu.gas.entity.request.waterfacility.ReqCreateWaterFacility; |
| | | import com.fengdu.gas.entity.request.waterfacility.ReqModifyWaterFacility; |
| | | import com.fengdu.gas.entity.search.SearchWaterFacility; |
| | | import com.fengdu.gas.repository.vo.WaterFacilityVO; |
| | | |
| | | /** |
| | | * 9000.设备信息 |
| | | * @author zr |
| | | * @order 9000 |
| | | */ |
| | | @RestController |
| | | @RequestMapping(value = "waterFacility") |
| | | public class WaterFacilityController extends BasicController { |
| | | @Autowired |
| | | private WaterFacilityService service; |
| | | |
| | | /** |
| | | * 创建[设备信息] |
| | | * @author zr |
| | | */ |
| | | @PostMapping(value = "create") |
| | | public ExecutedResult<Long> create(@RequestBody ReqCreateWaterFacility request) { |
| | | //#region 参数验证 |
| | | ParameterValidator validator = new ParameterValidator() |
| | | // 非空 |
| | | //.addNotNullOrEmpty(ParameterUtil.named("名称"), request.getName()) |
| | | // 限制最大长度 |
| | | //.addLengthMax(ParameterUtil.named("名称"), request.getName(), ConstantFactory.LENGTH_MAX50) |
| | | ; |
| | | ParameterValidateResult result = validator.validate(); |
| | | if (result.getIsFiled()) { |
| | | return failed(result.getErrorMsg()); |
| | | } |
| | | //#endregion |
| | | return service.create(request); |
| | | } |
| | | |
| | | /** |
| | | * 编辑[设备信息] |
| | | * @author zr |
| | | */ |
| | | @PostMapping(value = "modify") |
| | | public ExecutedResult<String> modify(@RequestBody ReqModifyWaterFacility request) { |
| | | //#region 参数验证 |
| | | ParameterValidator validator = new ParameterValidator() |
| | | // 必须大于0 |
| | | .addGreater(ParameterUtil.named("[设备信息]id"), request.getId(), 0L) |
| | | // 非空 |
| | | //.addNotNullOrEmpty(ParameterUtil.named("名称"), request.getName()) |
| | | // 限制最大长度 |
| | | //.addLengthMax(ParameterUtil.named("名称"), request.getName(), ConstantFactory.LENGTH_MAX50) |
| | | ; |
| | | ParameterValidateResult result = validator.validate(); |
| | | if (result.getIsFiled()) { |
| | | return failed(result.getErrorMsg()); |
| | | } |
| | | //#endregion |
| | | return service.modify(request); |
| | | } |
| | | |
| | | /** |
| | | * 获取[设备信息] |
| | | * @author zr |
| | | */ |
| | | @GetMapping(value = "get/{id}") |
| | | public ExecutedResult<WaterFacilityVO> get(@PathVariable Long id) { |
| | | return service.get(id); |
| | | } |
| | | |
| | | /** |
| | | * 查询[设备信息] |
| | | * @author zr |
| | | */ |
| | | @PostMapping(value = "search") |
| | | public ExecutedResult<PagerResult<WaterFacilityVO>> search(@RequestBody SearchWaterFacility request) { |
| | | return service.search(request); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.host.controller; |
| | | |
| | | import com.fengdu.gas.common.ExecutedResult; |
| | | import com.fengdu.gas.common.PagerResult; |
| | | import com.fengdu.gas.common.util.ParameterUtil; |
| | | import com.fengdu.gas.common.validator.ParameterValidateResult; |
| | | import com.fengdu.gas.common.validator.ParameterValidator; |
| | | import com.fengdu.gas.entity.request.ReqListId; |
| | | import com.fengdu.gas.host.BasicController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import java.util.List; |
| | | import com.fengdu.gas.service.WaterFacilityParameterService; |
| | | import com.fengdu.gas.entity.request.waterfacilityparameter.ReqCreateWaterFacilityParameter; |
| | | import com.fengdu.gas.entity.request.waterfacilityparameter.ReqModifyWaterFacilityParameter; |
| | | import com.fengdu.gas.entity.search.SearchWaterFacilityParameter; |
| | | import com.fengdu.gas.repository.vo.WaterFacilityParameterVO; |
| | | |
| | | /** |
| | | * 9000.设备设定参数 |
| | | * @author zr |
| | | * @order 9000 |
| | | */ |
| | | @RestController |
| | | @RequestMapping(value = "waterFacilityParameter") |
| | | public class WaterFacilityParameterController extends BasicController { |
| | | @Autowired |
| | | private WaterFacilityParameterService service; |
| | | |
| | | /** |
| | | * 创建[设备设定参数] |
| | | * @author zr |
| | | */ |
| | | @PostMapping(value = "create") |
| | | public ExecutedResult<Long> create(@RequestBody ReqCreateWaterFacilityParameter request) { |
| | | //#region 参数验证 |
| | | ParameterValidator validator = new ParameterValidator() |
| | | // 非空 |
| | | //.addNotNullOrEmpty(ParameterUtil.named("名称"), request.getName()) |
| | | // 限制最大长度 |
| | | //.addLengthMax(ParameterUtil.named("名称"), request.getName(), ConstantFactory.LENGTH_MAX50) |
| | | ; |
| | | ParameterValidateResult result = validator.validate(); |
| | | if (result.getIsFiled()) { |
| | | return failed(result.getErrorMsg()); |
| | | } |
| | | //#endregion |
| | | return service.create(request); |
| | | } |
| | | |
| | | /** |
| | | * 编辑[设备设定参数] |
| | | * @author zr |
| | | */ |
| | | @PostMapping(value = "modify") |
| | | public ExecutedResult<String> modify(@RequestBody ReqModifyWaterFacilityParameter request) { |
| | | //#region 参数验证 |
| | | ParameterValidator validator = new ParameterValidator() |
| | | // 必须大于0 |
| | | .addGreater(ParameterUtil.named("[设备设定参数]id"), request.getId(), 0L) |
| | | // 非空 |
| | | //.addNotNullOrEmpty(ParameterUtil.named("名称"), request.getName()) |
| | | // 限制最大长度 |
| | | //.addLengthMax(ParameterUtil.named("名称"), request.getName(), ConstantFactory.LENGTH_MAX50) |
| | | ; |
| | | ParameterValidateResult result = validator.validate(); |
| | | if (result.getIsFiled()) { |
| | | return failed(result.getErrorMsg()); |
| | | } |
| | | //#endregion |
| | | return service.modify(request); |
| | | } |
| | | |
| | | /** |
| | | * 获取[设备设定参数] |
| | | * @author zr |
| | | */ |
| | | @GetMapping(value = "get/{id}") |
| | | public ExecutedResult<WaterFacilityParameterVO> get(@PathVariable Long id) { |
| | | return service.get(id); |
| | | } |
| | | |
| | | /** |
| | | * 查询[设备设定参数] |
| | | * @author zr |
| | | */ |
| | | @PostMapping(value = "search") |
| | | public ExecutedResult<PagerResult<WaterFacilityParameterVO>> search(@RequestBody SearchWaterFacilityParameter request) { |
| | | return service.search(request); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.host.controller; |
| | | |
| | | import com.fengdu.gas.common.ExecutedResult; |
| | | import com.fengdu.gas.common.PagerResult; |
| | | import com.fengdu.gas.common.util.ParameterUtil; |
| | | import com.fengdu.gas.common.validator.ParameterValidateResult; |
| | | import com.fengdu.gas.common.validator.ParameterValidator; |
| | | import com.fengdu.gas.entity.request.ReqListId; |
| | | import com.fengdu.gas.host.BasicController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import java.util.List; |
| | | import com.fengdu.gas.service.WaterFacilityTypeService; |
| | | import com.fengdu.gas.entity.request.waterfacilitytype.ReqCreateWaterFacilityType; |
| | | import com.fengdu.gas.entity.request.waterfacilitytype.ReqModifyWaterFacilityType; |
| | | import com.fengdu.gas.entity.search.SearchWaterFacilityType; |
| | | import com.fengdu.gas.repository.vo.WaterFacilityTypeVO; |
| | | |
| | | /** |
| | | * 9000.设备类型 |
| | | * @author zr |
| | | * @order 9000 |
| | | */ |
| | | @RestController |
| | | @RequestMapping(value = "waterFacilityType") |
| | | public class WaterFacilityTypeController extends BasicController { |
| | | @Autowired |
| | | private WaterFacilityTypeService service; |
| | | |
| | | /** |
| | | * 创建[设备类型] |
| | | * @author zr |
| | | */ |
| | | @PostMapping(value = "create") |
| | | public ExecutedResult<Long> create(@RequestBody ReqCreateWaterFacilityType request) { |
| | | //#region 参数验证 |
| | | ParameterValidator validator = new ParameterValidator() |
| | | // 非空 |
| | | //.addNotNullOrEmpty(ParameterUtil.named("名称"), request.getName()) |
| | | // 限制最大长度 |
| | | //.addLengthMax(ParameterUtil.named("名称"), request.getName(), ConstantFactory.LENGTH_MAX50) |
| | | ; |
| | | ParameterValidateResult result = validator.validate(); |
| | | if (result.getIsFiled()) { |
| | | return failed(result.getErrorMsg()); |
| | | } |
| | | //#endregion |
| | | return service.create(request); |
| | | } |
| | | |
| | | /** |
| | | * 编辑[设备类型] |
| | | * @author zr |
| | | */ |
| | | @PostMapping(value = "modify") |
| | | public ExecutedResult<String> modify(@RequestBody ReqModifyWaterFacilityType request) { |
| | | //#region 参数验证 |
| | | ParameterValidator validator = new ParameterValidator() |
| | | // 必须大于0 |
| | | .addGreater(ParameterUtil.named("[设备类型]id"), request.getId(), 0L) |
| | | // 非空 |
| | | //.addNotNullOrEmpty(ParameterUtil.named("名称"), request.getName()) |
| | | // 限制最大长度 |
| | | //.addLengthMax(ParameterUtil.named("名称"), request.getName(), ConstantFactory.LENGTH_MAX50) |
| | | ; |
| | | ParameterValidateResult result = validator.validate(); |
| | | if (result.getIsFiled()) { |
| | | return failed(result.getErrorMsg()); |
| | | } |
| | | //#endregion |
| | | return service.modify(request); |
| | | } |
| | | |
| | | /** |
| | | * 获取[设备类型] |
| | | * @author zr |
| | | */ |
| | | @GetMapping(value = "get/{id}") |
| | | public ExecutedResult<WaterFacilityTypeVO> get(@PathVariable Long id) { |
| | | return service.get(id); |
| | | } |
| | | |
| | | /** |
| | | * 查询[设备类型] |
| | | * @author zr |
| | | */ |
| | | @PostMapping(value = "search") |
| | | public ExecutedResult<PagerResult<WaterFacilityTypeVO>> search(@RequestBody SearchWaterFacilityType request) { |
| | | return service.search(request); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.host.controller; |
| | | |
| | | import com.fengdu.gas.common.ExecutedResult; |
| | | import com.fengdu.gas.common.PagerResult; |
| | | import com.fengdu.gas.common.util.ParameterUtil; |
| | | import com.fengdu.gas.common.validator.ParameterValidateResult; |
| | | import com.fengdu.gas.common.validator.ParameterValidator; |
| | | import com.fengdu.gas.entity.request.ReqListId; |
| | | import com.fengdu.gas.host.BasicController; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import java.util.List; |
| | | import com.fengdu.gas.service.WaterMonitoryPointService; |
| | | import com.fengdu.gas.entity.request.watermonitorypoint.ReqCreateWaterMonitoryPoint; |
| | | import com.fengdu.gas.entity.request.watermonitorypoint.ReqModifyWaterMonitoryPoint; |
| | | import com.fengdu.gas.entity.search.SearchWaterMonitoryPoint; |
| | | import com.fengdu.gas.repository.vo.WaterMonitoryPointVO; |
| | | |
| | | /** |
| | | * 9000.监控点 |
| | | * @author zr |
| | | * @order 9000 |
| | | */ |
| | | @RestController |
| | | @RequestMapping(value = "waterMonitoryPoint") |
| | | public class WaterMonitoryPointController extends BasicController { |
| | | @Autowired |
| | | private WaterMonitoryPointService service; |
| | | |
| | | /** |
| | | * 创建[监控点] |
| | | * @author zr |
| | | */ |
| | | @PostMapping(value = "create") |
| | | public ExecutedResult<Long> create(@RequestBody ReqCreateWaterMonitoryPoint request) { |
| | | //#region 参数验证 |
| | | ParameterValidator validator = new ParameterValidator() |
| | | // 非空 |
| | | //.addNotNullOrEmpty(ParameterUtil.named("名称"), request.getName()) |
| | | // 限制最大长度 |
| | | //.addLengthMax(ParameterUtil.named("名称"), request.getName(), ConstantFactory.LENGTH_MAX50) |
| | | ; |
| | | ParameterValidateResult result = validator.validate(); |
| | | if (result.getIsFiled()) { |
| | | return failed(result.getErrorMsg()); |
| | | } |
| | | //#endregion |
| | | return service.create(request); |
| | | } |
| | | |
| | | /** |
| | | * 编辑[监控点] |
| | | * @author zr |
| | | */ |
| | | @PostMapping(value = "modify") |
| | | public ExecutedResult<String> modify(@RequestBody ReqModifyWaterMonitoryPoint request) { |
| | | //#region 参数验证 |
| | | ParameterValidator validator = new ParameterValidator() |
| | | // 必须大于0 |
| | | .addGreater(ParameterUtil.named("[监控点]id"), request.getId(), 0L) |
| | | // 非空 |
| | | //.addNotNullOrEmpty(ParameterUtil.named("名称"), request.getName()) |
| | | // 限制最大长度 |
| | | //.addLengthMax(ParameterUtil.named("名称"), request.getName(), ConstantFactory.LENGTH_MAX50) |
| | | ; |
| | | ParameterValidateResult result = validator.validate(); |
| | | if (result.getIsFiled()) { |
| | | return failed(result.getErrorMsg()); |
| | | } |
| | | //#endregion |
| | | return service.modify(request); |
| | | } |
| | | |
| | | /** |
| | | * 获取[监控点] |
| | | * @author zr |
| | | */ |
| | | @GetMapping(value = "get/{id}") |
| | | public ExecutedResult<WaterMonitoryPointVO> get(@PathVariable Long id) { |
| | | return service.get(id); |
| | | } |
| | | |
| | | /** |
| | | * 查询[监控点] |
| | | * @author zr |
| | | */ |
| | | @PostMapping(value = "search") |
| | | public ExecutedResult<PagerResult<WaterMonitoryPointVO>> search(@RequestBody SearchWaterMonitoryPoint request) { |
| | | return service.search(request); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.repository.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.fengdu.gas.common.PagerResult; |
| | | import com.fengdu.gas.common.enums.EYesOrNo; |
| | | import com.fengdu.gas.common.util.*; |
| | | import com.fengdu.gas.entity.dto.*; |
| | | import com.fengdu.gas.entity.enums.*; |
| | | import com.fengdu.gas.repository.BasicMapperImpl; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import com.fengdu.gas.entity.search.SearchFacilityAlarmRecord; |
| | | import com.fengdu.gas.repository.mapper.FacilityAlarmRecordMapper; |
| | | import com.fengdu.gas.repository.po.FacilityAlarmRecordPO; |
| | | |
| | | /** |
| | | * 设备报警记录 |
| | | * @author zr |
| | | */ |
| | | @Repository |
| | | public class FacilityAlarmRecordMapperImpl extends BasicMapperImpl<FacilityAlarmRecordPO, FacilityAlarmRecordMapper> { |
| | | FacilityAlarmRecordMapperImpl(FacilityAlarmRecordMapper mapper) { |
| | | super(mapper); |
| | | } |
| | | |
| | | @Override |
| | | public PagerResult<FacilityAlarmRecordPO> search(SearchBasicDTO request) { |
| | | // 还原查询条件真实类型 |
| | | SearchFacilityAlarmRecord search = (SearchFacilityAlarmRecord)request; |
| | | // 查询条件 |
| | | LambdaQueryWrapper<FacilityAlarmRecordPO> queryWrapper = this.query(); |
| | | // 非逻辑删除 |
| | | queryWrapper.eq(FacilityAlarmRecordPO::getIsDelete, EYesOrNo.NO.getValue()); |
| | | // 状态 |
| | | //queryWrapper.eq(NumericUtil.tryParseInt(search.getStatus()).compareTo(0) > 0, FacilityAlarmRecordPO::getStatus, search.getStatus()); |
| | | // 状态列表 |
| | | //queryWrapper.in(ListUtil.isNotNullOrEmpty(search.getListStatus()), FacilityAlarmRecordPO::getStatus, search.getListStatus()); |
| | | |
| | | // 数据创建时间-起始 |
| | | queryWrapper.ge(NumericUtil.tryParseLong(search.getCreateTimeStart()).compareTo(0L) > 0, FacilityAlarmRecordPO::getCreateTime, search.getCreateTimeStart()); |
| | | // 数据创建时间-截止 |
| | | queryWrapper.le(NumericUtil.tryParseLong(search.getCreateTimeEnd()).compareTo(0L) > 0, FacilityAlarmRecordPO::getCreateTime, search.getCreateTimeEnd()); |
| | | // 关键字 |
| | | //if (StringUtil.isNotNullOrEmpty(search.getKeywords())) { |
| | | // queryWrapper.and(q -> |
| | | // q.like(FacilityAlarmRecordPO::getName, search.getKeywords()) |
| | | // .or().like(FacilityAlarmRecordPO::getPhone, search.getKeywords()) |
| | | // ); |
| | | //} |
| | | |
| | | // 排序处理 |
| | | if (ListUtil.isNotNullOrEmpty(search.getOrderBy())) { |
| | | for (OrderByDTO item : search.getOrderBy()) { |
| | | EOrderBy orderBy = EOrderBy.getByValue(item.getOrderBy()); |
| | | // 顺序排序 |
| | | if (item.getIsAsc()) { |
| | | switch (orderBy) { |
| | | // 主键 |
| | | case ID: |
| | | queryWrapper.orderByAsc(FacilityAlarmRecordPO::getId); |
| | | break; |
| | | // 数据创建时间 |
| | | case CREATE_TIME: |
| | | queryWrapper.orderByAsc(FacilityAlarmRecordPO::getCreateTime); |
| | | break; |
| | | // 最后更新时间 |
| | | case UPDATE_TIME: |
| | | queryWrapper.orderByAsc(FacilityAlarmRecordPO::getUpdateTime); |
| | | break; |
| | | } |
| | | } else { |
| | | // 倒叙排序 |
| | | switch (orderBy) { |
| | | // 主键 |
| | | case ID: |
| | | queryWrapper.orderByDesc(FacilityAlarmRecordPO::getId); |
| | | break; |
| | | // 数据创建时间 |
| | | case CREATE_TIME: |
| | | queryWrapper.orderByDesc(FacilityAlarmRecordPO::getCreateTime); |
| | | break; |
| | | // 最后更新时间 |
| | | case UPDATE_TIME: |
| | | queryWrapper.orderByDesc(FacilityAlarmRecordPO::getUpdateTime); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | queryWrapper.orderByDesc(FacilityAlarmRecordPO::getId); |
| | | } |
| | | Page<FacilityAlarmRecordPO> pageResult = super.selectPage(new Page<>(search.getPage(), search.getLimit()), queryWrapper); |
| | | return new PagerResult<>(pageResult.getSize(), pageResult.getCurrent(), pageResult.getTotal(), pageResult.getRecords()); |
| | | } |
| | | |
| | | public Boolean add(FacilityAlarmRecordPO item) { |
| | | int rowCount = super.insert(item); |
| | | return rowCount == 1; |
| | | } |
| | | |
| | | public Boolean addNotIncrement(FacilityAlarmRecordPO item) { |
| | | int rowCount = super.insert(item); |
| | | return rowCount == 1; |
| | | } |
| | | |
| | | public FacilityAlarmRecordPO getById(Long id) { |
| | | return super.get(id); |
| | | } |
| | | |
| | | public List<FacilityAlarmRecordPO> getListById(List<Long> listId) { |
| | | return super.getList(listId); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.repository.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.fengdu.gas.common.PagerResult; |
| | | import com.fengdu.gas.common.enums.EYesOrNo; |
| | | import com.fengdu.gas.common.util.*; |
| | | import com.fengdu.gas.entity.dto.*; |
| | | import com.fengdu.gas.entity.enums.*; |
| | | import com.fengdu.gas.repository.BasicMapperImpl; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import com.fengdu.gas.entity.search.SearchSendMessageRecord; |
| | | import com.fengdu.gas.repository.mapper.SendMessageRecordMapper; |
| | | import com.fengdu.gas.repository.po.SendMessageRecordPO; |
| | | |
| | | /** |
| | | * 消息发送记录 |
| | | * @author zr |
| | | */ |
| | | @Repository |
| | | public class SendMessageRecordMapperImpl extends BasicMapperImpl<SendMessageRecordPO, SendMessageRecordMapper> { |
| | | SendMessageRecordMapperImpl(SendMessageRecordMapper mapper) { |
| | | super(mapper); |
| | | } |
| | | |
| | | @Override |
| | | public PagerResult<SendMessageRecordPO> search(SearchBasicDTO request) { |
| | | // 还原查询条件真实类型 |
| | | SearchSendMessageRecord search = (SearchSendMessageRecord)request; |
| | | // 查询条件 |
| | | LambdaQueryWrapper<SendMessageRecordPO> queryWrapper = this.query(); |
| | | // 非逻辑删除 |
| | | queryWrapper.eq(SendMessageRecordPO::getIsDelete, EYesOrNo.NO.getValue()); |
| | | // 状态 |
| | | //queryWrapper.eq(NumericUtil.tryParseInt(search.getStatus()).compareTo(0) > 0, SendMessageRecordPO::getStatus, search.getStatus()); |
| | | // 状态列表 |
| | | //queryWrapper.in(ListUtil.isNotNullOrEmpty(search.getListStatus()), SendMessageRecordPO::getStatus, search.getListStatus()); |
| | | |
| | | // 数据创建时间-起始 |
| | | queryWrapper.ge(NumericUtil.tryParseLong(search.getCreateTimeStart()).compareTo(0L) > 0, SendMessageRecordPO::getCreateTime, search.getCreateTimeStart()); |
| | | // 数据创建时间-截止 |
| | | queryWrapper.le(NumericUtil.tryParseLong(search.getCreateTimeEnd()).compareTo(0L) > 0, SendMessageRecordPO::getCreateTime, search.getCreateTimeEnd()); |
| | | // 关键字 |
| | | //if (StringUtil.isNotNullOrEmpty(search.getKeywords())) { |
| | | // queryWrapper.and(q -> |
| | | // q.like(SendMessageRecordPO::getName, search.getKeywords()) |
| | | // .or().like(SendMessageRecordPO::getPhone, search.getKeywords()) |
| | | // ); |
| | | //} |
| | | |
| | | // 排序处理 |
| | | if (ListUtil.isNotNullOrEmpty(search.getOrderBy())) { |
| | | for (OrderByDTO item : search.getOrderBy()) { |
| | | EOrderBy orderBy = EOrderBy.getByValue(item.getOrderBy()); |
| | | // 顺序排序 |
| | | if (item.getIsAsc()) { |
| | | switch (orderBy) { |
| | | // 主键 |
| | | case ID: |
| | | queryWrapper.orderByAsc(SendMessageRecordPO::getId); |
| | | break; |
| | | // 数据创建时间 |
| | | case CREATE_TIME: |
| | | queryWrapper.orderByAsc(SendMessageRecordPO::getCreateTime); |
| | | break; |
| | | // 最后更新时间 |
| | | case UPDATE_TIME: |
| | | queryWrapper.orderByAsc(SendMessageRecordPO::getUpdateTime); |
| | | break; |
| | | } |
| | | } else { |
| | | // 倒叙排序 |
| | | switch (orderBy) { |
| | | // 主键 |
| | | case ID: |
| | | queryWrapper.orderByDesc(SendMessageRecordPO::getId); |
| | | break; |
| | | // 数据创建时间 |
| | | case CREATE_TIME: |
| | | queryWrapper.orderByDesc(SendMessageRecordPO::getCreateTime); |
| | | break; |
| | | // 最后更新时间 |
| | | case UPDATE_TIME: |
| | | queryWrapper.orderByDesc(SendMessageRecordPO::getUpdateTime); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | queryWrapper.orderByDesc(SendMessageRecordPO::getId); |
| | | } |
| | | Page<SendMessageRecordPO> pageResult = super.selectPage(new Page<>(search.getPage(), search.getLimit()), queryWrapper); |
| | | return new PagerResult<>(pageResult.getSize(), pageResult.getCurrent(), pageResult.getTotal(), pageResult.getRecords()); |
| | | } |
| | | |
| | | public Boolean add(SendMessageRecordPO item) { |
| | | int rowCount = super.insert(item); |
| | | return rowCount == 1; |
| | | } |
| | | |
| | | public Boolean addNotIncrement(SendMessageRecordPO item) { |
| | | int rowCount = super.insert(item); |
| | | return rowCount == 1; |
| | | } |
| | | |
| | | public SendMessageRecordPO getById(Long id) { |
| | | return super.get(id); |
| | | } |
| | | |
| | | public List<SendMessageRecordPO> getListById(List<Long> listId) { |
| | | return super.getList(listId); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.repository.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.fengdu.gas.common.PagerResult; |
| | | import com.fengdu.gas.common.enums.EYesOrNo; |
| | | import com.fengdu.gas.common.util.*; |
| | | import com.fengdu.gas.entity.dto.*; |
| | | import com.fengdu.gas.entity.enums.*; |
| | | import com.fengdu.gas.repository.BasicMapperImpl; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import com.fengdu.gas.entity.search.SearchWaterFacility; |
| | | import com.fengdu.gas.repository.mapper.WaterFacilityMapper; |
| | | import com.fengdu.gas.repository.po.WaterFacilityPO; |
| | | |
| | | /** |
| | | * 设备信息 |
| | | * @author zr |
| | | */ |
| | | @Repository |
| | | public class WaterFacilityMapperImpl extends BasicMapperImpl<WaterFacilityPO, WaterFacilityMapper> { |
| | | WaterFacilityMapperImpl(WaterFacilityMapper mapper) { |
| | | super(mapper); |
| | | } |
| | | |
| | | @Override |
| | | public PagerResult<WaterFacilityPO> search(SearchBasicDTO request) { |
| | | // 还原查询条件真实类型 |
| | | SearchWaterFacility search = (SearchWaterFacility)request; |
| | | // 查询条件 |
| | | LambdaQueryWrapper<WaterFacilityPO> queryWrapper = this.query(); |
| | | // 非逻辑删除 |
| | | queryWrapper.eq(WaterFacilityPO::getIsDelete, EYesOrNo.NO.getValue()); |
| | | // 状态 |
| | | //queryWrapper.eq(NumericUtil.tryParseInt(search.getStatus()).compareTo(0) > 0, WaterFacilityPO::getStatus, search.getStatus()); |
| | | // 状态列表 |
| | | //queryWrapper.in(ListUtil.isNotNullOrEmpty(search.getListStatus()), WaterFacilityPO::getStatus, search.getListStatus()); |
| | | |
| | | // 数据创建时间-起始 |
| | | queryWrapper.ge(NumericUtil.tryParseLong(search.getCreateTimeStart()).compareTo(0L) > 0, WaterFacilityPO::getCreateTime, search.getCreateTimeStart()); |
| | | // 数据创建时间-截止 |
| | | queryWrapper.le(NumericUtil.tryParseLong(search.getCreateTimeEnd()).compareTo(0L) > 0, WaterFacilityPO::getCreateTime, search.getCreateTimeEnd()); |
| | | // 关键字 |
| | | //if (StringUtil.isNotNullOrEmpty(search.getKeywords())) { |
| | | // queryWrapper.and(q -> |
| | | // q.like(WaterFacilityPO::getName, search.getKeywords()) |
| | | // .or().like(WaterFacilityPO::getPhone, search.getKeywords()) |
| | | // ); |
| | | //} |
| | | |
| | | // 排序处理 |
| | | if (ListUtil.isNotNullOrEmpty(search.getOrderBy())) { |
| | | for (OrderByDTO item : search.getOrderBy()) { |
| | | EOrderBy orderBy = EOrderBy.getByValue(item.getOrderBy()); |
| | | // 顺序排序 |
| | | if (item.getIsAsc()) { |
| | | switch (orderBy) { |
| | | // 主键 |
| | | case ID: |
| | | queryWrapper.orderByAsc(WaterFacilityPO::getId); |
| | | break; |
| | | // 数据创建时间 |
| | | case CREATE_TIME: |
| | | queryWrapper.orderByAsc(WaterFacilityPO::getCreateTime); |
| | | break; |
| | | // 最后更新时间 |
| | | case UPDATE_TIME: |
| | | queryWrapper.orderByAsc(WaterFacilityPO::getUpdateTime); |
| | | break; |
| | | } |
| | | } else { |
| | | // 倒叙排序 |
| | | switch (orderBy) { |
| | | // 主键 |
| | | case ID: |
| | | queryWrapper.orderByDesc(WaterFacilityPO::getId); |
| | | break; |
| | | // 数据创建时间 |
| | | case CREATE_TIME: |
| | | queryWrapper.orderByDesc(WaterFacilityPO::getCreateTime); |
| | | break; |
| | | // 最后更新时间 |
| | | case UPDATE_TIME: |
| | | queryWrapper.orderByDesc(WaterFacilityPO::getUpdateTime); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | queryWrapper.orderByDesc(WaterFacilityPO::getId); |
| | | } |
| | | Page<WaterFacilityPO> pageResult = super.selectPage(new Page<>(search.getPage(), search.getLimit()), queryWrapper); |
| | | return new PagerResult<>(pageResult.getSize(), pageResult.getCurrent(), pageResult.getTotal(), pageResult.getRecords()); |
| | | } |
| | | |
| | | public Boolean add(WaterFacilityPO item) { |
| | | int rowCount = super.insert(item); |
| | | return rowCount == 1; |
| | | } |
| | | |
| | | public Boolean addNotIncrement(WaterFacilityPO item) { |
| | | int rowCount = super.insert(item); |
| | | return rowCount == 1; |
| | | } |
| | | |
| | | public WaterFacilityPO getById(Long id) { |
| | | return super.get(id); |
| | | } |
| | | |
| | | public List<WaterFacilityPO> getListById(List<Long> listId) { |
| | | return super.getList(listId); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.repository.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.fengdu.gas.common.PagerResult; |
| | | import com.fengdu.gas.common.enums.EYesOrNo; |
| | | import com.fengdu.gas.common.util.*; |
| | | import com.fengdu.gas.entity.dto.*; |
| | | import com.fengdu.gas.entity.enums.*; |
| | | import com.fengdu.gas.repository.BasicMapperImpl; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import com.fengdu.gas.entity.search.SearchWaterFacilityParameter; |
| | | import com.fengdu.gas.repository.mapper.WaterFacilityParameterMapper; |
| | | import com.fengdu.gas.repository.po.WaterFacilityParameterPO; |
| | | |
| | | /** |
| | | * 设备设定参数 |
| | | * @author zr |
| | | */ |
| | | @Repository |
| | | public class WaterFacilityParameterMapperImpl extends BasicMapperImpl<WaterFacilityParameterPO, WaterFacilityParameterMapper> { |
| | | WaterFacilityParameterMapperImpl(WaterFacilityParameterMapper mapper) { |
| | | super(mapper); |
| | | } |
| | | |
| | | @Override |
| | | public PagerResult<WaterFacilityParameterPO> search(SearchBasicDTO request) { |
| | | // 还原查询条件真实类型 |
| | | SearchWaterFacilityParameter search = (SearchWaterFacilityParameter)request; |
| | | // 查询条件 |
| | | LambdaQueryWrapper<WaterFacilityParameterPO> queryWrapper = this.query(); |
| | | // 非逻辑删除 |
| | | queryWrapper.eq(WaterFacilityParameterPO::getIsDelete, EYesOrNo.NO.getValue()); |
| | | // 状态 |
| | | //queryWrapper.eq(NumericUtil.tryParseInt(search.getStatus()).compareTo(0) > 0, WaterFacilityParameterPO::getStatus, search.getStatus()); |
| | | // 状态列表 |
| | | //queryWrapper.in(ListUtil.isNotNullOrEmpty(search.getListStatus()), WaterFacilityParameterPO::getStatus, search.getListStatus()); |
| | | |
| | | // 数据创建时间-起始 |
| | | queryWrapper.ge(NumericUtil.tryParseLong(search.getCreateTimeStart()).compareTo(0L) > 0, WaterFacilityParameterPO::getCreateTime, search.getCreateTimeStart()); |
| | | // 数据创建时间-截止 |
| | | queryWrapper.le(NumericUtil.tryParseLong(search.getCreateTimeEnd()).compareTo(0L) > 0, WaterFacilityParameterPO::getCreateTime, search.getCreateTimeEnd()); |
| | | // 关键字 |
| | | //if (StringUtil.isNotNullOrEmpty(search.getKeywords())) { |
| | | // queryWrapper.and(q -> |
| | | // q.like(WaterFacilityParameterPO::getName, search.getKeywords()) |
| | | // .or().like(WaterFacilityParameterPO::getPhone, search.getKeywords()) |
| | | // ); |
| | | //} |
| | | |
| | | // 排序处理 |
| | | if (ListUtil.isNotNullOrEmpty(search.getOrderBy())) { |
| | | for (OrderByDTO item : search.getOrderBy()) { |
| | | EOrderBy orderBy = EOrderBy.getByValue(item.getOrderBy()); |
| | | // 顺序排序 |
| | | if (item.getIsAsc()) { |
| | | switch (orderBy) { |
| | | // 主键 |
| | | case ID: |
| | | queryWrapper.orderByAsc(WaterFacilityParameterPO::getId); |
| | | break; |
| | | // 数据创建时间 |
| | | case CREATE_TIME: |
| | | queryWrapper.orderByAsc(WaterFacilityParameterPO::getCreateTime); |
| | | break; |
| | | // 最后更新时间 |
| | | case UPDATE_TIME: |
| | | queryWrapper.orderByAsc(WaterFacilityParameterPO::getUpdateTime); |
| | | break; |
| | | } |
| | | } else { |
| | | // 倒叙排序 |
| | | switch (orderBy) { |
| | | // 主键 |
| | | case ID: |
| | | queryWrapper.orderByDesc(WaterFacilityParameterPO::getId); |
| | | break; |
| | | // 数据创建时间 |
| | | case CREATE_TIME: |
| | | queryWrapper.orderByDesc(WaterFacilityParameterPO::getCreateTime); |
| | | break; |
| | | // 最后更新时间 |
| | | case UPDATE_TIME: |
| | | queryWrapper.orderByDesc(WaterFacilityParameterPO::getUpdateTime); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | queryWrapper.orderByDesc(WaterFacilityParameterPO::getId); |
| | | } |
| | | Page<WaterFacilityParameterPO> pageResult = super.selectPage(new Page<>(search.getPage(), search.getLimit()), queryWrapper); |
| | | return new PagerResult<>(pageResult.getSize(), pageResult.getCurrent(), pageResult.getTotal(), pageResult.getRecords()); |
| | | } |
| | | |
| | | public Boolean add(WaterFacilityParameterPO item) { |
| | | int rowCount = super.insert(item); |
| | | return rowCount == 1; |
| | | } |
| | | |
| | | public Boolean addNotIncrement(WaterFacilityParameterPO item) { |
| | | int rowCount = super.insert(item); |
| | | return rowCount == 1; |
| | | } |
| | | |
| | | public WaterFacilityParameterPO getById(Long id) { |
| | | return super.get(id); |
| | | } |
| | | |
| | | public List<WaterFacilityParameterPO> getListById(List<Long> listId) { |
| | | return super.getList(listId); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.repository.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.fengdu.gas.common.PagerResult; |
| | | import com.fengdu.gas.common.enums.EYesOrNo; |
| | | import com.fengdu.gas.common.util.*; |
| | | import com.fengdu.gas.entity.dto.*; |
| | | import com.fengdu.gas.entity.enums.*; |
| | | import com.fengdu.gas.repository.BasicMapperImpl; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import com.fengdu.gas.entity.search.SearchWaterFacilityType; |
| | | import com.fengdu.gas.repository.mapper.WaterFacilityTypeMapper; |
| | | import com.fengdu.gas.repository.po.WaterFacilityTypePO; |
| | | |
| | | /** |
| | | * 设备类型 |
| | | * @author zr |
| | | */ |
| | | @Repository |
| | | public class WaterFacilityTypeMapperImpl extends BasicMapperImpl<WaterFacilityTypePO, WaterFacilityTypeMapper> { |
| | | WaterFacilityTypeMapperImpl(WaterFacilityTypeMapper mapper) { |
| | | super(mapper); |
| | | } |
| | | |
| | | @Override |
| | | public PagerResult<WaterFacilityTypePO> search(SearchBasicDTO request) { |
| | | // 还原查询条件真实类型 |
| | | SearchWaterFacilityType search = (SearchWaterFacilityType)request; |
| | | // 查询条件 |
| | | LambdaQueryWrapper<WaterFacilityTypePO> queryWrapper = this.query(); |
| | | // 非逻辑删除 |
| | | queryWrapper.eq(WaterFacilityTypePO::getIsDelete, EYesOrNo.NO.getValue()); |
| | | // 状态 |
| | | //queryWrapper.eq(NumericUtil.tryParseInt(search.getStatus()).compareTo(0) > 0, WaterFacilityTypePO::getStatus, search.getStatus()); |
| | | // 状态列表 |
| | | //queryWrapper.in(ListUtil.isNotNullOrEmpty(search.getListStatus()), WaterFacilityTypePO::getStatus, search.getListStatus()); |
| | | |
| | | // 数据创建时间-起始 |
| | | queryWrapper.ge(NumericUtil.tryParseLong(search.getCreateTimeStart()).compareTo(0L) > 0, WaterFacilityTypePO::getCreateTime, search.getCreateTimeStart()); |
| | | // 数据创建时间-截止 |
| | | queryWrapper.le(NumericUtil.tryParseLong(search.getCreateTimeEnd()).compareTo(0L) > 0, WaterFacilityTypePO::getCreateTime, search.getCreateTimeEnd()); |
| | | // 关键字 |
| | | //if (StringUtil.isNotNullOrEmpty(search.getKeywords())) { |
| | | // queryWrapper.and(q -> |
| | | // q.like(WaterFacilityTypePO::getName, search.getKeywords()) |
| | | // .or().like(WaterFacilityTypePO::getPhone, search.getKeywords()) |
| | | // ); |
| | | //} |
| | | |
| | | // 排序处理 |
| | | if (ListUtil.isNotNullOrEmpty(search.getOrderBy())) { |
| | | for (OrderByDTO item : search.getOrderBy()) { |
| | | EOrderBy orderBy = EOrderBy.getByValue(item.getOrderBy()); |
| | | // 顺序排序 |
| | | if (item.getIsAsc()) { |
| | | switch (orderBy) { |
| | | // 主键 |
| | | case ID: |
| | | queryWrapper.orderByAsc(WaterFacilityTypePO::getId); |
| | | break; |
| | | // 数据创建时间 |
| | | case CREATE_TIME: |
| | | queryWrapper.orderByAsc(WaterFacilityTypePO::getCreateTime); |
| | | break; |
| | | // 最后更新时间 |
| | | case UPDATE_TIME: |
| | | queryWrapper.orderByAsc(WaterFacilityTypePO::getUpdateTime); |
| | | break; |
| | | } |
| | | } else { |
| | | // 倒叙排序 |
| | | switch (orderBy) { |
| | | // 主键 |
| | | case ID: |
| | | queryWrapper.orderByDesc(WaterFacilityTypePO::getId); |
| | | break; |
| | | // 数据创建时间 |
| | | case CREATE_TIME: |
| | | queryWrapper.orderByDesc(WaterFacilityTypePO::getCreateTime); |
| | | break; |
| | | // 最后更新时间 |
| | | case UPDATE_TIME: |
| | | queryWrapper.orderByDesc(WaterFacilityTypePO::getUpdateTime); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | queryWrapper.orderByDesc(WaterFacilityTypePO::getId); |
| | | } |
| | | Page<WaterFacilityTypePO> pageResult = super.selectPage(new Page<>(search.getPage(), search.getLimit()), queryWrapper); |
| | | return new PagerResult<>(pageResult.getSize(), pageResult.getCurrent(), pageResult.getTotal(), pageResult.getRecords()); |
| | | } |
| | | |
| | | public Boolean add(WaterFacilityTypePO item) { |
| | | int rowCount = super.insert(item); |
| | | return rowCount == 1; |
| | | } |
| | | |
| | | public Boolean addNotIncrement(WaterFacilityTypePO item) { |
| | | int rowCount = super.insert(item); |
| | | return rowCount == 1; |
| | | } |
| | | |
| | | public WaterFacilityTypePO getById(Long id) { |
| | | return super.get(id); |
| | | } |
| | | |
| | | public List<WaterFacilityTypePO> getListById(List<Long> listId) { |
| | | return super.getList(listId); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.repository.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.fengdu.gas.common.PagerResult; |
| | | import com.fengdu.gas.common.enums.EYesOrNo; |
| | | import com.fengdu.gas.common.util.*; |
| | | import com.fengdu.gas.entity.dto.*; |
| | | import com.fengdu.gas.entity.enums.*; |
| | | import com.fengdu.gas.repository.BasicMapperImpl; |
| | | import org.springframework.stereotype.Repository; |
| | | |
| | | import java.util.List; |
| | | import com.fengdu.gas.entity.search.SearchWaterMonitoryPoint; |
| | | import com.fengdu.gas.repository.mapper.WaterMonitoryPointMapper; |
| | | import com.fengdu.gas.repository.po.WaterMonitoryPointPO; |
| | | |
| | | /** |
| | | * 监控点 |
| | | * @author zr |
| | | */ |
| | | @Repository |
| | | public class WaterMonitoryPointMapperImpl extends BasicMapperImpl<WaterMonitoryPointPO, WaterMonitoryPointMapper> { |
| | | WaterMonitoryPointMapperImpl(WaterMonitoryPointMapper mapper) { |
| | | super(mapper); |
| | | } |
| | | |
| | | @Override |
| | | public PagerResult<WaterMonitoryPointPO> search(SearchBasicDTO request) { |
| | | // 还原查询条件真实类型 |
| | | SearchWaterMonitoryPoint search = (SearchWaterMonitoryPoint)request; |
| | | // 查询条件 |
| | | LambdaQueryWrapper<WaterMonitoryPointPO> queryWrapper = this.query(); |
| | | // 非逻辑删除 |
| | | queryWrapper.eq(WaterMonitoryPointPO::getIsDelete, EYesOrNo.NO.getValue()); |
| | | // 状态 |
| | | //queryWrapper.eq(NumericUtil.tryParseInt(search.getStatus()).compareTo(0) > 0, WaterMonitoryPointPO::getStatus, search.getStatus()); |
| | | // 状态列表 |
| | | //queryWrapper.in(ListUtil.isNotNullOrEmpty(search.getListStatus()), WaterMonitoryPointPO::getStatus, search.getListStatus()); |
| | | |
| | | // 数据创建时间-起始 |
| | | queryWrapper.ge(NumericUtil.tryParseLong(search.getCreateTimeStart()).compareTo(0L) > 0, WaterMonitoryPointPO::getCreateTime, search.getCreateTimeStart()); |
| | | // 数据创建时间-截止 |
| | | queryWrapper.le(NumericUtil.tryParseLong(search.getCreateTimeEnd()).compareTo(0L) > 0, WaterMonitoryPointPO::getCreateTime, search.getCreateTimeEnd()); |
| | | // 关键字 |
| | | //if (StringUtil.isNotNullOrEmpty(search.getKeywords())) { |
| | | // queryWrapper.and(q -> |
| | | // q.like(WaterMonitoryPointPO::getName, search.getKeywords()) |
| | | // .or().like(WaterMonitoryPointPO::getPhone, search.getKeywords()) |
| | | // ); |
| | | //} |
| | | |
| | | // 排序处理 |
| | | if (ListUtil.isNotNullOrEmpty(search.getOrderBy())) { |
| | | for (OrderByDTO item : search.getOrderBy()) { |
| | | EOrderBy orderBy = EOrderBy.getByValue(item.getOrderBy()); |
| | | // 顺序排序 |
| | | if (item.getIsAsc()) { |
| | | switch (orderBy) { |
| | | // 主键 |
| | | case ID: |
| | | queryWrapper.orderByAsc(WaterMonitoryPointPO::getId); |
| | | break; |
| | | // 数据创建时间 |
| | | case CREATE_TIME: |
| | | queryWrapper.orderByAsc(WaterMonitoryPointPO::getCreateTime); |
| | | break; |
| | | // 最后更新时间 |
| | | case UPDATE_TIME: |
| | | queryWrapper.orderByAsc(WaterMonitoryPointPO::getUpdateTime); |
| | | break; |
| | | } |
| | | } else { |
| | | // 倒叙排序 |
| | | switch (orderBy) { |
| | | // 主键 |
| | | case ID: |
| | | queryWrapper.orderByDesc(WaterMonitoryPointPO::getId); |
| | | break; |
| | | // 数据创建时间 |
| | | case CREATE_TIME: |
| | | queryWrapper.orderByDesc(WaterMonitoryPointPO::getCreateTime); |
| | | break; |
| | | // 最后更新时间 |
| | | case UPDATE_TIME: |
| | | queryWrapper.orderByDesc(WaterMonitoryPointPO::getUpdateTime); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | queryWrapper.orderByDesc(WaterMonitoryPointPO::getId); |
| | | } |
| | | Page<WaterMonitoryPointPO> pageResult = super.selectPage(new Page<>(search.getPage(), search.getLimit()), queryWrapper); |
| | | return new PagerResult<>(pageResult.getSize(), pageResult.getCurrent(), pageResult.getTotal(), pageResult.getRecords()); |
| | | } |
| | | |
| | | public Boolean add(WaterMonitoryPointPO item) { |
| | | int rowCount = super.insert(item); |
| | | return rowCount == 1; |
| | | } |
| | | |
| | | public Boolean addNotIncrement(WaterMonitoryPointPO item) { |
| | | int rowCount = super.insert(item); |
| | | return rowCount == 1; |
| | | } |
| | | |
| | | public WaterMonitoryPointPO getById(Long id) { |
| | | return super.get(id); |
| | | } |
| | | |
| | | public List<WaterMonitoryPointPO> getListById(List<Long> listId) { |
| | | return super.getList(listId); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | package com.fengdu.gas.repository.mapper; |
| | | |
| | | import com.fengdu.gas.repository.BasicMapper;import com.fengdu.gas.repository.po.FacilityAlarmRecordPO; |
| | | |
| | | /** |
| | | * 设备报警记录 mapper |
| | | * @author zr |
| | | */ |
| | | public interface FacilityAlarmRecordMapper extends BasicMapper<FacilityAlarmRecordPO> { |
| | | } |
对比新文件 |
| | |
| | | package com.fengdu.gas.repository.mapper; |
| | | |
| | | import com.fengdu.gas.repository.BasicMapper;import com.fengdu.gas.repository.po.SendMessageRecordPO; |
| | | |
| | | /** |
| | | * 消息发送记录 mapper |
| | | * @author zr |
| | | */ |
| | | public interface SendMessageRecordMapper extends BasicMapper<SendMessageRecordPO> { |
| | | } |
对比新文件 |
| | |
| | | package com.fengdu.gas.repository.mapper; |
| | | |
| | | import com.fengdu.gas.repository.BasicMapper;import com.fengdu.gas.repository.po.WaterFacilityPO; |
| | | |
| | | /** |
| | | * 设备信息 mapper |
| | | * @author zr |
| | | */ |
| | | public interface WaterFacilityMapper extends BasicMapper<WaterFacilityPO> { |
| | | } |
对比新文件 |
| | |
| | | package com.fengdu.gas.repository.mapper; |
| | | |
| | | import com.fengdu.gas.repository.BasicMapper;import com.fengdu.gas.repository.po.WaterFacilityParameterPO; |
| | | |
| | | /** |
| | | * 设备设定参数 mapper |
| | | * @author zr |
| | | */ |
| | | public interface WaterFacilityParameterMapper extends BasicMapper<WaterFacilityParameterPO> { |
| | | } |
对比新文件 |
| | |
| | | package com.fengdu.gas.repository.mapper; |
| | | |
| | | import com.fengdu.gas.repository.BasicMapper;import com.fengdu.gas.repository.po.WaterFacilityTypePO; |
| | | |
| | | /** |
| | | * 设备类型 mapper |
| | | * @author zr |
| | | */ |
| | | public interface WaterFacilityTypeMapper extends BasicMapper<WaterFacilityTypePO> { |
| | | } |
对比新文件 |
| | |
| | | package com.fengdu.gas.repository.mapper; |
| | | |
| | | import com.fengdu.gas.repository.BasicMapper;import com.fengdu.gas.repository.po.WaterMonitoryPointPO; |
| | | |
| | | /** |
| | | * 监控点 mapper |
| | | * @author zr |
| | | */ |
| | | public interface WaterMonitoryPointMapper extends BasicMapper<WaterMonitoryPointPO> { |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.repository.po; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import java.io.Serializable; |
| | | import java.sql.Timestamp; |
| | | |
| | | /** |
| | | * 设备报警记录 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | @TableName("facility_alarm_record") |
| | | public class FacilityAlarmRecordPO implements Serializable { |
| | | /** |
| | | * 主键id |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 监控点id |
| | | */ |
| | | @TableField(value = "point_id") |
| | | private Long pointId; |
| | | /** |
| | | * 监控点名称 |
| | | */ |
| | | @TableField(value = "point_name") |
| | | private String pointName; |
| | | /** |
| | | * 设备id |
| | | */ |
| | | @TableField(value = "facility_id") |
| | | private Long facilityId; |
| | | /** |
| | | * 设备名称 |
| | | */ |
| | | @TableField(value = "facility_name") |
| | | private String facilityName; |
| | | /** |
| | | * 参数编码 |
| | | */ |
| | | @TableField(value = "columns_code") |
| | | private String columnsCode; |
| | | /** |
| | | * 参数名称 |
| | | */ |
| | | @TableField(value = "columns_name") |
| | | private String columnsName; |
| | | /** |
| | | * 报警描述 |
| | | */ |
| | | @TableField(value = "description") |
| | | private String description; |
| | | /** |
| | | * 报警次数 |
| | | */ |
| | | @TableField(value = "alarm_count") |
| | | private Integer alarmCount; |
| | | /** |
| | | * 首次报警时间 |
| | | */ |
| | | @TableField(value = "first_alarm_time") |
| | | private String firstAlarmTime; |
| | | /** |
| | | * 最后报警时间 |
| | | */ |
| | | @TableField(value = "latest_alarm_time") |
| | | private String latestAlarmTime; |
| | | /** |
| | | * 是否删除(逻辑删除) |
| | | */ |
| | | @TableLogic |
| | | @TableField(value = "is_delete") |
| | | private Integer isDelete; |
| | | /** |
| | | * 数据创建时间 |
| | | */ |
| | | @TableField(value = "create_time") |
| | | private Long createTime; |
| | | /** |
| | | * 最后更新时间 |
| | | */ |
| | | @TableField(value = "update_time") |
| | | private Timestamp updateTime; |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.repository.po; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import java.io.Serializable; |
| | | import java.sql.Timestamp; |
| | | |
| | | /** |
| | | * 消息发送记录 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | @TableName("send_message_record") |
| | | public class SendMessageRecordPO implements Serializable { |
| | | /** |
| | | * 主键id |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 消息类型(1邮件 2短信) |
| | | */ |
| | | @TableField(value = "type") |
| | | private Integer type; |
| | | /** |
| | | * 收件人id |
| | | */ |
| | | @TableField(value = "user_id") |
| | | private Long userId; |
| | | /** |
| | | * 收件人名称 |
| | | */ |
| | | @TableField(value = "user_name") |
| | | private String userName; |
| | | /** |
| | | * 监控点id |
| | | */ |
| | | @TableField(value = "point_id") |
| | | private Long pointId; |
| | | /** |
| | | * 监控点名称 |
| | | */ |
| | | @TableField(value = "point_name") |
| | | private String pointName; |
| | | /** |
| | | * 设备id |
| | | */ |
| | | @TableField(value = "facility_id") |
| | | private Long facilityId; |
| | | /** |
| | | * 设备名称 |
| | | */ |
| | | @TableField(value = "facility_name") |
| | | private String facilityName; |
| | | /** |
| | | * 内容 |
| | | */ |
| | | @TableField(value = "content") |
| | | private String content; |
| | | /** |
| | | * 接收时间 |
| | | */ |
| | | @TableField(value = "send_time") |
| | | private String sendTime; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @TableField(value = "remark") |
| | | private String remark; |
| | | /** |
| | | * 是否删除 |
| | | */ |
| | | @TableLogic |
| | | @TableField(value = "is_delete") |
| | | private Integer isDelete; |
| | | /** |
| | | * 创建日期 |
| | | */ |
| | | @TableField(value = "create_time") |
| | | private Long createTime; |
| | | /** |
| | | * 修改日期 |
| | | */ |
| | | @TableField(value = "update_time") |
| | | private Timestamp updateTime; |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.repository.po; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import java.io.Serializable; |
| | | import java.sql.Timestamp; |
| | | |
| | | /** |
| | | * 设备信息 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | @TableName("water_facility") |
| | | public class WaterFacilityPO implements Serializable { |
| | | /** |
| | | * null |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 设备名称 |
| | | */ |
| | | @TableField(value = "facility_name") |
| | | private String facilityName; |
| | | /** |
| | | * 设备编号 |
| | | */ |
| | | @TableField(value = "facility_code") |
| | | private String facilityCode; |
| | | /** |
| | | * 设备类型 |
| | | */ |
| | | @TableField(value = "facility_type") |
| | | private Long facilityType; |
| | | /** |
| | | * 监控点id |
| | | */ |
| | | @TableField(value = "point_id") |
| | | private Long pointId; |
| | | /** |
| | | * 是否在线 |
| | | */ |
| | | @TableField(value = "is_online") |
| | | private Integer isOnline; |
| | | /** |
| | | * 安装地址 |
| | | */ |
| | | @TableField(value = "address") |
| | | private String address; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @TableField(value = "remark") |
| | | private String remark; |
| | | /** |
| | | * 设备图片 |
| | | */ |
| | | @TableField(value = "facility_url") |
| | | private String facilityUrl; |
| | | /** |
| | | * 数据创建时间 |
| | | */ |
| | | @TableField(value = "create_time") |
| | | private Long createTime; |
| | | /** |
| | | * 最后更新时间 |
| | | */ |
| | | @TableField(value = "update_time") |
| | | private Timestamp updateTime; |
| | | /** |
| | | * 是否删除(逻辑删除) |
| | | */ |
| | | @TableLogic |
| | | @TableField(value = "is_delete") |
| | | private Integer isDelete; |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.repository.po; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import java.io.Serializable; |
| | | import java.sql.Timestamp; |
| | | |
| | | /** |
| | | * 设备设定参数 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | @TableName("water_facility_parameter") |
| | | public class WaterFacilityParameterPO implements Serializable { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 设备id |
| | | */ |
| | | @TableField(value = "facility_id") |
| | | private Long facilityId; |
| | | /** |
| | | * 设备code |
| | | */ |
| | | @TableField(value = "facility_code") |
| | | private String facilityCode; |
| | | /** |
| | | * 参数编码 |
| | | */ |
| | | @TableField(value = "columns_code") |
| | | private String columnsCode; |
| | | /** |
| | | * 参数名称 |
| | | */ |
| | | @TableField(value = "columns_show") |
| | | private String columnsShow; |
| | | /** |
| | | * 参数单位 |
| | | */ |
| | | @TableField(value = "columns_units") |
| | | private String columnsUnits; |
| | | /** |
| | | * 数据创建时间 |
| | | */ |
| | | @TableField(value = "create_time") |
| | | private Long createTime; |
| | | /** |
| | | * 最后更新时间 |
| | | */ |
| | | @TableField(value = "update_time") |
| | | private Timestamp updateTime; |
| | | /** |
| | | * 是否删除(逻辑删除) |
| | | */ |
| | | @TableLogic |
| | | @TableField(value = "is_delete") |
| | | private Integer isDelete; |
| | | /** |
| | | * 参数值 |
| | | */ |
| | | @TableField(value = "column_value") |
| | | private String columnValue; |
| | | /** |
| | | * 最后更新时间 |
| | | */ |
| | | @TableField(value = "last_time") |
| | | private String lastTime; |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.repository.po; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import java.io.Serializable; |
| | | import java.sql.Timestamp; |
| | | |
| | | /** |
| | | * 设备类型 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | @TableName("water_facility_type") |
| | | public class WaterFacilityTypePO implements Serializable { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 编码 |
| | | */ |
| | | @TableField(value = "code") |
| | | private String code; |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @TableField(value = "name") |
| | | private String name; |
| | | /** |
| | | * 数据创建时间 |
| | | */ |
| | | @TableField(value = "create_time") |
| | | private Long createTime; |
| | | /** |
| | | * 编辑时间 |
| | | */ |
| | | @TableField(value = "update_time") |
| | | private Timestamp updateTime; |
| | | /** |
| | | * 是否删除(逻辑删除) |
| | | */ |
| | | @TableLogic |
| | | @TableField(value = "is_delete") |
| | | private Integer isDelete; |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.repository.po; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | |
| | | import java.io.Serializable; |
| | | import java.sql.Timestamp; |
| | | |
| | | /** |
| | | * 监控点 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | @TableName("water_monitory_point") |
| | | public class WaterMonitoryPointPO implements Serializable { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 监控点编号 |
| | | */ |
| | | @TableField(value = "point_code") |
| | | private String pointCode; |
| | | /** |
| | | * 监控点名称 |
| | | */ |
| | | @TableField(value = "point_name") |
| | | private String pointName; |
| | | /** |
| | | * 详细地址 |
| | | */ |
| | | @TableField(value = "address") |
| | | private String address; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @TableField(value = "remark") |
| | | private String remark; |
| | | /** |
| | | * 监控点图片 |
| | | */ |
| | | @TableField(value = "image_rul") |
| | | private String imageRul; |
| | | /** |
| | | * 数据创建时间 |
| | | */ |
| | | @TableField(value = "create_time") |
| | | private Long createTime; |
| | | /** |
| | | * 最后更新时间 |
| | | */ |
| | | @TableField(value = "update_time") |
| | | private Timestamp updateTime; |
| | | /** |
| | | * 是否删除(逻辑删除) |
| | | */ |
| | | @TableLogic |
| | | @TableField(value = "is_delete") |
| | | private Integer isDelete; |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.repository.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import com.fengdu.gas.common.util.LocalDateTimeUtil; |
| | | import com.fengdu.gas.common.util.NumericUtil; |
| | | import java.util.Objects; |
| | | import com.fengdu.gas.repository.po.FacilityAlarmRecordPO; |
| | | |
| | | /** |
| | | * 设备报警记录 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | public class FacilityAlarmRecordVO extends FacilityAlarmRecordPO implements BasicVO { |
| | | |
| | | @Override |
| | | public String getCreateTimeView() { |
| | | if (NumericUtil.tryParseLong(this.getCreateTime()).compareTo(0L) > 0) { |
| | | return LocalDateTimeUtil.toFormatString(this.getCreateTime()); |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | @Override |
| | | public String getUpdateTimeView() { |
| | | if (Objects.isNull(this.getUpdateTime())) { |
| | | return ""; |
| | | } |
| | | return LocalDateTimeUtil.toFormatFullString(this.getUpdateTime()); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.repository.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import com.fengdu.gas.common.util.LocalDateTimeUtil; |
| | | import com.fengdu.gas.common.util.NumericUtil; |
| | | import java.util.Objects; |
| | | import com.fengdu.gas.repository.po.SendMessageRecordPO; |
| | | |
| | | /** |
| | | * 消息发送记录 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | public class SendMessageRecordVO extends SendMessageRecordPO implements BasicVO { |
| | | |
| | | @Override |
| | | public String getCreateTimeView() { |
| | | if (NumericUtil.tryParseLong(this.getCreateTime()).compareTo(0L) > 0) { |
| | | return LocalDateTimeUtil.toFormatString(this.getCreateTime()); |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | @Override |
| | | public String getUpdateTimeView() { |
| | | if (Objects.isNull(this.getUpdateTime())) { |
| | | return ""; |
| | | } |
| | | return LocalDateTimeUtil.toFormatFullString(this.getUpdateTime()); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.repository.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import com.fengdu.gas.common.util.LocalDateTimeUtil; |
| | | import com.fengdu.gas.common.util.NumericUtil; |
| | | import java.util.Objects; |
| | | import com.fengdu.gas.repository.po.WaterFacilityParameterPO; |
| | | |
| | | /** |
| | | * 设备设定参数 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | public class WaterFacilityParameterVO extends WaterFacilityParameterPO implements BasicVO { |
| | | |
| | | @Override |
| | | public String getCreateTimeView() { |
| | | if (NumericUtil.tryParseLong(this.getCreateTime()).compareTo(0L) > 0) { |
| | | return LocalDateTimeUtil.toFormatString(this.getCreateTime()); |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | @Override |
| | | public String getUpdateTimeView() { |
| | | if (Objects.isNull(this.getUpdateTime())) { |
| | | return ""; |
| | | } |
| | | return LocalDateTimeUtil.toFormatFullString(this.getUpdateTime()); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.repository.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import com.fengdu.gas.common.util.LocalDateTimeUtil; |
| | | import com.fengdu.gas.common.util.NumericUtil; |
| | | import java.util.Objects; |
| | | import com.fengdu.gas.repository.po.WaterFacilityTypePO; |
| | | |
| | | /** |
| | | * 设备类型 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | public class WaterFacilityTypeVO extends WaterFacilityTypePO implements BasicVO { |
| | | |
| | | @Override |
| | | public String getCreateTimeView() { |
| | | if (NumericUtil.tryParseLong(this.getCreateTime()).compareTo(0L) > 0) { |
| | | return LocalDateTimeUtil.toFormatString(this.getCreateTime()); |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | @Override |
| | | public String getUpdateTimeView() { |
| | | if (Objects.isNull(this.getUpdateTime())) { |
| | | return ""; |
| | | } |
| | | return LocalDateTimeUtil.toFormatFullString(this.getUpdateTime()); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.repository.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import com.fengdu.gas.common.util.LocalDateTimeUtil; |
| | | import com.fengdu.gas.common.util.NumericUtil; |
| | | import java.util.Objects; |
| | | import com.fengdu.gas.repository.po.WaterFacilityPO; |
| | | |
| | | /** |
| | | * 设备信息 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | public class WaterFacilityVO extends WaterFacilityPO implements BasicVO { |
| | | |
| | | @Override |
| | | public String getCreateTimeView() { |
| | | if (NumericUtil.tryParseLong(this.getCreateTime()).compareTo(0L) > 0) { |
| | | return LocalDateTimeUtil.toFormatString(this.getCreateTime()); |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | @Override |
| | | public String getUpdateTimeView() { |
| | | if (Objects.isNull(this.getUpdateTime())) { |
| | | return ""; |
| | | } |
| | | return LocalDateTimeUtil.toFormatFullString(this.getUpdateTime()); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.repository.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import com.fengdu.gas.common.util.LocalDateTimeUtil; |
| | | import com.fengdu.gas.common.util.NumericUtil; |
| | | import java.util.Objects; |
| | | import com.fengdu.gas.repository.po.WaterMonitoryPointPO; |
| | | |
| | | /** |
| | | * 监控点 |
| | | * @author zr |
| | | */ |
| | | @Data |
| | | public class WaterMonitoryPointVO extends WaterMonitoryPointPO implements BasicVO { |
| | | |
| | | @Override |
| | | public String getCreateTimeView() { |
| | | if (NumericUtil.tryParseLong(this.getCreateTime()).compareTo(0L) > 0) { |
| | | return LocalDateTimeUtil.toFormatString(this.getCreateTime()); |
| | | } |
| | | return ""; |
| | | } |
| | | |
| | | @Override |
| | | public String getUpdateTimeView() { |
| | | if (Objects.isNull(this.getUpdateTime())) { |
| | | return ""; |
| | | } |
| | | return LocalDateTimeUtil.toFormatFullString(this.getUpdateTime()); |
| | | } |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.service; |
| | | |
| | | import com.fengdu.gas.common.*; |
| | | import com.fengdu.gas.common.enums.*; |
| | | import com.fengdu.gas.common.model.Tuple; |
| | | import com.fengdu.gas.common.util.*; |
| | | import org.apache.commons.lang3.BooleanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | import com.fengdu.gas.repository.impl.FacilityAlarmRecordMapperImpl; |
| | | import com.fengdu.gas.repository.po.FacilityAlarmRecordPO; |
| | | import com.fengdu.gas.entity.request.facilityalarmrecord.ReqCreateFacilityAlarmRecord; |
| | | import com.fengdu.gas.entity.request.facilityalarmrecord.ReqModifyFacilityAlarmRecord; |
| | | import com.fengdu.gas.entity.search.SearchFacilityAlarmRecord; |
| | | import com.fengdu.gas.repository.vo.FacilityAlarmRecordVO; |
| | | import com.fengdu.gas.service.convert.FacilityAlarmRecordConvert; |
| | | |
| | | /** |
| | | * 设备报警记录 |
| | | * @author zr |
| | | */ |
| | | @Service |
| | | public class FacilityAlarmRecordService extends BaseService { |
| | | @Autowired |
| | | private FacilityAlarmRecordMapperImpl mapper; |
| | | |
| | | public ExecutedResult<Long> create(ReqCreateFacilityAlarmRecord request) { |
| | | // 转换po |
| | | FacilityAlarmRecordPO item = FacilityAlarmRecordConvert.INSTANCE.toCreate(request); |
| | | // 设置状态 |
| | | //item.setStatus(EState.NORMAL.getValue()); |
| | | // 设置记录创建时间 |
| | | item.setCreateTime(LocalDateTimeUtil.nowTimeStamp()); |
| | | // 是否删除(逻辑删除)初始值 |
| | | item.setIsDelete(EYesOrNo.NO.getValue()); |
| | | |
| | | int rowCount = mapper.insert(item); |
| | | if (rowCount != 1) { |
| | | return ExecutedResult.failed("创建[设备报警记录]失败。"); |
| | | } |
| | | return ExecutedResult.success(item.getId()); |
| | | } |
| | | |
| | | public ExecutedResult<String> modify(ReqModifyFacilityAlarmRecord request) { |
| | | // 验证记录是否存在 |
| | | ExecutedResult<FacilityAlarmRecordPO> checkExists = this.check4Id(request.getId()); |
| | | if (checkExists.isFailed()) { |
| | | return ExecutedResult.failed(checkExists.getMsg()); |
| | | } |
| | | // 转换po |
| | | FacilityAlarmRecordPO item = FacilityAlarmRecordConvert.INSTANCE.toModify(request); |
| | | |
| | | int rowCount = mapper.updateById(item); |
| | | if (rowCount != 1) { |
| | | return ExecutedResult.failed("编辑[设备报警记录]失败。"); |
| | | } |
| | | return ExecutedResult.success(); |
| | | } |
| | | |
| | | public ExecutedResult<FacilityAlarmRecordVO> get(Long id) { |
| | | FacilityAlarmRecordVO result = new FacilityAlarmRecordVO(); |
| | | |
| | | FacilityAlarmRecordPO find = mapper.get(id); |
| | | if (null != find) { |
| | | // 转换vo |
| | | result = FacilityAlarmRecordConvert.INSTANCE.toVo(find); |
| | | } |
| | | return ExecutedResult.success(result); |
| | | } |
| | | |
| | | // public ExecutedResult<String> stop(Long id) { |
| | | // // 验证记录是否存在 |
| | | // ExecutedResult<FacilityAlarmRecordPO> checkExists = this.check4Id(id); |
| | | // if (checkExists.isFailed()) { |
| | | // return ExecutedResult.failed(checkExists.getMsg()); |
| | | // } |
| | | // FacilityAlarmRecordPO item = new FacilityAlarmRecordPO(); |
| | | // item.setId(id); |
| | | // item.setStatus(EState.DISABLED.getValue()); |
| | | // |
| | | // int rowCount = mapper.updateById(item); |
| | | // if (rowCount != 1) { |
| | | // return ExecutedResult.failed("停用[设备报警记录]失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> enable(Long id) { |
| | | // // 验证记录是否存在 |
| | | // ExecutedResult<FacilityAlarmRecordPO> checkExists = this.check4Id(id); |
| | | // if (checkExists.isFailed()) { |
| | | // return ExecutedResult.failed(checkExists.getMsg()); |
| | | // } |
| | | // FacilityAlarmRecordPO item = new FacilityAlarmRecordPO(); |
| | | // item.setId(id); |
| | | // item.setStatus(EState.NORMAL.getValue()); |
| | | // |
| | | // int rowCount = mapper.updateById(item); |
| | | // if (rowCount != 1) { |
| | | // return ExecutedResult.failed("启用[设备报警记录]失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> setSort(ReqSetSort request) { |
| | | // // 验证记录是否存在 |
| | | // ExecutedResult<FacilityAlarmRecordPO> checkExists = this.check4Id(request.getId()); |
| | | // if (checkExists.isFailed()) { |
| | | // return ExecutedResult.failed(checkExists.getMsg()); |
| | | // } |
| | | // FacilityAlarmRecordPO item = new FacilityAlarmRecordPO(); |
| | | // item.setId(request.getId()); |
| | | // item.setSort(request.getSort()); |
| | | // |
| | | // int rowCount = mapper.updateById(item); |
| | | // if (rowCount != 1) { |
| | | // return ExecutedResult.failed("设置[设备报警记录]排序值失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> listSetSort(ReqListSetSort request) { |
| | | // // id列表 |
| | | // List<Long> listId = request.getList().stream().map(ReqSetSort::getId).collect(Collectors.toList()); |
| | | // // 验证记录是否存在 |
| | | // ExecutedResult<List<FacilityAlarmRecordPO>> checkExists = this.check4Id(listId); |
| | | // if (checkExists.isFailed()) { |
| | | // return ExecutedResult.failed(checkExists.getMsg()); |
| | | // } |
| | | // |
| | | // List<FacilityAlarmRecordPO> listUpdate = request.getList().stream() |
| | | // .map(c -> { |
| | | // FacilityAlarmRecordPO item = new FacilityAlarmRecordPO(); |
| | | // item.setId(c.getId()); |
| | | // item.setSort(c.getSort()); |
| | | // return item; |
| | | // }) |
| | | // .collect(Collectors.toList()); |
| | | // Boolean result = mapper.modifyList(listUpdate); |
| | | // if (result) { |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // return ExecutedResult.failed("[设备报警记录]设置排序值失败"); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> remove(Long id) { |
| | | // Boolean result = mapper.deleteLogic(id); |
| | | // if (BooleanUtils.isFalse(result)) { |
| | | // return ExecutedResult.failed("删除[设备报警记录]失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> removeList(List<Long> ids) { |
| | | // Boolean result = mapper.deleteLogic(ids); |
| | | // if (BooleanUtils.isFalse(result)) { |
| | | // return ExecutedResult.failed("删除[设备报警记录]失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | |
| | | public ExecutedResult<List<FacilityAlarmRecordVO>> getList(List<Long> listId) { |
| | | List<FacilityAlarmRecordVO> result = new ArrayList<>(); |
| | | |
| | | List<FacilityAlarmRecordPO> list = mapper.getList(listId); |
| | | if (ListUtil.isNotNullOrEmpty(list)) { |
| | | // 转换vo |
| | | result = FacilityAlarmRecordConvert.INSTANCE.toVo(list); |
| | | } |
| | | return ExecutedResult.success(result); |
| | | } |
| | | |
| | | public ExecutedResult<PagerResult<FacilityAlarmRecordVO>> search(SearchFacilityAlarmRecord search) { |
| | | // 处理创建时间范围-查询参数 |
| | | Tuple<String, String> createTimeRange = ParameterUtil.getTimeRange(search.getCreateTimeRange()); |
| | | if (StringUtil.isNotNullOrEmpty(createTimeRange.getItem1())) { |
| | | search.setCreateTimeStart(LocalDateTimeUtil.getTimeStamp(createTimeRange.getItem1()).getTime()); |
| | | } |
| | | if (StringUtil.isNotNullOrEmpty(createTimeRange.getItem2())) { |
| | | search.setCreateTimeEnd(LocalDateTimeUtil.getTimeStamp(createTimeRange.getItem2()).getTime()); |
| | | } |
| | | |
| | | PagerResult<FacilityAlarmRecordPO> pageList = mapper.search(search); |
| | | List<FacilityAlarmRecordVO> listVo = new ArrayList<>(); |
| | | List<FacilityAlarmRecordPO> list = pageList.getList(); |
| | | if (ListUtil.isNotNullOrEmpty(list)) { |
| | | pageList.setLastId(list.get(list.size() - 1).getId()); |
| | | // 转换vo |
| | | listVo = FacilityAlarmRecordConvert.INSTANCE.toVo(list); |
| | | } |
| | | PagerResult<FacilityAlarmRecordVO> result = new PagerResult<>(pageList.getLimit(), pageList.getPage(), pageList.getTotal(), listVo); |
| | | result.setLastId(pageList.getLastId()); |
| | | return ExecutedResult.success(result); |
| | | } |
| | | |
| | | protected ExecutedResult<FacilityAlarmRecordPO> check4Id(Long id) { |
| | | FacilityAlarmRecordPO exists = mapper.get(id); |
| | | if (Objects.isNull(exists)) { |
| | | return ExecutedResult.failed("[设备报警记录]不存在:" + id); |
| | | } |
| | | return ExecutedResult.success(exists); |
| | | } |
| | | protected ExecutedResult<List<FacilityAlarmRecordPO>> check4Id(List<Long> listId) { |
| | | // 从数据库查找设备报警记录 |
| | | List<FacilityAlarmRecordPO> list = mapper.getList(listId); |
| | | if (ListUtil.isNullOrEmpty(list)) { |
| | | return ExecutedResult.failed("[设备报警记录]不存在." + listId); |
| | | } |
| | | // 数据库找到的id列表 |
| | | List<Long> listIdFind = list.stream().map(FacilityAlarmRecordPO::getId).collect(Collectors.toList()); |
| | | // 数量不一致 |
| | | if (listId.size() != listIdFind.size()) { |
| | | // 筛选数据库不存在的设备报警记录 |
| | | List<Long> listIdNotFound = listId.stream().filter(c -> !listIdFind.contains(c)).collect(Collectors.toList()); |
| | | if (ListUtil.isNullOrEmpty(list)) { |
| | | return ExecutedResult.failed("[设备报警记录]不存在." + listIdNotFound); |
| | | } |
| | | } |
| | | return ExecutedResult.success(list); |
| | | }} |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.service; |
| | | |
| | | import com.fengdu.gas.common.*; |
| | | import com.fengdu.gas.common.enums.*; |
| | | import com.fengdu.gas.common.model.Tuple; |
| | | import com.fengdu.gas.common.util.*; |
| | | import org.apache.commons.lang3.BooleanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | import com.fengdu.gas.repository.impl.SendMessageRecordMapperImpl; |
| | | import com.fengdu.gas.repository.po.SendMessageRecordPO; |
| | | import com.fengdu.gas.entity.request.sendmessagerecord.ReqCreateSendMessageRecord; |
| | | import com.fengdu.gas.entity.request.sendmessagerecord.ReqModifySendMessageRecord; |
| | | import com.fengdu.gas.entity.search.SearchSendMessageRecord; |
| | | import com.fengdu.gas.repository.vo.SendMessageRecordVO; |
| | | import com.fengdu.gas.service.convert.SendMessageRecordConvert; |
| | | |
| | | /** |
| | | * 消息发送记录 |
| | | * @author zr |
| | | */ |
| | | @Service |
| | | public class SendMessageRecordService extends BaseService { |
| | | @Autowired |
| | | private SendMessageRecordMapperImpl mapper; |
| | | |
| | | public ExecutedResult<Long> create(ReqCreateSendMessageRecord request) { |
| | | // 转换po |
| | | SendMessageRecordPO item = SendMessageRecordConvert.INSTANCE.toCreate(request); |
| | | // 设置状态 |
| | | //item.setStatus(EState.NORMAL.getValue()); |
| | | // 设置记录创建时间 |
| | | item.setCreateTime(LocalDateTimeUtil.nowTimeStamp()); |
| | | // 是否删除(逻辑删除)初始值 |
| | | item.setIsDelete(EYesOrNo.NO.getValue()); |
| | | |
| | | int rowCount = mapper.insert(item); |
| | | if (rowCount != 1) { |
| | | return ExecutedResult.failed("创建[消息发送记录]失败。"); |
| | | } |
| | | return ExecutedResult.success(item.getId()); |
| | | } |
| | | |
| | | public ExecutedResult<String> modify(ReqModifySendMessageRecord request) { |
| | | // 验证记录是否存在 |
| | | ExecutedResult<SendMessageRecordPO> checkExists = this.check4Id(request.getId()); |
| | | if (checkExists.isFailed()) { |
| | | return ExecutedResult.failed(checkExists.getMsg()); |
| | | } |
| | | // 转换po |
| | | SendMessageRecordPO item = SendMessageRecordConvert.INSTANCE.toModify(request); |
| | | |
| | | int rowCount = mapper.updateById(item); |
| | | if (rowCount != 1) { |
| | | return ExecutedResult.failed("编辑[消息发送记录]失败。"); |
| | | } |
| | | return ExecutedResult.success(); |
| | | } |
| | | |
| | | public ExecutedResult<SendMessageRecordVO> get(Long id) { |
| | | SendMessageRecordVO result = new SendMessageRecordVO(); |
| | | |
| | | SendMessageRecordPO find = mapper.get(id); |
| | | if (null != find) { |
| | | // 转换vo |
| | | result = SendMessageRecordConvert.INSTANCE.toVo(find); |
| | | } |
| | | return ExecutedResult.success(result); |
| | | } |
| | | |
| | | // public ExecutedResult<String> stop(Long id) { |
| | | // // 验证记录是否存在 |
| | | // ExecutedResult<SendMessageRecordPO> checkExists = this.check4Id(id); |
| | | // if (checkExists.isFailed()) { |
| | | // return ExecutedResult.failed(checkExists.getMsg()); |
| | | // } |
| | | // SendMessageRecordPO item = new SendMessageRecordPO(); |
| | | // item.setId(id); |
| | | // item.setStatus(EState.DISABLED.getValue()); |
| | | // |
| | | // int rowCount = mapper.updateById(item); |
| | | // if (rowCount != 1) { |
| | | // return ExecutedResult.failed("停用[消息发送记录]失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> enable(Long id) { |
| | | // // 验证记录是否存在 |
| | | // ExecutedResult<SendMessageRecordPO> checkExists = this.check4Id(id); |
| | | // if (checkExists.isFailed()) { |
| | | // return ExecutedResult.failed(checkExists.getMsg()); |
| | | // } |
| | | // SendMessageRecordPO item = new SendMessageRecordPO(); |
| | | // item.setId(id); |
| | | // item.setStatus(EState.NORMAL.getValue()); |
| | | // |
| | | // int rowCount = mapper.updateById(item); |
| | | // if (rowCount != 1) { |
| | | // return ExecutedResult.failed("启用[消息发送记录]失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> setSort(ReqSetSort request) { |
| | | // // 验证记录是否存在 |
| | | // ExecutedResult<SendMessageRecordPO> checkExists = this.check4Id(request.getId()); |
| | | // if (checkExists.isFailed()) { |
| | | // return ExecutedResult.failed(checkExists.getMsg()); |
| | | // } |
| | | // SendMessageRecordPO item = new SendMessageRecordPO(); |
| | | // item.setId(request.getId()); |
| | | // item.setSort(request.getSort()); |
| | | // |
| | | // int rowCount = mapper.updateById(item); |
| | | // if (rowCount != 1) { |
| | | // return ExecutedResult.failed("设置[消息发送记录]排序值失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> listSetSort(ReqListSetSort request) { |
| | | // // id列表 |
| | | // List<Long> listId = request.getList().stream().map(ReqSetSort::getId).collect(Collectors.toList()); |
| | | // // 验证记录是否存在 |
| | | // ExecutedResult<List<SendMessageRecordPO>> checkExists = this.check4Id(listId); |
| | | // if (checkExists.isFailed()) { |
| | | // return ExecutedResult.failed(checkExists.getMsg()); |
| | | // } |
| | | // |
| | | // List<SendMessageRecordPO> listUpdate = request.getList().stream() |
| | | // .map(c -> { |
| | | // SendMessageRecordPO item = new SendMessageRecordPO(); |
| | | // item.setId(c.getId()); |
| | | // item.setSort(c.getSort()); |
| | | // return item; |
| | | // }) |
| | | // .collect(Collectors.toList()); |
| | | // Boolean result = mapper.modifyList(listUpdate); |
| | | // if (result) { |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // return ExecutedResult.failed("[消息发送记录]设置排序值失败"); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> remove(Long id) { |
| | | // Boolean result = mapper.deleteLogic(id); |
| | | // if (BooleanUtils.isFalse(result)) { |
| | | // return ExecutedResult.failed("删除[消息发送记录]失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> removeList(List<Long> ids) { |
| | | // Boolean result = mapper.deleteLogic(ids); |
| | | // if (BooleanUtils.isFalse(result)) { |
| | | // return ExecutedResult.failed("删除[消息发送记录]失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | |
| | | public ExecutedResult<List<SendMessageRecordVO>> getList(List<Long> listId) { |
| | | List<SendMessageRecordVO> result = new ArrayList<>(); |
| | | |
| | | List<SendMessageRecordPO> list = mapper.getList(listId); |
| | | if (ListUtil.isNotNullOrEmpty(list)) { |
| | | // 转换vo |
| | | result = SendMessageRecordConvert.INSTANCE.toVo(list); |
| | | } |
| | | return ExecutedResult.success(result); |
| | | } |
| | | |
| | | public ExecutedResult<PagerResult<SendMessageRecordVO>> search(SearchSendMessageRecord search) { |
| | | // 处理创建时间范围-查询参数 |
| | | Tuple<String, String> createTimeRange = ParameterUtil.getTimeRange(search.getCreateTimeRange()); |
| | | if (StringUtil.isNotNullOrEmpty(createTimeRange.getItem1())) { |
| | | search.setCreateTimeStart(LocalDateTimeUtil.getTimeStamp(createTimeRange.getItem1()).getTime()); |
| | | } |
| | | if (StringUtil.isNotNullOrEmpty(createTimeRange.getItem2())) { |
| | | search.setCreateTimeEnd(LocalDateTimeUtil.getTimeStamp(createTimeRange.getItem2()).getTime()); |
| | | } |
| | | |
| | | PagerResult<SendMessageRecordPO> pageList = mapper.search(search); |
| | | List<SendMessageRecordVO> listVo = new ArrayList<>(); |
| | | List<SendMessageRecordPO> list = pageList.getList(); |
| | | if (ListUtil.isNotNullOrEmpty(list)) { |
| | | pageList.setLastId(list.get(list.size() - 1).getId()); |
| | | // 转换vo |
| | | listVo = SendMessageRecordConvert.INSTANCE.toVo(list); |
| | | } |
| | | PagerResult<SendMessageRecordVO> result = new PagerResult<>(pageList.getLimit(), pageList.getPage(), pageList.getTotal(), listVo); |
| | | result.setLastId(pageList.getLastId()); |
| | | return ExecutedResult.success(result); |
| | | } |
| | | |
| | | protected ExecutedResult<SendMessageRecordPO> check4Id(Long id) { |
| | | SendMessageRecordPO exists = mapper.get(id); |
| | | if (Objects.isNull(exists)) { |
| | | return ExecutedResult.failed("[消息发送记录]不存在:" + id); |
| | | } |
| | | return ExecutedResult.success(exists); |
| | | } |
| | | protected ExecutedResult<List<SendMessageRecordPO>> check4Id(List<Long> listId) { |
| | | // 从数据库查找消息发送记录 |
| | | List<SendMessageRecordPO> list = mapper.getList(listId); |
| | | if (ListUtil.isNullOrEmpty(list)) { |
| | | return ExecutedResult.failed("[消息发送记录]不存在." + listId); |
| | | } |
| | | // 数据库找到的id列表 |
| | | List<Long> listIdFind = list.stream().map(SendMessageRecordPO::getId).collect(Collectors.toList()); |
| | | // 数量不一致 |
| | | if (listId.size() != listIdFind.size()) { |
| | | // 筛选数据库不存在的消息发送记录 |
| | | List<Long> listIdNotFound = listId.stream().filter(c -> !listIdFind.contains(c)).collect(Collectors.toList()); |
| | | if (ListUtil.isNullOrEmpty(list)) { |
| | | return ExecutedResult.failed("[消息发送记录]不存在." + listIdNotFound); |
| | | } |
| | | } |
| | | return ExecutedResult.success(list); |
| | | }} |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.service; |
| | | |
| | | import com.fengdu.gas.common.*; |
| | | import com.fengdu.gas.common.enums.*; |
| | | import com.fengdu.gas.common.model.Tuple; |
| | | import com.fengdu.gas.common.util.*; |
| | | import org.apache.commons.lang3.BooleanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | import com.fengdu.gas.repository.impl.WaterFacilityParameterMapperImpl; |
| | | import com.fengdu.gas.repository.po.WaterFacilityParameterPO; |
| | | import com.fengdu.gas.entity.request.waterfacilityparameter.ReqCreateWaterFacilityParameter; |
| | | import com.fengdu.gas.entity.request.waterfacilityparameter.ReqModifyWaterFacilityParameter; |
| | | import com.fengdu.gas.entity.search.SearchWaterFacilityParameter; |
| | | import com.fengdu.gas.repository.vo.WaterFacilityParameterVO; |
| | | import com.fengdu.gas.service.convert.WaterFacilityParameterConvert; |
| | | |
| | | /** |
| | | * 设备设定参数 |
| | | * @author zr |
| | | */ |
| | | @Service |
| | | public class WaterFacilityParameterService extends BaseService { |
| | | @Autowired |
| | | private WaterFacilityParameterMapperImpl mapper; |
| | | |
| | | public ExecutedResult<Long> create(ReqCreateWaterFacilityParameter request) { |
| | | // 转换po |
| | | WaterFacilityParameterPO item = WaterFacilityParameterConvert.INSTANCE.toCreate(request); |
| | | // 设置状态 |
| | | //item.setStatus(EState.NORMAL.getValue()); |
| | | // 设置记录创建时间 |
| | | item.setCreateTime(LocalDateTimeUtil.nowTimeStamp()); |
| | | // 是否删除(逻辑删除)初始值 |
| | | item.setIsDelete(EYesOrNo.NO.getValue()); |
| | | |
| | | int rowCount = mapper.insert(item); |
| | | if (rowCount != 1) { |
| | | return ExecutedResult.failed("创建[设备设定参数]失败。"); |
| | | } |
| | | return ExecutedResult.success(item.getId()); |
| | | } |
| | | |
| | | public ExecutedResult<String> modify(ReqModifyWaterFacilityParameter request) { |
| | | // 验证记录是否存在 |
| | | ExecutedResult<WaterFacilityParameterPO> checkExists = this.check4Id(request.getId()); |
| | | if (checkExists.isFailed()) { |
| | | return ExecutedResult.failed(checkExists.getMsg()); |
| | | } |
| | | // 转换po |
| | | WaterFacilityParameterPO item = WaterFacilityParameterConvert.INSTANCE.toModify(request); |
| | | |
| | | int rowCount = mapper.updateById(item); |
| | | if (rowCount != 1) { |
| | | return ExecutedResult.failed("编辑[设备设定参数]失败。"); |
| | | } |
| | | return ExecutedResult.success(); |
| | | } |
| | | |
| | | public ExecutedResult<WaterFacilityParameterVO> get(Long id) { |
| | | WaterFacilityParameterVO result = new WaterFacilityParameterVO(); |
| | | |
| | | WaterFacilityParameterPO find = mapper.get(id); |
| | | if (null != find) { |
| | | // 转换vo |
| | | result = WaterFacilityParameterConvert.INSTANCE.toVo(find); |
| | | } |
| | | return ExecutedResult.success(result); |
| | | } |
| | | |
| | | // public ExecutedResult<String> stop(Long id) { |
| | | // // 验证记录是否存在 |
| | | // ExecutedResult<WaterFacilityParameterPO> checkExists = this.check4Id(id); |
| | | // if (checkExists.isFailed()) { |
| | | // return ExecutedResult.failed(checkExists.getMsg()); |
| | | // } |
| | | // WaterFacilityParameterPO item = new WaterFacilityParameterPO(); |
| | | // item.setId(id); |
| | | // item.setStatus(EState.DISABLED.getValue()); |
| | | // |
| | | // int rowCount = mapper.updateById(item); |
| | | // if (rowCount != 1) { |
| | | // return ExecutedResult.failed("停用[设备设定参数]失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> enable(Long id) { |
| | | // // 验证记录是否存在 |
| | | // ExecutedResult<WaterFacilityParameterPO> checkExists = this.check4Id(id); |
| | | // if (checkExists.isFailed()) { |
| | | // return ExecutedResult.failed(checkExists.getMsg()); |
| | | // } |
| | | // WaterFacilityParameterPO item = new WaterFacilityParameterPO(); |
| | | // item.setId(id); |
| | | // item.setStatus(EState.NORMAL.getValue()); |
| | | // |
| | | // int rowCount = mapper.updateById(item); |
| | | // if (rowCount != 1) { |
| | | // return ExecutedResult.failed("启用[设备设定参数]失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> setSort(ReqSetSort request) { |
| | | // // 验证记录是否存在 |
| | | // ExecutedResult<WaterFacilityParameterPO> checkExists = this.check4Id(request.getId()); |
| | | // if (checkExists.isFailed()) { |
| | | // return ExecutedResult.failed(checkExists.getMsg()); |
| | | // } |
| | | // WaterFacilityParameterPO item = new WaterFacilityParameterPO(); |
| | | // item.setId(request.getId()); |
| | | // item.setSort(request.getSort()); |
| | | // |
| | | // int rowCount = mapper.updateById(item); |
| | | // if (rowCount != 1) { |
| | | // return ExecutedResult.failed("设置[设备设定参数]排序值失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> listSetSort(ReqListSetSort request) { |
| | | // // id列表 |
| | | // List<Long> listId = request.getList().stream().map(ReqSetSort::getId).collect(Collectors.toList()); |
| | | // // 验证记录是否存在 |
| | | // ExecutedResult<List<WaterFacilityParameterPO>> checkExists = this.check4Id(listId); |
| | | // if (checkExists.isFailed()) { |
| | | // return ExecutedResult.failed(checkExists.getMsg()); |
| | | // } |
| | | // |
| | | // List<WaterFacilityParameterPO> listUpdate = request.getList().stream() |
| | | // .map(c -> { |
| | | // WaterFacilityParameterPO item = new WaterFacilityParameterPO(); |
| | | // item.setId(c.getId()); |
| | | // item.setSort(c.getSort()); |
| | | // return item; |
| | | // }) |
| | | // .collect(Collectors.toList()); |
| | | // Boolean result = mapper.modifyList(listUpdate); |
| | | // if (result) { |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // return ExecutedResult.failed("[设备设定参数]设置排序值失败"); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> remove(Long id) { |
| | | // Boolean result = mapper.deleteLogic(id); |
| | | // if (BooleanUtils.isFalse(result)) { |
| | | // return ExecutedResult.failed("删除[设备设定参数]失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> removeList(List<Long> ids) { |
| | | // Boolean result = mapper.deleteLogic(ids); |
| | | // if (BooleanUtils.isFalse(result)) { |
| | | // return ExecutedResult.failed("删除[设备设定参数]失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | |
| | | public ExecutedResult<List<WaterFacilityParameterVO>> getList(List<Long> listId) { |
| | | List<WaterFacilityParameterVO> result = new ArrayList<>(); |
| | | |
| | | List<WaterFacilityParameterPO> list = mapper.getList(listId); |
| | | if (ListUtil.isNotNullOrEmpty(list)) { |
| | | // 转换vo |
| | | result = WaterFacilityParameterConvert.INSTANCE.toVo(list); |
| | | } |
| | | return ExecutedResult.success(result); |
| | | } |
| | | |
| | | public ExecutedResult<PagerResult<WaterFacilityParameterVO>> search(SearchWaterFacilityParameter search) { |
| | | // 处理创建时间范围-查询参数 |
| | | Tuple<String, String> createTimeRange = ParameterUtil.getTimeRange(search.getCreateTimeRange()); |
| | | if (StringUtil.isNotNullOrEmpty(createTimeRange.getItem1())) { |
| | | search.setCreateTimeStart(LocalDateTimeUtil.getTimeStamp(createTimeRange.getItem1()).getTime()); |
| | | } |
| | | if (StringUtil.isNotNullOrEmpty(createTimeRange.getItem2())) { |
| | | search.setCreateTimeEnd(LocalDateTimeUtil.getTimeStamp(createTimeRange.getItem2()).getTime()); |
| | | } |
| | | |
| | | PagerResult<WaterFacilityParameterPO> pageList = mapper.search(search); |
| | | List<WaterFacilityParameterVO> listVo = new ArrayList<>(); |
| | | List<WaterFacilityParameterPO> list = pageList.getList(); |
| | | if (ListUtil.isNotNullOrEmpty(list)) { |
| | | pageList.setLastId(list.get(list.size() - 1).getId()); |
| | | // 转换vo |
| | | listVo = WaterFacilityParameterConvert.INSTANCE.toVo(list); |
| | | } |
| | | PagerResult<WaterFacilityParameterVO> result = new PagerResult<>(pageList.getLimit(), pageList.getPage(), pageList.getTotal(), listVo); |
| | | result.setLastId(pageList.getLastId()); |
| | | return ExecutedResult.success(result); |
| | | } |
| | | |
| | | protected ExecutedResult<WaterFacilityParameterPO> check4Id(Long id) { |
| | | WaterFacilityParameterPO exists = mapper.get(id); |
| | | if (Objects.isNull(exists)) { |
| | | return ExecutedResult.failed("[设备设定参数]不存在:" + id); |
| | | } |
| | | return ExecutedResult.success(exists); |
| | | } |
| | | protected ExecutedResult<List<WaterFacilityParameterPO>> check4Id(List<Long> listId) { |
| | | // 从数据库查找设备设定参数 |
| | | List<WaterFacilityParameterPO> list = mapper.getList(listId); |
| | | if (ListUtil.isNullOrEmpty(list)) { |
| | | return ExecutedResult.failed("[设备设定参数]不存在." + listId); |
| | | } |
| | | // 数据库找到的id列表 |
| | | List<Long> listIdFind = list.stream().map(WaterFacilityParameterPO::getId).collect(Collectors.toList()); |
| | | // 数量不一致 |
| | | if (listId.size() != listIdFind.size()) { |
| | | // 筛选数据库不存在的设备设定参数 |
| | | List<Long> listIdNotFound = listId.stream().filter(c -> !listIdFind.contains(c)).collect(Collectors.toList()); |
| | | if (ListUtil.isNullOrEmpty(list)) { |
| | | return ExecutedResult.failed("[设备设定参数]不存在." + listIdNotFound); |
| | | } |
| | | } |
| | | return ExecutedResult.success(list); |
| | | }} |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.service; |
| | | |
| | | import com.fengdu.gas.common.*; |
| | | import com.fengdu.gas.common.enums.*; |
| | | import com.fengdu.gas.common.model.Tuple; |
| | | import com.fengdu.gas.common.util.*; |
| | | import org.apache.commons.lang3.BooleanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | import com.fengdu.gas.repository.impl.WaterFacilityMapperImpl; |
| | | import com.fengdu.gas.repository.po.WaterFacilityPO; |
| | | import com.fengdu.gas.entity.request.waterfacility.ReqCreateWaterFacility; |
| | | import com.fengdu.gas.entity.request.waterfacility.ReqModifyWaterFacility; |
| | | import com.fengdu.gas.entity.search.SearchWaterFacility; |
| | | import com.fengdu.gas.repository.vo.WaterFacilityVO; |
| | | import com.fengdu.gas.service.convert.WaterFacilityConvert; |
| | | |
| | | /** |
| | | * 设备信息 |
| | | * @author zr |
| | | */ |
| | | @Service |
| | | public class WaterFacilityService extends BaseService { |
| | | @Autowired |
| | | private WaterFacilityMapperImpl mapper; |
| | | |
| | | public ExecutedResult<Long> create(ReqCreateWaterFacility request) { |
| | | // 转换po |
| | | WaterFacilityPO item = WaterFacilityConvert.INSTANCE.toCreate(request); |
| | | // 设置状态 |
| | | //item.setStatus(EState.NORMAL.getValue()); |
| | | // 设置记录创建时间 |
| | | item.setCreateTime(LocalDateTimeUtil.nowTimeStamp()); |
| | | // 是否删除(逻辑删除)初始值 |
| | | item.setIsDelete(EYesOrNo.NO.getValue()); |
| | | |
| | | int rowCount = mapper.insert(item); |
| | | if (rowCount != 1) { |
| | | return ExecutedResult.failed("创建[设备信息]失败。"); |
| | | } |
| | | return ExecutedResult.success(item.getId()); |
| | | } |
| | | |
| | | public ExecutedResult<String> modify(ReqModifyWaterFacility request) { |
| | | // 验证记录是否存在 |
| | | ExecutedResult<WaterFacilityPO> checkExists = this.check4Id(request.getId()); |
| | | if (checkExists.isFailed()) { |
| | | return ExecutedResult.failed(checkExists.getMsg()); |
| | | } |
| | | // 转换po |
| | | WaterFacilityPO item = WaterFacilityConvert.INSTANCE.toModify(request); |
| | | |
| | | int rowCount = mapper.updateById(item); |
| | | if (rowCount != 1) { |
| | | return ExecutedResult.failed("编辑[设备信息]失败。"); |
| | | } |
| | | return ExecutedResult.success(); |
| | | } |
| | | |
| | | public ExecutedResult<WaterFacilityVO> get(Long id) { |
| | | WaterFacilityVO result = new WaterFacilityVO(); |
| | | |
| | | WaterFacilityPO find = mapper.get(id); |
| | | if (null != find) { |
| | | // 转换vo |
| | | result = WaterFacilityConvert.INSTANCE.toVo(find); |
| | | } |
| | | return ExecutedResult.success(result); |
| | | } |
| | | |
| | | // public ExecutedResult<String> stop(Long id) { |
| | | // // 验证记录是否存在 |
| | | // ExecutedResult<WaterFacilityPO> checkExists = this.check4Id(id); |
| | | // if (checkExists.isFailed()) { |
| | | // return ExecutedResult.failed(checkExists.getMsg()); |
| | | // } |
| | | // WaterFacilityPO item = new WaterFacilityPO(); |
| | | // item.setId(id); |
| | | // item.setStatus(EState.DISABLED.getValue()); |
| | | // |
| | | // int rowCount = mapper.updateById(item); |
| | | // if (rowCount != 1) { |
| | | // return ExecutedResult.failed("停用[设备信息]失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> enable(Long id) { |
| | | // // 验证记录是否存在 |
| | | // ExecutedResult<WaterFacilityPO> checkExists = this.check4Id(id); |
| | | // if (checkExists.isFailed()) { |
| | | // return ExecutedResult.failed(checkExists.getMsg()); |
| | | // } |
| | | // WaterFacilityPO item = new WaterFacilityPO(); |
| | | // item.setId(id); |
| | | // item.setStatus(EState.NORMAL.getValue()); |
| | | // |
| | | // int rowCount = mapper.updateById(item); |
| | | // if (rowCount != 1) { |
| | | // return ExecutedResult.failed("启用[设备信息]失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> setSort(ReqSetSort request) { |
| | | // // 验证记录是否存在 |
| | | // ExecutedResult<WaterFacilityPO> checkExists = this.check4Id(request.getId()); |
| | | // if (checkExists.isFailed()) { |
| | | // return ExecutedResult.failed(checkExists.getMsg()); |
| | | // } |
| | | // WaterFacilityPO item = new WaterFacilityPO(); |
| | | // item.setId(request.getId()); |
| | | // item.setSort(request.getSort()); |
| | | // |
| | | // int rowCount = mapper.updateById(item); |
| | | // if (rowCount != 1) { |
| | | // return ExecutedResult.failed("设置[设备信息]排序值失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> listSetSort(ReqListSetSort request) { |
| | | // // id列表 |
| | | // List<Long> listId = request.getList().stream().map(ReqSetSort::getId).collect(Collectors.toList()); |
| | | // // 验证记录是否存在 |
| | | // ExecutedResult<List<WaterFacilityPO>> checkExists = this.check4Id(listId); |
| | | // if (checkExists.isFailed()) { |
| | | // return ExecutedResult.failed(checkExists.getMsg()); |
| | | // } |
| | | // |
| | | // List<WaterFacilityPO> listUpdate = request.getList().stream() |
| | | // .map(c -> { |
| | | // WaterFacilityPO item = new WaterFacilityPO(); |
| | | // item.setId(c.getId()); |
| | | // item.setSort(c.getSort()); |
| | | // return item; |
| | | // }) |
| | | // .collect(Collectors.toList()); |
| | | // Boolean result = mapper.modifyList(listUpdate); |
| | | // if (result) { |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // return ExecutedResult.failed("[设备信息]设置排序值失败"); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> remove(Long id) { |
| | | // Boolean result = mapper.deleteLogic(id); |
| | | // if (BooleanUtils.isFalse(result)) { |
| | | // return ExecutedResult.failed("删除[设备信息]失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> removeList(List<Long> ids) { |
| | | // Boolean result = mapper.deleteLogic(ids); |
| | | // if (BooleanUtils.isFalse(result)) { |
| | | // return ExecutedResult.failed("删除[设备信息]失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | |
| | | public ExecutedResult<List<WaterFacilityVO>> getList(List<Long> listId) { |
| | | List<WaterFacilityVO> result = new ArrayList<>(); |
| | | |
| | | List<WaterFacilityPO> list = mapper.getList(listId); |
| | | if (ListUtil.isNotNullOrEmpty(list)) { |
| | | // 转换vo |
| | | result = WaterFacilityConvert.INSTANCE.toVo(list); |
| | | } |
| | | return ExecutedResult.success(result); |
| | | } |
| | | |
| | | public ExecutedResult<PagerResult<WaterFacilityVO>> search(SearchWaterFacility search) { |
| | | // 处理创建时间范围-查询参数 |
| | | Tuple<String, String> createTimeRange = ParameterUtil.getTimeRange(search.getCreateTimeRange()); |
| | | if (StringUtil.isNotNullOrEmpty(createTimeRange.getItem1())) { |
| | | search.setCreateTimeStart(LocalDateTimeUtil.getTimeStamp(createTimeRange.getItem1()).getTime()); |
| | | } |
| | | if (StringUtil.isNotNullOrEmpty(createTimeRange.getItem2())) { |
| | | search.setCreateTimeEnd(LocalDateTimeUtil.getTimeStamp(createTimeRange.getItem2()).getTime()); |
| | | } |
| | | |
| | | PagerResult<WaterFacilityPO> pageList = mapper.search(search); |
| | | List<WaterFacilityVO> listVo = new ArrayList<>(); |
| | | List<WaterFacilityPO> list = pageList.getList(); |
| | | if (ListUtil.isNotNullOrEmpty(list)) { |
| | | pageList.setLastId(list.get(list.size() - 1).getId()); |
| | | // 转换vo |
| | | listVo = WaterFacilityConvert.INSTANCE.toVo(list); |
| | | } |
| | | PagerResult<WaterFacilityVO> result = new PagerResult<>(pageList.getLimit(), pageList.getPage(), pageList.getTotal(), listVo); |
| | | result.setLastId(pageList.getLastId()); |
| | | return ExecutedResult.success(result); |
| | | } |
| | | |
| | | protected ExecutedResult<WaterFacilityPO> check4Id(Long id) { |
| | | WaterFacilityPO exists = mapper.get(id); |
| | | if (Objects.isNull(exists)) { |
| | | return ExecutedResult.failed("[设备信息]不存在:" + id); |
| | | } |
| | | return ExecutedResult.success(exists); |
| | | } |
| | | protected ExecutedResult<List<WaterFacilityPO>> check4Id(List<Long> listId) { |
| | | // 从数据库查找设备信息 |
| | | List<WaterFacilityPO> list = mapper.getList(listId); |
| | | if (ListUtil.isNullOrEmpty(list)) { |
| | | return ExecutedResult.failed("[设备信息]不存在." + listId); |
| | | } |
| | | // 数据库找到的id列表 |
| | | List<Long> listIdFind = list.stream().map(WaterFacilityPO::getId).collect(Collectors.toList()); |
| | | // 数量不一致 |
| | | if (listId.size() != listIdFind.size()) { |
| | | // 筛选数据库不存在的设备信息 |
| | | List<Long> listIdNotFound = listId.stream().filter(c -> !listIdFind.contains(c)).collect(Collectors.toList()); |
| | | if (ListUtil.isNullOrEmpty(list)) { |
| | | return ExecutedResult.failed("[设备信息]不存在." + listIdNotFound); |
| | | } |
| | | } |
| | | return ExecutedResult.success(list); |
| | | }} |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.service; |
| | | |
| | | import com.fengdu.gas.common.*; |
| | | import com.fengdu.gas.common.enums.*; |
| | | import com.fengdu.gas.common.model.Tuple; |
| | | import com.fengdu.gas.common.util.*; |
| | | import org.apache.commons.lang3.BooleanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | import com.fengdu.gas.repository.impl.WaterFacilityTypeMapperImpl; |
| | | import com.fengdu.gas.repository.po.WaterFacilityTypePO; |
| | | import com.fengdu.gas.entity.request.waterfacilitytype.ReqCreateWaterFacilityType; |
| | | import com.fengdu.gas.entity.request.waterfacilitytype.ReqModifyWaterFacilityType; |
| | | import com.fengdu.gas.entity.search.SearchWaterFacilityType; |
| | | import com.fengdu.gas.repository.vo.WaterFacilityTypeVO; |
| | | import com.fengdu.gas.service.convert.WaterFacilityTypeConvert; |
| | | |
| | | /** |
| | | * 设备类型 |
| | | * @author zr |
| | | */ |
| | | @Service |
| | | public class WaterFacilityTypeService extends BaseService { |
| | | @Autowired |
| | | private WaterFacilityTypeMapperImpl mapper; |
| | | |
| | | public ExecutedResult<Long> create(ReqCreateWaterFacilityType request) { |
| | | // 转换po |
| | | WaterFacilityTypePO item = WaterFacilityTypeConvert.INSTANCE.toCreate(request); |
| | | // 设置状态 |
| | | //item.setStatus(EState.NORMAL.getValue()); |
| | | // 设置记录创建时间 |
| | | item.setCreateTime(LocalDateTimeUtil.nowTimeStamp()); |
| | | // 是否删除(逻辑删除)初始值 |
| | | item.setIsDelete(EYesOrNo.NO.getValue()); |
| | | |
| | | int rowCount = mapper.insert(item); |
| | | if (rowCount != 1) { |
| | | return ExecutedResult.failed("创建[设备类型]失败。"); |
| | | } |
| | | return ExecutedResult.success(item.getId()); |
| | | } |
| | | |
| | | public ExecutedResult<String> modify(ReqModifyWaterFacilityType request) { |
| | | // 验证记录是否存在 |
| | | ExecutedResult<WaterFacilityTypePO> checkExists = this.check4Id(request.getId()); |
| | | if (checkExists.isFailed()) { |
| | | return ExecutedResult.failed(checkExists.getMsg()); |
| | | } |
| | | // 转换po |
| | | WaterFacilityTypePO item = WaterFacilityTypeConvert.INSTANCE.toModify(request); |
| | | |
| | | int rowCount = mapper.updateById(item); |
| | | if (rowCount != 1) { |
| | | return ExecutedResult.failed("编辑[设备类型]失败。"); |
| | | } |
| | | return ExecutedResult.success(); |
| | | } |
| | | |
| | | public ExecutedResult<WaterFacilityTypeVO> get(Long id) { |
| | | WaterFacilityTypeVO result = new WaterFacilityTypeVO(); |
| | | |
| | | WaterFacilityTypePO find = mapper.get(id); |
| | | if (null != find) { |
| | | // 转换vo |
| | | result = WaterFacilityTypeConvert.INSTANCE.toVo(find); |
| | | } |
| | | return ExecutedResult.success(result); |
| | | } |
| | | |
| | | // public ExecutedResult<String> stop(Long id) { |
| | | // // 验证记录是否存在 |
| | | // ExecutedResult<WaterFacilityTypePO> checkExists = this.check4Id(id); |
| | | // if (checkExists.isFailed()) { |
| | | // return ExecutedResult.failed(checkExists.getMsg()); |
| | | // } |
| | | // WaterFacilityTypePO item = new WaterFacilityTypePO(); |
| | | // item.setId(id); |
| | | // item.setStatus(EState.DISABLED.getValue()); |
| | | // |
| | | // int rowCount = mapper.updateById(item); |
| | | // if (rowCount != 1) { |
| | | // return ExecutedResult.failed("停用[设备类型]失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> enable(Long id) { |
| | | // // 验证记录是否存在 |
| | | // ExecutedResult<WaterFacilityTypePO> checkExists = this.check4Id(id); |
| | | // if (checkExists.isFailed()) { |
| | | // return ExecutedResult.failed(checkExists.getMsg()); |
| | | // } |
| | | // WaterFacilityTypePO item = new WaterFacilityTypePO(); |
| | | // item.setId(id); |
| | | // item.setStatus(EState.NORMAL.getValue()); |
| | | // |
| | | // int rowCount = mapper.updateById(item); |
| | | // if (rowCount != 1) { |
| | | // return ExecutedResult.failed("启用[设备类型]失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> setSort(ReqSetSort request) { |
| | | // // 验证记录是否存在 |
| | | // ExecutedResult<WaterFacilityTypePO> checkExists = this.check4Id(request.getId()); |
| | | // if (checkExists.isFailed()) { |
| | | // return ExecutedResult.failed(checkExists.getMsg()); |
| | | // } |
| | | // WaterFacilityTypePO item = new WaterFacilityTypePO(); |
| | | // item.setId(request.getId()); |
| | | // item.setSort(request.getSort()); |
| | | // |
| | | // int rowCount = mapper.updateById(item); |
| | | // if (rowCount != 1) { |
| | | // return ExecutedResult.failed("设置[设备类型]排序值失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> listSetSort(ReqListSetSort request) { |
| | | // // id列表 |
| | | // List<Long> listId = request.getList().stream().map(ReqSetSort::getId).collect(Collectors.toList()); |
| | | // // 验证记录是否存在 |
| | | // ExecutedResult<List<WaterFacilityTypePO>> checkExists = this.check4Id(listId); |
| | | // if (checkExists.isFailed()) { |
| | | // return ExecutedResult.failed(checkExists.getMsg()); |
| | | // } |
| | | // |
| | | // List<WaterFacilityTypePO> listUpdate = request.getList().stream() |
| | | // .map(c -> { |
| | | // WaterFacilityTypePO item = new WaterFacilityTypePO(); |
| | | // item.setId(c.getId()); |
| | | // item.setSort(c.getSort()); |
| | | // return item; |
| | | // }) |
| | | // .collect(Collectors.toList()); |
| | | // Boolean result = mapper.modifyList(listUpdate); |
| | | // if (result) { |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // return ExecutedResult.failed("[设备类型]设置排序值失败"); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> remove(Long id) { |
| | | // Boolean result = mapper.deleteLogic(id); |
| | | // if (BooleanUtils.isFalse(result)) { |
| | | // return ExecutedResult.failed("删除[设备类型]失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> removeList(List<Long> ids) { |
| | | // Boolean result = mapper.deleteLogic(ids); |
| | | // if (BooleanUtils.isFalse(result)) { |
| | | // return ExecutedResult.failed("删除[设备类型]失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | |
| | | public ExecutedResult<List<WaterFacilityTypeVO>> getList(List<Long> listId) { |
| | | List<WaterFacilityTypeVO> result = new ArrayList<>(); |
| | | |
| | | List<WaterFacilityTypePO> list = mapper.getList(listId); |
| | | if (ListUtil.isNotNullOrEmpty(list)) { |
| | | // 转换vo |
| | | result = WaterFacilityTypeConvert.INSTANCE.toVo(list); |
| | | } |
| | | return ExecutedResult.success(result); |
| | | } |
| | | |
| | | public ExecutedResult<PagerResult<WaterFacilityTypeVO>> search(SearchWaterFacilityType search) { |
| | | // 处理创建时间范围-查询参数 |
| | | Tuple<String, String> createTimeRange = ParameterUtil.getTimeRange(search.getCreateTimeRange()); |
| | | if (StringUtil.isNotNullOrEmpty(createTimeRange.getItem1())) { |
| | | search.setCreateTimeStart(LocalDateTimeUtil.getTimeStamp(createTimeRange.getItem1()).getTime()); |
| | | } |
| | | if (StringUtil.isNotNullOrEmpty(createTimeRange.getItem2())) { |
| | | search.setCreateTimeEnd(LocalDateTimeUtil.getTimeStamp(createTimeRange.getItem2()).getTime()); |
| | | } |
| | | |
| | | PagerResult<WaterFacilityTypePO> pageList = mapper.search(search); |
| | | List<WaterFacilityTypeVO> listVo = new ArrayList<>(); |
| | | List<WaterFacilityTypePO> list = pageList.getList(); |
| | | if (ListUtil.isNotNullOrEmpty(list)) { |
| | | pageList.setLastId(list.get(list.size() - 1).getId()); |
| | | // 转换vo |
| | | listVo = WaterFacilityTypeConvert.INSTANCE.toVo(list); |
| | | } |
| | | PagerResult<WaterFacilityTypeVO> result = new PagerResult<>(pageList.getLimit(), pageList.getPage(), pageList.getTotal(), listVo); |
| | | result.setLastId(pageList.getLastId()); |
| | | return ExecutedResult.success(result); |
| | | } |
| | | |
| | | protected ExecutedResult<WaterFacilityTypePO> check4Id(Long id) { |
| | | WaterFacilityTypePO exists = mapper.get(id); |
| | | if (Objects.isNull(exists)) { |
| | | return ExecutedResult.failed("[设备类型]不存在:" + id); |
| | | } |
| | | return ExecutedResult.success(exists); |
| | | } |
| | | protected ExecutedResult<List<WaterFacilityTypePO>> check4Id(List<Long> listId) { |
| | | // 从数据库查找设备类型 |
| | | List<WaterFacilityTypePO> list = mapper.getList(listId); |
| | | if (ListUtil.isNullOrEmpty(list)) { |
| | | return ExecutedResult.failed("[设备类型]不存在." + listId); |
| | | } |
| | | // 数据库找到的id列表 |
| | | List<Long> listIdFind = list.stream().map(WaterFacilityTypePO::getId).collect(Collectors.toList()); |
| | | // 数量不一致 |
| | | if (listId.size() != listIdFind.size()) { |
| | | // 筛选数据库不存在的设备类型 |
| | | List<Long> listIdNotFound = listId.stream().filter(c -> !listIdFind.contains(c)).collect(Collectors.toList()); |
| | | if (ListUtil.isNullOrEmpty(list)) { |
| | | return ExecutedResult.failed("[设备类型]不存在." + listIdNotFound); |
| | | } |
| | | } |
| | | return ExecutedResult.success(list); |
| | | }} |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.service; |
| | | |
| | | import com.fengdu.gas.common.*; |
| | | import com.fengdu.gas.common.enums.*; |
| | | import com.fengdu.gas.common.model.Tuple; |
| | | import com.fengdu.gas.common.util.*; |
| | | import org.apache.commons.lang3.BooleanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | import com.fengdu.gas.repository.impl.WaterMonitoryPointMapperImpl; |
| | | import com.fengdu.gas.repository.po.WaterMonitoryPointPO; |
| | | import com.fengdu.gas.entity.request.watermonitorypoint.ReqCreateWaterMonitoryPoint; |
| | | import com.fengdu.gas.entity.request.watermonitorypoint.ReqModifyWaterMonitoryPoint; |
| | | import com.fengdu.gas.entity.search.SearchWaterMonitoryPoint; |
| | | import com.fengdu.gas.repository.vo.WaterMonitoryPointVO; |
| | | import com.fengdu.gas.service.convert.WaterMonitoryPointConvert; |
| | | |
| | | /** |
| | | * 监控点 |
| | | * @author zr |
| | | */ |
| | | @Service |
| | | public class WaterMonitoryPointService extends BaseService { |
| | | @Autowired |
| | | private WaterMonitoryPointMapperImpl mapper; |
| | | |
| | | public ExecutedResult<Long> create(ReqCreateWaterMonitoryPoint request) { |
| | | // 转换po |
| | | WaterMonitoryPointPO item = WaterMonitoryPointConvert.INSTANCE.toCreate(request); |
| | | // 设置状态 |
| | | //item.setStatus(EState.NORMAL.getValue()); |
| | | // 设置记录创建时间 |
| | | item.setCreateTime(LocalDateTimeUtil.nowTimeStamp()); |
| | | // 是否删除(逻辑删除)初始值 |
| | | item.setIsDelete(EYesOrNo.NO.getValue()); |
| | | |
| | | int rowCount = mapper.insert(item); |
| | | if (rowCount != 1) { |
| | | return ExecutedResult.failed("创建[监控点]失败。"); |
| | | } |
| | | return ExecutedResult.success(item.getId()); |
| | | } |
| | | |
| | | public ExecutedResult<String> modify(ReqModifyWaterMonitoryPoint request) { |
| | | // 验证记录是否存在 |
| | | ExecutedResult<WaterMonitoryPointPO> checkExists = this.check4Id(request.getId()); |
| | | if (checkExists.isFailed()) { |
| | | return ExecutedResult.failed(checkExists.getMsg()); |
| | | } |
| | | // 转换po |
| | | WaterMonitoryPointPO item = WaterMonitoryPointConvert.INSTANCE.toModify(request); |
| | | |
| | | int rowCount = mapper.updateById(item); |
| | | if (rowCount != 1) { |
| | | return ExecutedResult.failed("编辑[监控点]失败。"); |
| | | } |
| | | return ExecutedResult.success(); |
| | | } |
| | | |
| | | public ExecutedResult<WaterMonitoryPointVO> get(Long id) { |
| | | WaterMonitoryPointVO result = new WaterMonitoryPointVO(); |
| | | |
| | | WaterMonitoryPointPO find = mapper.get(id); |
| | | if (null != find) { |
| | | // 转换vo |
| | | result = WaterMonitoryPointConvert.INSTANCE.toVo(find); |
| | | } |
| | | return ExecutedResult.success(result); |
| | | } |
| | | |
| | | // public ExecutedResult<String> stop(Long id) { |
| | | // // 验证记录是否存在 |
| | | // ExecutedResult<WaterMonitoryPointPO> checkExists = this.check4Id(id); |
| | | // if (checkExists.isFailed()) { |
| | | // return ExecutedResult.failed(checkExists.getMsg()); |
| | | // } |
| | | // WaterMonitoryPointPO item = new WaterMonitoryPointPO(); |
| | | // item.setId(id); |
| | | // item.setStatus(EState.DISABLED.getValue()); |
| | | // |
| | | // int rowCount = mapper.updateById(item); |
| | | // if (rowCount != 1) { |
| | | // return ExecutedResult.failed("停用[监控点]失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> enable(Long id) { |
| | | // // 验证记录是否存在 |
| | | // ExecutedResult<WaterMonitoryPointPO> checkExists = this.check4Id(id); |
| | | // if (checkExists.isFailed()) { |
| | | // return ExecutedResult.failed(checkExists.getMsg()); |
| | | // } |
| | | // WaterMonitoryPointPO item = new WaterMonitoryPointPO(); |
| | | // item.setId(id); |
| | | // item.setStatus(EState.NORMAL.getValue()); |
| | | // |
| | | // int rowCount = mapper.updateById(item); |
| | | // if (rowCount != 1) { |
| | | // return ExecutedResult.failed("启用[监控点]失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> setSort(ReqSetSort request) { |
| | | // // 验证记录是否存在 |
| | | // ExecutedResult<WaterMonitoryPointPO> checkExists = this.check4Id(request.getId()); |
| | | // if (checkExists.isFailed()) { |
| | | // return ExecutedResult.failed(checkExists.getMsg()); |
| | | // } |
| | | // WaterMonitoryPointPO item = new WaterMonitoryPointPO(); |
| | | // item.setId(request.getId()); |
| | | // item.setSort(request.getSort()); |
| | | // |
| | | // int rowCount = mapper.updateById(item); |
| | | // if (rowCount != 1) { |
| | | // return ExecutedResult.failed("设置[监控点]排序值失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> listSetSort(ReqListSetSort request) { |
| | | // // id列表 |
| | | // List<Long> listId = request.getList().stream().map(ReqSetSort::getId).collect(Collectors.toList()); |
| | | // // 验证记录是否存在 |
| | | // ExecutedResult<List<WaterMonitoryPointPO>> checkExists = this.check4Id(listId); |
| | | // if (checkExists.isFailed()) { |
| | | // return ExecutedResult.failed(checkExists.getMsg()); |
| | | // } |
| | | // |
| | | // List<WaterMonitoryPointPO> listUpdate = request.getList().stream() |
| | | // .map(c -> { |
| | | // WaterMonitoryPointPO item = new WaterMonitoryPointPO(); |
| | | // item.setId(c.getId()); |
| | | // item.setSort(c.getSort()); |
| | | // return item; |
| | | // }) |
| | | // .collect(Collectors.toList()); |
| | | // Boolean result = mapper.modifyList(listUpdate); |
| | | // if (result) { |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // return ExecutedResult.failed("[监控点]设置排序值失败"); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> remove(Long id) { |
| | | // Boolean result = mapper.deleteLogic(id); |
| | | // if (BooleanUtils.isFalse(result)) { |
| | | // return ExecutedResult.failed("删除[监控点]失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | // |
| | | // public ExecutedResult<String> removeList(List<Long> ids) { |
| | | // Boolean result = mapper.deleteLogic(ids); |
| | | // if (BooleanUtils.isFalse(result)) { |
| | | // return ExecutedResult.failed("删除[监控点]失败。"); |
| | | // } |
| | | // return ExecutedResult.success(); |
| | | // } |
| | | |
| | | public ExecutedResult<List<WaterMonitoryPointVO>> getList(List<Long> listId) { |
| | | List<WaterMonitoryPointVO> result = new ArrayList<>(); |
| | | |
| | | List<WaterMonitoryPointPO> list = mapper.getList(listId); |
| | | if (ListUtil.isNotNullOrEmpty(list)) { |
| | | // 转换vo |
| | | result = WaterMonitoryPointConvert.INSTANCE.toVo(list); |
| | | } |
| | | return ExecutedResult.success(result); |
| | | } |
| | | |
| | | public ExecutedResult<PagerResult<WaterMonitoryPointVO>> search(SearchWaterMonitoryPoint search) { |
| | | // 处理创建时间范围-查询参数 |
| | | Tuple<String, String> createTimeRange = ParameterUtil.getTimeRange(search.getCreateTimeRange()); |
| | | if (StringUtil.isNotNullOrEmpty(createTimeRange.getItem1())) { |
| | | search.setCreateTimeStart(LocalDateTimeUtil.getTimeStamp(createTimeRange.getItem1()).getTime()); |
| | | } |
| | | if (StringUtil.isNotNullOrEmpty(createTimeRange.getItem2())) { |
| | | search.setCreateTimeEnd(LocalDateTimeUtil.getTimeStamp(createTimeRange.getItem2()).getTime()); |
| | | } |
| | | |
| | | PagerResult<WaterMonitoryPointPO> pageList = mapper.search(search); |
| | | List<WaterMonitoryPointVO> listVo = new ArrayList<>(); |
| | | List<WaterMonitoryPointPO> list = pageList.getList(); |
| | | if (ListUtil.isNotNullOrEmpty(list)) { |
| | | pageList.setLastId(list.get(list.size() - 1).getId()); |
| | | // 转换vo |
| | | listVo = WaterMonitoryPointConvert.INSTANCE.toVo(list); |
| | | } |
| | | PagerResult<WaterMonitoryPointVO> result = new PagerResult<>(pageList.getLimit(), pageList.getPage(), pageList.getTotal(), listVo); |
| | | result.setLastId(pageList.getLastId()); |
| | | return ExecutedResult.success(result); |
| | | } |
| | | |
| | | protected ExecutedResult<WaterMonitoryPointPO> check4Id(Long id) { |
| | | WaterMonitoryPointPO exists = mapper.get(id); |
| | | if (Objects.isNull(exists)) { |
| | | return ExecutedResult.failed("[监控点]不存在:" + id); |
| | | } |
| | | return ExecutedResult.success(exists); |
| | | } |
| | | protected ExecutedResult<List<WaterMonitoryPointPO>> check4Id(List<Long> listId) { |
| | | // 从数据库查找监控点 |
| | | List<WaterMonitoryPointPO> list = mapper.getList(listId); |
| | | if (ListUtil.isNullOrEmpty(list)) { |
| | | return ExecutedResult.failed("[监控点]不存在." + listId); |
| | | } |
| | | // 数据库找到的id列表 |
| | | List<Long> listIdFind = list.stream().map(WaterMonitoryPointPO::getId).collect(Collectors.toList()); |
| | | // 数量不一致 |
| | | if (listId.size() != listIdFind.size()) { |
| | | // 筛选数据库不存在的监控点 |
| | | List<Long> listIdNotFound = listId.stream().filter(c -> !listIdFind.contains(c)).collect(Collectors.toList()); |
| | | if (ListUtil.isNullOrEmpty(list)) { |
| | | return ExecutedResult.failed("[监控点]不存在." + listIdNotFound); |
| | | } |
| | | } |
| | | return ExecutedResult.success(list); |
| | | }} |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.service.convert; |
| | | |
| | | import com.fengdu.gas.entity.request.facilityalarmrecord.ReqCreateFacilityAlarmRecord; |
| | | import com.fengdu.gas.entity.request.facilityalarmrecord.ReqModifyFacilityAlarmRecord; |
| | | import com.fengdu.gas.repository.po.FacilityAlarmRecordPO; |
| | | import com.fengdu.gas.repository.vo.FacilityAlarmRecordVO; |
| | | |
| | | import org.mapstruct.Mapper; |
| | | import org.mapstruct.factory.Mappers; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 设备报警记录 |
| | | * @author {#=author} |
| | | */ |
| | | @Mapper |
| | | public interface FacilityAlarmRecordConvert { |
| | | FacilityAlarmRecordConvert INSTANCE = Mappers.getMapper(FacilityAlarmRecordConvert.class); |
| | | |
| | | FacilityAlarmRecordPO toCreate(ReqCreateFacilityAlarmRecord request); |
| | | FacilityAlarmRecordPO toModify(ReqModifyFacilityAlarmRecord request); |
| | | |
| | | FacilityAlarmRecordVO toVo(FacilityAlarmRecordPO item); |
| | | List<FacilityAlarmRecordVO> toVo(List<FacilityAlarmRecordPO> list); |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.service.convert; |
| | | |
| | | import com.fengdu.gas.entity.request.sendmessagerecord.ReqCreateSendMessageRecord; |
| | | import com.fengdu.gas.entity.request.sendmessagerecord.ReqModifySendMessageRecord; |
| | | import com.fengdu.gas.repository.po.SendMessageRecordPO; |
| | | import com.fengdu.gas.repository.vo.SendMessageRecordVO; |
| | | |
| | | import org.mapstruct.Mapper; |
| | | import org.mapstruct.factory.Mappers; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 消息发送记录 |
| | | * @author {#=author} |
| | | */ |
| | | @Mapper |
| | | public interface SendMessageRecordConvert { |
| | | SendMessageRecordConvert INSTANCE = Mappers.getMapper(SendMessageRecordConvert.class); |
| | | |
| | | SendMessageRecordPO toCreate(ReqCreateSendMessageRecord request); |
| | | SendMessageRecordPO toModify(ReqModifySendMessageRecord request); |
| | | |
| | | SendMessageRecordVO toVo(SendMessageRecordPO item); |
| | | List<SendMessageRecordVO> toVo(List<SendMessageRecordPO> list); |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.service.convert; |
| | | |
| | | import com.fengdu.gas.entity.request.waterfacility.ReqCreateWaterFacility; |
| | | import com.fengdu.gas.entity.request.waterfacility.ReqModifyWaterFacility; |
| | | import com.fengdu.gas.repository.po.WaterFacilityPO; |
| | | import com.fengdu.gas.repository.vo.WaterFacilityVO; |
| | | |
| | | import org.mapstruct.Mapper; |
| | | import org.mapstruct.factory.Mappers; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 设备信息 |
| | | * @author {#=author} |
| | | */ |
| | | @Mapper |
| | | public interface WaterFacilityConvert { |
| | | WaterFacilityConvert INSTANCE = Mappers.getMapper(WaterFacilityConvert.class); |
| | | |
| | | WaterFacilityPO toCreate(ReqCreateWaterFacility request); |
| | | WaterFacilityPO toModify(ReqModifyWaterFacility request); |
| | | |
| | | WaterFacilityVO toVo(WaterFacilityPO item); |
| | | List<WaterFacilityVO> toVo(List<WaterFacilityPO> list); |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.service.convert; |
| | | |
| | | import com.fengdu.gas.entity.request.waterfacilityparameter.ReqCreateWaterFacilityParameter; |
| | | import com.fengdu.gas.entity.request.waterfacilityparameter.ReqModifyWaterFacilityParameter; |
| | | import com.fengdu.gas.repository.po.WaterFacilityParameterPO; |
| | | import com.fengdu.gas.repository.vo.WaterFacilityParameterVO; |
| | | |
| | | import org.mapstruct.Mapper; |
| | | import org.mapstruct.factory.Mappers; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 设备设定参数 |
| | | * @author {#=author} |
| | | */ |
| | | @Mapper |
| | | public interface WaterFacilityParameterConvert { |
| | | WaterFacilityParameterConvert INSTANCE = Mappers.getMapper(WaterFacilityParameterConvert.class); |
| | | |
| | | WaterFacilityParameterPO toCreate(ReqCreateWaterFacilityParameter request); |
| | | WaterFacilityParameterPO toModify(ReqModifyWaterFacilityParameter request); |
| | | |
| | | WaterFacilityParameterVO toVo(WaterFacilityParameterPO item); |
| | | List<WaterFacilityParameterVO> toVo(List<WaterFacilityParameterPO> list); |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.service.convert; |
| | | |
| | | import com.fengdu.gas.entity.request.waterfacilitytype.ReqCreateWaterFacilityType; |
| | | import com.fengdu.gas.entity.request.waterfacilitytype.ReqModifyWaterFacilityType; |
| | | import com.fengdu.gas.repository.po.WaterFacilityTypePO; |
| | | import com.fengdu.gas.repository.vo.WaterFacilityTypeVO; |
| | | |
| | | import org.mapstruct.Mapper; |
| | | import org.mapstruct.factory.Mappers; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 设备类型 |
| | | * @author {#=author} |
| | | */ |
| | | @Mapper |
| | | public interface WaterFacilityTypeConvert { |
| | | WaterFacilityTypeConvert INSTANCE = Mappers.getMapper(WaterFacilityTypeConvert.class); |
| | | |
| | | WaterFacilityTypePO toCreate(ReqCreateWaterFacilityType request); |
| | | WaterFacilityTypePO toModify(ReqModifyWaterFacilityType request); |
| | | |
| | | WaterFacilityTypeVO toVo(WaterFacilityTypePO item); |
| | | List<WaterFacilityTypeVO> toVo(List<WaterFacilityTypePO> list); |
| | | } |
对比新文件 |
| | |
| | | /** |
| | | # __----~~~~~~~~~~~------___ |
| | | # . . ~~//====...... __--~ ~~ |
| | | # -. \_|// |||\\ ~~~~~~::::... /~ |
| | | # ___-==_ _-~o~ \/ ||| \\ _/~~- |
| | | # __---~~~.==~||\=_ -_--~/_-~|- |\\ \\ _/~ |
| | | # _-~~ .=~ | \\-_ '-~7 /- / || \ / |
| | | # .~ .~ | \\ -_ / /- / || \ / |
| | | # / ____ / | \\ ~-_/ /|- _/ .|| \ / |
| | | # |~~ ~~|--~~~~--_ \ ~==-/ | \~--===~~ .\ |
| | | # ' ~-| /| |-~\~~ __--~~ |
| | | # |-~~-_/ | | ~\_ _-~ /\ |
| | | # / \ \__ \/~ \__ |
| | | # _--~ _/ | .-~~____--~-/ ~~==. |
| | | # ((->/~ '.|||' -_| ~~-/ , . _|| |
| | | # -_ ~\ ~~---l__i__i__i--~~_/ |
| | | # _-~-__ ~) \--______________--~~ |
| | | # //.-~~~-~_--~- |-------~~~~~~~~ |
| | | # //.-~~~--\ |
| | | # 神兽保佑 |
| | | # 永无BUG! |
| | | */ |
| | | package com.fengdu.gas.service.convert; |
| | | |
| | | import com.fengdu.gas.entity.request.watermonitorypoint.ReqCreateWaterMonitoryPoint; |
| | | import com.fengdu.gas.entity.request.watermonitorypoint.ReqModifyWaterMonitoryPoint; |
| | | import com.fengdu.gas.repository.po.WaterMonitoryPointPO; |
| | | import com.fengdu.gas.repository.vo.WaterMonitoryPointVO; |
| | | |
| | | import org.mapstruct.Mapper; |
| | | import org.mapstruct.factory.Mappers; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 监控点 |
| | | * @author {#=author} |
| | | */ |
| | | @Mapper |
| | | public interface WaterMonitoryPointConvert { |
| | | WaterMonitoryPointConvert INSTANCE = Mappers.getMapper(WaterMonitoryPointConvert.class); |
| | | |
| | | WaterMonitoryPointPO toCreate(ReqCreateWaterMonitoryPoint request); |
| | | WaterMonitoryPointPO toModify(ReqModifyWaterMonitoryPoint request); |
| | | |
| | | WaterMonitoryPointVO toVo(WaterMonitoryPointPO item); |
| | | List<WaterMonitoryPointVO> toVo(List<WaterMonitoryPointPO> list); |
| | | } |
| | |
| | | server: |
| | | port: 8088 |
| | | port: 8040 |
| | | |
| | | spring: |
| | | jackson: |
| | | date-format: yyyy-MM-dd HH:mm:ss |
| | | datasource: |
| | | driver-class-name: org.postgresql.Driver |
| | | url: jdbc:postgresql://113.250.189.120:57654/test_db1 |
| | | url: jdbc:postgresql://113.250.189.120:57654/fengdu_gases_system |
| | | username: lunhan |
| | | password: lunhan.20240330 |
| | | druid: |
| | |
| | | root: info |
| | | com.fengdu.gas: info |
| | | |
| | | # mybatis-plus 配置: |
| | | mybatis-plus: |
| | | configuration: |
| | | ### 开启打印sql配置 |
| | | log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | file: |
| | | uploadBasicPath: ./logs/upload/ |
| | | fileBasicUrl: http://localhost/file |
| | | disturbStr: com.fengdu.gas |
| | | |
| | | |
| | | |
| | | # mybatis-plus 配置: |
| | | #mybatis-plus: |
| | | # configuration: |
| | | # ### 开启打印sql配置 |
| | | # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
| | | |
| | | mqtt: |
| | | # 是否启用 |
| | | enable: false |
| | | host: 113.250.189.120 |
| | | port: 1885 |
| | | user: admin |
| | | password: public |
| | | # 订阅主题 |
| | | topic: fengdu/# |
| | | # 订阅消息的客户端id |
| | | clientId: fengdu-gases-service-dev |
| | | # 连接超时时间 |
| | | connectionTimeout: 10 |
| | | # 心跳 |
| | | keepAliveInterval: 20 |
| | | # 发送消息的客户端id |
| | | serverClientId: fengdu-gases-service-publish-dev |
| | | # quartz定时任务配置 |
| | | quartz: |
| | | # 是否启用 |
文件名从 src/test/java/com/lunhan/xxx/GenCodeGauss.java 修改 |
| | |
| | | private static final String PORT = "57654"; |
| | | private static final String USER = "lunhan"; |
| | | private static final String PASSWORD = "lunhan.20240330"; |
| | | private static final String DB_NAME = "test_db1"; |
| | | private static final String AUTHOR = "lin.liu"; |
| | | private static final String DB_NAME = "fengdu_gases_system"; |
| | | private static final String AUTHOR = "zr"; |
| | | |
| | | public static Connection CONN = null; |
| | | private static final String DRIVER = "org.postgresql.Driver"; |
| | |
| | | |
| | | //region 输出文件路径设置 |
| | | class OutSet { |
| | | public static final String PO = "./src/main/java/com/lunhan/xxx/repository/po/"; |
| | | public static final String VO = "./src/main/java/com/lunhan/xxx/repository/vo/"; |
| | | public static final String CONVERT_MAPPER = "./src/main/java/com/lunhan/xxx/service/convert/"; |
| | | public static final String MAPPER_IMPL = "./src/main/java/com/lunhan/xxx/repository/impl/"; |
| | | public static final String MAPPER = "./src/main/java/com/lunhan/xxx/repository/mapper/"; |
| | | public static final String SERVICE = "./src/main/java/com/lunhan/xxx/service/"; |
| | | public static final String Controller = "./src/main/java/com/lunhan/xxx/host/controller/"; |
| | | public static final String SEARCH = "./src/main/java/com/lunhan/xxx/entity/search/"; |
| | | public static final String RequestDTO = "./src/main/java/com/lunhan/xxx/entity/request/"; |
| | | public static final String ResponseDTO = "./src/main/java/com/lunhan/xxx/entity/response/"; |
| | | public static final String PO = "./src/main/java/com/fengdu/gas/repository/po/"; |
| | | public static final String VO = "./src/main/java/com/fengdu/gas/repository/vo/"; |
| | | public static final String CONVERT_MAPPER = "./src/main/java/com/fengdu/gas/service/convert/"; |
| | | public static final String MAPPER_IMPL = "./src/main/java/com/fengdu/gas/repository/impl/"; |
| | | public static final String MAPPER = "./src/main/java/com/fengdu/gas/repository/mapper/"; |
| | | public static final String SERVICE = "./src/main/java/com/fengdu/gas/service/"; |
| | | public static final String Controller = "./src/main/java/com/fengdu/gas/host/controller/"; |
| | | public static final String SEARCH = "./src/main/java/com/fengdu/gas/entity/search/"; |
| | | public static final String RequestDTO = "./src/main/java/com/fengdu/gas/entity/request/"; |
| | | public static final String ResponseDTO = "./src/main/java/com/fengdu/gas/entity/response/"; |
| | | } |
| | | //endregion |
| | | |
| | |
| | | * 只生成以下配置的表 |
| | | */ |
| | | private static final List<String> ONLY_TABLES = Arrays.asList( |
| | | |
| | | "send_message_record","water_monitory_point","water_facility_type","water_facility_parameter","facility_alarm_record" |
| | | ); |
| | | |
| | | public static void main(String[] args) { |