Merge remote-tracking branch 'origin/master'
35个文件已修改
24个文件已添加
2个文件已删除
| | |
| | | // 6ãæµé计æ
éå
³éï¼7ãç´§æ¥å
³éï¼8ãç¨æ·è¿ç¨å¼éï¼9ãç¨æ·è¿ç¨å
³éï¼ |
| | | public Byte type ; |
| | | public Double totalAmount; //累计æµéï¼5åèBCDç ï¼åå¼èå´0~9999999999ï¼åä½ä¸ºm3ã |
| | | public String cardNo ;//ICå¡ç¼å· |
| | | public String icAddr ;//icå¡å°å |
| | | public String IcCardNo;//ICå¡ç¼å· |
| | | public String icCardAddr;//icå¡å°å |
| | | public Double remainMoney ;//å©ä½éé¢ï¼ç¨æ·ä½é¢4åèBCDç ï¼åå¼èå´0.00~999999.99ï¼åä½ä¸ºå
|
| | | public String openDt ;//ç¨æ°´æ·ç¨æ°´å¼å§æ¶é´ï¼6åèBCDç ï¼é¡ºåºæ¯å¹´ææ¥æ¶åç§ï¼å
¶ä¸å
Œ
å¹´=2000+å¹´ã |
| | | public String closeDt ;//ç¨æ°´æ·ç¨æ°´ç»ææ¶é´ï¼6åèBCDç ï¼é¡ºåºæ¯å¹´ææ¥æ¶åç§ï¼å
¶ä¸å
Œ
å¹´=2000+å¹´ã |
| | |
| | | sb.append(totalAmount==null?"":totalAmount); |
| | | sb.append("\n"); |
| | | sb.append(" ICå¡ç¼å·ï¼"); |
| | | sb.append(cardNo); |
| | | sb.append(IcCardNo); |
| | | sb.append("\n"); |
| | | sb.append(" icå¡å°åï¼"); |
| | | sb.append(icAddr); |
| | | sb.append(icCardAddr); |
| | | sb.append("\n"); |
| | | sb.append(" å©ä½éé¢ï¼å
ï¼ï¼"); |
| | | sb.append(remainMoney ==null?"": remainMoney); |
| | |
| | | // 16ï¼ç¨æ·å¼éå管éå
æ²¡ææ°´ï¼èªå¨å
³éã管éä¸åºæ°´èªå¨å
³é |
| | | public Byte type ; |
| | | public Double totalAmount; //累计æµéï¼5åèBCDç ï¼åå¼èå´0~9999999999ï¼åä½ä¸ºm3ã |
| | | public String cardNo ;//ICå¡ç¼å· |
| | | public String icAddr ;//icå¡å°å |
| | | public String icCardNo;//ICå¡ç¼å· |
| | | public String icCardAddr;//icå¡å°å |
| | | public Double remainMoney;//å©ä½éé¢ï¼ç¨æ·ä½é¢4åèBCDç ï¼åå¼èå´0.00~999999.99ï¼åä½ä¸ºå
|
| | | public String openDt ;//ç¨æ°´æ·å¼éæ¶é´ï¼6åèBCDç ï¼é¡ºåºæ¯å¹´ææ¥æ¶åç§ï¼å
¶ä¸å
Œ
å¹´=2000+å¹´ã |
| | | public String rtuDt ;//æ§å¶å¨æ¶é |
| | |
| | | sb.append(totalAmount==null?"":totalAmount); |
| | | sb.append("\n"); |
| | | sb.append(" ICå¡ç¼å·ï¼"); |
| | | sb.append(cardNo); |
| | | sb.append(icCardNo); |
| | | sb.append("\n"); |
| | | sb.append(" icå¡å°åï¼"); |
| | | sb.append(icAddr); |
| | | sb.append(icCardAddr); |
| | | sb.append("\n"); |
| | | sb.append(" å©ä½éé¢ï¼å
ï¼ï¼"); |
| | | sb.append(remainMoney ==null?"": remainMoney); |
| | |
| | | public Double waterPress; //æ°´åï¼4åèBCDç ï¼åå¼èå´0~999999.99ï¼åä½ä¸ºKPaã |
| | | public Double batteryVolt;//èçµæ± çµå:4åèBCDç ï¼åå¼èå´0~99.99ï¼åä½ä¸ºVã |
| | | public Double sunVolt ;//太é³è½çµå:4åèBCDç ï¼åå¼èå´0~99.99ï¼åä½ä¸ºVã |
| | | public Integer signal; //ä¿¡å·å¼ºåº¦ï¼1åèBCDç ï¼åå¼èå´0~99ã |
| | | public Integer signalValue; //ä¿¡å·å¼ºåº¦ï¼1åèBCDç ï¼åå¼èå´0~99ã |
| | | public String rtuDt ;//æ§å¶å¨æ¶é |
| | | public DataAlarmVo alarmVo ;//æ¥è¦ |
| | | public DataStateVo stateVo ;//ç¶æ |
| | |
| | | sb.append(sunVolt==null?"":sunVolt); |
| | | sb.append("\n"); |
| | | sb.append(" ä¿¡å·å¼ºåº¦ï¼"); |
| | | sb.append(signal==null?"":signal); |
| | | sb.append(signalValue ==null?"": signalValue); |
| | | sb.append("\n"); |
| | | sb.append(" æ§å¶å¨æ¶éï¼"); |
| | | sb.append(rtuDt==null?"":rtuDt); |
| | |
| | | |
| | | @Data |
| | | public class DataStateVo { |
| | | public Byte idCard ;// èçµæ± çµå |
| | | public Byte work;//å·¥ä½ç¶æ |
| | | public Byte icCard;// ICå¡åè½ |
| | | public Byte working;//å·¥ä½ç¶æ |
| | | public Byte valve ;//éé¨ |
| | | |
| | | public String toString(){ |
| | | StringBuilder str = new StringBuilder() ; |
| | | str.append(" ç¶æ:\n"); |
| | | str.append(" IC å¡åè½ï¼"); |
| | | str.append(idCard==null?"":(idCard==1?"ææ":"æ æ")); |
| | | str.append(icCard ==null?"":(icCard ==1?"ææ":"æ æ")); |
| | | str.append("\n"); |
| | | str.append(" å·¥ä½ç¶æï¼"); |
| | | str.append(work ==null?"":(work==1?"å¯å¨":"忢")); |
| | | str.append(working ==null?"":(working ==1?"å¯å¨":"忢")); |
| | | str.append("\n"); |
| | | str.append(" éé¨ï¼"); |
| | | str.append(" éé¨ç¶æï¼"); |
| | | str.append(valve==null?"":(valve==1?"æå¼":"å
³é")); |
| | | return str.toString() ; |
| | | } |
| | |
| | | cdData.totalAmount += tpInt * 100000000.0 ; |
| | | |
| | | //ç¨æ°´æ·å·æ°æ®æ ¼å¼ï¼5åèBCDç ä½ä½å¨åé«ä½å¨åã |
| | | cdData.cardNo = ByteUtil.BCD2String_LE(bs, index, index + 4) ; |
| | | cdData.icCardNo = ByteUtil.BCD2String_LE(bs, index, index + 4) ; |
| | | index += 5 ; |
| | | |
| | | //ICå¡å·æ ¼å¼ï¼4åèHEXç ä½ä½å¨åé«ä½å¨åã |
| | | cdData.cardNo = ByteUtil.bytesToHex(bs, index, index + 3) ; |
| | | cdData.icCardNo = ByteUtil.bytesToHex(bs, index, index + 3) ; |
| | | index += 4 ; |
| | | |
| | | //ç¨æ°´æ·ä½é¢ï¼ç¨æ·ä½é¢4åèBCDç ï¼åå¼èå´0.00~999999.99ï¼åä½ä¸ºå
ã |
| | |
| | | cdData.totalAmount += tpInt * 100000000.0 ; |
| | | |
| | | //ç¨æ°´æ·å·æ°æ®æ ¼å¼ï¼5åèBCDç ä½ä½å¨åé«ä½å¨åã |
| | | cdData.cardNo = ByteUtil.BCD2String_LE(bs, index, index + 4) ; |
| | | cdData.IcCardNo = ByteUtil.BCD2String_LE(bs, index, index + 4) ; |
| | | index += 5 ; |
| | | |
| | | //ICå¡å·æ ¼å¼ï¼4åèHEXç ä½ä½å¨åé«ä½å¨åã |
| | | cdData.cardNo = ByteUtil.bytesToHex(bs, index, index + 3) ; |
| | | cdData.IcCardNo = ByteUtil.bytesToHex(bs, index, index + 3) ; |
| | | index += 4 ; |
| | | |
| | | //ç¨æ°´æ·ä½é¢ï¼ç¨æ·ä½é¢4åèBCDç ï¼åå¼èå´0.00~999999.99ï¼åä½ä¸ºå
ã |
| | |
| | | } |
| | | if(hasSignal){ |
| | | //ä¿¡å·å¼ºåº¦ï¼1åèBCDç ï¼åå¼èå´0~99ã |
| | | cdData.signal = 0 ; |
| | | cdData.signalValue = 0 ; |
| | | int tpInt = ByteUtil.BCD2Int_LE(bs, index, index) ; |
| | | index++ ; |
| | | cdData.signal += tpInt ; |
| | | cdData.signalValue += tpInt ; |
| | | } |
| | | if(hasAlarmStatus){ |
| | | //æ¥è¦æ°æ® |
| | |
| | | DataStateVo avo = new DataStateVo() ; |
| | | byte b = bs[index] ; |
| | | index++ ; |
| | | avo.idCard = (byte)(b & 0x4) ; |
| | | avo.work = (byte)(b & 0x8) ; |
| | | avo.icCard = (byte)(b & 0x4) ; |
| | | avo.working = (byte)(b & 0x8) ; |
| | | avo.valve = (byte)(b & 0x20) ; |
| | | return avo ; |
| | | } |
| | |
| | | List<VoController> getControllers(Map<?, ?> params); |
| | | |
| | | /** |
| | | * æ ¹æ®æ§å¶å¨å°åè·åæ§å¶å¨å表 |
| | | * æ ¹æ®æ§å¶å¨ç¼å·è·åæ§å¶å¨å表 |
| | | * @param rtuAddr |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> getControllersByAddr(@Param("rtuAddr") String rtuAddr); |
| | | |
| | | /** |
| | | * æ ¹æ®æ§å¶å¨ç¼å·è·åæ§å¶å¨å表 |
| | | * @param rtuAddr |
| | | * @return |
| | | */ |
| | | List<PrController> getControllersByRtuAddrAndIntakeNotNull(@Param("rtuAddr") String rtuAddr); |
| | | |
| | | |
| | | /** |
| | | * æ ¹æ®æ§å¶å¨ç¼å·é»è¾å 餿§å¶ |
| | |
| | | * @return |
| | | */ |
| | | Integer getRecordCountOfController(@Param("controllerId") Long controllerId); |
| | | |
| | | /** |
| | | * æ ¹æ®æ§å¶å¨ç¼å·è·åå·²ç»å®è®°å½æ° |
| | | * @param controllerId |
| | | * @return |
| | | */ |
| | | Integer getBindedCount(@Param("controllerId") Long controllerId); |
| | | |
| | | /** |
| | | * æ ¹æ®æ§å¶å¨ç¼å·å é¤åæ°´å£ç¼å· |
| | | * @param controllerId |
| | | * @return |
| | | */ |
| | | Integer deleteIntakeId(@Param("controllerId") Long controllerId); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrControllerTramp; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @Date 2024/1/15 15:27 |
| | | * @LastEditTime 2024/1/15 15:27 |
| | | * @Description |
| | | */ |
| | | */ |
| | | @Mapper |
| | | public interface PrControllerTrampMapper extends BaseMapper<PrControllerTramp> { |
| | | /** |
| | |
| | | * @param rutAddr æ§å¶å¨å°å |
| | | * @return object by æ§å¶å¨å°å |
| | | */ |
| | | List<PrControllerTramp> selectPrControllerTrampByRtuAddr(String rutAddr); |
| | | List<PrControllerTramp> getPrControllerTrampByRtuAddr(String rutAddr); |
| | | |
| | | /** |
| | | * update record selective |
| | |
| | | * @return update count |
| | | */ |
| | | int updateByPrimaryKey(PrControllerTramp record); |
| | | |
| | | /** |
| | | * æ ¹æ®æ§å¶å¨ç¼å·è·åæµæµªæ§å¶å¨å°å |
| | | * @param controllerId æµæµªæ§å¶å¨ç¼å· |
| | | * @return è®°å½æ°é |
| | | */ |
| | | //String getTrampRtuAddr(@Param("controllerId") Long controllerId); |
| | | |
| | | /** |
| | | * æ ¹æ®æ§å¶å¨ç¼å·è·åæµæµªæ§å¶å¨ä¿¡æ¯ |
| | | * @param controllerId |
| | | * @return |
| | | */ |
| | | PrControllerTramp getTrampControllerInfo(@Param("controllerId") Long controllerId); |
| | | } |
| | |
| | | * @return Level åºåç级 |
| | | */ |
| | | Integer getLevelByRegionId(long regionId); |
| | | |
| | | /** |
| | | * è·åæªç»æ§å¶å¨çåæ°´å£å表 |
| | | * @return |
| | | */ |
| | | List<Map<String, Object>> getNoBindingIntakes(); |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.daoRm; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoRm.RmAlarmStateHistory; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/1/16 11:18 |
| | | * @LastEditTime 2024/1/16 11:18 |
| | | * @Description |
| | | */ |
| | | @Mapper |
| | | public interface RmAlarmStateHistoryMapper extends BaseMapper<RmAlarmStateHistory> { |
| | | /** |
| | | * delete by primary key |
| | | * @param id primaryKey |
| | | * @return deleteCount |
| | | */ |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | /** |
| | | * insert record to table |
| | | * @param record the record |
| | | * @return insert count |
| | | */ |
| | | int insert(RmAlarmStateHistory record); |
| | | |
| | | /** |
| | | * insert record to table selective |
| | | * @param record the record |
| | | * @return insert count |
| | | */ |
| | | int insertSelective(RmAlarmStateHistory record); |
| | | |
| | | /** |
| | | * select by primary key |
| | | * @param id primary key |
| | | * @return object by primary key |
| | | */ |
| | | RmAlarmStateHistory selectByPrimaryKey(Long id); |
| | | |
| | | /** |
| | | * update record selective |
| | | * @param record the updated record |
| | | * @return update count |
| | | */ |
| | | int updateByPrimaryKeySelective(RmAlarmStateHistory record); |
| | | |
| | | /** |
| | | * update record |
| | | * @param record the updated record |
| | | * @return update count |
| | | */ |
| | | int updateByPrimaryKey(RmAlarmStateHistory record); |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.daoRm; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoRm.RmAlarmStateLast; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/1/16 11:18 |
| | | * @LastEditTime 2024/1/16 11:18 |
| | | * @Description |
| | | */ |
| | | @Mapper |
| | | public interface RmAlarmStateLastMapper extends BaseMapper<RmAlarmStateLast> { |
| | | /** |
| | | * delete by primary key |
| | | * @param id primaryKey |
| | | * @return deleteCount |
| | | */ |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | /** |
| | | * insert record to table |
| | | * @param record the record |
| | | * @return insert count |
| | | */ |
| | | int insert(RmAlarmStateLast record); |
| | | |
| | | /** |
| | | * insert record to table selective |
| | | * @param record the record |
| | | * @return insert count |
| | | */ |
| | | int insertSelective(RmAlarmStateLast record); |
| | | |
| | | /** |
| | | * select by primary key |
| | | * @param id primary key |
| | | * @return object by primary key |
| | | */ |
| | | RmAlarmStateLast selectByPrimaryKey(Long id); |
| | | |
| | | /** |
| | | * select by rtuAddr |
| | | * @param rtuAddr rtuAddr |
| | | * @return object by rtuAddr |
| | | */ |
| | | List<RmAlarmStateLast> selectByRtuAddr(String rtuAddr); |
| | | |
| | | /** |
| | | * update record selective |
| | | * @param record the updated record |
| | | * @return update count |
| | | */ |
| | | int updateByPrimaryKeySelective(RmAlarmStateLast record); |
| | | |
| | | /** |
| | | * update record |
| | | * @param record the updated record |
| | | * @return update count |
| | | */ |
| | | int updateByPrimaryKey(RmAlarmStateLast record); |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.daoRm; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoRm.RmAutoReportHistory; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/1/16 14:59 |
| | | * @LastEditTime 2024/1/16 14:59 |
| | | * @Description |
| | | */ |
| | | @Mapper |
| | | public interface RmAutoReportHistoryMapper extends BaseMapper<RmAutoReportHistory> { |
| | | /** |
| | | * delete by primary key |
| | | * @param id primaryKey |
| | | * @return deleteCount |
| | | */ |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | /** |
| | | * insert record to table |
| | | * @param record the record |
| | | * @return insert count |
| | | */ |
| | | int insert(RmAutoReportHistory record); |
| | | |
| | | /** |
| | | * insert record to table selective |
| | | * @param record the record |
| | | * @return insert count |
| | | */ |
| | | int insertSelective(RmAutoReportHistory record); |
| | | |
| | | /** |
| | | * select by primary key |
| | | * @param id primary key |
| | | * @return object by primary key |
| | | */ |
| | | RmAutoReportHistory selectByPrimaryKey(Long id); |
| | | |
| | | /** |
| | | * update record selective |
| | | * @param record the updated record |
| | | * @return update count |
| | | */ |
| | | int updateByPrimaryKeySelective(RmAutoReportHistory record); |
| | | |
| | | /** |
| | | * update record |
| | | * @param record the updated record |
| | | * @return update count |
| | | */ |
| | | int updateByPrimaryKey(RmAutoReportHistory record); |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.daoRm; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoRm.RmAutoReportLast; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/1/16 14:45 |
| | | * @LastEditTime 2024/1/16 14:45 |
| | | * @Description |
| | | */ |
| | | @Mapper |
| | | public interface RmAutoReportLastMapper extends BaseMapper<RmAutoReportLast> { |
| | | /** |
| | | * delete by primary key |
| | | * @param id primaryKey |
| | | * @return deleteCount |
| | | */ |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | /** |
| | | * insert record to table |
| | | * @param record the record |
| | | * @return insert count |
| | | */ |
| | | int insert(RmAutoReportLast record); |
| | | |
| | | /** |
| | | * insert record to table selective |
| | | * @param record the record |
| | | * @return insert count |
| | | */ |
| | | int insertSelective(RmAutoReportLast record); |
| | | |
| | | /** |
| | | * select by primary key |
| | | * @param id primary key |
| | | * @return object by primary key |
| | | */ |
| | | RmAutoReportLast selectByPrimaryKey(Long id); |
| | | |
| | | /** |
| | | * select by rtuAddr |
| | | * @param rtuAddr rtuAddr |
| | | * @return object by rtuAddr |
| | | */ |
| | | List<RmAutoReportLast> selectByRtuAddr(String rtuAddr); |
| | | |
| | | /** |
| | | * update record selective |
| | | * @param record the updated record |
| | | * @return update count |
| | | */ |
| | | int updateByPrimaryKeySelective(RmAutoReportLast record); |
| | | |
| | | /** |
| | | * update record |
| | | * @param record the updated record |
| | | * @return update count |
| | | */ |
| | | int updateByPrimaryKey(RmAutoReportLast record); |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.daoRm; |
| | | |
| | | import com.dy.pipIrrGlobal.pojoRm.RmIntakeAmount; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/1/17 9:07 |
| | | * @LastEditTime 2024/1/17 9:07 |
| | | * @Description |
| | | */ |
| | | @Mapper |
| | | public interface RmIntakeAmountMapper { |
| | | /** |
| | | * delete by primary key |
| | | * @param id primaryKey |
| | | * @return deleteCount |
| | | */ |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | /** |
| | | * insert record to table |
| | | * @param record the record |
| | | * @return insert count |
| | | */ |
| | | int insert(RmIntakeAmount record); |
| | | |
| | | /** |
| | | * insert record to table selective |
| | | * @param record the record |
| | | * @return insert count |
| | | */ |
| | | int insertSelective(RmIntakeAmount record); |
| | | |
| | | /** |
| | | * select by primary key |
| | | * @param id primary key |
| | | * @return object by primary key |
| | | */ |
| | | RmIntakeAmount selectByPrimaryKey(Long id); |
| | | |
| | | /** |
| | | * update record selective |
| | | * @param record the updated record |
| | | * @return update count |
| | | */ |
| | | int updateByPrimaryKeySelective(RmIntakeAmount record); |
| | | |
| | | /** |
| | | * update record |
| | | * @param record the updated record |
| | | * @return update count |
| | | */ |
| | | int updateByPrimaryKey(RmIntakeAmount record); |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.daoRm; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveReport; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/1/16 19:44 |
| | | * @LastEditTime 2024/1/16 19:44 |
| | | * @Description |
| | | */ |
| | | @Mapper |
| | | public interface RmOpenCloseValveReportMapper extends BaseMapper<RmOpenCloseValveReport> { |
| | | /** |
| | | * delete by primary key |
| | | * @param id primaryKey |
| | | * @return deleteCount |
| | | */ |
| | | int deleteByPrimaryKey(Long id); |
| | | |
| | | /** |
| | | * insert record to table |
| | | * @param record the record |
| | | * @return insert count |
| | | */ |
| | | int insert(RmOpenCloseValveReport record); |
| | | |
| | | /** |
| | | * insert record to table selective |
| | | * @param record the record |
| | | * @return insert count |
| | | */ |
| | | int insertSelective(RmOpenCloseValveReport record); |
| | | |
| | | /** |
| | | * select by primary key |
| | | * @param id primary key |
| | | * @return object by primary key |
| | | */ |
| | | RmOpenCloseValveReport selectByPrimaryKey(Long id); |
| | | |
| | | /** |
| | | * update record selective |
| | | * @param record the updated record |
| | | * @return update count |
| | | */ |
| | | int updateByPrimaryKeySelective(RmOpenCloseValveReport record); |
| | | |
| | | /** |
| | | * update record |
| | | * @param record the updated record |
| | | * @return update count |
| | | */ |
| | | int updateByPrimaryKey(RmOpenCloseValveReport record); |
| | | } |
| | |
| | | import com.dy.common.po.BaseEntity; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.*; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | |
| | | private Long id; |
| | | |
| | | /** |
| | | * åæ°´å£ID |
| | | */ |
| | | @Schema(description = "åæ°´å£ID", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotNull(message = "åæ°´å£IDä¸è½ä¸ºç©º") |
| | | private Long intakeId; |
| | | |
| | | /** |
| | | * æ§å¶å¨å°å |
| | | */ |
| | | @Schema(description = "æ§å¶å¨å°å", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotBlank(message = "æ§å¶å¨å°åä¸è½ä¸ºç©º") |
| | | @Length(message = "æ§å¶å¨å°åä¸å¤§äº{max}å",max = 11) |
| | | private String rtuaddr; |
| | | private String rtuAddr; |
| | | |
| | | /** |
| | | * é讯åè®® |
| | |
| | | private String protocol; |
| | | |
| | | /** |
| | | * å¨çº¿ç¶æ;1-å¨çº¿ï¼2-离线 |
| | | * åç°æ¥ææ¶é´ |
| | | */ |
| | | @Schema(description = "å¨çº¿ç¶æ", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Byte onlinestate; |
| | | |
| | | /** |
| | | * æè¿ä¸æ¥æ¶é´ |
| | | */ |
| | | @Schema(description = "æè¿ä¸æ¥æ¶é´", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Date reporttime; |
| | | @Schema(description = "åç°æ¥ææ¶é´", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Date findDt; |
| | | |
| | | /** |
| | | * æ·»å æ¹å¼;1-ç³»ç»èªå¨ï¼2-æå¨ |
| | | */ |
| | | @Schema(description = "æ·»å æ¹å¼", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Byte addways; |
| | | private Byte addWays; |
| | | |
| | | /** |
| | | * æä½äººID |
| | |
| | | * æä½æ¶é´ |
| | | */ |
| | | @Schema(description = "æä½æ¶é´", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | private Date operatedt; |
| | | private Date operateDt; |
| | | |
| | | /** |
| | | * é»è¾å 餿 è¯;0-æªå é¤ï¼1-å é¤ |
| | |
| | | import com.dy.common.po.BaseEntity; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import jakarta.validation.constraints.NotBlank; |
| | | import jakarta.validation.constraints.NotNull; |
| | | import lombok.*; |
| | | import org.hibernate.validator.constraints.Length; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * æµæµªæ§å¶å¨ |
| | |
| | | public Long id; |
| | | |
| | | /** |
| | | * é讯åè®® |
| | | * æ§å¶å¨å°å |
| | | */ |
| | | @Schema(description = "æ§å¶å¨å°å", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotBlank(message = "æ§å¶å¨å°åä¸è½ä¸ºç©º") |
| | |
| | | public String protocol; |
| | | |
| | | /** |
| | | * é讯åè®® |
| | | * åç°æ¶é´ |
| | | */ |
| | | @Schema(description = "åç°æ¶é´", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotBlank(message = "åç°æ¶é´ä¸è½ä¸ºç©º") |
| | | public String findDt;//åç°æ¶é´ï¼ yyyy-mm-dd HH:MM:SSï¼ |
| | | @NotNull(message = "åç°æ¶é´ä¸è½ä¸ºç©º") |
| | | public Date findDt;//åç°æ¶é´ï¼ yyyy-mm-dd HH:MM:SSï¼ |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.pojoRm; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.*; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/1/16 11:03 |
| | | * @LastEditTime 2024/1/16 11:03 |
| | | * @Description æ§å¶å¨æ¥è¦ä¸ç¶æï¼åå²ï¼ |
| | | */ |
| | | @TableName(value="rm_alarm_state_history", autoResultMap = true) |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "æ§å¶å¨æ¥è¦ä¸ç¶æï¼åå²ï¼") |
| | | public class RmAlarmStateHistory implements BaseEntity { |
| | | |
| | | public static final long serialVersionUID = 202401161104001L; |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @TableId(type = IdType.INPUT) |
| | | public Long id; |
| | | |
| | | /** |
| | | * æ§å¶å¨å®ä½IDï¼å¤é®ï¼ |
| | | */ |
| | | @Schema(description = "æ§å¶å¨å®ä½å¤é®", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long controllerid; |
| | | |
| | | /** |
| | | * åæ°´å£IDï¼å¤é®ï¼ |
| | | */ |
| | | @Schema(description = "åæ°´å£å®ä½å¤é®", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long intakeid; |
| | | |
| | | /** |
| | | * æ§å¶å¨å°å |
| | | */ |
| | | @Schema(description = "æ§å¶å¨å°å", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | public String rtuaddr; |
| | | |
| | | /** |
| | | * 䏿¥æ¥ææ¶é´ |
| | | */ |
| | | @Schema(description = "䏿¥æ¥ææ¶é´", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | public Date dt; |
| | | |
| | | /** |
| | | * æ¥è¦-èçµæ± çµå(1æ¥è¦ï¼0æ£å¸¸) |
| | | */ |
| | | @Schema(description = "æ¥è¦-èçµæ± çµå(1æ¥è¦ï¼0æ£å¸¸)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Byte bateryvolt; |
| | | |
| | | /** |
| | | * æ¥è¦-æ¼æ(1æ¥è¦ï¼0æ£å¸¸) |
| | | */ |
| | | @Schema(description = "æ¥è¦-èçµæ± çµå(1æ¥è¦ï¼0æ£å¸¸)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Byte loss; |
| | | |
| | | /** |
| | | * æ¥è¦-仪表(1æ¥è¦ï¼0æ£å¸¸) |
| | | */ |
| | | @Schema(description = "æ¥è¦-仪表(1æ¥è¦ï¼0æ£å¸¸)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Byte meter; |
| | | |
| | | /** |
| | | * æ¥è¦-éé¨(1æ¥è¦ï¼0æ£å¸¸) |
| | | */ |
| | | @Schema(description = "æ¥è¦-éé¨(1æ¥è¦ï¼0æ£å¸¸)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Byte valve; |
| | | |
| | | /** |
| | | * ç¶æ-ICå¡åè½ï¼1ææã0æ æï¼ |
| | | */ |
| | | @Schema(description = "ç¶æ-ICå¡åè½ï¼1ææã0æ æï¼", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Byte iccard; |
| | | |
| | | /** |
| | | * ç¶æ-å·¥ä½ï¼1å¯å¨ã0åæ¢ï¼ |
| | | */ |
| | | @Schema(description = "æ¥è¦-仪表(1æ¥è¦ï¼0æ£å¸¸)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Byte working; |
| | | |
| | | /** |
| | | * ç¶æ-éé¨ï¼1æå¼ã0å
³éï¼ |
| | | */ |
| | | @Schema(description = "ç¶æ-éé¨ï¼1æå¼ã0å
³éï¼", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Byte valvestate; |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.pojoRm; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.*; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/1/16 10:39 |
| | | * @LastEditTime 2024/1/16 10:39 |
| | | * @Description æ§å¶å¨æ¥è¦ä¸ç¶æï¼ææ°ï¼ |
| | | */ |
| | | @TableName(value="rm_alarm_state_last", autoResultMap = true) |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "æ§å¶å¨æ¥è¦ä¸ç¶æï¼ææ°ï¼") |
| | | public class RmAlarmStateLast implements BaseEntity { |
| | | |
| | | public static final long serialVersionUID = 202401161041001L; |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @TableId(type = IdType.INPUT) |
| | | public Long id; |
| | | |
| | | /** |
| | | * æ§å¶å¨å®ä½IDï¼å¤é®ï¼ |
| | | */ |
| | | @Schema(description = "æ§å¶å¨å®ä½å¤é®", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long controllerid; |
| | | |
| | | /** |
| | | * åæ°´å£IDï¼å¤é®ï¼ |
| | | */ |
| | | @Schema(description = "åæ°´å£å®ä½å¤é®", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long intakeid; |
| | | |
| | | /** |
| | | * æ§å¶å¨å°å |
| | | */ |
| | | @Schema(description = "æ§å¶å¨å°å", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | public String rtuaddr; |
| | | |
| | | /** |
| | | * 䏿¥æ¥ææ¶é´ |
| | | */ |
| | | @Schema(description = "䏿¥æ¥ææ¶é´", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | public Date dt; |
| | | |
| | | /** |
| | | * æ¥è¦-èçµæ± çµå(1æ¥è¦ï¼0æ£å¸¸) |
| | | */ |
| | | @Schema(description = "æ¥è¦-èçµæ± çµå(1æ¥è¦ï¼0æ£å¸¸)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Byte bateryvolt; |
| | | |
| | | /** |
| | | * æ¥è¦-æ¼æ(1æ¥è¦ï¼0æ£å¸¸) |
| | | */ |
| | | @Schema(description = "æ¥è¦-èçµæ± çµå(1æ¥è¦ï¼0æ£å¸¸)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Byte loss; |
| | | |
| | | /** |
| | | * æ¥è¦-仪表(1æ¥è¦ï¼0æ£å¸¸) |
| | | */ |
| | | @Schema(description = "æ¥è¦-仪表(1æ¥è¦ï¼0æ£å¸¸)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Byte meter; |
| | | |
| | | /** |
| | | * æ¥è¦-éé¨(1æ¥è¦ï¼0æ£å¸¸) |
| | | */ |
| | | @Schema(description = "æ¥è¦-éé¨(1æ¥è¦ï¼0æ£å¸¸)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Byte valve; |
| | | |
| | | /** |
| | | * ç¶æ-ICå¡åè½ï¼1ææã0æ æï¼ |
| | | */ |
| | | @Schema(description = "ç¶æ-ICå¡åè½ï¼1ææã0æ æï¼", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Byte iccard; |
| | | |
| | | /** |
| | | * ç¶æ-å·¥ä½ï¼1å¯å¨ã0åæ¢ï¼ |
| | | */ |
| | | @Schema(description = "æ¥è¦-仪表(1æ¥è¦ï¼0æ£å¸¸)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Byte working; |
| | | |
| | | /** |
| | | * ç¶æ-éé¨ï¼1æå¼ã0å
³éï¼ |
| | | */ |
| | | @Schema(description = "ç¶æ-éé¨ï¼1æå¼ã0å
³éï¼", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Byte valvestate; |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.pojoRm; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.*; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/1/16 14:59 |
| | | * @LastEditTime 2024/1/16 14:59 |
| | | * @Description ç»ç«¯èªæ¥ï¼ææ°ï¼ |
| | | */ |
| | | @TableName(value="rm_alarm_state_history", autoResultMap = true) |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "æ§å¶å¨èªæ¥ï¼åå²ï¼") |
| | | public class RmAutoReportHistory implements BaseEntity { |
| | | |
| | | public static final long serialVersionUID = 202401161501001L; |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @TableId(type = IdType.INPUT) |
| | | public Long id; |
| | | |
| | | |
| | | /** |
| | | * æ§å¶å¨å®ä½IDï¼å¤é®ï¼ |
| | | */ |
| | | @Schema(description = "æ§å¶å¨å®ä½å¤é®", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long controllerid; |
| | | |
| | | /** |
| | | * åæ°´å£IDï¼å¤é®ï¼ |
| | | */ |
| | | @Schema(description = "åæ°´å£å®ä½å¤é®", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long intakeid; |
| | | |
| | | /** |
| | | * æ§å¶å¨å°å |
| | | */ |
| | | @Schema(description = "æ§å¶å¨å°å", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | public String rtuaddr; |
| | | |
| | | /** |
| | | * 䏿¥æ¥ææ¶é´ |
| | | */ |
| | | @Schema(description = "䏿¥æ¥ææ¶é´", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | public Date dt; |
| | | |
| | | /** |
| | | * æ§å¶å¨æ¶é |
| | | */ |
| | | @Schema(description = "æ§å¶å¨æ¶é", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | public Date rtudt; |
| | | |
| | | /** |
| | | * ç¬æ¶æµéï¼5åèBCDç ï¼åå¼èå´0~9999999.999ï¼åä½ä¸ºm3/h |
| | | */ |
| | | @Schema(description = "ç¬æ¶æµéï¼5åèBCDç ï¼åå¼èå´0~9999999.999ï¼åä½ä¸ºm3/h", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double instantamount; |
| | | |
| | | /** |
| | | * 累计æµéï¼5åèBCDç ï¼åå¼èå´0~9999999999ï¼åä½ä¸ºm3 |
| | | */ |
| | | @Schema(description = "累计æµéï¼5åèBCDç ï¼åå¼èå´0~9999999999ï¼åä½ä¸ºm3", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double totalamount; |
| | | |
| | | /** |
| | | * æå¤±æµéï¼5åèBCDç ï¼åå¼èå´0~9999999999ï¼åä½ä¸ºm3 |
| | | */ |
| | | @Schema(description = "æå¤±æµéï¼5åèBCDç ï¼åå¼èå´0~9999999999ï¼åä½ä¸ºm3", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double lossamount; |
| | | |
| | | /** |
| | | * æ°´åï¼4åèBCDç ï¼åå¼èå´0~999999.99ï¼åä½ä¸ºKPa |
| | | */ |
| | | @Schema(description = "æ°´åï¼4åèBCDç ï¼åå¼èå´0~999999.99ï¼åä½ä¸ºKPa", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double waterpress; |
| | | |
| | | /** |
| | | * èçµæ± çµå:4åèBCDç ï¼åå¼èå´0~99.99ï¼åä½ä¸ºV |
| | | */ |
| | | @Schema(description = "èçµæ± çµå:4åèBCDç ï¼åå¼èå´0~99.99ï¼åä½ä¸ºV", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double batteryvolt; |
| | | |
| | | /** |
| | | * 太é³è½çµå:4åèBCDç ï¼åå¼èå´0~99.99ï¼åä½ä¸ºV |
| | | */ |
| | | @Schema(description = "太é³è½çµå:4åèBCDç ï¼åå¼èå´0~99.99ï¼åä½ä¸ºV", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double sunvolt; |
| | | |
| | | /** |
| | | * ä¿¡å·å¼ºåº¦ï¼1åèBCDç ï¼åå¼èå´0~99 |
| | | */ |
| | | @Schema(description = "ä¿¡å·å¼ºåº¦ï¼1åèBCDç ï¼åå¼èå´0~99", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Integer signalvalue; |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.pojoRm; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.*; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/1/16 14:45 |
| | | * @LastEditTime 2024/1/16 14:45 |
| | | * @Description ç»ç«¯èªæ¥ï¼ææ°ï¼ |
| | | */ |
| | | @TableName(value="rm_alarm_state_last", autoResultMap = true) |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "æ§å¶å¨èªæ¥ï¼ææ°ï¼") |
| | | public class RmAutoReportLast implements BaseEntity { |
| | | |
| | | public static final long serialVersionUID = 202401161446001L; |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @TableId(type = IdType.INPUT) |
| | | public Long id; |
| | | |
| | | |
| | | /** |
| | | * æ§å¶å¨å®ä½IDï¼å¤é®ï¼ |
| | | */ |
| | | @Schema(description = "æ§å¶å¨å®ä½å¤é®", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long controllerid; |
| | | |
| | | /** |
| | | * åæ°´å£IDï¼å¤é®ï¼ |
| | | */ |
| | | @Schema(description = "åæ°´å£å®ä½å¤é®", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long intakeid; |
| | | |
| | | /** |
| | | * æ§å¶å¨å°å |
| | | */ |
| | | @Schema(description = "æ§å¶å¨å°å", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | public String rtuaddr; |
| | | |
| | | /** |
| | | * 䏿¥æ¥ææ¶é´ |
| | | */ |
| | | @Schema(description = "䏿¥æ¥ææ¶é´", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | public Date dt; |
| | | |
| | | /** |
| | | * æ§å¶å¨æ¶é |
| | | */ |
| | | @Schema(description = "æ§å¶å¨æ¶é", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | public Date rtudt; |
| | | |
| | | /** |
| | | * ç¬æ¶æµéï¼5åèBCDç ï¼åå¼èå´0~9999999.999ï¼åä½ä¸ºm3/h |
| | | */ |
| | | @Schema(description = "ç¬æ¶æµéï¼5åèBCDç ï¼åå¼èå´0~9999999.999ï¼åä½ä¸ºm3/h", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double instantamount; |
| | | |
| | | /** |
| | | * 累计æµéï¼5åèBCDç ï¼åå¼èå´0~9999999999ï¼åä½ä¸ºm3 |
| | | */ |
| | | @Schema(description = "累计æµéï¼5åèBCDç ï¼åå¼èå´0~9999999999ï¼åä½ä¸ºm3", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double totalamount; |
| | | |
| | | /** |
| | | * æå¤±æµéï¼5åèBCDç ï¼åå¼èå´0~9999999999ï¼åä½ä¸ºm3 |
| | | */ |
| | | @Schema(description = "æå¤±æµéï¼5åèBCDç ï¼åå¼èå´0~9999999999ï¼åä½ä¸ºm3", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double lossamount; |
| | | |
| | | /** |
| | | * æ°´åï¼4åèBCDç ï¼åå¼èå´0~999999.99ï¼åä½ä¸ºKPa |
| | | */ |
| | | @Schema(description = "æ°´åï¼4åèBCDç ï¼åå¼èå´0~999999.99ï¼åä½ä¸ºKPa", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double waterpress; |
| | | |
| | | /** |
| | | * èçµæ± çµå:4åèBCDç ï¼åå¼èå´0~99.99ï¼åä½ä¸ºV |
| | | */ |
| | | @Schema(description = "èçµæ± çµå:4åèBCDç ï¼åå¼èå´0~99.99ï¼åä½ä¸ºV", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double batteryvolt; |
| | | |
| | | /** |
| | | * 太é³è½çµå:4åèBCDç ï¼åå¼èå´0~99.99ï¼åä½ä¸ºV |
| | | */ |
| | | @Schema(description = "太é³è½çµå:4åèBCDç ï¼åå¼èå´0~99.99ï¼åä½ä¸ºV", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double sunvolt; |
| | | |
| | | /** |
| | | * ä¿¡å·å¼ºåº¦ï¼1åèBCDç ï¼åå¼èå´0~99 |
| | | */ |
| | | @Schema(description = "ä¿¡å·å¼ºåº¦ï¼1åèBCDç ï¼åå¼èå´0~99", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Integer signalvalue; |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.pojoRm; |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.*; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/1/17 9:07 |
| | | * @LastEditTime 2024/1/17 9:07 |
| | | * @Description åæ°´å£åæ°´é |
| | | */ |
| | | @TableName(value="rm_intake_amount", autoResultMap = true) |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "åæ°´å£åæ°´é") |
| | | public class RmIntakeAmount implements BaseEntity { |
| | | |
| | | public static final long serialVersionUID = 202401170908001L; |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @TableId(type = IdType.INPUT) |
| | | public Long id; |
| | | |
| | | /** |
| | | * åæ°´å£IDï¼å¤é®ï¼ |
| | | */ |
| | | @Schema(description = "åæ°´å£å®ä½å¤é®", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long intakeid; |
| | | |
| | | /** |
| | | * ç´¯è®¡åæ°´éï¼ä¸å
æ¬æ¼ææ°´éï¼ |
| | | */ |
| | | @Schema(description = "ç´¯è®¡åæ°´éï¼ä¸å
æ¬æ¼ææ°´éï¼", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double amount; |
| | | |
| | | /** |
| | | * ç´¯è®¡æ¼ææ°´é |
| | | */ |
| | | @Schema(description = "ç´¯è®¡æ¼ææ°´é", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double loss; |
| | | |
| | | /** |
| | | * æå计水éçæ§å¶å¨IDï¼å¤é®ï¼ |
| | | */ |
| | | @Schema(description = "æ§å¶å¨å®ä½å¤é®", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long controlleridlast; |
| | | |
| | | /** |
| | | * æåè®¡æ°´éæ¥æ |
| | | */ |
| | | @Schema(description = "æåè®¡æ°´éæ¥æ", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | public Date dtlast; |
| | | |
| | | /** |
| | | * æåè®¡æ°´éæ¶æ§å¶å¨åæ°´é |
| | | */ |
| | | @Schema(description = "æåè®¡æ°´éæ¶æ§å¶å¨åæ°´é", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double amountlast; |
| | | |
| | | /** |
| | | * æåè®¡æ°´éæ¶æ§å¶å¨ç´¯è®¡æ°´é |
| | | */ |
| | | @Schema(description = "æåè®¡æ°´éæ¶æ§å¶å¨ç´¯è®¡æ°´é", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double totalamountlast; |
| | | |
| | | /** |
| | | * æåè®¡æ°´éæ¥æºï¼1å¼é工使¥ï¼2å
³éæ¥ï¼3èªæ¥ï¼ |
| | | */ |
| | | @Schema(description = "æåè®¡æ°´éæ¥æºï¼1å¼é工使¥ï¼2å
³éæ¥ï¼3èªæ¥ï¼", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Byte resourcetypelast; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.pipIrrGlobal.pojoRm; |
| | | |
| | | |
| | | import com.alibaba.fastjson2.annotation.JSONField; |
| | | import com.alibaba.fastjson2.writer.ObjectWriterImplToString; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.dy.common.po.BaseEntity; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.v3.oas.annotations.media.Schema; |
| | | import lombok.*; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/1/16 19:44 |
| | | * @LastEditTime 2024/1/16 19:44 |
| | | * @Description æ§å¶å¨å¼å
³éè®°å½ |
| | | */ |
| | | @TableName(value="rm_open_close_valve_report", autoResultMap = true) |
| | | @Data |
| | | @Builder |
| | | @ToString |
| | | @NoArgsConstructor |
| | | @AllArgsConstructor |
| | | @Schema(name = "æ§å¶å¨å¼å
³éè®°å½") |
| | | public class RmOpenCloseValveReport implements BaseEntity { |
| | | |
| | | public static final long serialVersionUID = 202401161929001L; |
| | | /** |
| | | * ä¸»é® |
| | | */ |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | @TableId(type = IdType.INPUT) |
| | | public Long id; |
| | | |
| | | /** |
| | | * æ§å¶å¨å®ä½IDï¼å¤é®ï¼ |
| | | */ |
| | | @Schema(description = "æ§å¶å¨å®ä½å¤é®", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long controllerid; |
| | | |
| | | /** |
| | | * åæ°´å£å®ä½IDï¼å¤é®ï¼ |
| | | */ |
| | | @Schema(description = "åæ°´å£å®ä½å¤é®", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JSONField(serializeUsing= ObjectWriterImplToString.class) |
| | | public Long intakeid; |
| | | |
| | | /** |
| | | * æ§å¶å¨å°å |
| | | */ |
| | | @Schema(description = "æ§å¶å¨å°å", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | public String rtuaddr; |
| | | |
| | | /** |
| | | * å¼éæ°æ®æ¥æ¶æ¶é´ |
| | | */ |
| | | @Schema(description = "å¼éæ°æ®æ¥æ¶æ¶é´", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | public Date opdt; |
| | | |
| | | /** |
| | | * å¼éç±»å |
| | | */ |
| | | @Schema(description = "å¼éç±»å", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Byte optype; |
| | | |
| | | /** |
| | | * å¼éæ¶ç´¯è®¡æµé |
| | | */ |
| | | @Schema(description = "å¼éæ¶ç´¯è®¡æµé", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double optotalamount; |
| | | |
| | | /** |
| | | * å¼éICå¡ç¼å· |
| | | */ |
| | | @Schema(description = "å¼éICå¡ç¼å·", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public String opiccardno; |
| | | |
| | | /** |
| | | * å¼éicå¡å°å |
| | | */ |
| | | @Schema(description = "å¼éicå¡å°å", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public String opiccardaddr; |
| | | |
| | | /** |
| | | * å¼éæ¶å©ä½éé¢ |
| | | */ |
| | | @Schema(description = "å¼éæ¶å©ä½éé¢", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double opremainmoney; |
| | | |
| | | /** |
| | | * å¼éæ¶æ§å¶å¨æ¶é |
| | | */ |
| | | @Schema(description = "å¼éæ¶æ§å¶å¨æ¶é", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | public Date opendt; |
| | | |
| | | /** |
| | | * å
³éæ°æ®æ¥æ¶æ¥ææ¶é´ |
| | | */ |
| | | @Schema(description = "éæ°æ®æ¥æ¶æ¥ææ¶é´", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | public Date cldt; |
| | | |
| | | /** |
| | | * å
³éç±»å |
| | | */ |
| | | @Schema(description = "å
³éç±»å", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Byte cltype; |
| | | |
| | | /** |
| | | * å
³éæ¶ç´¯è®¡æµé |
| | | */ |
| | | @Schema(description = "å
³éæ¶ç´¯è®¡æµé", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double cltotalamount; |
| | | |
| | | /** |
| | | * å
³éæ¶ICå¡ç¼å· |
| | | */ |
| | | @Schema(description = "å
³éæ¶ICå¡ç¼å·", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public String cliccardno; |
| | | |
| | | /** |
| | | * å
³éæ¶ICå¡å°å |
| | | */ |
| | | @Schema(description = "å
³éæ¶ICå¡å°å", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public String cliccardaddr; |
| | | |
| | | /** |
| | | * å
³éæ¶å©ä½éé¢ |
| | | */ |
| | | @Schema(description = "å
³éæ¶å©ä½éé¢", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double clremainmoney; |
| | | |
| | | /** |
| | | * å
³éæ¥ä¸æ¬æ¬¡ç¨æ°´é |
| | | */ |
| | | @Schema(description = "å
³éæ¥ä¸æ¬æ¬¡ç¨æ°´é", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double clthisamount; |
| | | |
| | | /** |
| | | * å
³éæ¥ä¸æ¬æ¬¡æ¶è´¹éé¢ |
| | | */ |
| | | @Schema(description = "å
³éæ¥ä¸æ¬æ¬¡æ¶è´¹éé¢", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Double clthismoney; |
| | | |
| | | /** |
| | | * å
³éæ¥ä¸æ¬æ¬¡ç¨æ°´æ¶é¿ï¼åéï¼ |
| | | */ |
| | | @Schema(description = "å
³éæ¥ä¸æ¬æ¬¡ç¨æ°´æ¶é¿ï¼åéï¼", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | public Integer clthistime; |
| | | |
| | | /** |
| | | * å
³éæ¥ä¸çå¼éæ¶æ§å¶å¨æ¶é |
| | | */ |
| | | @Schema(description = "å
³éæ¥ä¸çå¼éæ¶æ§å¶å¨æ¶é", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | public Date clopendt; |
| | | |
| | | /** |
| | | * å
³éæ¶æ§å¶å¨æ¶é |
| | | */ |
| | | @Schema(description = "å
³éæ¶æ§å¶å¨æ¶é", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | public Date closedt; |
| | | |
| | | } |
| | |
| | | package com.dy.pipIrrGlobal.util; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | public class Constant { |
| | | /** |
| | |
| | | public static final Integer no = 0 ; |
| | | public static final String YES = "1" ; |
| | | public static final String NO = "0" ; |
| | | |
| | | // 项ç®ç¼å· |
| | | public static final Integer projectCode_ym = 100; |
| | | public static final Integer projectCode_pj = 101; |
| | | |
| | | // åè®®å表 |
| | | public static final String[] protocol = {"DYJS_2023", "DYJS_2024"}; |
| | | |
| | | public static List<String[]> yesNo(){ |
| | | List<String[]> list = new ArrayList<>() ; |
| | | list.add(new String[]{YES , "æ¯"}) ; |
| | |
| | | return null ; |
| | | } |
| | | |
| | | // 1ãå·å¡å¼éï¼2å·å¡å
³éï¼3ãä¸å¿ç«å¼éï¼4ãä¸å¿ç«å
³éï¼5ãæ¬ è´¹å
³éï¼ |
| | | // 6ãæµé计æ
éå
³éï¼7ãç´§æ¥å
³éï¼8ãç¨æ·è¿ç¨å¼éï¼9ãç¨æ·è¿ç¨å
³éï¼ |
| | | // 16ï¼ç¨æ·å¼éå管éå
æ²¡ææ°´ï¼èªå¨å
³éã管éä¸åºæ°´èªå¨å
³é |
| | | public static final Integer valveOpenByIC = 1 ;//å·å¡å¼é |
| | | public static final Integer valveCloseByIC = 2 ;//å·å¡å
³é |
| | | public static final Integer valveOpenByCenter = 3 ;//ä¸å¿ç«å¼é |
| | | public static final Integer valveCloseByCenter = 4 ;//ä¸å¿ç«å
³é |
| | | public static final Integer valveCloseByFee = 5 ;//æ¬ è´¹å
³é |
| | | public static final Integer valveCloseByFlowMeterFault = 6 ;//æµé计æ
éå
³é |
| | | public static final Integer valveCloseByEmergency = 7 ;//ç´§æ¥å
³é |
| | | public static final Integer valveOpenByRemoteUser = 8 ;//ç¨æ·è¿ç¨å¼é |
| | | public static final Integer valveCloseByRemoteUser = 9 ;//ç¨æ·è¿ç¨å
³éï¼ |
| | | public static final Integer valveCloseByNoWater = 16 ;//ç®¡éæ æ°´èªå¨å
³éï¼ |
| | | |
| | | public static Map<Integer, String> openCloseValveTypes(){ |
| | | Map<Integer, String> map = new HashMap<>() ; |
| | | map.put(valveOpenByIC, "å·å¡å¼é"); |
| | | map.put(valveCloseByIC , "å·å¡å
³é") ; |
| | | map.put(valveOpenByCenter , "ä¸å¿ç«å¼é") ; |
| | | map.put(valveCloseByCenter , "ä¸å¿ç«å
³é") ; |
| | | map.put(valveCloseByFee , "æ¬ è´¹å
³é") ; |
| | | map.put(valveCloseByFlowMeterFault , "æµé计æ
éå
³é") ; |
| | | map.put(valveCloseByEmergency , "ç´§æ¥å
³é") ; |
| | | map.put(valveOpenByRemoteUser , "ç¨æ·è¿ç¨å¼é") ; |
| | | map.put(valveCloseByRemoteUser , "ç¨æ·è¿ç¨å
³é") ; |
| | | map.put(valveCloseByNoWater , "ç®¡éæ æ°´èªå¨å
³é") ; |
| | | return map ; |
| | | } |
| | | public static String openCloseValveTypeName(Integer type){ |
| | | if(type != null){ |
| | | return switch (type.intValue()) { |
| | | case 1 -> "å·å¡å¼é"; |
| | | case 2 -> "å·å¡å
³é"; |
| | | case 3 -> "ä¸å¿ç«å¼é"; |
| | | case 4 -> "ä¸å¿ç«å
³é"; |
| | | case 5 -> "æ¬ è´¹å
³é"; |
| | | case 6 -> "æµé计æ
éå
³é"; |
| | | case 7 -> "ç´§æ¥å
³é"; |
| | | case 8 -> "ç¨æ·è¿ç¨å¼é"; |
| | | case 9 -> "ç¨æ·è¿ç¨å
³é"; |
| | | case 16 -> "ç®¡éæ æ°´èªå¨å
³é"; |
| | | default -> "æªç¥"; |
| | | }; |
| | | } |
| | | return null ; |
| | | } |
| | | |
| | | } |
| | |
| | | @ColumnWidth(15) |
| | | private String rtuAddr; |
| | | |
| | | @Schema(title = "å¨çº¿ç¶æ") |
| | | @ExcelProperty("å¨çº¿ç¶æ") |
| | | @ColumnWidth(15) |
| | | private String onlineState; |
| | | |
| | | @Schema(title = "ç»å®åæ°´å£") |
| | | @ExcelProperty("ç»å®åæ°´å£") |
| | | @ColumnWidth(10) |
| | |
| | | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @Schema(title = "æè¿ä¸æ¥æ¶é´") |
| | | @ExcelProperty("æè¿ä¸æ¥æ¶é´") |
| | | @Schema(title = "åç°æ¥ææ¶é´") |
| | | @ExcelProperty("åç°æ¥ææ¶é´") |
| | | @ColumnWidth(30) |
| | | private Date reportTime; |
| | | private Date findDt; |
| | | } |
| | |
| | | idSuffix: 7 |
| | | |
| | | #项ç®ç¼å· |
| | | projectCode: |
| | | ym: 100 |
| | | pj: 101 |
| | | #projectCode: |
| | | # ym: 100 |
| | | # pj: 101 |
| | | |
| | | #é讯åè®® |
| | | protocol: DYJS_2023,DYJS_2024 |
| | | #protocol: DYJS_2023,DYJS_2024 |
| | |
| | | <!--@mbg.generated--> |
| | | <!--@Table pr_controller--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="rtuAddr" jdbcType="VARCHAR" property="rtuaddr" /> |
| | | <result column="intakeId" jdbcType="BIGINT" property="intakeId" /> |
| | | <result column="rtuAddr" jdbcType="VARCHAR" property="rtuAddr" /> |
| | | <result column="protocol" jdbcType="VARCHAR" property="protocol" /> |
| | | <result column="onlineState" jdbcType="TINYINT" property="onlinestate" /> |
| | | <result column="reportTime" jdbcType="TIMESTAMP" property="reporttime" /> |
| | | <result column="addWays" jdbcType="TINYINT" property="addways" /> |
| | | <result column="findDt" jdbcType="TIMESTAMP" property="findDt" /> |
| | | <result column="addWays" jdbcType="TINYINT" property="addWays" /> |
| | | <result column="operator" jdbcType="BIGINT" property="operator" /> |
| | | <result column="operateDt" jdbcType="TIMESTAMP" property="operatedt" /> |
| | | <result column="operateDt" jdbcType="TIMESTAMP" property="operateDt" /> |
| | | <result column="deleted" jdbcType="TINYINT" property="deleted" /> |
| | | </resultMap> |
| | | <resultMap id="PartResultMap" type="com.dy.pipIrrGlobal.pojoPr.PrController"> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="intakeId" jdbcType="BIGINT" property="intakeId" /> |
| | | <result column="rtuAddr" jdbcType="VARCHAR" property="rtuAddr" /> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, rtuAddr, protocol, onlineState, reportTime, addWays, `operator`, operateDt, deleted |
| | | id, intakeId, rtuAddr, protocol, findDt, addWays, `operator`, operateDt, deleted |
| | | </sql> |
| | | <sql id="Part_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, rtuAddr, intakeId |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | |
| | | </delete> |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoPr.PrController"> |
| | | <!--@mbg.generated--> |
| | | insert into pr_controller (id, rtuAddr, protocol, |
| | | onlineState, reportTime, addWays, |
| | | insert into pr_controller (id, intakeId, rtuAddr, |
| | | protocol, findDt, addWays, |
| | | `operator`, operateDt, deleted |
| | | ) |
| | | values (#{id,jdbcType=BIGINT}, #{rtuaddr,jdbcType=VARCHAR}, #{protocol,jdbcType=VARCHAR}, |
| | | #{onlinestate,jdbcType=TINYINT}, #{reporttime,jdbcType=TIMESTAMP}, #{addways,jdbcType=TINYINT}, |
| | | #{operator,jdbcType=BIGINT}, #{operatedt,jdbcType=TIMESTAMP}, #{deleted,jdbcType=TINYINT} |
| | | values (#{id,jdbcType=BIGINT}, #{intakeId,jdbcType=BIGINT}, #{rtuAddr,jdbcType=VARCHAR}, |
| | | #{protocol,jdbcType=VARCHAR}, #{findDt,jdbcType=TIMESTAMP}, #{addWays,jdbcType=TINYINT}, |
| | | #{operator,jdbcType=BIGINT}, #{operateDt,jdbcType=TIMESTAMP}, #{deleted,jdbcType=TINYINT} |
| | | ) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrController"> |
| | |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="rtuaddr != null"> |
| | | <if test="intakeId != null"> |
| | | intakeId, |
| | | </if> |
| | | <if test="rtuAddr != null"> |
| | | rtuAddr, |
| | | </if> |
| | | <if test="protocol != null"> |
| | | protocol, |
| | | </if> |
| | | <if test="onlinestate != null"> |
| | | onlineState, |
| | | <if test="findDt != null"> |
| | | findDt, |
| | | </if> |
| | | <if test="reporttime != null"> |
| | | reportTime, |
| | | </if> |
| | | <if test="addways != null"> |
| | | <if test="addWays != null"> |
| | | addWays, |
| | | </if> |
| | | <if test="operator != null"> |
| | | `operator`, |
| | | </if> |
| | | <if test="operatedt != null"> |
| | | <if test="operateDt != null"> |
| | | operateDt, |
| | | </if> |
| | | <if test="deleted != null"> |
| | |
| | | <if test="id != null"> |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="rtuaddr != null"> |
| | | #{rtuaddr,jdbcType=VARCHAR}, |
| | | <if test="intakeId != null"> |
| | | #{intakeId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="rtuAddr != null"> |
| | | #{rtuAddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="protocol != null"> |
| | | #{protocol,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="onlinestate != null"> |
| | | #{onlinestate,jdbcType=TINYINT}, |
| | | <if test="findDt != null"> |
| | | #{findDt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="reporttime != null"> |
| | | #{reporttime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="addways != null"> |
| | | #{addways,jdbcType=TINYINT}, |
| | | <if test="addWays != null"> |
| | | #{addWays,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="operator != null"> |
| | | #{operator,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="operatedt != null"> |
| | | #{operatedt,jdbcType=TIMESTAMP}, |
| | | <if test="operateDt != null"> |
| | | #{operateDt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="deleted != null"> |
| | | #{deleted,jdbcType=TINYINT}, |
| | |
| | | <!--@mbg.generated--> |
| | | update pr_controller |
| | | <set> |
| | | <if test="rtuaddr != null"> |
| | | rtuAddr = #{rtuaddr,jdbcType=VARCHAR}, |
| | | <if test="intakeId != null"> |
| | | intakeId = #{intakeId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="rtuAddr != null"> |
| | | rtuAddr = #{rtuAddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="protocol != null"> |
| | | protocol = #{protocol,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="onlinestate != null"> |
| | | onlineState = #{onlinestate,jdbcType=TINYINT}, |
| | | <if test="findDt != null"> |
| | | findDt = #{findDt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="reporttime != null"> |
| | | reportTime = #{reporttime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="addways != null"> |
| | | addWays = #{addways,jdbcType=TINYINT}, |
| | | <if test="addWays != null"> |
| | | addWays = #{addWays,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="operator != null"> |
| | | `operator` = #{operator,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="operatedt != null"> |
| | | operateDt = #{operatedt,jdbcType=TIMESTAMP}, |
| | | <if test="operateDt != null"> |
| | | operateDt = #{operateDt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="deleted != null"> |
| | | deleted = #{deleted,jdbcType=TINYINT}, |
| | |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoPr.PrController"> |
| | | <!--@mbg.generated--> |
| | | update pr_controller |
| | | set rtuAddr = #{rtuaddr,jdbcType=VARCHAR}, |
| | | set intakeId = #{intakeId,jdbcType=BIGINT}, |
| | | rtuAddr = #{rtuAddr,jdbcType=VARCHAR}, |
| | | protocol = #{protocol,jdbcType=VARCHAR}, |
| | | onlineState = #{onlinestate,jdbcType=TINYINT}, |
| | | reportTime = #{reporttime,jdbcType=TIMESTAMP}, |
| | | addWays = #{addways,jdbcType=TINYINT}, |
| | | findDt = #{findDt,jdbcType=TIMESTAMP}, |
| | | addWays = #{addWays,jdbcType=TINYINT}, |
| | | `operator` = #{operator,jdbcType=BIGINT}, |
| | | operateDt = #{operatedt,jdbcType=TIMESTAMP}, |
| | | operateDt = #{operateDt,jdbcType=TIMESTAMP}, |
| | | deleted = #{deleted,jdbcType=TINYINT} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <!--æ ¹æ®æå®è·åæ§å¶å¨è®°å½æ°--> |
| | | <!--æ ¹æ®æ§å¶å¨ç¼å·å é¤åæ°´å£ç¼å·--> |
| | | <update id="deleteIntakeId"> |
| | | UPDATE pr_controller SET intakeId = null WHERE id = ${controllerId} |
| | | </update> |
| | | |
| | | <!--æ ¹æ®æå®æ¡ä»¶è·åæ§å¶å¨è®°å½æ°--> |
| | | <select id="getRecordCount" resultType="java.lang.Long"> |
| | | SELECT |
| | | COUNT(*) AS recordCount |
| | | FROM pr_controller con |
| | | INNER JOIN pr_intake_controller ic ON ic.controllerId = con.id |
| | | INNER JOIN pr_intake inta ON ic.intakeId = inta.id |
| | | INNER JOIN pr_intake inta ON con.intakeId = inta.id |
| | | <where> |
| | | AND ic.operateType = 1 |
| | | AND deleted = 0 |
| | | |
| | | <if test = "id != null and id > 0"> |
| | | AND con.id = ${id} |
| | |
| | | |
| | | <if test = "rtuAddr != null and rtuAddr !=''"> |
| | | AND con.rtuAddr like CONCAT('%',#{rtuAddr},'%') |
| | | </if> |
| | | |
| | | <if test = "onlineState != null and onlineState > 0"> |
| | | AND con.onlineState = ${onlineState} |
| | | </if> |
| | | |
| | | <if test = "bindNumber != null and bindNumber > 0"> |
| | |
| | | </where> |
| | | </select> |
| | | |
| | | <!--æ ¹æ®æå®è·åæ§å¶å¨è®°å½--> |
| | | <!--æ ¹æ®æå®æ¡ä»¶è·åæ§å¶å¨è®°å½--> |
| | | <select id="getControllers" resultType="com.dy.pipIrrGlobal.voPr.VoController"> |
| | | SELECT |
| | | con.rtuAddr AS rtuAddr, |
| | | (CASE |
| | | WHEN con.onlineState = 1 THEN "å¨çº¿" |
| | | WHEN con.onlineState = 2 THEN "离线" |
| | | END) AS onlineState, |
| | | inta.name AS intakeName, |
| | | (SELECT COUNT(*) FROM pr_intake_controller WHERE controllerId = con.id AND intakeId = inta.id AND operateType = 1) AS bindNumber, |
| | | con.reportTime |
| | | con.findDt |
| | | FROM pr_controller con |
| | | INNER JOIN pr_intake_controller ic ON ic.controllerId = con.id |
| | | INNER JOIN pr_intake inta ON ic.intakeId = inta.id |
| | | INNER JOIN pr_intake inta ON con.intakeId = inta.id |
| | | <where> |
| | | AND ic.operateType = 1 |
| | | AND deleted = 0 |
| | | |
| | | <if test = "id != null and id > 0"> |
| | | AND con.id = ${id} |
| | |
| | | |
| | | <if test = "rtuAddr != null and rtuAddr !=''"> |
| | | AND con.rtuAddr like CONCAT('%',#{rtuAddr},'%') |
| | | </if> |
| | | |
| | | <if test = "onlineState != null and onlineState > 0"> |
| | | AND con.onlineState = ${onlineState} |
| | | </if> |
| | | |
| | | <if test = "bindNumber != null and bindNumber > 0"> |
| | |
| | | <if test="pageCurr != null and pageSize != null"> |
| | | LIMIT ${pageCurr}, ${pageSize} |
| | | </if> |
| | | |
| | | </select> |
| | | |
| | | <!--æ ¹æ®æ§å¶å¨å°åè·åæ§å¶å¨å表--> |
| | | <select id="getControllersByAddr" resultType="java.util.Map"> |
| | | SELECT id, rtuAddr FROM pr_controller WHERE rtuAddr LIKE CONCAT('%',#{rtuAddr},'%') |
| | | SELECT id, rtuAddr FROM pr_controller WHERE deleted = 0 AND rtuAddr LIKE CONCAT('%',#{rtuAddr},'%') |
| | | </select> |
| | | |
| | | <!--æ ¹æ®æ§å¶å¨å°åè·åæ§å¶å¨å表--> |
| | | <select id="getControllersByRtuAddrAndIntakeNotNull" parameterType="java.lang.String" resultMap="PartResultMap"> |
| | | SELECT |
| | | <include refid="Part_Column_List"> |
| | | </include> |
| | | FROM pr_controller WHERE deleted = 0 AND intakeId is not null AND rtuAddr=#{rtuAddr,jdbcType=VARCHAR} |
| | | </select> |
| | | |
| | | <!--æ ¹æ®æ§å¶å¨ç¼å·é»è¾å 餿§å¶--> |
| | |
| | | <select id="getRecordCountOfController" resultType="java.lang.Integer"> |
| | | SELECT COUNT(*) AS recordCount FROM pr_controller WHERE deleted = 0 AND id = ${controllerId} |
| | | </select> |
| | | |
| | | <!--æ ¹æ®æ§å¶å¨ç¼å·è·åå·²ç»å®è®°å½æ°--> |
| | | <select id="getBindedCount" resultType="java.lang.Integer"> |
| | | SELECT COUNT(*) AS recordCount FROM pr_controller WHERE rtuAddr = (SELECT rtuAddr FROM pr_controller_tramp WHERE id = ${controllerId}) AND intakeId IS NOT NULL |
| | | </select> |
| | | </mapper> |
| | |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="rtuAddr" jdbcType="VARCHAR" property="rtuAddr" /> |
| | | <result column="protocol" jdbcType="VARCHAR" property="protocol" /> |
| | | <result column="findDt" jdbcType="VARCHAR" property="findDt" /> |
| | | <result column="findDt" jdbcType="TIMESTAMP" property="findDt" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | |
| | | from pr_controller_tramp |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <select id="selectPrControllerTrampByRtuAddr" parameterType="java.lang.String" resultMap="BaseResultMap"> |
| | | |
| | | <select id="getPrControllerTrampByRtuAddr" parameterType="java.lang.String" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from pr_controller_tramp |
| | | where rtuAddr = #{rtuAddr,jdbcType=VARCHAR} |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from pr_controller_tramp |
| | |
| | | insert into pr_controller_tramp (id, rtuAddr, protocol, |
| | | findDt) |
| | | values (#{id,jdbcType=BIGINT}, #{rtuAddr,jdbcType=VARCHAR}, #{protocol,jdbcType=VARCHAR}, |
| | | #{findDt,jdbcType=VARCHAR}) |
| | | #{findDt,jdbcType=TIMESTAMP}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoPr.PrControllerTramp"> |
| | | <!--@mbg.generated--> |
| | |
| | | #{protocol,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="findDt != null"> |
| | | #{findDt,jdbcType=VARCHAR}, |
| | | #{findDt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | |
| | | protocol = #{protocol,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="findDt != null"> |
| | | findDt = #{findDt,jdbcType=VARCHAR}, |
| | | findDt = #{findDt,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | |
| | | update pr_controller_tramp |
| | | set rtuAddr = #{rtuAddr,jdbcType=VARCHAR}, |
| | | protocol = #{protocol,jdbcType=VARCHAR}, |
| | | findDt = #{findDt,jdbcType=VARCHAR} |
| | | findDt = #{findDt,jdbcType=TIMESTAMP} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <!--æ ¹æ®æ§å¶å¨ç¼å·è·åæµæµªæ§å¶å¨å°å--> |
| | | <!-- <select id="getTrampRtuAddr" resultType="java.lang.String">--> |
| | | <!-- SELECT rtuAddr FROM pr_controller_tramp WHERE id = ${controllerId}--> |
| | | <!-- </select>--> |
| | | |
| | | <!--æ ¹æ®æ§å¶å¨ç¼å·è·åæµæµªæ§å¶å¨ä¿¡æ¯--> |
| | | <select id="getTrampControllerInfo" resultMap="BaseResultMap"> |
| | | SELECT rtuAddr, protocol, findDt FROM pr_controller_tramp WHERE id = ${controllerId} |
| | | </select> |
| | | </mapper> |
| | |
| | | where region.id = #{regionId,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <!--è·åæªç»æ§å¶å¨çåæ°´å£å表--> |
| | | <select id="getNoBindingIntakes" resultType="java.util.HashMap"> |
| | | SELECT |
| | | CAST(inta.id AS char)AS intakeId, |
| | | name AS intakeName |
| | | FROM pr_intake inta |
| | | WHERE id NOT IN(SELECT intakeId FROM pr_controller) AND deleted = 0 |
| | | </select> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dy.pipIrrGlobal.daoRm.RmAlarmStateHistoryMapper"> |
| | | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoRm.RmAlarmStateHistory"> |
| | | <!--@mbg.generated--> |
| | | <!--@Table rm_alarm_state_history--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="controllerId" jdbcType="BIGINT" property="controllerid" /> |
| | | <result column="intakeId" jdbcType="BIGINT" property="intakeid" /> |
| | | <result column="rtuAddr" jdbcType="VARCHAR" property="rtuaddr" /> |
| | | <result column="dt" jdbcType="DATE" property="dt" /> |
| | | <result column="bateryVolt" jdbcType="TINYINT" property="bateryvolt" /> |
| | | <result column="loss" jdbcType="TINYINT" property="loss" /> |
| | | <result column="meter" jdbcType="TINYINT" property="meter" /> |
| | | <result column="valve" jdbcType="TINYINT" property="valve" /> |
| | | <result column="icCard" jdbcType="TINYINT" property="iccard" /> |
| | | <result column="working" jdbcType="TINYINT" property="working" /> |
| | | <result column="valveState" jdbcType="TINYINT" property="valvestate" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, controllerId, intakeId, rtuAddr, dt, bateryVolt, loss, meter, valve, icCard, |
| | | working, valveState |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from rm_alarm_state_history |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from rm_alarm_state_history |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmAlarmStateHistory"> |
| | | <!--@mbg.generated--> |
| | | insert into rm_alarm_state_history (id, controllerId, intakeId, |
| | | rtuAddr, dt, bateryVolt, |
| | | loss, meter, valve, |
| | | icCard, working, valveState |
| | | ) |
| | | values (#{id,jdbcType=BIGINT}, #{controllerid,jdbcType=BIGINT}, #{intakeid,jdbcType=BIGINT}, |
| | | #{rtuaddr,jdbcType=VARCHAR}, #{dt,jdbcType=DATE}, #{bateryvolt,jdbcType=TINYINT}, |
| | | #{loss,jdbcType=TINYINT}, #{meter,jdbcType=TINYINT}, #{valve,jdbcType=TINYINT}, |
| | | #{iccard,jdbcType=TINYINT}, #{working,jdbcType=TINYINT}, #{valvestate,jdbcType=TINYINT} |
| | | ) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmAlarmStateHistory"> |
| | | <!--@mbg.generated--> |
| | | insert into rm_alarm_state_history |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="controllerid != null"> |
| | | controllerId, |
| | | </if> |
| | | <if test="intakeid != null"> |
| | | intakeId, |
| | | </if> |
| | | <if test="rtuaddr != null"> |
| | | rtuAddr, |
| | | </if> |
| | | <if test="dt != null"> |
| | | dt, |
| | | </if> |
| | | <if test="bateryvolt != null"> |
| | | bateryVolt, |
| | | </if> |
| | | <if test="loss != null"> |
| | | loss, |
| | | </if> |
| | | <if test="meter != null"> |
| | | meter, |
| | | </if> |
| | | <if test="valve != null"> |
| | | valve, |
| | | </if> |
| | | <if test="iccard != null"> |
| | | icCard, |
| | | </if> |
| | | <if test="working != null"> |
| | | working, |
| | | </if> |
| | | <if test="valvestate != null"> |
| | | valveState, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="controllerid != null"> |
| | | #{controllerid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="intakeid != null"> |
| | | #{intakeid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="rtuaddr != null"> |
| | | #{rtuaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="dt != null"> |
| | | #{dt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="bateryvolt != null"> |
| | | #{bateryvolt,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="loss != null"> |
| | | #{loss,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="meter != null"> |
| | | #{meter,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="valve != null"> |
| | | #{valve,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="iccard != null"> |
| | | #{iccard,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="working != null"> |
| | | #{working,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="valvestate != null"> |
| | | #{valvestate,jdbcType=TINYINT}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmAlarmStateHistory"> |
| | | <!--@mbg.generated--> |
| | | update rm_alarm_state_history |
| | | <set> |
| | | <if test="controllerid != null"> |
| | | controllerId = #{controllerid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="intakeid != null"> |
| | | intakeId = #{intakeid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="rtuaddr != null"> |
| | | rtuAddr = #{rtuaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="dt != null"> |
| | | dt = #{dt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="bateryvolt != null"> |
| | | bateryVolt = #{bateryvolt,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="loss != null"> |
| | | loss = #{loss,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="meter != null"> |
| | | meter = #{meter,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="valve != null"> |
| | | valve = #{valve,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="iccard != null"> |
| | | icCard = #{iccard,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="working != null"> |
| | | working = #{working,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="valvestate != null"> |
| | | valveState = #{valvestate,jdbcType=TINYINT}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoRm.RmAlarmStateHistory"> |
| | | <!--@mbg.generated--> |
| | | update rm_alarm_state_history |
| | | set controllerId = #{controllerid,jdbcType=BIGINT}, |
| | | intakeId = #{intakeid,jdbcType=BIGINT}, |
| | | rtuAddr = #{rtuaddr,jdbcType=VARCHAR}, |
| | | dt = #{dt,jdbcType=DATE}, |
| | | bateryVolt = #{bateryvolt,jdbcType=TINYINT}, |
| | | loss = #{loss,jdbcType=TINYINT}, |
| | | meter = #{meter,jdbcType=TINYINT}, |
| | | valve = #{valve,jdbcType=TINYINT}, |
| | | icCard = #{iccard,jdbcType=TINYINT}, |
| | | working = #{working,jdbcType=TINYINT}, |
| | | valveState = #{valvestate,jdbcType=TINYINT} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dy.pipIrrGlobal.daoRm.RmAlarmStateLastMapper"> |
| | | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoRm.RmAlarmStateLast"> |
| | | <!--@mbg.generated--> |
| | | <!--@Table rm_alarm_state_last--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="controllerId" jdbcType="BIGINT" property="controllerid" /> |
| | | <result column="intakeId" jdbcType="BIGINT" property="intakeid" /> |
| | | <result column="rtuAddr" jdbcType="VARCHAR" property="rtuaddr" /> |
| | | <result column="dt" jdbcType="DATE" property="dt" /> |
| | | <result column="bateryVolt" jdbcType="TINYINT" property="bateryvolt" /> |
| | | <result column="loss" jdbcType="TINYINT" property="loss" /> |
| | | <result column="meter" jdbcType="TINYINT" property="meter" /> |
| | | <result column="valve" jdbcType="TINYINT" property="valve" /> |
| | | <result column="icCard" jdbcType="TINYINT" property="iccard" /> |
| | | <result column="working" jdbcType="TINYINT" property="working" /> |
| | | <result column="valveState" jdbcType="TINYINT" property="valvestate" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, controllerId, intakeId, rtuAddr, dt, bateryVolt, loss, meter, valve, icCard, |
| | | working, valveState |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from rm_alarm_state_last |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <select id="selectByRtuAddr" parameterType="java.lang.String" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from rm_alarm_state_last |
| | | where rtuAddr = #{rtuAddr,jdbcType=VARCHAR} |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from rm_alarm_state_last |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmAlarmStateLast"> |
| | | <!--@mbg.generated--> |
| | | insert into rm_alarm_state_last (id, controllerId, intakeId, |
| | | rtuAddr, dt, bateryVolt, |
| | | loss, meter, valve, |
| | | icCard, working, valveState |
| | | ) |
| | | values (#{id,jdbcType=BIGINT}, #{controllerid,jdbcType=BIGINT}, #{intakeid,jdbcType=BIGINT}, |
| | | #{rtuaddr,jdbcType=VARCHAR}, #{dt,jdbcType=DATE}, #{bateryvolt,jdbcType=TINYINT}, |
| | | #{loss,jdbcType=TINYINT}, #{meter,jdbcType=TINYINT}, #{valve,jdbcType=TINYINT}, |
| | | #{iccard,jdbcType=TINYINT}, #{working,jdbcType=TINYINT}, #{valvestate,jdbcType=TINYINT} |
| | | ) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmAlarmStateLast"> |
| | | <!--@mbg.generated--> |
| | | insert into rm_alarm_state_last |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="controllerid != null"> |
| | | controllerId, |
| | | </if> |
| | | <if test="intakeid != null"> |
| | | intakeId, |
| | | </if> |
| | | <if test="rtuaddr != null"> |
| | | rtuAddr, |
| | | </if> |
| | | <if test="dt != null"> |
| | | dt, |
| | | </if> |
| | | <if test="bateryvolt != null"> |
| | | bateryVolt, |
| | | </if> |
| | | <if test="loss != null"> |
| | | loss, |
| | | </if> |
| | | <if test="meter != null"> |
| | | meter, |
| | | </if> |
| | | <if test="valve != null"> |
| | | valve, |
| | | </if> |
| | | <if test="iccard != null"> |
| | | icCard, |
| | | </if> |
| | | <if test="working != null"> |
| | | working, |
| | | </if> |
| | | <if test="valvestate != null"> |
| | | valveState, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="controllerid != null"> |
| | | #{controllerid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="intakeid != null"> |
| | | #{intakeid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="rtuaddr != null"> |
| | | #{rtuaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="dt != null"> |
| | | #{dt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="bateryvolt != null"> |
| | | #{bateryvolt,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="loss != null"> |
| | | #{loss,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="meter != null"> |
| | | #{meter,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="valve != null"> |
| | | #{valve,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="iccard != null"> |
| | | #{iccard,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="working != null"> |
| | | #{working,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="valvestate != null"> |
| | | #{valvestate,jdbcType=TINYINT}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmAlarmStateLast"> |
| | | <!--@mbg.generated--> |
| | | update rm_alarm_state_last |
| | | <set> |
| | | <if test="controllerid != null"> |
| | | controllerId = #{controllerid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="intakeid != null"> |
| | | intakeId = #{intakeid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="rtuaddr != null"> |
| | | rtuAddr = #{rtuaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="dt != null"> |
| | | dt = #{dt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="bateryvolt != null"> |
| | | bateryVolt = #{bateryvolt,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="loss != null"> |
| | | loss = #{loss,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="meter != null"> |
| | | meter = #{meter,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="valve != null"> |
| | | valve = #{valve,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="iccard != null"> |
| | | icCard = #{iccard,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="working != null"> |
| | | working = #{working,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="valvestate != null"> |
| | | valveState = #{valvestate,jdbcType=TINYINT}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoRm.RmAlarmStateLast"> |
| | | <!--@mbg.generated--> |
| | | update rm_alarm_state_last |
| | | set controllerId = #{controllerid,jdbcType=BIGINT}, |
| | | intakeId = #{intakeid,jdbcType=BIGINT}, |
| | | rtuAddr = #{rtuaddr,jdbcType=VARCHAR}, |
| | | dt = #{dt,jdbcType=DATE}, |
| | | bateryVolt = #{bateryvolt,jdbcType=TINYINT}, |
| | | loss = #{loss,jdbcType=TINYINT}, |
| | | meter = #{meter,jdbcType=TINYINT}, |
| | | valve = #{valve,jdbcType=TINYINT}, |
| | | icCard = #{iccard,jdbcType=TINYINT}, |
| | | working = #{working,jdbcType=TINYINT}, |
| | | valveState = #{valvestate,jdbcType=TINYINT} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dy.pipIrrGlobal.daoRm.RmAutoReportHistoryMapper"> |
| | | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoRm.RmAutoReportHistory"> |
| | | <!--@mbg.generated--> |
| | | <!--@Table rm_auto_report_history--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="controllerId" jdbcType="BIGINT" property="controllerid" /> |
| | | <result column="intakeId" jdbcType="BIGINT" property="intakeid" /> |
| | | <result column="rtuAddr" jdbcType="VARCHAR" property="rtuaddr" /> |
| | | <result column="dt" jdbcType="DATE" property="dt" /> |
| | | <result column="rtuDt" jdbcType="DATE" property="rtudt" /> |
| | | <result column="instantAmount" jdbcType="DOUBLE" property="instantamount" /> |
| | | <result column="totalAmount" jdbcType="DOUBLE" property="totalamount" /> |
| | | <result column="lossAmount" jdbcType="DOUBLE" property="lossamount" /> |
| | | <result column="waterPress" jdbcType="DOUBLE" property="waterpress" /> |
| | | <result column="batteryVolt" jdbcType="DOUBLE" property="batteryvolt" /> |
| | | <result column="sunVolt" jdbcType="DOUBLE" property="sunvolt" /> |
| | | <result column="signalValue" jdbcType="INTEGER" property="signalvalue" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, controllerId, intakeId, rtuAddr, dt, rtuDt, instantAmount, totalAmount, lossAmount, |
| | | waterPress, batteryVolt, sunVolt, signalValue |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from rm_auto_report_history |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from rm_auto_report_history |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmAutoReportHistory"> |
| | | <!--@mbg.generated--> |
| | | insert into rm_auto_report_history (id, controllerId, intakeId, |
| | | rtuAddr, dt, rtuDt, instantAmount, |
| | | totalAmount, lossAmount, waterPress, |
| | | batteryVolt, sunVolt, signalValue |
| | | ) |
| | | values (#{id,jdbcType=BIGINT}, #{controllerid,jdbcType=BIGINT}, #{intakeid,jdbcType=BIGINT}, |
| | | #{rtuaddr,jdbcType=VARCHAR}, #{dt,jdbcType=DATE}, #{rtudt,jdbcType=DATE}, #{instantamount,jdbcType=DOUBLE}, |
| | | #{totalamount,jdbcType=DOUBLE}, #{lossamount,jdbcType=DOUBLE}, #{waterpress,jdbcType=DOUBLE}, |
| | | #{batteryvolt,jdbcType=DOUBLE}, #{sunvolt,jdbcType=DOUBLE}, #{signalvalue,jdbcType=INTEGER} |
| | | ) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmAutoReportHistory"> |
| | | <!--@mbg.generated--> |
| | | insert into rm_auto_report_history |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="controllerid != null"> |
| | | controllerId, |
| | | </if> |
| | | <if test="intakeid != null"> |
| | | intakeId, |
| | | </if> |
| | | <if test="rtuaddr != null"> |
| | | rtuAddr, |
| | | </if> |
| | | <if test="dt != null"> |
| | | dt, |
| | | </if> |
| | | <if test="rtudt != null"> |
| | | rtuDt, |
| | | </if> |
| | | <if test="instantamount != null"> |
| | | instantAmount, |
| | | </if> |
| | | <if test="totalamount != null"> |
| | | totalAmount, |
| | | </if> |
| | | <if test="lossamount != null"> |
| | | lossAmount, |
| | | </if> |
| | | <if test="waterpress != null"> |
| | | waterPress, |
| | | </if> |
| | | <if test="batteryvolt != null"> |
| | | batteryVolt, |
| | | </if> |
| | | <if test="sunvolt != null"> |
| | | sunVolt, |
| | | </if> |
| | | <if test="signalvalue != null"> |
| | | signalValue, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="controllerid != null"> |
| | | #{controllerid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="intakeid != null"> |
| | | #{intakeid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="rtuaddr != null"> |
| | | #{rtuaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="dt != null"> |
| | | #{dt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="rtudt != null"> |
| | | #{rtudt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="instantamount != null"> |
| | | #{instantamount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="totalamount != null"> |
| | | #{totalamount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="lossamount != null"> |
| | | #{lossamount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="waterpress != null"> |
| | | #{waterpress,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="batteryvolt != null"> |
| | | #{batteryvolt,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="sunvolt != null"> |
| | | #{sunvolt,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="signalvalue != null"> |
| | | #{signalvalue,jdbcType=INTEGER}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmAutoReportHistory"> |
| | | <!--@mbg.generated--> |
| | | update rm_auto_report_history |
| | | <set> |
| | | <if test="controllerid != null"> |
| | | controllerId = #{controllerid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="intakeid != null"> |
| | | intakeId = #{intakeid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="rtuaddr != null"> |
| | | rtuAddr = #{rtuaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="dt != null"> |
| | | dt = #{dt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="rtudt != null"> |
| | | rtuDt = #{rtudt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="instantamount != null"> |
| | | instantAmount = #{instantamount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="totalamount != null"> |
| | | totalAmount = #{totalamount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="lossamount != null"> |
| | | lossAmount = #{lossamount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="waterpress != null"> |
| | | waterPress = #{waterpress,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="batteryvolt != null"> |
| | | batteryVolt = #{batteryvolt,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="sunvolt != null"> |
| | | sunVolt = #{sunvolt,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="signalvalue != null"> |
| | | signalValue = #{signalvalue,jdbcType=INTEGER}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoRm.RmAutoReportHistory"> |
| | | <!--@mbg.generated--> |
| | | update rm_auto_report_history |
| | | set controllerId = #{controllerid,jdbcType=BIGINT}, |
| | | intakeId = #{intakeid,jdbcType=BIGINT}, |
| | | rtuAddr = #{rtuaddr,jdbcType=VARCHAR}, |
| | | dt = #{dt,jdbcType=DATE}, |
| | | rtuDt = #{rtudt,jdbcType=DATE}, |
| | | instantAmount = #{instantamount,jdbcType=DOUBLE}, |
| | | totalAmount = #{totalamount,jdbcType=DOUBLE}, |
| | | lossAmount = #{lossamount,jdbcType=DOUBLE}, |
| | | waterPress = #{waterpress,jdbcType=DOUBLE}, |
| | | batteryVolt = #{batteryvolt,jdbcType=DOUBLE}, |
| | | sunVolt = #{sunvolt,jdbcType=DOUBLE}, |
| | | signalValue = #{signalvalue,jdbcType=INTEGER} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dy.pipIrrGlobal.daoRm.RmAutoReportLastMapper"> |
| | | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoRm.RmAutoReportLast"> |
| | | <!--@mbg.generated--> |
| | | <!--@Table rm_auto_report_last--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="controllerId" jdbcType="BIGINT" property="controllerid" /> |
| | | <result column="intakeId" jdbcType="BIGINT" property="intakeid" /> |
| | | <result column="rtuAddr" jdbcType="VARCHAR" property="rtuaddr" /> |
| | | <result column="dt" jdbcType="DATE" property="dt" /> |
| | | <result column="rtuDt" jdbcType="DATE" property="rtudt" /> |
| | | <result column="instantAmount" jdbcType="DOUBLE" property="instantamount" /> |
| | | <result column="totalAmount" jdbcType="DOUBLE" property="totalamount" /> |
| | | <result column="lossAmount" jdbcType="DOUBLE" property="lossamount" /> |
| | | <result column="waterPress" jdbcType="DOUBLE" property="waterpress" /> |
| | | <result column="batteryVolt" jdbcType="DOUBLE" property="batteryvolt" /> |
| | | <result column="sunVolt" jdbcType="DOUBLE" property="sunvolt" /> |
| | | <result column="signalValue" jdbcType="INTEGER" property="signalvalue" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, controllerId, intakeId, rtuAddr, dt, rtuDt, instantAmount, totalAmount, lossAmount, |
| | | waterPress, batteryVolt, sunVolt, signalValue |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from rm_auto_report_last |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | | <select id="selectByRtuAddr" parameterType="java.lang.String" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from rm_auto_report_last |
| | | where rtuAddr = #{rtuAddr,jdbcType=VARCHAR} |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from rm_auto_report_last |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmAutoReportLast"> |
| | | <!--@mbg.generated--> |
| | | insert into rm_auto_report_last (id, controllerId, intakeId, |
| | | rtuAddr, dt, rtuDt, instantAmount, |
| | | totalAmount, lossAmount, waterPress, |
| | | batteryVolt, sunVolt, signalValue |
| | | ) |
| | | values (#{id,jdbcType=BIGINT}, #{controllerid,jdbcType=BIGINT}, #{intakeid,jdbcType=BIGINT}, |
| | | #{rtuaddr,jdbcType=VARCHAR}, #{dt,jdbcType=DATE}, #{rtudt,jdbcType=DATE}, #{instantamount,jdbcType=DOUBLE}, |
| | | #{totalamount,jdbcType=DOUBLE}, #{lossamount,jdbcType=DOUBLE}, #{waterpress,jdbcType=DOUBLE}, |
| | | #{batteryvolt,jdbcType=DOUBLE}, #{sunvolt,jdbcType=DOUBLE}, #{signalvalue,jdbcType=INTEGER} |
| | | ) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmAutoReportLast"> |
| | | <!--@mbg.generated--> |
| | | insert into rm_auto_report_last |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="controllerid != null"> |
| | | controllerId, |
| | | </if> |
| | | <if test="intakeid != null"> |
| | | intakeId, |
| | | </if> |
| | | <if test="rtuaddr != null"> |
| | | rtuAddr, |
| | | </if> |
| | | <if test="dt != null"> |
| | | dt, |
| | | </if> |
| | | <if test="rtudt != null"> |
| | | rtuDt, |
| | | </if> |
| | | <if test="instantamount != null"> |
| | | instantAmount, |
| | | </if> |
| | | <if test="totalamount != null"> |
| | | totalAmount, |
| | | </if> |
| | | <if test="lossamount != null"> |
| | | lossAmount, |
| | | </if> |
| | | <if test="waterpress != null"> |
| | | waterPress, |
| | | </if> |
| | | <if test="batteryvolt != null"> |
| | | batteryVolt, |
| | | </if> |
| | | <if test="sunvolt != null"> |
| | | sunVolt, |
| | | </if> |
| | | <if test="signalvalue != null"> |
| | | signalValue, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="controllerid != null"> |
| | | #{controllerid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="intakeid != null"> |
| | | #{intakeid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="rtuaddr != null"> |
| | | #{rtuaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="dt != null"> |
| | | #{dt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="rtudt != null"> |
| | | #{rtudt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="instantamount != null"> |
| | | #{instantamount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="totalamount != null"> |
| | | #{totalamount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="lossamount != null"> |
| | | #{lossamount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="waterpress != null"> |
| | | #{waterpress,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="batteryvolt != null"> |
| | | #{batteryvolt,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="sunvolt != null"> |
| | | #{sunvolt,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="signalvalue != null"> |
| | | #{signalvalue,jdbcType=INTEGER}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmAutoReportLast"> |
| | | <!--@mbg.generated--> |
| | | update rm_auto_report_last |
| | | <set> |
| | | <if test="controllerid != null"> |
| | | controllerId = #{controllerid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="intakeid != null"> |
| | | intakeId = #{intakeid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="rtuaddr != null"> |
| | | rtuAddr = #{rtuaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="dt != null"> |
| | | dt = #{dt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="rtudt != null"> |
| | | rtuDt = #{rtudt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="instantamount != null"> |
| | | instantAmount = #{instantamount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="totalamount != null"> |
| | | totalAmount = #{totalamount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="lossamount != null"> |
| | | lossAmount = #{lossamount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="waterpress != null"> |
| | | waterPress = #{waterpress,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="batteryvolt != null"> |
| | | batteryVolt = #{batteryvolt,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="sunvolt != null"> |
| | | sunVolt = #{sunvolt,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="signalvalue != null"> |
| | | signalValue = #{signalvalue,jdbcType=INTEGER}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoRm.RmAutoReportLast"> |
| | | <!--@mbg.generated--> |
| | | update rm_auto_report_last |
| | | set controllerId = #{controllerid,jdbcType=BIGINT}, |
| | | intakeId = #{intakeid,jdbcType=BIGINT}, |
| | | rtuAddr = #{rtuaddr,jdbcType=VARCHAR}, |
| | | dt = #{dt,jdbcType=DATE}, |
| | | rtuDt = #{rtudt,jdbcType=DATE}, |
| | | instantAmount = #{instantamount,jdbcType=DOUBLE}, |
| | | totalAmount = #{totalamount,jdbcType=DOUBLE}, |
| | | lossAmount = #{lossamount,jdbcType=DOUBLE}, |
| | | waterPress = #{waterpress,jdbcType=DOUBLE}, |
| | | batteryVolt = #{batteryvolt,jdbcType=DOUBLE}, |
| | | sunVolt = #{sunvolt,jdbcType=DOUBLE}, |
| | | signalValue = #{signalvalue,jdbcType=INTEGER} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dy.pipIrrGlobal.daoRm.RmIntakeAmountMapper"> |
| | | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoRm.RmIntakeAmount"> |
| | | <!--@mbg.generated--> |
| | | <!--@Table rm_intake_amount--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="intakeId" jdbcType="BIGINT" property="intakeid" /> |
| | | <result column="amount" jdbcType="DOUBLE" property="amount" /> |
| | | <result column="loss" jdbcType="DOUBLE" property="loss" /> |
| | | <result column="controllerIdLast" jdbcType="BIGINT" property="controlleridlast" /> |
| | | <result column="dtLast" jdbcType="DATE" property="dtlast" /> |
| | | <result column="amountLast" jdbcType="DOUBLE" property="amountlast" /> |
| | | <result column="totalAmountLast" jdbcType="DOUBLE" property="totalamountlast" /> |
| | | <result column="resourceTypeLast" jdbcType="TINYINT" property="resourcetypelast" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, intakeId, amount, loss, controllerIdLast, dtLast, amountLast, totalAmountLast, |
| | | resourceTypeLast |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from rm_intake_amount |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from rm_intake_amount |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmIntakeAmount"> |
| | | <!--@mbg.generated--> |
| | | insert into rm_intake_amount (id, intakeId, amount, |
| | | loss, controllerIdLast, dtLast, |
| | | amountLast, totalAmountLast, resourceTypeLast |
| | | ) |
| | | values (#{id,jdbcType=BIGINT}, #{intakeid,jdbcType=BIGINT}, #{amount,jdbcType=DOUBLE}, |
| | | #{loss,jdbcType=DOUBLE}, #{controlleridlast,jdbcType=BIGINT}, #{dtlast,jdbcType=DATE}, |
| | | #{amountlast,jdbcType=DOUBLE}, #{totalamountlast,jdbcType=DOUBLE}, #{resourcetypelast,jdbcType=TINYINT} |
| | | ) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmIntakeAmount"> |
| | | <!--@mbg.generated--> |
| | | insert into rm_intake_amount |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="intakeid != null"> |
| | | intakeId, |
| | | </if> |
| | | <if test="amount != null"> |
| | | amount, |
| | | </if> |
| | | <if test="loss != null"> |
| | | loss, |
| | | </if> |
| | | <if test="controlleridlast != null"> |
| | | controllerIdLast, |
| | | </if> |
| | | <if test="dtlast != null"> |
| | | dtLast, |
| | | </if> |
| | | <if test="amountlast != null"> |
| | | amountLast, |
| | | </if> |
| | | <if test="totalamountlast != null"> |
| | | totalAmountLast, |
| | | </if> |
| | | <if test="resourcetypelast != null"> |
| | | resourceTypeLast, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="intakeid != null"> |
| | | #{intakeid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="amount != null"> |
| | | #{amount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="loss != null"> |
| | | #{loss,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="controlleridlast != null"> |
| | | #{controlleridlast,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="dtlast != null"> |
| | | #{dtlast,jdbcType=DATE}, |
| | | </if> |
| | | <if test="amountlast != null"> |
| | | #{amountlast,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="totalamountlast != null"> |
| | | #{totalamountlast,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="resourcetypelast != null"> |
| | | #{resourcetypelast,jdbcType=TINYINT}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmIntakeAmount"> |
| | | <!--@mbg.generated--> |
| | | update rm_intake_amount |
| | | <set> |
| | | <if test="intakeid != null"> |
| | | intakeId = #{intakeid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="amount != null"> |
| | | amount = #{amount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="loss != null"> |
| | | loss = #{loss,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="controlleridlast != null"> |
| | | controllerIdLast = #{controlleridlast,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="dtlast != null"> |
| | | dtLast = #{dtlast,jdbcType=DATE}, |
| | | </if> |
| | | <if test="amountlast != null"> |
| | | amountLast = #{amountlast,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="totalamountlast != null"> |
| | | totalAmountLast = #{totalamountlast,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="resourcetypelast != null"> |
| | | resourceTypeLast = #{resourcetypelast,jdbcType=TINYINT}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoRm.RmIntakeAmount"> |
| | | <!--@mbg.generated--> |
| | | update rm_intake_amount |
| | | set intakeId = #{intakeid,jdbcType=BIGINT}, |
| | | amount = #{amount,jdbcType=DOUBLE}, |
| | | loss = #{loss,jdbcType=DOUBLE}, |
| | | controllerIdLast = #{controlleridlast,jdbcType=BIGINT}, |
| | | dtLast = #{dtlast,jdbcType=DATE}, |
| | | amountLast = #{amountlast,jdbcType=DOUBLE}, |
| | | totalAmountLast = #{totalamountlast,jdbcType=DOUBLE}, |
| | | resourceTypeLast = #{resourcetypelast,jdbcType=TINYINT} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.dy.pipIrrGlobal.daoRm.RmOpenCloseValveReportMapper"> |
| | | <resultMap id="BaseResultMap" type="com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveReport"> |
| | | <!--@mbg.generated--> |
| | | <!--@Table rm_open_close_valve_report--> |
| | | <id column="id" jdbcType="BIGINT" property="id" /> |
| | | <result column="controllerId" jdbcType="BIGINT" property="controllerid" /> |
| | | <result column="intakeId" jdbcType="BIGINT" property="intakeid" /> |
| | | <result column="rtuAddr" jdbcType="VARCHAR" property="rtuaddr" /> |
| | | <result column="opDt" jdbcType="DATE" property="opdt" /> |
| | | <result column="opType" jdbcType="TINYINT" property="optype" /> |
| | | <result column="opTotalAmount" jdbcType="DOUBLE" property="optotalamount" /> |
| | | <result column="opIcCardNo" jdbcType="VARCHAR" property="opiccardno" /> |
| | | <result column="opIcCardAddr" jdbcType="VARCHAR" property="opiccardaddr" /> |
| | | <result column="opRemainMoney" jdbcType="DOUBLE" property="opremainmoney" /> |
| | | <result column="openDt" jdbcType="DATE" property="opendt" /> |
| | | <result column="clDt" jdbcType="DATE" property="cldt" /> |
| | | <result column="clType" jdbcType="TINYINT" property="cltype" /> |
| | | <result column="clTotalAmount" jdbcType="DOUBLE" property="cltotalamount" /> |
| | | <result column="clIcCardNo" jdbcType="VARCHAR" property="cliccardno" /> |
| | | <result column="clIcCardAddr" jdbcType="VARCHAR" property="cliccardaddr" /> |
| | | <result column="clRemainMoney" jdbcType="DOUBLE" property="clremainmoney" /> |
| | | <result column="clThisAmount" jdbcType="DOUBLE" property="clthisamount" /> |
| | | <result column="clThisMoney" jdbcType="DOUBLE" property="clthismoney" /> |
| | | <result column="clThisTime" jdbcType="INTEGER" property="clthistime" /> |
| | | <result column="clOpenDt" jdbcType="DATE" property="clopendt" /> |
| | | <result column="closeDt" jdbcType="DATE" property="closedt" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, controllerId, intakeId, rtuAddr, opDt, opType, opTotalAmount, opIcCardNo, opIcCardAddr, |
| | | opRemainMoney, openDt, clDt, clType, clTotalAmount, clIcCardNo, clIcCardAddr, clRemainMoney, |
| | | clThisAmount, clThisMoney, clThisTime, clOpenDt, closeDt |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from rm_open_close_valve_report |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from rm_open_close_valve_report |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveReport"> |
| | | <!--@mbg.generated--> |
| | | insert into rm_open_close_valve_report (id, controllerId, intakeId, |
| | | rtuAddr, opDt, opType, |
| | | opTotalAmount, opIcCardNo, opIcCardAddr, |
| | | opRemainMoney, openDt, clDt, |
| | | clType, clTotalAmount, clIcCardNo, |
| | | clIcCardAddr, clRemainMoney, clThisAmount, |
| | | clThisMoney, clThisTime, clOpenDt, |
| | | closeDt) |
| | | values (#{id,jdbcType=BIGINT}, #{controllerid,jdbcType=BIGINT}, #{intakeid,jdbcType=BIGINT}, |
| | | #{rtuaddr,jdbcType=VARCHAR}, #{opdt,jdbcType=DATE}, #{optype,jdbcType=TINYINT}, |
| | | #{optotalamount,jdbcType=DOUBLE}, #{opiccardno,jdbcType=VARCHAR}, #{opiccardaddr,jdbcType=VARCHAR}, |
| | | #{opremainmoney,jdbcType=DOUBLE}, #{opendt,jdbcType=DATE}, #{cldt,jdbcType=DATE}, |
| | | #{cltype,jdbcType=TINYINT}, #{cltotalamount,jdbcType=DOUBLE}, #{cliccardno,jdbcType=VARCHAR}, |
| | | #{cliccardaddr,jdbcType=VARCHAR}, #{clremainmoney,jdbcType=DOUBLE}, #{clthisamount,jdbcType=DOUBLE}, |
| | | #{clthismoney,jdbcType=DOUBLE}, #{clthistime,jdbcType=INTEGER}, #{clopendt,jdbcType=DATE}, |
| | | #{closedt,jdbcType=DATE}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveReport"> |
| | | <!--@mbg.generated--> |
| | | insert into rm_open_close_valve_report |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | id, |
| | | </if> |
| | | <if test="controllerid != null"> |
| | | controllerId, |
| | | </if> |
| | | <if test="intakeid != null"> |
| | | intakeId, |
| | | </if> |
| | | <if test="rtuaddr != null"> |
| | | rtuAddr, |
| | | </if> |
| | | <if test="opdt != null"> |
| | | opDt, |
| | | </if> |
| | | <if test="optype != null"> |
| | | opType, |
| | | </if> |
| | | <if test="optotalamount != null"> |
| | | opTotalAmount, |
| | | </if> |
| | | <if test="opiccardno != null"> |
| | | opIcCardNo, |
| | | </if> |
| | | <if test="opiccardaddr != null"> |
| | | opIcCardAddr, |
| | | </if> |
| | | <if test="opremainmoney != null"> |
| | | opRemainMoney, |
| | | </if> |
| | | <if test="opendt != null"> |
| | | openDt, |
| | | </if> |
| | | <if test="cldt != null"> |
| | | clDt, |
| | | </if> |
| | | <if test="cltype != null"> |
| | | clType, |
| | | </if> |
| | | <if test="cltotalamount != null"> |
| | | clTotalAmount, |
| | | </if> |
| | | <if test="cliccardno != null"> |
| | | clIcCardNo, |
| | | </if> |
| | | <if test="cliccardaddr != null"> |
| | | clIcCardAddr, |
| | | </if> |
| | | <if test="clremainmoney != null"> |
| | | clRemainMoney, |
| | | </if> |
| | | <if test="clthisamount != null"> |
| | | clThisAmount, |
| | | </if> |
| | | <if test="clthismoney != null"> |
| | | clThisMoney, |
| | | </if> |
| | | <if test="clthistime != null"> |
| | | clThisTime, |
| | | </if> |
| | | <if test="clopendt != null"> |
| | | clOpenDt, |
| | | </if> |
| | | <if test="closedt != null"> |
| | | closeDt, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null"> |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="controllerid != null"> |
| | | #{controllerid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="intakeid != null"> |
| | | #{intakeid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="rtuaddr != null"> |
| | | #{rtuaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="opdt != null"> |
| | | #{opdt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="optype != null"> |
| | | #{optype,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="optotalamount != null"> |
| | | #{optotalamount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="opiccardno != null"> |
| | | #{opiccardno,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="opiccardaddr != null"> |
| | | #{opiccardaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="opremainmoney != null"> |
| | | #{opremainmoney,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="opendt != null"> |
| | | #{opendt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="cldt != null"> |
| | | #{cldt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="cltype != null"> |
| | | #{cltype,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="cltotalamount != null"> |
| | | #{cltotalamount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="cliccardno != null"> |
| | | #{cliccardno,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="cliccardaddr != null"> |
| | | #{cliccardaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="clremainmoney != null"> |
| | | #{clremainmoney,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="clthisamount != null"> |
| | | #{clthisamount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="clthismoney != null"> |
| | | #{clthismoney,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="clthistime != null"> |
| | | #{clthistime,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="clopendt != null"> |
| | | #{clopendt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="closedt != null"> |
| | | #{closedt,jdbcType=DATE}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveReport"> |
| | | <!--@mbg.generated--> |
| | | update rm_open_close_valve_report |
| | | <set> |
| | | <if test="controllerid != null"> |
| | | controllerId = #{controllerid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="intakeid != null"> |
| | | intakeId = #{intakeid,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="rtuaddr != null"> |
| | | rtuAddr = #{rtuaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="opdt != null"> |
| | | opDt = #{opdt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="optype != null"> |
| | | opType = #{optype,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="optotalamount != null"> |
| | | opTotalAmount = #{optotalamount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="opiccardno != null"> |
| | | opIcCardNo = #{opiccardno,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="opiccardaddr != null"> |
| | | opIcCardAddr = #{opiccardaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="opremainmoney != null"> |
| | | opRemainMoney = #{opremainmoney,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="opendt != null"> |
| | | openDt = #{opendt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="cldt != null"> |
| | | clDt = #{cldt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="cltype != null"> |
| | | clType = #{cltype,jdbcType=TINYINT}, |
| | | </if> |
| | | <if test="cltotalamount != null"> |
| | | clTotalAmount = #{cltotalamount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="cliccardno != null"> |
| | | clIcCardNo = #{cliccardno,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="cliccardaddr != null"> |
| | | clIcCardAddr = #{cliccardaddr,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="clremainmoney != null"> |
| | | clRemainMoney = #{clremainmoney,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="clthisamount != null"> |
| | | clThisAmount = #{clthisamount,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="clthismoney != null"> |
| | | clThisMoney = #{clthismoney,jdbcType=DOUBLE}, |
| | | </if> |
| | | <if test="clthistime != null"> |
| | | clThisTime = #{clthistime,jdbcType=INTEGER}, |
| | | </if> |
| | | <if test="clopendt != null"> |
| | | clOpenDt = #{clopendt,jdbcType=DATE}, |
| | | </if> |
| | | <if test="closedt != null"> |
| | | closeDt = #{closedt,jdbcType=DATE}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoRm.RmOpenCloseValveReport"> |
| | | <!--@mbg.generated--> |
| | | update rm_open_close_valve_report |
| | | set controllerId = #{controllerid,jdbcType=BIGINT}, |
| | | intakeId = #{intakeid,jdbcType=BIGINT}, |
| | | rtuAddr = #{rtuaddr,jdbcType=VARCHAR}, |
| | | opDt = #{opdt,jdbcType=DATE}, |
| | | opType = #{optype,jdbcType=TINYINT}, |
| | | opTotalAmount = #{optotalamount,jdbcType=DOUBLE}, |
| | | opIcCardNo = #{opiccardno,jdbcType=VARCHAR}, |
| | | opIcCardAddr = #{opiccardaddr,jdbcType=VARCHAR}, |
| | | opRemainMoney = #{opremainmoney,jdbcType=DOUBLE}, |
| | | openDt = #{opendt,jdbcType=DATE}, |
| | | clDt = #{cldt,jdbcType=DATE}, |
| | | clType = #{cltype,jdbcType=TINYINT}, |
| | | clTotalAmount = #{cltotalamount,jdbcType=DOUBLE}, |
| | | clIcCardNo = #{cliccardno,jdbcType=VARCHAR}, |
| | | clIcCardAddr = #{cliccardaddr,jdbcType=VARCHAR}, |
| | | clRemainMoney = #{clremainmoney,jdbcType=DOUBLE}, |
| | | clThisAmount = #{clthisamount,jdbcType=DOUBLE}, |
| | | clThisMoney = #{clthismoney,jdbcType=DOUBLE}, |
| | | clThisTime = #{clthistime,jdbcType=INTEGER}, |
| | | clOpenDt = #{clopendt,jdbcType=DATE}, |
| | | closeDt = #{closedt,jdbcType=DATE} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |
| | |
| | | package com.dy.aceMw.server.rtuData; |
| | | |
| | | import java.text.ParseException; |
| | | |
| | | public interface Task { |
| | | |
| | | |
| | |
| | | * æ§è¡èç¹ä»»å¡ |
| | | * @param data éè¦å¤ççæ°æ® |
| | | */ |
| | | public void execute(Object data) ; |
| | | public void execute(Object data) throws ParseException; |
| | | |
| | | /** |
| | | * å¾å°æ¬ä»»å¡èç¹å¤ç产ççä¸é´ç»æï¼ä»¥ä¾æ¬èç¹æå¨æ æçä¸çº§ä»»å¡èç¹åæ¬æ æçå·¦ä¾§ï¼æ ¹å¨ä¸ï¼æææ æçèç¹åºç¨æ¬ç»æ |
| | |
| | | * å¤çº¿ç¨ç¯å¢ä¸è¿è¡ |
| | | * @return |
| | | */ |
| | | public static synchronized TaskSurpport popTask(){ |
| | | TaskSurpport t = (tasks.size() > 0)?tasks.get(0):null ; |
| | | if(t != null){ |
| | | tasks.remove(0) ; |
| | | }else{ |
| | | try { |
| | | t = newTaskTree() ; |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage() == null?"å®ä¾åä¸è¡æ°æ®å¤çä»»å¡å¯¹è±¡æ 失败ï¼" : e.getMessage(), e); |
| | | } finally { |
| | | if(t == null){ |
| | | log.error("å®ä¾åä¸è¡æ°æ®å¤çä»»å¡å¯¹è±¡å¤±è´¥ï¼" ); |
| | | public static TaskSurpport popTask(){ |
| | | synchronized(tasks){ |
| | | TaskSurpport t = (tasks.size() > 0)?tasks.get(0):null ; |
| | | if(t != null){ |
| | | tasks.remove(0) ; |
| | | }else{ |
| | | try { |
| | | t = newTaskTree() ; |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage() == null?"å®ä¾åä¸è¡æ°æ®å¤çä»»å¡å¯¹è±¡æ 失败ï¼" : e.getMessage(), e); |
| | | } finally { |
| | | if(t == null){ |
| | | log.error("å®ä¾åä¸è¡æ°æ®å¤çä»»å¡å¯¹è±¡å¤±è´¥ï¼" ); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return t ; |
| | | } |
| | | |
| | | return t ; |
| | | } |
| | | |
| | | /** |
| | |
| | | * è¿ééè¦åæ¥éï¼å 为ä¸é¢æ¹æ³ä¸æ§è¡å®tasks.get(0)䏿ªæ§è¡tasks.remove(0)æé´ï¼æ¬æ¹æ³æ§è¡å¹¶ä¸æ§è¡å®ï¼é£ä¹åæå°±ä¼åºä¹±å |
| | | * @param t |
| | | */ |
| | | public static synchronized void freeAndCleanTask(TaskSurpport t){ |
| | | if(t != null){ |
| | | boolean find = false ; |
| | | for(TaskSurpport tin : tasks){ |
| | | if(tin == t){ |
| | | find = true ; |
| | | break ; |
| | | public static void freeAndCleanTask(TaskSurpport t){ |
| | | synchronized(tasks) { |
| | | if (t != null) { |
| | | boolean find = false; |
| | | for (TaskSurpport tin : tasks) { |
| | | if (tin == t) { |
| | | find = true; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | if(!find){ |
| | | t.cleanMeAndSubs(); |
| | | tasks.add(0, t) ; |
| | | if (!find) { |
| | | t.cleanMeAndSubs(); |
| | | tasks.add(0, t); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | import org.apache.logging.log4j.LogManager; |
| | | import org.apache.logging.log4j.Logger; |
| | | |
| | | import java.text.ParseException; |
| | | |
| | | /** |
| | | * é¨åå®ç°Task |
| | | */ |
| | |
| | | private static final Logger log = LogManager.getLogger(TaskSurpport.class.getName()) ; |
| | | |
| | | //å½åæå¤ççä¸è¡æ°æ®æå±RTUçå°å |
| | | public String rtuAddr_inRootTk ;//åªå¨æ ¹rootä»»å¡å¯¹è±¡ä¸ä¼ä»æ¤å¼ |
| | | //public String rtuAddr_inRootTk ;//åªå¨æ ¹rootä»»å¡å¯¹è±¡ä¸ä¼ä»æ¤å¼ |
| | | //æ¬èç¹é
ç½® |
| | | protected TaskConfig conf ; |
| | | //æ ¹ä»»å¡ |
| | |
| | | * @param data éè¦å¤ççæ°æ® |
| | | */ |
| | | @Override |
| | | public abstract void execute(Object data) ; |
| | | public abstract void execute(Object data) throws ParseException; |
| | | |
| | | /** |
| | | * ä»»å¡éç¨å¯¹è±¡æ± ï¼ä»¥ä¾¿éç¨ä»»å¡å¯¹è±¡ï¼ |
| | |
| | | */ |
| | | @Override |
| | | public void cleanMeAndSubs() { |
| | | rtuAddr_inRootTk = null ; |
| | | //rtuAddr_inRootTk = null ; |
| | | taskResult = null ; |
| | | if(this.subTasks != null && this.subTasks.length > 0){ |
| | | for(int i = 0 ; i < this.subTasks.length; i++){ |
| | |
| | | |
| | | import com.dy.pipIrrGlobal.daoPr.PrControllerMapper; |
| | | import com.dy.pipIrrGlobal.daoPr.PrControllerTrampMapper; |
| | | import com.dy.pipIrrGlobal.daoPr.PrIntakeMapper; |
| | | import com.dy.pipIrrGlobal.daoRm.RmAlarmStateHistoryMapper; |
| | | import com.dy.pipIrrGlobal.daoRm.RmAlarmStateLastMapper; |
| | | import com.dy.pipIrrGlobal.daoRm.RmAutoReportHistoryMapper; |
| | | import com.dy.pipIrrGlobal.daoRm.RmAutoReportLastMapper; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrController; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrControllerTramp; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrIntake; |
| | | import com.dy.pipIrrGlobal.pojoRm.RmAlarmStateHistory; |
| | | import com.dy.pipIrrGlobal.pojoRm.RmAlarmStateLast; |
| | | import com.dy.pipIrrGlobal.pojoRm.RmAutoReportHistory; |
| | | import com.dy.pipIrrGlobal.pojoRm.RmAutoReportLast; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | private PrControllerTrampMapper prControllerTrampMapperDao;//æµæµªæ§å¶å¨DAO |
| | | @Autowired |
| | | private PrControllerMapper prControllerMapperDao ;//æ§å¶å¨DAO |
| | | |
| | | @Autowired |
| | | @Lazy |
| | | private DbSv sv ; |
| | | private RmAlarmStateLastMapper rmAlarmStateLastMapperDao ;//æ§å¶å¨ææ°æ¥è¦åç¶æDAO |
| | | @Autowired |
| | | private RmAlarmStateHistoryMapper rmAlarmStateHistoryMapperDao ;//æ§å¶å¨å岿¥è¦åç¶æDAO |
| | | @Autowired |
| | | private RmAutoReportLastMapper rmAutoReportLastMapperDao ;//æ§å¶å¨ææ°ä¸æ¥æ°æ®DAO |
| | | @Autowired |
| | | private RmAutoReportHistoryMapper rmAutoReportHistoryMapperDao ;//æ§å¶å¨åå²ä¸æ¥æ°æ®DAO |
| | | |
| | | //@Autowired |
| | | //@Lazy |
| | | //private DbSv sv ; |
| | | |
| | | /** |
| | | * éè¿æ§å¶å¨å°å仿°æ®åºè¡¨ä¸æ¥è¯¢æ§å¶å¨ |
| | | * @param rtuAddr æ§å¶å¨å°å |
| | | * @return æ§å¶å¨ |
| | | */ |
| | | public PrController getPrControllerByRtuAddr(String rtuAddr){ |
| | | List<PrController> list = this.prControllerMapperDao.selectPrControllerByRtuAddr(rtuAddr) ; |
| | | public PrController getControllersByRtuAddrAndIntakeNotNull(String rtuAddr){ |
| | | List<PrController> list = this.prControllerMapperDao.getControllersByRtuAddrAndIntakeNotNull(rtuAddr) ; |
| | | if(list != null && list.size() > 0){ |
| | | return list.get(0) ; |
| | | } |
| | |
| | | * @return æµæµªæ§å¶å¨ |
| | | */ |
| | | public PrControllerTramp getPrControllerTrampByRtuAddr(String rtuAddr){ |
| | | List<PrControllerTramp> list = this.prControllerTrampMapperDao.selectPrControllerTrampByRtuAddr(rtuAddr) ; |
| | | List<PrControllerTramp> list = this.prControllerTrampMapperDao.getPrControllerTrampByRtuAddr(rtuAddr) ; |
| | | if(list != null && list.size() > 0){ |
| | | return list.get(0) ; |
| | | } |
| | | return null ; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * ä¿åæµæµªæ§å¶å¨ |
| | | * @param po |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void savePrConctrollerTramp(PrControllerTramp po){ |
| | | this.prControllerTrampMapperDao.insert(po) ; |
| | | } |
| | | /** |
| | | * å¾å°æ§å¶å¨æ¥è¦ä¸ç¶æææ°è®°å½ |
| | | * @param rtuAddr |
| | | * @return |
| | | */ |
| | | public RmAlarmStateLast getRmLastAlarmState(String rtuAddr){ |
| | | List<RmAlarmStateLast> list = rmAlarmStateLastMapperDao.selectByRtuAddr(rtuAddr) ; |
| | | if(list != null && list.size() > 0){ |
| | | return list.get(0) ; |
| | | } |
| | | return null ; |
| | | } |
| | | /** |
| | | * ä¿åæ§å¶å¨æ¥è¦ä¸ç¶æææ°è®°å½ |
| | | * @param po |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void saveRmAlarmStateLast(RmAlarmStateLast po){ |
| | | this.rmAlarmStateLastMapperDao.insert(po) ; |
| | | } |
| | | /** |
| | | * ä¿åæ§å¶å¨æ¥è¦ä¸ç¶æåå²è®°å½ |
| | | * @param po |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void saveRmAlarmStateHistory(RmAlarmStateHistory po){ |
| | | this.rmAlarmStateHistoryMapperDao.insert(po) ; |
| | | } |
| | | /** |
| | | * å¾å°æ§å¶å¨ä¸æ¥æ°æ®ææ°è®°å½ |
| | | * @param rtuAddr |
| | | * @return |
| | | */ |
| | | public RmAutoReportLast getRmLastAutoReport(String rtuAddr){ |
| | | List<RmAutoReportLast> list = rmAutoReportLastMapperDao.selectByRtuAddr(rtuAddr) ; |
| | | if(list != null && list.size() > 0){ |
| | | return list.get(0) ; |
| | | } |
| | | return null ; |
| | | } |
| | | /** |
| | | * ä¿åæ§å¶å¨ä¸æ¥æ°æ®ææ°è®°å½ |
| | | * @param po |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void saveRmAutoReportLast(RmAutoReportLast po){ |
| | | this.rmAutoReportLastMapperDao.insert(po) ; |
| | | } |
| | | /** |
| | | * ä¿åæ§å¶å¨ä¸æ¥æ°æ®åå²è®°å½ |
| | | * @param po |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void saveRmAutoReportHistory(RmAutoReportHistory po){ |
| | | this.rmAutoReportHistoryMapperDao.insert(po) ; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.dy.aceMw.server.rtuData.p206V1_0_0; |
| | | |
| | | import com.dy.aceMw.server.rtuData.TaskSurpport; |
| | | import com.dy.aceMw.server.rtuData.dbSv.DbSv; |
| | | import com.dy.common.mw.protocol.Data; |
| | | import com.dy.common.mw.protocol.p206V1_0_0.DataAlarmVo; |
| | | import com.dy.common.mw.protocol.p206V1_0_0.DataStateVo; |
| | | import com.dy.common.mw.protocol.p206V1_0_0.DataV1_0_1; |
| | | import com.dy.common.util.DateTime; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrController; |
| | | import com.dy.pipIrrGlobal.pojoRm.RmAlarmStateHistory; |
| | | import com.dy.pipIrrGlobal.pojoRm.RmAlarmStateLast; |
| | | import org.apache.logging.log4j.LogManager; |
| | | import org.apache.logging.log4j.Logger; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/1/15 21:59 |
| | | * @LastEditTime 2024/1/15 21:59 |
| | | * @Description |
| | | */ |
| | | public class TkDealAlarmStatus extends TaskSurpport { |
| | | |
| | | private static final Logger log = LogManager.getLogger(TkDealAlarmStatus.class.getName()) ; |
| | | |
| | | //ç±»IDï¼ä¸å®ä¸Tree.xmlé
ç½®æä»¶ä¸é
ç½®ä¸è´ |
| | | public static final String taskId = "TkDealAlarmStatus" ; |
| | | |
| | | /** |
| | | * æ§è¡èç¹ä»»å¡ï¼æ¥è¦åç¶æ |
| | | * @param data éè¦å¤ççæ°æ® |
| | | */ |
| | | @Override |
| | | public void execute(Object data) { |
| | | Data d = (Data)data ; |
| | | Object subD = d.getSubData() ; |
| | | if(subD != null){ |
| | | DataV1_0_1 dV1_0_1 = (DataV1_0_1)subD ; |
| | | if(dV1_0_1 != null){ |
| | | //dV1_0_1.dataCd81Vo ä¸ dV1_0_1.dataCdC0Vo ä¸ä¼åæ¶æå¼ |
| | | try{ |
| | | if(dV1_0_1.dataCd81Vo != null){ |
| | | if(dV1_0_1.dataCd81Vo.alarmVo != null || dV1_0_1.dataCd81Vo.stateVo != null){ |
| | | Object[] objs = this.getTaskResults(TkPreGenObjs.taskId) ; |
| | | DbSv sv = (DbSv)objs[0] ; |
| | | PrController controller = (PrController)objs[1] ; |
| | | this.saveOrUpdateLast(sv, controller, d.getRtuAddr(), dV1_0_1, dV1_0_1.dataCd81Vo.alarmVo, dV1_0_1.dataCd81Vo.stateVo) ; |
| | | this.saveHistory(sv, controller, d.getRtuAddr(), dV1_0_1, dV1_0_1.dataCd81Vo.alarmVo, dV1_0_1.dataCd81Vo.stateVo) ; |
| | | } |
| | | } else if(dV1_0_1.dataCdC0Vo != null){ |
| | | if(dV1_0_1.dataCdC0Vo.alarmVo != null || dV1_0_1.dataCdC0Vo.stateVo != null){ |
| | | Object[] objs = this.getTaskResults(TkPreGenObjs.taskId) ; |
| | | DbSv sv = (DbSv)objs[0] ; |
| | | PrController controller = (PrController)objs[1] ; |
| | | this.saveOrUpdateLast(sv, controller, d.getRtuAddr(), dV1_0_1, dV1_0_1.dataCdC0Vo.alarmVo, dV1_0_1.dataCdC0Vo.stateVo) ; |
| | | this.saveHistory(sv, controller, d.getRtuAddr(), dV1_0_1, dV1_0_1.dataCdC0Vo.alarmVo, dV1_0_1.dataCdC0Vo.stateVo) ; |
| | | } |
| | | } |
| | | }catch (Exception e){ |
| | | log.error("ä¿åæ§å¶å¨æ¥è¦åç¶ææ°æ®æ¶åçå¼å¸¸", e); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | * ä¿åæ¥è¦ç¶æææ°æ°æ® |
| | | * @param sv æå¡ |
| | | * @param controller æ§å¶å¨å¯¹è±¡ |
| | | * @param rtuAddr æ§å¶å¨å°å |
| | | * @param alarmVo æ¥è¦å¯¹è±¡ |
| | | * @param stateVo ç¶æå¯¹è±¡ |
| | | */ |
| | | private void saveOrUpdateLast(DbSv sv, PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataAlarmVo alarmVo, DataStateVo stateVo) throws Exception { |
| | | RmAlarmStateLast po = sv.getRmLastAlarmState(rtuAddr) ; |
| | | if(po == null){ |
| | | po = new RmAlarmStateLast(null, controller==null?null:controller.getId(), controller==null?null:controller.getIntakeId(), |
| | | rtuAddr, |
| | | DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1_0_1.dt), |
| | | alarmVo==null?null:alarmVo.batteryVolt, alarmVo==null?null:alarmVo.loss, alarmVo==null?null:alarmVo.meter, alarmVo==null?null:alarmVo.valve, |
| | | stateVo==null?null:stateVo.icCard, stateVo==null?null:stateVo.working, stateVo==null?null:stateVo.valve) ; |
| | | sv.saveRmAlarmStateLast(po) ; |
| | | }else{ |
| | | po = this.update(controller, po, dV1_0_1, alarmVo, stateVo) ; |
| | | sv.saveRmAlarmStateLast(po); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * ä¿åæ¥è¦ç¶æåå²è®°å½ |
| | | * @param sv æå¡ |
| | | * @param controller æ§å¶å¨å¯¹è±¡ |
| | | * @param rtuAddr æ§å¶å¨å°å |
| | | * @param alarmVo æ¥è¦å¯¹è±¡ |
| | | * @param stateVo ç¶æå¯¹è±¡ |
| | | */ |
| | | private void saveHistory(DbSv sv, PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataAlarmVo alarmVo, DataStateVo stateVo) throws Exception { |
| | | RmAlarmStateHistory po = new RmAlarmStateHistory(null, controller==null?null:controller.getId(), controller==null?null:controller.getIntakeId(), |
| | | rtuAddr, |
| | | DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1_0_1.dt), |
| | | alarmVo==null?null:alarmVo.batteryVolt, alarmVo==null?null:alarmVo.loss, alarmVo==null?null:alarmVo.meter, alarmVo==null?null:alarmVo.valve, |
| | | stateVo==null?null:stateVo.icCard, stateVo==null?null:stateVo.working, stateVo==null?null:stateVo.valve) ; |
| | | sv.saveRmAlarmStateHistory(po) ; |
| | | } |
| | | |
| | | |
| | | private RmAlarmStateLast update(PrController controller, RmAlarmStateLast po, DataV1_0_1 dV1_0_1, DataAlarmVo alarmVo, DataStateVo stateVo) throws Exception { |
| | | po.controllerid = controller==null?null:controller.getId() ; |
| | | |
| | | po.dt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1_0_1.dt) ; |
| | | if(alarmVo != null){ |
| | | po.bateryvolt = alarmVo.batteryVolt ; |
| | | po.loss = alarmVo.loss ; |
| | | po.meter = alarmVo.meter ; |
| | | po.valve = alarmVo.valve ; |
| | | }else{ |
| | | po.bateryvolt = null ; |
| | | po.loss = null ; |
| | | po.meter = null ; |
| | | po.valve = null ; |
| | | } |
| | | if(stateVo != null){ |
| | | po.iccard = stateVo.icCard ; |
| | | po.working = stateVo.working ; |
| | | po.valvestate = stateVo.valve ; |
| | | }else{ |
| | | po.iccard = null ; |
| | | po.working = null ; |
| | | po.valvestate = null ; |
| | | } |
| | | return po ; |
| | | } |
| | | } |
New file |
| | |
| | | package com.dy.aceMw.server.rtuData.p206V1_0_0; |
| | | |
| | | import com.dy.aceMw.server.rtuData.TaskSurpport; |
| | | import com.dy.aceMw.server.rtuData.dbSv.DbSv; |
| | | import com.dy.common.mw.protocol.Data; |
| | | import com.dy.common.mw.protocol.p206V1_0_0.DataCdC0Vo; |
| | | import com.dy.common.mw.protocol.p206V1_0_0.DataV1_0_1; |
| | | import com.dy.common.util.DateTime; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrController; |
| | | import com.dy.pipIrrGlobal.pojoRm.RmAutoReportHistory; |
| | | import com.dy.pipIrrGlobal.pojoRm.RmAutoReportLast; |
| | | import org.apache.logging.log4j.LogManager; |
| | | import org.apache.logging.log4j.Logger; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/1/16 14:11 |
| | | * @LastEditTime 2024/1/16 14:11 |
| | | * @Description |
| | | */ |
| | | public class TkDealAutoReport extends TaskSurpport { |
| | | |
| | | private static final Logger log = LogManager.getLogger(TkDealAlarmStatus.class.getName()) ; |
| | | |
| | | //ç±»IDï¼ä¸å®ä¸Tree.xmlé
ç½®æä»¶ä¸é
ç½®ä¸è´ |
| | | public static final String taskId = "TkDealAlarmStatus" ; |
| | | |
| | | /** |
| | | * æ§è¡èç¹ä»»å¡ï¼æ§å¶å¨èªæ¥æ°æ®ï¼åè½ç 为C0ï¼ |
| | | * @param data éè¦å¤ççæ°æ® |
| | | */ |
| | | @Override |
| | | public void execute(Object data) { |
| | | Data d = (Data) data; |
| | | Object subD = d.getSubData(); |
| | | if (subD != null) { |
| | | DataV1_0_1 dV1_0_1 = (DataV1_0_1) subD; |
| | | if (dV1_0_1 != null && dV1_0_1.dataCdC0Vo != null) { |
| | | Object[] objs = this.getTaskResults(TkPreGenObjs.taskId) ; |
| | | DbSv sv = (DbSv)objs[0] ; |
| | | PrController controller = (PrController)objs[1] ; |
| | | try{ |
| | | this.saveOrUpdateLast(sv, controller, d.getRtuAddr(), dV1_0_1, dV1_0_1.dataCdC0Vo) ; |
| | | this.saveHistory(sv, controller, d.getRtuAddr(),dV1_0_1, dV1_0_1.dataCdC0Vo) ; |
| | | }catch (Exception e){ |
| | | log.error("ä¿åæ§å¶å¨èªæ¥æ°æ®æ¶åçå¼å¸¸", e); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | * ä¿åèªæ¥ææ°æ°æ® |
| | | * @param sv æå¡ |
| | | * @param controller æ§å¶å¨å¯¹è±¡ |
| | | * @param rtuAddr æ§å¶å¨å°å |
| | | * @param dataCdC0Vo èªæ¥æ°æ®å¯¹è±¡ |
| | | */ |
| | | private void saveOrUpdateLast(DbSv sv, PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataCdC0Vo dataCdC0Vo) throws Exception { |
| | | RmAutoReportLast po = sv.getRmLastAutoReport(rtuAddr) ; |
| | | if(po == null){ |
| | | po = new RmAutoReportLast(null, controller==null?null:controller.getId(), controller==null?null:controller.getId(), |
| | | rtuAddr, |
| | | DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1_0_1.dt), |
| | | DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCdC0Vo.rtuDt), |
| | | dataCdC0Vo.instantAmount, dataCdC0Vo.totalAmount, dataCdC0Vo.lossAmount, |
| | | dataCdC0Vo.waterPress, dataCdC0Vo.batteryVolt, dataCdC0Vo.sunVolt, dataCdC0Vo.signalValue) ; |
| | | sv.saveRmAutoReportLast(po) ; |
| | | }else{ |
| | | po = this.update(po, dV1_0_1, dataCdC0Vo) ; |
| | | sv.saveRmAutoReportLast(po); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * ä¿åèªæ¥åå²è®°å½ |
| | | * @param sv æå¡ |
| | | * @param controller æ§å¶å¨å¯¹è±¡ |
| | | * @param rtuAddr æ§å¶å¨å°å |
| | | * @param dataCdC0Vo èªæ¥æ°æ®å¯¹è±¡ |
| | | */ |
| | | private void saveHistory(DbSv sv, PrController controller, String rtuAddr, DataV1_0_1 dV1_0_1, DataCdC0Vo dataCdC0Vo) throws Exception { |
| | | RmAutoReportHistory po = new RmAutoReportHistory(null, controller==null?null:controller.getId(), controller==null?null:controller.getIntakeId(), |
| | | rtuAddr, |
| | | DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1_0_1.dt), |
| | | DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCdC0Vo.rtuDt), |
| | | dataCdC0Vo.instantAmount, dataCdC0Vo.totalAmount, dataCdC0Vo.lossAmount, |
| | | dataCdC0Vo.waterPress, dataCdC0Vo.batteryVolt, dataCdC0Vo.sunVolt, dataCdC0Vo.signalValue) ; |
| | | sv.saveRmAutoReportHistory(po) ; |
| | | } |
| | | |
| | | |
| | | private RmAutoReportLast update(RmAutoReportLast po, DataV1_0_1 dV1_0_1, DataCdC0Vo dataCdC0Vo) throws Exception { |
| | | po.dt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dV1_0_1.dt); |
| | | po.rtudt = DateTime.dateFrom_yyyy_MM_dd_HH_mm_ss(dataCdC0Vo.rtuDt) ; |
| | | po.instantamount = dataCdC0Vo.instantAmount; |
| | | po.totalamount = dataCdC0Vo.totalAmount; |
| | | po.lossamount = dataCdC0Vo.lossAmount; |
| | | po.waterpress = dataCdC0Vo.waterPress; |
| | | po.batteryvolt = dataCdC0Vo.batteryVolt; |
| | | po.sunvolt = dataCdC0Vo.sunVolt; |
| | | po.signalvalue = dataCdC0Vo.signalValue; |
| | | return po ; |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | package com.dy.aceMw.server.rtuData.p206V1_0_0; |
| | | |
| | | import com.dy.aceMw.server.rtuData.TaskSurpport; |
| | | import com.dy.aceMw.server.rtuData.dbSv.DbSv; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrControllerTramp; |
| | | import org.apache.logging.log4j.LogManager; |
| | | import org.apache.logging.log4j.Logger; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/1/16 17:18 |
| | | * @LastEditTime 2024/1/16 17:18 |
| | | * @Description |
| | | */ |
| | | /** |
| | | * å¤çæ§å¶å¨å
³é䏿¥ |
| | | */ |
| | | public class TkDealCloseValveReport extends TaskSurpport { |
| | | |
| | | private static final Logger log = LogManager.getLogger(TkDealCloseValveReport.class.getName()) ; |
| | | |
| | | //ç±»IDï¼ä¸å®ä¸Tree.xmlé
ç½®æä»¶ä¸é
ç½®ä¸è´ |
| | | public static final String taskId = "TkDealCloseValveReport" ; |
| | | |
| | | /** |
| | | * æ§è¡èç¹ä»»å¡: å¤çæ§å¶å¨å
³é䏿¥ |
| | | * @param data éè¦å¤ççæ°æ® |
| | | */ |
| | | @Override |
| | | public void execute(Object data) { |
| | | Object[] objs = this.getTaskResults(TkPreGenObjs.taskId) ; |
| | | DbSv sv = (DbSv)objs[0] ; |
| | | PrControllerTramp rtuTramp = (PrControllerTramp)objs[2] ; |
| | | sv.savePrConctrollerTramp(rtuTramp); |
| | | } |
| | | } |
New file |
| | |
| | | package com.dy.aceMw.server.rtuData.p206V1_0_0; |
| | | |
| | | import com.dy.aceMw.server.rtuData.TaskSurpport; |
| | | import com.dy.aceMw.server.rtuData.dbSv.DbSv; |
| | | import com.dy.common.mw.protocol.Data; |
| | | import com.dy.common.mw.protocol.p206V1_0_0.DataV1_0_1; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrController; |
| | | import org.apache.logging.log4j.LogManager; |
| | | import org.apache.logging.log4j.Logger; |
| | | |
| | | /** |
| | | * @Author liurunyu |
| | | * @Date 2024/1/16 17:16 |
| | | * @LastEditTime 2024/1/16 17:16 |
| | | * @Description |
| | | */ |
| | | /** |
| | | * å¤çæ§å¶å¨å¼é䏿¥ |
| | | */ |
| | | public class TkDealOpenValveReport extends TaskSurpport { |
| | | |
| | | private static final Logger log = LogManager.getLogger(TkDealOpenValveReport.class.getName()) ; |
| | | |
| | | //ç±»IDï¼ä¸å®ä¸Tree.xmlé
ç½®æä»¶ä¸é
ç½®ä¸è´ |
| | | public static final String taskId = "TkDealOpenValveReport" ; |
| | | |
| | | /** |
| | | * æ§è¡èç¹ä»»å¡: å¤çæ§å¶å¨å¼é䏿¥ |
| | | * @param data éè¦å¤ççæ°æ® |
| | | */ |
| | | @Override |
| | | public void execute(Object data) { |
| | | Data d = (Data) data; |
| | | Object subD = d.getSubData(); |
| | | if (subD != null) { |
| | | DataV1_0_1 dV1_0_1 = (DataV1_0_1) subD; |
| | | if (dV1_0_1 != null && dV1_0_1.dataCd83OpenVo != null) { |
| | | Object[] objs = this.getTaskResults(TkPreGenObjs.taskId) ; |
| | | DbSv sv = (DbSv)objs[0] ; |
| | | PrController controller = (PrController)objs[1] ; |
| | | try{ |
| | | this.saveOrUpdateLast(sv, controller, d.getRtuAddr(), dV1_0_1.dataCdC0Vo) ; |
| | | this.saveHistory(sv, controller, d.getRtuAddr(), dV1_0_1.dataCdC0Vo) ; |
| | | }catch (Exception e){ |
| | | log.error("ä¿åæ§å¶å¨å¼é䏿¥æ¶åçå¼å¸¸", e); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public void execute(Object data) { |
| | | if(data instanceof Data){ |
| | | Data d = (Data)data ; |
| | | if(d.getCommandId() == null || d.getCommandId().trim().equals("")){ |
| | | //æ å½ä»¤ID |
| | | this.toNextTasks(data); |
| | | } |
| | | Data d = (Data)data ; |
| | | if(d.getCommandId() == null || d.getCommandId().trim().equals("")){ |
| | | //æ å½ä»¤ID |
| | | this.toNextTasks(data); |
| | | } |
| | | //Object[] objs = this.getTaskResults(TkPreGenObjs.taskId) ; |
| | | //DbSv sv = (DbSv)objs[0] ; |
| | | //PrController controller = (PrController)objs[1] ; |
| | | } |
| | | } |
| | |
| | | import org.apache.logging.log4j.LogManager; |
| | | import org.apache.logging.log4j.Logger; |
| | | |
| | | import java.text.DateFormat; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | public class TkPreGenObjs extends TaskSurpport { |
| | | |
| | | private static final Logger log = LogManager.getLogger(TkPreGenObjs.class.getName()) ; |
| | |
| | | * @param data éè¦å¤ççæ°æ® |
| | | */ |
| | | @Override |
| | | public void execute(Object data) { |
| | | public void execute(Object data) throws ParseException { |
| | | Data d = (Data)data ; |
| | | String rtuAddr = d.getRtuAddr() ;//TkRtuDataé夿äºrtuAddr为空 |
| | | DbSv sv = (DbSv)SpringContextUtil.getBean(DbSv.class) ; |
| | | if(sv != null){ |
| | | PrController controller = sv.getPrControllerByRtuAddr(rtuAddr) ; |
| | | PrController controller = sv.getControllersByRtuAddrAndIntakeNotNull(rtuAddr) ; |
| | | if(controller == null){ |
| | | //æ°æ®åºä¸æªæ¥è¯¢å°æ§å¶å¨ï¼RTUå®ä½ï¼ |
| | | //æ°æ®åºä¸æªæ¥è¯¢(å·²ç»ç»å®ä¸æ§å¶å¨å°åç¸ç¬¦)å°æ§å¶å¨ï¼RTUå®ä½ï¼ |
| | | //æµæµªè
æ§å¶å¨ |
| | | PrControllerTramp rtuTramp = sv.getPrControllerTrampByRtuAddr(rtuAddr); |
| | | if(rtuTramp == null){ |
| | | rtuTramp = new PrControllerTramp(null, rtuAddr, d.getProtocol(), DateTime.yyyy_MM_dd_HH_mm_ss()) ; |
| | | rtuTramp = new PrControllerTramp(null, rtuAddr, d.getProtocol(), new Date()) ; |
| | | this.taskResult = new Object[]{sv, null, rtuTramp} ; |
| | | this.toNextOneTask(data, TkDealControllerTramp.taskId); |
| | | } |
| | |
| | | <task id="TkDealControllerTramp" name="å¤çæµæµªæ§å¶å¨" enable="true" class="com.dy.aceMw.server.rtuData.p206V1_0_0.TkDealControllerTramp" /> |
| | | <!-- éæµæµªè
RTUï¼å¿
é¡»æ¾å¨TkDealControllerTrampåé¢ --> |
| | | <!-- è¯å«ä¸»å¨ä¸æ¥æ°æ® --> |
| | | <task id="TkFindReport" name="è¯å«ä¸æ¥æ°æ®" enable="true" class="com.dy.aceMw.server.rtuData.p206V1_0_0.TkFindReport"> |
| | | |
| | | <task id="TkFindReport" name="è¯å«æ§å¶å¨ä¸æ¥æ°æ®" enable="true" class="com.dy.aceMw.server.rtuData.p206V1_0_0.TkFindReport"> |
| | | <task id="TkDealAlarmStatus" name="æ§å¶å¨æ¥è¦ä¸ç¶ææ°æ®" enable="true" class="com.dy.aceMw.server.rtuData.p206V1_0_0.TkDealAlarmStatus" /> |
| | | <task id="TkDealAutoReport" name="æ§å¶å¨èªæ¥æ°æ®" enable="true" class="com.dy.aceMw.server.rtuData.p206V1_0_0.TkDealAutoReport" /> |
| | | <task id="TkDealOpenValveReport" name="æ§å¶å¨å¼é䏿¥" enable="true" class="com.dy.aceMw.server.rtuData.p206V1_0_0.TkDealOpenValveReport" /> |
| | | <task id="TkDealCloseValveReport" name="æ§å¶å¨å
³é䏿¥" enable="true" class="com.dy.aceMw.server.rtuData.p206V1_0_0.TkDealCloseValveReport" /> |
| | | </task> |
| | | <!-- è¯å«å½ä»¤ååºæ°æ® --> |
| | | <task id="TkFindComResponse" name="è¯å«ååºå½ä»¤æ°æ®" enable="true" class="com.dy.aceMw.server.rtuData.p206V1_0_0.TkFindComResponse"> |
| | |
| | | </task> |
| | | </task> |
| | | </task> |
| | | </task> |
| | | </task> |
| | | </task> |
| | | </project> |
| | |
| | | */ |
| | | @Schema(description = "è§è²ç¼å·", requiredMode = Schema.RequiredMode.NOT_REQUIRED) |
| | | @Positive(message = "è§è²ç¼å·å¿
须为大äº0çæ´æ°") |
| | | private Long roleid; |
| | | private Long roleId; |
| | | |
| | | /** |
| | | * è§è²åç§° |
| | |
| | | @SuppressWarnings("unchecked")//javaçæ¬è¶é«ï¼å¯¹æ³å约æè¶ä¸¥ï¼æä»¥é
ç½®SuppressWarnings("unchecked") |
| | | public class RoleCtrl { |
| | | |
| | | //private RoleSv sv ; |
| | | private final RoleSv roleSv; |
| | | |
| | | //@Autowired |
| | | //private void setSv(RoleSv sv){ |
| | | // this.sv = sv ; |
| | | //} |
| | | |
| | | /** |
| | | * æ ¹æ®æå®æ¡ä»¶ï¼è§è²ç¼å·ãè§è²åç§°ï¼è·åè§è²å表 |
| | |
| | | } |
| | | |
| | | /** |
| | | * æ·»å è§è²åæéåè¡¨ï¼æ·»å å夿è§è²åæ¯å¦å·²åå¨ |
| | | * @param po è§è²ä¼ å
¥å¯¹è±¡ï¼å
æ¬è§è²åç§°ãæéå表ãæä½äººç¼å· |
| | | * @param bindingResult |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æ·»å è§è²", description = "æäº¤è§è²æ°æ®åæéæ°æ®ï¼è¿è¡ä¿å") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "æä½ç»æï¼trueï¼æåï¼falseï¼å¤±è´¥ï¼BaseResponse.contentï¼", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = Boolean.class))} |
| | | ) |
| | | }) |
| | | @PostMapping(path = "save", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop() |
| | | public BaseResponse<Boolean> save(@RequestBody @Valid DtoRole po, BindingResult bindingResult){ |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | |
| | | // è·åè§è²å称级æéå表 |
| | | String roleName = Optional.ofNullable(po.getRoleName()).orElse(""); |
| | | JSONArray permissions = Optional.ofNullable(JSONArray.parseArray(po.getPermissions())).orElse(JSONArray.parseArray("[]")); |
| | | Long operator = Optional.ofNullable(po.getOperator()).orElse(0L); |
| | | |
| | | // 夿è§è²åç§°æ¯å¦éå |
| | | Integer recordCount = Optional.ofNullable(roleSv.getRecordCountByName(roleName)).orElse(0); |
| | | if(recordCount > 0) |
| | | return BaseResponseUtils.buildFail(SystemResultCode.ROLE_NAME_EXIST.getMessage()); |
| | | |
| | | // æ·»å è§è² |
| | | BaRole baRole = new BaRole(); |
| | | Long roleId = 0L; |
| | | try { |
| | | baRole.setName(roleName); |
| | | baRole.setOperator(operator); |
| | | Date operateTime = new Date(); |
| | | baRole.setOperateDt(operateTime); |
| | | baRole.setDeleted(Deleted.NO.getCode()); |
| | | roleId = roleSv.addRole(baRole); |
| | | } catch (Exception e) { |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | |
| | | if(roleId <= 0) |
| | | return BaseResponseUtils.buildFail(SystemResultCode.ADD_ROLE_FAIL.getMessage()); |
| | | |
| | | // æ·»å æéå表 |
| | | BaRolePermissions baRolePermissions = new BaRolePermissions(); |
| | | baRolePermissions.setRoleid(roleId); |
| | | baRolePermissions.setPermissions(permissions); |
| | | Integer rc = Optional.ofNullable(roleSv.addPermissions(baRolePermissions)).orElse(0); |
| | | if(rc <= 0) { |
| | | return BaseResponseUtils.buildFail(SystemResultCode.ADD_ROLE_FAIL.getMessage()); |
| | | } |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | | } |
| | | |
| | | /** |
| | | * è§è²ææï¼å½è§è²ç¼å·ä¸ºç©ºæ¶ï¼å®é
为添å è§è²åæéå表 |
| | | * è§è²ææ |
| | | * 1. 妿roleidåroleNameé½ç©ºï¼æç¤ºéè¯¯ä¿¡æ¯ |
| | | * 2. 妿roleidä¸ºç©ºï¼æ°å»ºè§è²ä¸ææ |
| | | * 1. æ·»å è§è²è®°å½ |
| | | * 2. æ·»å è§è²ãæéå
³èè®°å½ |
| | | * 3. 妿roleidä¸ä¸ºç©ºï¼ä¿®æ¹è§è²åææ |
| | | * 1. å é¤è§è²ãæéè®°å½ |
| | | * 2. ä¿®æ¹è§è²ä¿¡æ¯ |
| | | * 3. æ·»å è§è²ãæéè®°å½ |
| | | * @param po |
| | | * @param bindingResult |
| | | * @return |
| | |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | |
| | | /** |
| | | * 妿roleidåroleNameé½ç©ºï¼æç¤ºéè¯¯ä¿¡æ¯ |
| | | * 妿roleidä¸ºç©ºï¼æ°å»ºè§è²ä¸ææ |
| | | * 1. æ·»å è§è²è®°å½ |
| | | * 2. æ·»å è§è²ãæéå
³èè®°å½ |
| | | * 妿roleidä¸ä¸ºç©ºï¼ä¿®æ¹è§è²ææ |
| | | * 1. å é¤è§è²ãæéè®°å½ |
| | | * 2. æ·»å è§è²ãæéè®°å½ |
| | | */ |
| | | |
| | | Long roleId = Optional.ofNullable(po.getRoleid()).orElse(0L); |
| | | Long roleId = Optional.ofNullable(po.getRoleId()).orElse(0L); |
| | | String roleName = Optional.ofNullable(po.getRoleName()).orElse(""); |
| | | //String permissions = Optional.ofNullable(po.getPermissions()).orElse(""); |
| | | JSONArray permissions = Optional.ofNullable(JSONArray.parseArray(po.getPermissions())).orElse(JSONArray.parseArray("[]")); |
| | | Long operator = Optional.ofNullable(po.getOperator()).orElse(0L); |
| | | |
| | |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | | } |
| | | |
| | | // ä¿®æ¹è§è²ä¿¡æ¯ |
| | | BaRole baRole = new BaRole(); |
| | | baRole.setId(roleId); |
| | | baRole.setName(roleName); |
| | | baRole.setOperator(operator); |
| | | Date operateTime = new Date(); |
| | | baRole.setOperateDt(operateTime); |
| | | roleSv.updateRole(baRole); |
| | | |
| | | // ä¿®æ¹è§è²ææ |
| | | BaRolePermissions baRolePermissions = new BaRolePermissions(); |
| | | baRolePermissions.setRoleid(roleId); |
| | | baRolePermissions.setPermissions(permissions); |
| | | roleSv.delPermissionsByRoleId(roleId); |
| | | roleSv.addPermissions(baRolePermissions); |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹è§è² |
| | | * @param po ä¿åè§è²form表å对象 |
| | | * @return æ¯å¦æå |
| | | */ |
| | | @Operation(summary = "ä¿®æ¹è§è²", description = "æäº¤è§è²æ°æ®ï¼è¿è¡ä¿®æ¹") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "æä½ç»æï¼trueï¼æåï¼falseï¼å¤±è´¥ï¼BaseResponse.contentï¼", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = Boolean.class))} |
| | | ) |
| | | }) |
| | | @PostMapping(path = "update", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @SsoAop() |
| | | public BaseResponse<Boolean> update(@RequestBody @Valid BaRole po, BindingResult bindingResult){ |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | |
| | | // æ¥æ¶è§è²ç¼å·ãè§è²åç§°ãæä½äººç¼å· |
| | | Long roleId = Optional.ofNullable(po.getId()).orElse(0L); |
| | | String roleName = Optional.ofNullable(po.getName()).orElse(""); |
| | | Long operator = Optional.ofNullable(po.getOperator()).orElse(0L); |
| | | |
| | | // 夿䏻鮿¯å¦ä¸ºç©º |
| | | if(roleId == 0) |
| | | return BaseResponseUtils.buildFail(SystemResultCode.PLEASE_INPUT_ROLE_ID.getMessage()) ; |
| | | |
| | | Integer recordCount = 0; |
| | | try { |
| | | po.setName(roleName); |
| | | po.setOperator(operator); |
| | | Date operateTime = new Date(); |
| | | po.setOperateDt(operateTime); |
| | | |
| | | //po.deleted = null ;//设置为nullï¼ä¸åæ´æ° |
| | | recordCount = roleSv.updateRole(po); |
| | | } catch (Exception e) { |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | |
| | | if(recordCount <= 0) |
| | | return BaseResponseUtils.buildFail("æ°æ®åºåå¨å¤±è´¥") ; |
| | | |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | | } |
| | |
| | | package com.dy.pipIrrProject.controller; |
| | | |
| | | import com.alibaba.fastjson2.JSONArray; |
| | | import com.alibaba.excel.EasyExcel; |
| | | import com.alibaba.excel.support.ExcelTypeEnum; |
| | | import com.dy.common.aop.SsoAop; |
| | |
| | | |
| | | /** |
| | | * æ ¹æ®æ§å¶å¨ç¼å·è·åæ§å¶å¨å表 |
| | | * @param controllerCode æ§å¶å¨ç¼å· |
| | | * @param rtuAddr æ§å¶å¨å°å |
| | | * @return ç¬¦åæ¡ä»¶çæ§å¶å¨å表 |
| | | */ |
| | | @Operation(summary = "è·å¾æ§å¶å¨è®°å½", description = "è¿ååæ§å¶å¨æ°æ®") |
| | |
| | | @PostMapping(path = "add", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop() |
| | | public BaseResponse<Boolean> add(@RequestBody @Valid DtoController po, BindingResult bindingResult){ |
| | | //public BaseResponse<Boolean> add(@RequestBody @Valid DtoController po, BindingResult bindingResult){ |
| | | public BaseResponse<Boolean> add(@RequestBody @Valid PrController po, BindingResult bindingResult){ |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | |
| | | PrController prController = DtoToPojo.INSTANCT.po2vo(po); |
| | | //PrController prController = DtoToPojo.INSTANCT.po2vo(po); |
| | | //Date operateTime = new Date(); |
| | | //prController.setOperatedt(operateTime); |
| | | //prController.setDeleted((byte)0); |
| | | //prController.setReporttime(operateTime); |
| | | |
| | | Date operateTime = new Date(); |
| | | prController.setOperatedt(operateTime); |
| | | prController.setDeleted((byte)0); |
| | | prController.setReporttime(operateTime); |
| | | Integer rec = Optional.ofNullable(controllerSv.addController(prController)).orElse(0); |
| | | po.setOperateDt(operateTime); |
| | | po.setDeleted((byte)0); |
| | | po.setFindDt(operateTime); |
| | | Integer rec = Optional.ofNullable(controllerSv.addController(po)).orElse(0); |
| | | if(rec == 0) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.CONTROLLER_FAIL.getMessage()); |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * è·åæªç»æ§å¶å¨çåæ°´å£å表 |
| | | * @return |
| | | */ |
| | | @Operation(summary = "è·å¾æªç»æ§å¶å¨çåæ°´å£è®°å½", description = "è¿åæªç»æ§å¶å¨çåæ°´å£æ°æ®") |
| | | @ApiResponses(value = { |
| | | @ApiResponse( |
| | | responseCode = ResultCodeMsg.RsCode.SUCCESS_CODE, |
| | | description = "è¿åæ§å¶å¨æ°æ®ï¼BaseResponse.content:QueryResultVo[{}]ï¼", |
| | | content = {@Content(mediaType = MediaType.APPLICATION_JSON_VALUE, |
| | | schema = @Schema(implementation = BaClient.class))} |
| | | ) |
| | | }) |
| | | @GetMapping(path = "nobinding_intakes") |
| | | @SsoAop() |
| | | public BaseResponse<JSONArray> getNoBindingIntakes(){ |
| | | try { |
| | | JSONArray array = controllerSv.getNoBindingIntakes(); |
| | | if(array.size() <= 0) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.NO_BINDING_INTAKE.getMessage()); |
| | | } |
| | | return BaseResponseUtils.buildSuccess(array); |
| | | } catch (Exception e) { |
| | | log.error("æ¥è¯¢æ§å¶å¨å¼å¸¸", e); |
| | | return BaseResponseUtils.buildException(e.getMessage()) ; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å¯¼åºæ§å¶å¨å表 |
| | | * @param response |
| | | * @param vo |
| | |
| | | package com.dy.pipIrrProject.controller; |
| | | |
| | | import com.alibaba.fastjson2.JSON; |
| | | import com.alibaba.fastjson2.JSONArray; |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.daoPr.PrControllerMapper; |
| | | import com.dy.pipIrrGlobal.daoPr.PrIntakeMapper; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrController; |
| | | import com.dy.pipIrrGlobal.voPr.VoController; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Optional; |
| | | |
| | | /** |
| | | * @author ZhuBaoMin |
| | |
| | | public class ControllerSv { |
| | | @Autowired |
| | | private PrControllerMapper prControllerMapper; |
| | | |
| | | @Autowired |
| | | private PrIntakeMapper prIntakeMapper; |
| | | |
| | | /** |
| | | * æ ¹æ®æå®è·åæ§å¶å¨è®°å½ |
| | |
| | | return rsVo ; |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®æ§å¶å¨ç¼å·è·åæªå é¤çæ§å¶å¨æ°é |
| | | * @param controllerId |
| | | * @return |
| | | */ |
| | | public Integer getRecordCountOfController(Long controllerId) { |
| | | return prControllerMapper.getRecordCountOfController(controllerId); |
| | | } |
| | | /** |
| | | * æ ¹æ®æ§å¶å¨ç¼å·è·åå·²ç»å®è®°å½æ° |
| | | * @param controllerId |
| | | * @return |
| | | */ |
| | | public Integer getBindedCount(Long controllerId) { |
| | | return prControllerMapper.getBindedCount(controllerId); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®ä¸»é®å é¤å¤é® |
| | | * @param controllerId |
| | | * @return |
| | | */ |
| | | public Integer deleteIntakeId(Long controllerId) { |
| | | return prControllerMapper.deleteIntakeId(controllerId); |
| | | } |
| | | |
| | | /** |
| | | * è·åæªç»æ§å¶å¨çåæ°´å£å表 |
| | | * @return |
| | | */ |
| | | public JSONArray getNoBindingIntakes() { |
| | | List<Map<String, Object>> list = Optional.ofNullable(prIntakeMapper.getNoBindingIntakes()).orElse(new ArrayList<>()); |
| | | JSONArray array= null; |
| | | if(list.size() > 0) { |
| | | array= JSONArray.parseArray(JSON.toJSONString(list)); |
| | | } |
| | | return array; |
| | | } |
| | | } |
| | |
| | | public static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * åæ°´å£ç¼å· |
| | | * åæ°´å£ID |
| | | */ |
| | | @Schema(description = "åæ°´å£ID", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotNull(message = "åæ°´å£IDä¸è½ä¸ºç©º") |
| | | private Long intakeId; |
| | | |
| | | /** |
| | | * æ§å¶å¨ç¼å· |
| | | * æ§å¶å¨ID |
| | | */ |
| | | @Schema(description = "æ§å¶å¨ID", requiredMode = Schema.RequiredMode.REQUIRED) |
| | | @NotNull(message = "æ§å¶å¨IDä¸è½ä¸ºç©º") |
| | |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.common.webUtil.ResultCodeMsg; |
| | | import com.dy.pipIrrGlobal.pojoBa.BaClient; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrController; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrControllerTramp; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrIntakeController; |
| | | import com.dy.pipIrrProject.controller.ControllerSv; |
| | | import com.dy.pipIrrProject.intake.IntakeSv; |
| | |
| | | import org.springframework.validation.BindingResult; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | private final ControllerSv controllerSv; |
| | | |
| | | /** |
| | | * æ·»å åæ°´å£/æ§å¶å¨æç»è®°å½ |
| | | * è¥åæ°´å£ææ§å¶å¨ä¸åå¨éæç¤ºç¨æ· |
| | | * è¥åæ°´å£å·²ç»ä¸æ§å¶å¨ç»å®éæç¤ºç¨æ· |
| | | * åæ°´å£ç»å®æ§å¶å¨ |
| | | * 1. æ¥æ¶åæ°´å£IDåæµæµªæ§å¶å¨IDï¼å¹¶éªè¯åæ°´å£åæ§å¶å¨æ¯å¦åå¨ |
| | | * 2. å¤æè¯¥æ§å¶å¨æ¯å¦å卿ªè§£ç»è®°å½ï¼å¦æåå¨æç¤ºç¨æ·è¯¥æ§å¶å¨å卿ªè§£ç»è®°å½ |
| | | * 3. ç»è£
æ§å¶å¨å¯¹è±¡æå
¥æ§å¶å¨è¡¨ä¸ |
| | | * 4. æ·»å ç»å®è®°å½ |
| | | * 5. å 餿µæµªæ§å¶å¨ï¼ç©çå é¤ï¼ |
| | | * @param po |
| | | * @param bindingResult |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æ·»å ç»å®è®°å½", description = "æ·»å ç»å®è®°å½") |
| | | @ApiResponses(value = { |
| | |
| | | @PostMapping(path = "bind", consumes = MediaType.APPLICATION_JSON_VALUE) |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @SsoAop() |
| | | public BaseResponse<Boolean> bind(@RequestBody @Valid DtoIntakeController po, BindingResult bindingResult){ |
| | | public BaseResponse<Boolean> bind(@RequestBody @Valid DtoIntakeController po, BindingResult bindingResult) throws ParseException { |
| | | SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | if(bindingResult != null && bindingResult.hasErrors()){ |
| | | return BaseResponseUtils.buildFail(Objects.requireNonNull(bindingResult.getFieldError()).getDefaultMessage()); |
| | | } |
| | | // æ ¹æ®ç¼å·åå«è·ååæ°´å£ãæ§å¶å¨æªå é¤è®°å½æ° |
| | | Integer recIntke = Optional.ofNullable(intakeSv.getRecordCountOfIntake(po.getIntakeId())).orElse(0); |
| | | Integer recController = Optional.ofNullable(controllerSv.getRecordCountOfController(po.getControllerId())).orElse(0); |
| | | if(recIntke == 0 || recController == 0) { |
| | | // æ¥æ¶åæ° |
| | | Long intakeId = po.getIntakeId(); |
| | | Long controllerId = po.getControllerId(); |
| | | String remarks = po.getRemarks(); |
| | | Long operator = po.getOperator(); |
| | | |
| | | // æ ¹æ®ç¼å·åå«è·ååæ°´å£è®°å½æ°ãæµæµªæ§å¶å¨ä¿¡æ¯ï¼å¤æåæ°´å£åæ§å¶å¨æ¯å¦åå¨ |
| | | Integer recIntke = Optional.ofNullable(intakeSv.getRecordCountOfIntake(intakeId)).orElse(0); |
| | | PrControllerTramp prControllerTramp = intakeControllerSv.getTrampControllerInfo(controllerId); |
| | | //Map map_TrampController = Optional.ofNullable(intakeControllerSv.getTrampControllerInfo(controllerId)).orElse(new HashMap()); |
| | | if(recIntke == 0 || prControllerTramp == null) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.INTAKE_OR_CONTROLLER_NO_EXIST.getMessage()); |
| | | } |
| | | |
| | | Integer recordCount = Optional.ofNullable(intakeControllerSv.getBindRecordCount(po.getIntakeId(), po.getControllerId(), (byte)1)).orElse(0); |
| | | if(recordCount > 0) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.INTAKE_HAS_BINDED_CONTROLLER.getMessage()); |
| | | // æ ¹æ®æ§å¶å¨ç¼å·å¤æè¯¥æ§å¶å¨æ¯å¦å卿ªè§£ç»è®°å½ |
| | | Integer recBinded = Optional.ofNullable(controllerSv.getBindedCount(controllerId)).orElse(0); |
| | | if(recBinded > 0) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.CONTROLLER_BINDED.getMessage()); |
| | | } |
| | | |
| | | PrIntakeController prIntakeController = DtoToPojo.INSTANCT.po2vo(po); |
| | | // æ·»å æ§å¶å¨è®°å½ |
| | | PrController prController = new PrController(); |
| | | prController.setIntakeId(intakeId); |
| | | prController.setRtuAddr(prControllerTramp.getRtuAddr()); |
| | | prController.setProtocol(prControllerTramp.getProtocol()); |
| | | prController.setFindDt(prControllerTramp.getFindDt()); |
| | | prController.setAddWays((byte)1); |
| | | prController.setOperator(operator); |
| | | Date operateTime = new Date(); |
| | | prController.setOperateDt(operateTime); |
| | | prController.setDeleted((byte)0); |
| | | Integer rec_addController = Optional.ofNullable(controllerSv.addController(prController)).orElse(0); |
| | | if(rec_addController == 0) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.BIND_FAIL.getMessage()); |
| | | } |
| | | |
| | | // æ·»å ç»å®è®°å½ |
| | | PrIntakeController prIntakeController = DtoToPojo.INSTANCT.po2vo(po); |
| | | prIntakeController.setOperatedt(operateTime); |
| | | prIntakeController.setOperatetype((byte)1); |
| | | |
| | | Integer rec = Optional.ofNullable(intakeControllerSv.addRecord(prIntakeController)).orElse(0); |
| | | if(rec == 0) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.BIND_FAIL.getMessage()); |
| | | } |
| | | |
| | | // æ ¹æ®æµæµªæ§å¶å¨ç¼å·å 餿µæµªæ§å¶å¨è®°å½ |
| | | intakeControllerSv.deleteTrampController(controllerId); |
| | | |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | | } |
| | | |
| | | /** |
| | | * æ·»å åæ°´å£/æ§å¶å¨è§£ç»è®°å½ |
| | | * 1. 夿忰´å£æ¯å¦åå¨ |
| | | * 2. 夿æ§å¶å¨æ¯å¦åå¨ |
| | | * 3. 夿忰´å£ãæ§å¶å¨è§£ç»å
³ç³»æ¯å¦å·²åå¨ |
| | | * åæ°´å£è§£ç»æ§å¶å¨ |
| | | * 1. æ¥æ¶åæ°´å£IDåæµæµªæ§å¶å¨IDï¼å¹¶éªè¯åæ°´å£åæ§å¶å¨æ¯å¦åå¨ |
| | | * 2. æ·»å è§£ç»è®°å½ |
| | | * 3. å 餿§å¶å¨å¤é® |
| | | * @param po |
| | | * @param bindingResult |
| | | * @return |
| | | */ |
| | | @Operation(summary = "æ·»å è§£ç»è®°å½", description = "æ·»å è§£ç»è®°å½") |
| | | @ApiResponses(value = { |
| | |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.INTAKE_OR_CONTROLLER_NO_EXIST.getMessage()); |
| | | } |
| | | |
| | | Integer recordCount = Optional.ofNullable(intakeControllerSv.getBindRecordCount(po.getIntakeId(), po.getControllerId(), (byte)2)).orElse(0); |
| | | if(recordCount > 0) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.INTAKE_CONTROLLER_HAS_UNBOUND.getMessage()); |
| | | } |
| | | // 夿æåæä½è®°å½æ¯å¦ä¸ºè§£ç»è®°å½ |
| | | //Integer recordCount = Optional.ofNullable(intakeControllerSv.getBindRecordCount(po.getIntakeId(), po.getControllerId(), (byte)2)).orElse(0); |
| | | //if(recordCount > 0) { |
| | | // return BaseResponseUtils.buildFail(ProjectResultCode.INTAKE_CONTROLLER_HAS_UNBOUND.getMessage()); |
| | | //} |
| | | |
| | | // æ·»å è§£ç»è®°å½ |
| | | PrIntakeController prIntakeController = DtoToPojo.INSTANCT.po2vo(po); |
| | | Date operateTime = new Date(); |
| | | prIntakeController.setOperatedt(operateTime); |
| | | prIntakeController.setOperatetype((byte)2); |
| | | |
| | | Integer rec = Optional.ofNullable(intakeControllerSv.addRecord(prIntakeController)).orElse(0); |
| | | if(rec == 0) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.BIND_FAIL.getMessage()); |
| | | } |
| | | |
| | | // å 餿§å¶å¨å¤é® |
| | | Integer rec_deleteIntakeId = Optional.ofNullable(controllerSv.deleteIntakeId(po.getControllerId())).orElse(0); |
| | | if(rec_deleteIntakeId == 0) { |
| | | return BaseResponseUtils.buildFail(ProjectResultCode.BIND_FAIL.getMessage()); |
| | | } |
| | | |
| | | return BaseResponseUtils.buildSuccess(true) ; |
| | | } |
| | | |
| | |
| | | package com.dy.pipIrrProject.intakeController; |
| | | |
| | | import com.dy.pipIrrGlobal.daoPr.PrControllerTrampMapper; |
| | | import com.dy.pipIrrGlobal.daoPr.PrIntakeControllerMapper; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrControllerTramp; |
| | | import com.dy.pipIrrGlobal.pojoPr.PrIntakeController; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | public class IntakeControllerSv { |
| | | @Autowired |
| | | private PrIntakeControllerMapper prIntakeControllerMapper; |
| | | |
| | | @Autowired |
| | | private PrControllerTrampMapper prControllerTrampMapper; |
| | | |
| | | /** |
| | | * æ ¹æ®åæ°´å£ç¼å·ãæ§å¶å¨ç¼å·ãæä½ç±»å«è·åè®°å½æ°é |
| | |
| | | List<Map<String, Object>> getBindsByControllerId(Long controllerId) { |
| | | return prIntakeControllerMapper.getBindsByControllerId(controllerId); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®æ§å¶å¨ç¼å·è·åæµæµªæ§å¶å¨å°å |
| | | * @param controllerId æµæµªæ§å¶å¨ç¼å· |
| | | * @return æµæµªæ§å¶å¨å°å |
| | | */ |
| | | //public String getTrampRtuAddr(Long controllerId) { |
| | | // return prControllerTrampMapper.getTrampRtuAddr(controllerId); |
| | | //} |
| | | |
| | | /** |
| | | * æ ¹æ®æ§å¶å¨ç¼å·è·åæµæµªæ§å¶å¨ä¿¡æ¯ |
| | | * @param controllerId |
| | | * @return |
| | | */ |
| | | public PrControllerTramp getTrampControllerInfo(Long controllerId) { |
| | | return prControllerTrampMapper.getTrampControllerInfo(controllerId); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ®æµæµªæ§å¶å¨ç¼å·å 餿µæµªæ§å¶å¨è®°å½ |
| | | * @param controllerId |
| | | * @return |
| | | */ |
| | | public Integer deleteTrampController(Long controllerId) { |
| | | return prControllerTrampMapper.deleteByPrimaryKey(controllerId); |
| | | } |
| | | } |
| | |
| | | UPDATE_INTAKE(20003, "ä¿®æ¹åæ°´å£æ°æ®å¤±è´¥"), |
| | | PLEASE_INPUT_INTAKE_ID(20004, "åæ°´å£ç¼å·ä¸ä¸ºç©º"), |
| | | DELETE_INTAKE_FAIL(20005, "åæ°´å£å é¤å¤±è´¥"), |
| | | NO_BINDING_INTAKE(20006, "æ²¡ææªç»å®çåæ°´å£"), |
| | | |
| | | /** |
| | | * æ§å¶å¨ |
| | |
| | | INTAKE_NO_RECORDS(40004, "è¯¥åæ°´å£æ ç»å®è®°å½"), |
| | | CONTROLLER_NO_RECORDS(40005, "该æ§å¶å¨æ ç»å®è®°å½"), |
| | | INTAKE_OR_CONTROLLER_NO_EXIST(40006, "åæ°´å£ææ§å¶å¨ä¸åå¨"), |
| | | CONTROLLER_BINDED(40007, "该æ§å¶å¨å°æªè§£ç»"), |
| | | |
| | | /** |
| | | * æµéçæµç« |
| | |
| | | import com.dy.common.webUtil.ResultCodeMsg; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeActiveCard; |
| | | import com.dy.pipIrrGlobal.pojoSe.SeClientCard; |
| | | import com.dy.pipIrrGlobal.util.Constant; |
| | | import com.dy.pipIrrGlobal.voSe.VoActiveCard; |
| | | import com.dy.pipIrrSell.clientCard.CardStateENUM; |
| | | import com.dy.pipIrrSell.clientCard.ClientCardSv; |
| | |
| | | import jakarta.validation.Valid; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.BindingResult; |
| | |
| | | private final ClientCardSv clientCardSv; |
| | | private final RechargeCtrl rechargeCtrl; |
| | | |
| | | @Value("${projectCode.ym}") |
| | | private Integer projectCode; |
| | | //@Value("${projectCode.ym}") |
| | | //private Integer projectCode; |
| | | |
| | | /** |
| | | * è·åå¼å¡è®°å½ |
| | |
| | | } |
| | | |
| | | Map map = new HashMap(); |
| | | map.put("projectCode", projectCode); |
| | | //map.put("projectCode", projectCode); |
| | | map.put("projectCode", Constant.projectCode_ym); |
| | | map.put("cardNum", cardNum); |
| | | return BaseResponseUtils.buildSuccess(map) ; |
| | | } |
| | |
| | | @Mapping(target = "name", source = "name") |
| | | @Mapping(target = "clientNum", source = "clientnum") |
| | | @Mapping(target = "phone", source = "phone") |
| | | @Mapping(target = "idCard", source = "idcard") |
| | | @Mapping(target = "idcard", source = "idcard") |
| | | //@Mapping(target = "cardCount", source = "cardCount") |
| | | @Mapping(target = "address", source = "address") |
| | | @Mapping(target = "operateDt", source = "operatedt") |