fzzy-igdss-core/src/main/java/com/fzzy/igds/constant/Constant.java
@@ -67,4 +67,14 @@ public static final String NETWORK_01 = "01";// æçº¿æ¨¡å¼ public static final String NETWORK_02 = "02";// æ çº¿æ¨¡å¼ /** * ç¼åKEY-åºå ¥åºæµç¨é ç½®ä¿¡æ¯ */ public static final String CACHE_INOUT_SYS_CONF = "INOUT_SYS_CONF"; /** * ç¼åKEY-åºå ¥åºé 置信æ¯ç¼å */ public static final String CACHE_INOUT_CONF_LIST = "INOUT_CONF"; } fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/DepotConf.java
@@ -103,10 +103,6 @@ @TableField("grain_auto") private String grainAuto = Constant.YN_N; @Column(name = "only_cur_depot", columnDefinition = "varchar(40) COMMENT 'æ¾ç¤ºå½å'") @TableField("only_cur_depot") private String onlyCurDepot = "Y"; @Column(name = "is_only_th", columnDefinition = "varchar(40) COMMENT 'ç²®æ æ¯å¦æ¸©æ¹¿åº¦'") @TableField("is_only_th") private String isOnlyTH = Constant.YN_N; fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/InoutConf.java
@@ -97,7 +97,7 @@ @TableField("snap_type") private String snapType; @Column(name = "plate_snap_type", columnDefinition = "varchar(40) COMMENT '车çè¯å«æææ¹å¼'") @Column(name = "plate_snap_type", columnDefinition = "varchar(40) COMMENT 'æå¾è¯å«'") @TableField("plate_snap_type") private String plateSnapType; fzzy-igdss-core/src/main/java/com/fzzy/igds/domain/QuantityConf.java
@@ -14,8 +14,8 @@ */ @Data @Entity @Table(name = "d_quantity") @TableName("d_quantity") @Table(name = "d_quantity_conf") @TableName("d_quantity_conf") @EqualsAndHashCode(callSuper = false) public class QuantityConf extends BizBaseEntity implements Serializable { fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/DepotConfRepository.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,56 @@ package com.fzzy.igds.repository; import com.fzzy.igds.domain.DepotConf; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.List; /** * @Description * @Author CZT * @Date 2025/11/28 15:38 */ @Service public interface DepotConfRepository extends JpaRepository<DepotConf, String> { /** * æ ¹æ®ç»ç»ç¼ç è·åä»åºè´§ä½ä¿¡æ¯ * * @param companyId * @return */ @Query("from DepotConf where companyId =:companyId order by depotId") List<DepotConf> getDepotConfByCompanyId(@Param("companyId") String companyId); /** * æ ¹æ®ç»ç»ç¼ç ååºåºç¼ç è·åä»åºè´§ä½ä¿¡æ¯ * * @param companyId * @param deptId * @return */ @Query("from DepotConf where companyId =:companyId and deptId =:deptId order by depotId") List<DepotConf> getDepotConf(@Param("companyId") String companyId, @Param("deptId") String deptId); /** * æ ¹æ®ç»ç»ç¼ç åä»åºç¼ç è·åä»åºè´§ä½ä¿¡æ¯ * @param companyId * @param depotId * @return */ @Query("from DepotConf where companyId =:companyId and depotId =:depotId") DepotConf getDepotConfByDepotId(@Param("companyId") String companyId, @Param("depotId") String depotId); @Transactional @Modifying @Query("update DepotConf set grainFreq=:grainFreq where companyId=:companyId and deptId =:deptId") int updateGrainFreq(@Param("grainFreq") String grainFreq, @Param("companyId") String companyId, @Param("deptId") String deptId); } fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/DeptRepository.java
@@ -28,7 +28,7 @@ /** * æ ¹æ®companyIdè·åä¿¡æ¯ * * @param companyId * @param id * @return */ @Query("from Dept where id =:id order by id") fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/DeviceIotRepository.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,41 @@ package com.fzzy.igds.repository; import com.fzzy.igds.domain.DeviceIot; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.List; /** * @Description * @Author CZT * @Date 2025/11/28 14:42 */ @Service public interface DeviceIotRepository extends JpaRepository<DeviceIot, String>, JpaSpecificationExecutor<DeviceIot> { /** * æ ¹æ®ç»ç»ç¼ç è·åä»åºè´§ä½ä¿¡æ¯ * * @param companyId * @return */ @Query("from DeviceIot where companyId =:companyId order by id") List<DeviceIot> getDeviceIotByCompanyId(@Param("companyId") String companyId); /** * æ´æ°è®¾å¤ä½ç½® * @param deviceId * @param posX * @param posY */ @Transactional @Modifying @Query("update DeviceIot set posX =:posX,posY =:posY where id =:deviceId") void updatePos(@Param("deviceId") String deviceId, @Param("posX") Double posX, @Param("posY") Double posY); } fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/DeviceSerRepository.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,73 @@ package com.fzzy.igds.repository; import com.fzzy.igds.domain.DeviceSer; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Date; import java.util.List; /** * @Description * @Author CZT * @Date 2025/11/28 13:48 */ @Service public interface DeviceSerRepository extends JpaRepository<DeviceSer, String> { /** * æ ¹æ®ç»ç»ç¼ç è·åä»åºè´§ä½ä¿¡æ¯ * * @param companyId * @return */ @Query("from DeviceSer where companyId =:companyId order by orderNum") List<DeviceSer> getDataByDeptId(@Param("companyId") String companyId); /** * è·åä¸å±åæºä¿¡æ¯ * * @param parentId * @return */ @Query("from DeviceSer where deptId like:parentId order by orderNum") List<DeviceSer> getDataByParentId(@Param("parentId") String parentId); /** * æ ¹æ®ç»ç»ç¼ç è·åä»åºè´§ä½ä¿¡æ¯ * * @param companyId * @return */ @Query("from DeviceSer where companyId =:companyId and id =:id order by orderNum") DeviceSer getDataById(@Param("companyId") String companyId, @Param("id") String id); /** * æ´æ°åæºç¶æ * @param companyId * @param status */ @Transactional @Modifying @Query("update DeviceSer set status =:status where companyId =:companyId") void updateSerStatus(@Param("companyId") String companyId, @Param("status") String status); /** * æ ¹æ®SNæ´æ°ç¶æ * @param ip * @param port * @param status * @param sn * @param updateTime */ @Transactional @Modifying @Query("update DeviceSer set status =:status,ip =:ip,port =:port,updateTime =:updateTime where sn =:sn") void updateBySn(@Param("ip") String ip, @Param("port") Integer port,@Param("status") String status,@Param("sn") String sn,@Param("updateTime") Date updateTime); } fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/InoutConfRepository.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,41 @@ package com.fzzy.igds.repository; import com.fzzy.igds.domain.InoutConf; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.List; /** * @Description * @Author CZT * @Date 2025/11/27 20:23 */ @Service public interface InoutConfRepository extends JpaRepository<InoutConf, String> { /** * æ ¹æ®ç»ç»ç¼ç ååºåºç¼ç è·åä¿¡æ¯ * * @param companyId * @param deptId * @return */ @Query("from InoutConf where companyId =:companyId and deptId =:deptId order by sort,inoutProgress") List<InoutConf> getInoutConfList(@Param("companyId") String companyId, @Param("deptId") String deptId); /** * æ´æ°ç¶æ * @param status * @param ip * @param port */ @Transactional @Modifying @Query("update InoutConf set status =:status where ip =:ip and port =:port") void updateInoutConfStatus(@Param("status") String status, @Param("ip") String ip, @Param("port") Integer port); } fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/InoutSysConfRepository.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,48 @@ package com.fzzy.igds.repository; import com.fzzy.igds.domain.InoutSysConf; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Service; import java.util.List; /** * @Description * @Author CZT * @Date 2025/11/27 20:23 */ @Service public interface InoutSysConfRepository extends JpaRepository<InoutSysConf, String> { /** * æ ¹æ®ç»ç»ç¼ç ååºåºç¼ç è·åä¿¡æ¯ * * @param companyId * @param deptId * @return */ @Query("from InoutSysConf where companyId =:companyId and deptId =:deptId") InoutSysConf getInoutSysConf(@Param("companyId") String companyId, @Param("deptId") String deptId); /** * æ ¹æ®idè·åä¿¡æ¯ * * @param parentId * @return */ @Query("from InoutSysConf where deptId like:parentId order by deptId") List<InoutSysConf> getDataByParentId(@Param("parentId") String parentId); /** * æ ¹æ®companyIdè·åä¿¡æ¯ * * @param companyId * @return */ @Query("from InoutSysConf where deptId =:id order by deptId") List<InoutSysConf> getDataById(@Param("id") String id); } fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/QuantityConfRepository.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,53 @@ package com.fzzy.igds.repository; import com.fzzy.igds.domain.QuantityConf; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.List; /** * @Description * @Author CZT * @Date 2025/11/28 16:52 */ @Service public interface QuantityConfRepository extends JpaRepository<QuantityConf, String> { /** * æ ¹æ®ç»ç»ç¼ç ååºåºç¼ç è·åä»åºè´§ä½ä¿¡æ¯ * * @param companyId * @param deptId * @return */ @Query("from QuantityConf where companyId =:companyId and deptId =:deptId order by depotId") List<QuantityConf> listQuantityConf(@Param("companyId") String companyId, @Param("deptId") String deptId); /** * æ ¹æ®ç»ç»ç¼ç è·åä»åºè´§ä½ä¿¡æ¯ * * @param companyId * @return */ @Query("from QuantityConf where companyId =:companyId order by depotId") List<QuantityConf> listQuantityConf(@Param("companyId") String companyId); /** * æ´æ°é ç½®ç¶æ * @param ip * @param port * @param status * @param sn */ @Transactional @Modifying @Query("update QuantityConf set ip =:ip,port =:port,status =:status where sn =:sn") void updateConfStatus(@Param("ip") String ip, @Param("port") Integer port, @Param("status") String status, @Param("sn") String sn); } fzzy-igdss-core/src/main/java/com/fzzy/igds/repository/SecCameraRepository.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,51 @@ package com.fzzy.igds.repository; import com.fzzy.igds.domain.Camera; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaSpecificationExecutor; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.List; /** * @Description * @Author CZT * @Date 2025/11/28 10:48 */ @Service public interface SecCameraRepository extends JpaRepository<Camera, String> , JpaSpecificationExecutor<Camera> { /** * æ ¹æ®ç»ç»ç¼ç ååºåºç¼ç è·åä¿¡æ¯ * * @param companyId * @param deptId * @return */ @Query("from Camera where companyId =:companyId and deptId =:deptId order by orderNum") List<Camera> listCamera(@Param("companyId") String companyId, @Param("deptId") String deptId); /** * æ ¹æ®ç»ç»ç¼ç ååºåºç¼ç è·åä¿¡æ¯ * * @param companyId * @return */ @Query("from Camera where companyId =:companyId order by orderNum") List<Camera> listCameraByCompanyId(@Param("companyId") String companyId); /** * æ´æ°è®¾å¤ä½ç½® * @param id * @param posX * @param posY */ @Transactional @Modifying @Query("update Camera set posX =:posX,posY =:posY where id =:id") void updatePosById(@Param("id") String id, @Param("posX") Double posX, @Param("posY") Double posY); } fzzy-igdss-core/src/main/java/com/fzzy/igds/service/CoreDeptService.java
@@ -25,6 +25,8 @@ private ISysDeptService iSysDeptService; @Resource private DeptRepository deptRepository; @Resource private InoutConfService inoutConfService; /** @@ -36,6 +38,14 @@ return deptRepository.getDataByParentId(parentId + "%"); } /** * jpaæ¥è¯¢ä¿¡æ¯ * @return */ public List<Dept> getAllDeptData() { return deptRepository.getAllData(ContextUtil.getCompanyId()); } /** * jpaæ¥è¯¢ä¿¡æ¯ @@ -70,6 +80,9 @@ dept.setCreateTime(new Date()); this.update(dept); //çæåºå ¥åºæµç¨é ç½®ä¿¡æ¯ inoutConfService.initSysConfData(sysDept.getCompanyId(), dept.getId()); } /** @@ -93,6 +106,10 @@ * @return */ public void delData(String deptId) { //å é¤åºåºä¿¡æ¯ deptRepository.deleteById(deptId); //å 餿µç¨é ç½®ä¿¡æ¯ inoutConfService.delSysConfData(deptId); } } fzzy-igdss-core/src/main/java/com/fzzy/igds/service/DepotConfService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,249 @@ package com.fzzy.igds.service; import com.fzzy.igds.constant.RedisConst; import com.fzzy.igds.domain.Depot; import com.fzzy.igds.domain.DepotConf; import com.fzzy.igds.repository.DepotConfRepository; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.utils.StringUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.ArrayList; import java.util.Collection; import java.util.Date; import java.util.List; import java.util.stream.Collectors; /** * @Description * @Author CZT * @Date 2025/11/28 15:42 */ @Slf4j @Service public class DepotConfService { @Resource private DepotConfRepository depotConfRepository; @Resource private DepotService depotService; @Resource private RedisCache redisCache; /** * jpaæ¥è¯¢é ç½®ä¿¡æ¯ * * @param companyId * @param deptId * @return */ public List<DepotConf> getConfList(String companyId, String deptId) { if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } if (StringUtils.isEmpty(deptId)) { deptId = ContextUtil.subDeptId(null); } return depotConfRepository.getDepotConf(companyId, deptId); } /** * jpaæ´æ°ä¿åé ç½®ä¿¡æ¯ * * @param conf */ public void saveConf(DepotConf conf) { if (StringUtils.isEmpty(conf.getCompanyId())) { conf.setCompanyId(ContextUtil.getCompanyId()); } if (StringUtils.isEmpty(conf.getDeptId())) { conf.setDeptId(ContextUtil.subDeptId(null)); conf.setCreateBy(ContextUtil.getLoginUserName()); conf.setCreateTime(new Date()); } conf.setUpdateBy(ContextUtil.getLoginUserName()); conf.setUpdateTime(new Date()); depotConfRepository.save(conf); flushConfCache(conf.getCompanyId()); } /** * jpaå é¤é ç½®ä¿¡æ¯ * * @param conf * @return */ public void deleteDepotConf(DepotConf conf) { depotConfRepository.delete(conf); //å é¤é ç½®ç¼å this.delCacheDepotConf(conf, conf.getCompanyId()); } /** * 设置ç¼åä¿¡æ¯ * * @param list * @param companyId */ public void setCacheDepotConf(List<DepotConf> list, String companyId) { if (null != list) { Depot depot; String key; for (DepotConf depotConf : list) { depot = depotService.getCacheDepot(companyId, depotConf.getDepotId()); if (null != depot) { depotConf.setDepotName(depot.getName()); depotConf.setDepotType(depot.getDepotType()); } key = RedisConst.buildKey(companyId, RedisConst.KEY_DEPOT_CONF, depotConf.getDepotId()); redisCache.setCacheObject(key, depotConf); } } } /** * å é¤ç¼åä¿¡æ¯ * * @param depotConf * @param companyId */ public void delCacheDepotConf(DepotConf depotConf, String companyId) { if (null == depotConf) { return; } if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } String key = RedisConst.buildKey(companyId, RedisConst.KEY_DEPOT_CONF, depotConf.getDepotId()); redisCache.deleteObject(key); } /** * è·åç¼å-æ ¹æ®ç»ç»ç¼ç è·åé 置信æ¯éå * * @param companyId * @return */ public List<DepotConf> getCacheDepotConfList(String companyId) { if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } String patten = RedisConst.buildKey(companyId, RedisConst.KEY_DEPOT_CONF) + "*"; Collection<String> keys = redisCache.keys(patten); if (null == keys || keys.isEmpty()) { return null; } List<DepotConf> result = new ArrayList<>(); for (String key : keys) { result.add((DepotConf) redisCache.getCacheObject(key)); } return result; } /** * è·åç¼å-æ ¹æ®ç»ç»ç¼ç åç²®æ åæºIDè·åé 置信æ¯éå * * @param companyId * @param serId * @return */ public List<DepotConf> getCacheDepotConfList(String companyId, String serId) { List<DepotConf> list = getCacheDepotConfList(companyId); if (null == list || list.isEmpty()) { return null; } return list.stream() .filter(item -> null != item.getGrainSer() && item.getGrainSer().equals(serId)) .collect(Collectors.toList()); } /** * è·åç¼å-æ ¹æ®ç»ç»ç¼ç åç²®æ åæºIDè·åé ç½®ä¿¡æ¯ * * @param companyId * @param serId * @return */ public DepotConf getCacheDepotConfBySerId(String companyId, String serId) { List<DepotConf> data = getCacheDepotConfList(companyId); if (null == data) { return null; } return data.stream().filter(item -> serId.equals(item.getGrainSer())) .findAny().orElse(null); } /** * è·åç¼å-æ ¹æ®ç»ç»ç¼ç åä»åºç¼ç è·åé ç½®ä¿¡æ¯ * * @param companyId * @param depotId * @return */ public DepotConf getCacheDepotConfByDepotId(String companyId, String depotId) { if (StringUtils.isEmpty(depotId)) { return null; } if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } String key = RedisConst.buildKey(companyId, RedisConst.KEY_DEPOT_CONF, depotId); DepotConf depotConf = redisCache.getCacheObject(key); if (null == depotConf) { depotConf = depotConfRepository.getDepotConfByDepotId(companyId, depotId); redisCache.setCacheObject(key, depotConf); } return depotConf; } /** * æ ¹æ®ä»åºå表ï¼èªå¨çæä»åºé ç½®ä¿¡æ¯ * @param companyId */ private void addConfByDepot(String companyId) { List<Depot> list = depotService.getCacheDepotList(companyId); if (null == list || list.isEmpty()) { return; } DepotConf conf; for (Depot depot : list) { conf = new DepotConf(); conf.setDepotId(depot.getId()); conf.setCompanyId(depot.getCompanyId()); conf.setDeptId(depot.getDeptId()); this.saveConf(conf); } } /** * å·æ°ä»åºé ç½®ç¼å * @param companyId */ public void flushConfCache(String companyId) { if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } List<DepotConf> list = depotConfRepository.getDepotConfByCompanyId(companyId); this.setCacheDepotConf(list, companyId); } /** * æ´æ°ç²®æ ä¿åé¢ç * @param freq */ public void updateFreq(String freq) { depotConfRepository.updateGrainFreq(ContextUtil.getCompanyId(), ContextUtil.subDeptId(null), freq); } } fzzy-igdss-core/src/main/java/com/fzzy/igds/service/DeviceIotService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,194 @@ package com.fzzy.igds.service; import com.fzzy.igds.constant.RedisConst; import com.fzzy.igds.domain.DeviceIot; import com.fzzy.igds.repository.DeviceIotRepository; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.utils.StringUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.domain.Specification; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.*; import java.util.stream.Collectors; /** * @Description * @Author CZT * @Date 2025/11/28 14:45 */ @Slf4j @Service public class DeviceIotService { @Resource private RedisCache redisCache; @Resource private DeviceIotRepository deviceIotRepository; /** * JPAå页æ¥è¯¢æ°æ® * * @param specification * @param pageable * @return */ public Page<DeviceIot> findAll(Specification<DeviceIot> specification, Pageable pageable) { return deviceIotRepository.findAll(specification, pageable); } /** * JPA - ä¿åæ°æ® * @param deviceIot */ public void updateDeviceIot(DeviceIot deviceIot) { if (StringUtils.isEmpty(deviceIot.getCompanyId())) { deviceIot.setCompanyId(ContextUtil.getCompanyId()); } if (StringUtils.isEmpty(deviceIot.getDeptId())) { deviceIot.setDeptId(ContextUtil.subDeptId(null)); } if (StringUtils.isEmpty(deviceIot.getId())) { deviceIot.setId(ContextUtil.generateId()); deviceIot.setCreateBy(ContextUtil.getLoginUserName()); deviceIot.setCreateTime(new Date()); } deviceIot.setUpdateBy(ContextUtil.getLoginUserName()); deviceIot.setUpdateTime(new Date()); deviceIotRepository.save(deviceIot); } /** * JPA - å 餿°æ® * @param deviceIot */ public void delDepotDeviceIot(DeviceIot deviceIot) { deviceIotRepository.delete(deviceIot); } /** * jpaæ´æ°è®¾å¤ä½ç½® * * @param deviceId * @param posX * @param posY */ public void updatePos(String deviceId, Double posX, Double posY) { deviceIotRepository.updatePos(deviceId, posX, posY); } /** * å·æ°ç¼å * @param companyId */ public void refreshCache(String companyId) { if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } // è·åææç设å¤ä¿¡æ¯ List<DeviceIot> listAll =deviceIotRepository.getDeviceIotByCompanyId(companyId); if (null != listAll) { this.setCacheAllDeviceIot(listAll, companyId); } } /** * 设置ç¼å * @param listAll * @param companyId */ public void setCacheAllDeviceIot(List<DeviceIot> listAll, String companyId) { // é¦å æç §åæºåç»ï¼ç¶ååæ´æ°ç¼åã Map<String, List<DeviceIot>> map = listAll.stream().collect( Collectors.groupingBy(DeviceIot::getSerId)); if (null == map || map.isEmpty()) { log.error("åå ¸ä¿¡æ¯ï¼ææè®¾å¤æç §åæºåç»ä¿åç¼åå¤±è´¥ï¼æ²¡æåç»æå=={}", companyId); return; } for (String serId : map.keySet()) { updateCacheDeviceIotBySerId(map.get(serId), companyId, serId); } } /** * æ´æ°ç¼å * @param listBySer * @param companyId * @param serId */ public void updateCacheDeviceIotBySerId(List<DeviceIot> listBySer, String companyId, String serId) { String key = RedisConst.buildDeviceKey(companyId, RedisConst.KEY_DEVICE_IOT_LIST, serId); log.debug("åæº-设å¤-KEY={}", key); redisCache.setCacheObject(key, listBySer); } /** * è·åç¼åæ°æ® * @param companyId * @param serId * @return */ public List<DeviceIot> getCacheDeviceIotBySerId(String companyId, String serId) { String key = RedisConst.buildDeviceKey(companyId, RedisConst.KEY_DEVICE_IOT_LIST, serId); List<DeviceIot> list = (List<DeviceIot>) redisCache.getCacheObject(key); if (null == list || list.isEmpty()) { log.error("åå ¸ä¿¡æ¯ï¼æ²¡æè·åå°ç¼åä¿¡æ¯ï¼KEY={}", key); return null; } return list; } /** * è·åç¼åæ°æ® * @param companyId * @param depotId * @return */ public List<DeviceIot> getCacheDeviceIotByDepotId(String companyId, String depotId) { if(org.apache.commons.lang3.StringUtils.isEmpty(depotId)){ log.error("ä»åºç¼ç 为空ï¼è·åIot设å¤å¤±è´¥ï¼depotId={}", depotId); return null; } if(StringUtils.isEmpty(companyId)){ companyId = ContextUtil.getCompanyId(); } String pattern = RedisConst.buildKey(companyId, RedisConst.KEY_DEVICE_IOT_LIST) + "*"; Collection<String> keys = redisCache.keys(pattern); if (null == keys) { log.error("没æè·åå°Iotç¼åkeyä¿¡æ¯"); return null; } List<DeviceIot> list = new ArrayList<>(); List<DeviceIot> result; for (String key : keys) { result = (List<DeviceIot>) redisCache.getCacheObject(key); if(null == result || result.isEmpty()){ continue; } for (DeviceIot iot : result) { if(depotId.equals(iot.getDepotId())){ list.add(iot); } } } return list; } } fzzy-igdss-core/src/main/java/com/fzzy/igds/service/DeviceSerService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,407 @@ package com.fzzy.igds.service; import com.fzzy.igds.constant.Constant; import com.fzzy.igds.constant.RedisConst; import com.fzzy.igds.domain.DeviceSer; import com.fzzy.igds.repository.DeviceSerRepository; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.core.domain.entity.SysDept; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.service.ISysDeptService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.*; /** * @Description * @Author CZT * @Date 2025/11/28 13:48 */ @Slf4j @Service public class DeviceSerService { @Resource private ISysDeptService iSysDeptService; @Resource private DeviceSerRepository deviceSerRepository; @Resource private RedisCache redisCache; /** * JPA æ¥è¯¢åæºå表 * * @return */ public List<DeviceSer> getAllSer() { SysUser user = ContextUtil.getLoginUser(); SysDept userDept = iSysDeptService.selectDeptById(user.getDeptId()); if (Constant.DEPT_TYPE_20.equals(userDept.getType())) { return deviceSerRepository.getDataByDeptId(user.getDeptId() + ""); }else { return deviceSerRepository.getDataByParentId(user.getDeptId() + "%"); } } /** * JPA æ¥è¯¢åæº * * @param companyId * @param id * @return */ public DeviceSer getDataById(String companyId, String id) { if (StringUtils.isEmpty(id)) { return null; } if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } return deviceSerRepository.getDataById(companyId, id); } /** * JPA æ´æ°ä¿ååæº * * @param ser */ public void saveSer(DeviceSer ser) { if (null == ser.getNetworkType()) { ser.setNetworkType(Constant.NETWORK_01); } if (null == ser.getSn()) { ser.setSn(ser.getId()); } if (StringUtils.isEmpty(ser.getCompanyId())) { ser.setCompanyId(ContextUtil.getCompanyId()); ser.setCreateBy(ContextUtil.getLoginUserName()); ser.setCreateTime(new Date()); } ser.setUpdateBy(ContextUtil.getLoginUserName()); ser.setUpdateTime(new Date()); deviceSerRepository.save(ser); refreshCache(ser.getCompanyId()); } /** * JPA æ´æ°ä¿ååæº * * @param ser */ public void delSer(DeviceSer ser) { deviceSerRepository.delete(ser); //å é¤ç¼å delCache(ser.getCompanyId(), ser.getId()); } /** * æ´æ°åæºä¿¡æ¯ * @param status * @param ip * @param port */ public void updateStatusByIp(String status, String ip, Integer port) { String companyId = ContextUtil.getCompanyId(); DeviceSer ser = this.getCacheSerByIp(companyId, ip); ser.setStatus(status); ser.setIp(ip); ser.setPort(port); ser.setUpdateTime(new Date()); deviceSerRepository.save(ser); setCacheSer(ser); } /** * æ´æ°åæºä¿¡æ¯ * @param data */ public void updateByData(DeviceSer data) { if (null == data) { return; } DeviceSer ser = this.getCacheSer(data.getCompanyId(), data.getId()); if (null == ser) { return; } ser.setStatus(Constant.YN_Y); ser.setIp(data.getIp()); ser.setPort(data.getPort()); ser.setUpdateTime(new Date()); ser.setSn(data.getSn()); deviceSerRepository.save(ser); setCacheSer(ser); } /** * æ´æ°åæºä¿¡æ¯ * @param companyId * @param serId * @param controlModel */ public void updateControlModel(String companyId, String serId, String controlModel) { DeviceSer ser = this.getCacheSer(companyId, serId); if (null == ser) { return; } ser.setStatus(Constant.YN_Y); ser.setControlModel(controlModel); ser.setUpdateTime(new Date()); deviceSerRepository.save(ser); setCacheSer(ser); } /** * å·æ°ç¼å * * @param companyId */ public void refreshCache(String companyId) { if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } List<DeviceSer> list = this.getAllSer(); this.setCacheSer(list, companyId); } /** * 设置åä¸ªåæºç¼å * * @param ser */ public void setCacheSer(DeviceSer ser) { if (null == ser) { return; } ContextUtil.addSerCompany(ser.getSn(), ser.getCompanyId()); String key = RedisConst.buildKey(ser.getCompanyId(), RedisConst.KEY_DEVICE_SER_LIST, ser.getId()); redisCache.setCacheObject(key, ser); } /** * 设置ç¼å * * @param data * @param companyId */ public void setCacheSer(List<DeviceSer> data, String companyId) { if (null == data) { return; } if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } String key; for (DeviceSer ser : data) { ContextUtil.addSerCompany(ser.getSn(), ser.getCompanyId()); key = RedisConst.buildKey(companyId, RedisConst.KEY_DEVICE_SER_LIST, ser.getId()); redisCache.setCacheObject(key, ser); } } /** * å é¤ç¼åä¿¡æ¯ * * @param companyId * @param serId */ public void delCache(String companyId, String serId) { if (StringUtils.isEmpty(serId)) { return; } if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } String key = RedisConst.buildKey(companyId, RedisConst.KEY_DEVICE_SER_LIST, serId); redisCache.deleteObject(key); } /** * æ ¹æ®ç»ç»ç¼ç è·ååæºå表 * * @param companyId * @return */ public List<DeviceSer> getCacheSerList(String companyId) { if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } String pattern = RedisConst.buildKey(companyId, RedisConst.KEY_DEVICE_SER_LIST) + "*"; Collection<String> keys = redisCache.keys(pattern); List<DeviceSer> result = new ArrayList<>(); if (null == keys) { return result; } for (String key : keys) { result.add((DeviceSer) redisCache.getCacheObject(key)); } if (result.size() < 1) { result = getAllSer(); } if (result.size() < 1) { return null; } //éæ°æåº Collections.sort(result, (p1, p2) -> p1.getOrderNum() - p2.getOrderNum()); return result; } /** * æ ¹æ®ç±»åè·ååæºä¿¡æ¯ * @param companyId * @param type * @return */ public List<DeviceSer> getSerCacheByType(String companyId, String type) { List<DeviceSer> listAll = this.getCacheSerList(companyId); if (null == listAll || listAll.isEmpty()){ return null; } if (null == type){ return listAll; } List<DeviceSer> result = new ArrayList<DeviceSer>(); for (DeviceSer ser : listAll) { if (ser.getType().equals(type)) result.add(ser); } return result; } /** * æ ¹æ®åæºIDè·ååæºä¿¡æ¯ * * @param companyId * @param serId * @return */ public DeviceSer getCacheSer(String companyId, String serId) { if (StringUtils.isEmpty(serId)) { return null; } if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } String key = RedisConst.buildKey(companyId, RedisConst.KEY_DEVICE_SER_LIST, serId); DeviceSer ser = (DeviceSer) redisCache.getCacheObject(key); if (null == ser) { ser = getDataById(companyId, serId); if (null == ser) { log.error("---------ç¼å䏿²¡æè·åå°åæºç¼å----------"); return null; } redisCache.setCacheObject(key, ser); } return ser; } /** * æ ¹æ®åæºIPè·ååæºä¿¡æ¯ * * @param companyId * @param ip * @return */ public DeviceSer getCacheSerByIp(String companyId, String ip) { if (StringUtils.isEmpty(companyId)) { return null; } List<DeviceSer> serList = getCacheSerList(companyId); if (null == serList) { return null; } for (DeviceSer deviceSer : serList) { if (deviceSer.getIp().equals(ip)) { return deviceSer; } } return null; } /** * æ ¹æ®åæºIPå端å£è·ååæºä¿¡æ¯ * * @param companyId * @param ip * @param port * @return */ public DeviceSer getCacheSerByIp(String companyId, String ip, Integer port) { if (StringUtils.isEmpty(companyId)) { return null; } List<DeviceSer> serList = getCacheSerList(companyId); if (null == serList) { return null; } for (DeviceSer deviceSer : serList) { if (deviceSer.getIp().equals(ip) && deviceSer.getPort() == port) { return deviceSer; } } return null; } /** * æ ¹æ®åæºSNè·ååæºä¿¡æ¯ * * @param companyId * @param sn * @return */ public DeviceSer getCacheSerBySn(String companyId, String sn) { if (StringUtils.isEmpty(companyId)) { return null; } List<DeviceSer> serList = getCacheSerList(companyId); if (null == serList) { return null; } for (DeviceSer deviceSer : serList) { if (deviceSer.getSn().equals(sn)) { return deviceSer; } } return null; } /** * JPA-æ´æ°è®¾å¤å ¨é¨ç¦»çº¿ * @param companyId */ public void allOffLine(String companyId) { if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } deviceSerRepository.updateSerStatus(companyId, Constant.YN_N); } /** * JPA-æ ¹æ®SNæ´æ°ç¶æ * @param ip * @param port * @param sn * @param status */ public void onlineBySn(String ip, Integer port, String sn, String status) { deviceSerRepository.updateBySn(ip, port, status, sn, new Date()); } } fzzy-igdss-core/src/main/java/com/fzzy/igds/service/DicService.java
@@ -306,4 +306,68 @@ return list; } /** * çµç¼èµ·å§æ¹ä½ * * @return */ public List<SysDictData> triggerStartOrientation() { List<SysDictData> list = new ArrayList<SysDictData>(); list.add(new SysDictData("å³è¾¹", Constant.GRAIN_START_ORIENTATION_RIGHT)); list.add(new SysDictData("å³ä¸", Constant.GRAIN_START_ORIENTATION_RIGHT_UP)); list.add(new SysDictData("左边", Constant.GRAIN_START_ORIENTATION_LEFT)); list.add(new SysDictData("å·¦ä¸", Constant.GRAIN_START_ORIENTATION_LEFT_UP)); return list; } /** * çµç¼å¸çº¿æ¹å * * @return */ public List<SysDictData> triggerStartDirection() { List<SysDictData> list = new ArrayList<SysDictData>(); list.add(new SysDictData("纵å", Constant.GRAIN_START_DIRECTION_PORTRAIT)); list.add(new SysDictData("横å", Constant.GRAIN_START_DIRECTION_TRANSVERSE)); return list; } /** * çµç¼èµ·å§ç¹ä½ * * @return */ public List<SysDictData> triggerStartPoint() { List<SysDictData> list = new ArrayList<SysDictData>(); list.add(new SysDictData("é¡¶é¨", Constant.GRAIN_START_POINT_TOP)); list.add(new SysDictData("åºé¨", Constant.GRAIN_START_POINT_BELOW)); return list; } /** * å±è¡è½¬æ¢ * * @return */ public List<SysDictData> triggerStartConvert() { List<SysDictData> list = new ArrayList<SysDictData>(); list.add(new SysDictData("é»è®¤", Constant.GRAIN_CONVERT_DEFAULT)); list.add(new SysDictData("顺æ¶é", Constant.GRAIN_CONVERT_CLOCKWISE)); list.add(new SysDictData("éæ¶é", Constant.GRAIN_CONVERT_ANTICLOCKWISE)); return list; } /** * çä»é¥å½¢ * * @return */ public List<SysDictData> triggerCableCone() { List<SysDictData> list = new ArrayList<SysDictData>(); list.add(new SysDictData("æ é¥å½¢", Constant.CABLE_CONE_0)); list.add(new SysDictData("ä¸é¥å½¢", Constant.CABLE_CONE_1)); list.add(new SysDictData("ä¸é¥å½¢", Constant.CABLE_CONE_2)); return list; } } fzzy-igdss-core/src/main/java/com/fzzy/igds/service/InoutConfService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,233 @@ package com.fzzy.igds.service; import com.fzzy.igds.constant.Constant; import com.fzzy.igds.constant.RedisConst; import com.fzzy.igds.repository.InoutConfRepository; import com.fzzy.igds.repository.InoutSysConfRepository; import com.fzzy.igds.domain.InoutConf; import com.fzzy.igds.domain.InoutSysConf; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.core.domain.entity.SysDept; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.service.ISysDeptService; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.Date; import java.util.List; /** * @Description åºå ¥åºé ç½®serviceå±ï¼å 嫿µç¨é ç½®å设å¤é ç½® * @Author CZT * @Date 2025/11/28 09:23 */ @Slf4j @Service public class InoutConfService { @Resource private ISysDeptService iSysDeptService; @Resource private InoutSysConfRepository inoutSysConfRepository; @Resource private InoutConfRepository inoutConfRepository; @Resource private RedisCache redisCache; /*--------------- åºå ¥åºæµç¨ ---------------*/ /** * JPA-æ¥è¯¢æµç¨é ç½® * * @return */ public List<InoutSysConf> getSysConfData() { SysUser user = ContextUtil.getLoginUser(); SysDept userDept = iSysDeptService.selectDeptById(user.getDeptId()); if (Constant.DEPT_TYPE_20.equals(userDept.getType())) { return inoutSysConfRepository.getDataById(ContextUtil.subDeptId(user)); }else { return inoutSysConfRepository.getDataByParentId(user.getDeptId() + "%"); } } /** * * * @param companyId * @param deptId */ public void initSysConfData(String companyId, String deptId) { InoutSysConf inoutSysConf = new InoutSysConf(); inoutSysConf.setDeptId(deptId); inoutSysConf.setCompanyId(companyId); inoutSysConf.setProgressIn("REGISTER-WEIGHT_FULL-HANDLE-WEIGHT_EMPTY-RECORD"); inoutSysConf.setProgressOut("REGISTER-WEIGHT_EMPTY-HANDLE-WEIGHT_FULL-RECORD"); this.saveSysConfData(inoutSysConf); this.flushInoutSysConfCache(inoutSysConf); } /** * * @param deptId */ public void delSysConfData(String deptId) { inoutSysConfRepository.deleteById(deptId); } /** * JPA-ä¿åæµç¨é ç½® * * @param data * @return */ public void saveSysConfData(InoutSysConf data) { if (StringUtils.isEmpty(data.getCompanyId())) { data.setCompanyId(ContextUtil.getCompanyId()); } data.setUpdateBy(ContextUtil.getLoginUserName()); data.setUpdateTime(new Date()); inoutSysConfRepository.save(data); this.flushInoutSysConfCache(data); } /** * 设置ç¼å * * @param data */ public void flushInoutSysConfCache(InoutSysConf data) { String key = RedisConst.buildKey(data.getDeptId(), Constant.CACHE_INOUT_SYS_CONF); redisCache.setCacheObject(key, data); } /** * è·åç¼åä¿¡æ¯ * * @param companyId * @param deptId * @return */ public InoutSysConf getCacheInoutSysConf(String companyId, String deptId) { String key = RedisConst.buildKey(deptId, Constant.CACHE_INOUT_SYS_CONF); return (InoutSysConf) redisCache.getCacheObject(key); } /*--------------- åºå ¥åºè®¾å¤ ---------------*/ /** * JPA-æ¥è¯¢è®¾å¤é ç½® * * @return */ public List<InoutConf> getInoutConfList(String companyId, String deptId) { if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } if (StringUtils.isEmpty(deptId)) { deptId = ContextUtil.subDeptId(null); } return inoutConfRepository.getInoutConfList(companyId, deptId); } /** * JPA-ä¿å设å¤é ç½® * @param data * @return */ public String saveData(InoutConf data) { if (0 == data.getInOrder()) { data.setInOrder(1); } if (StringUtils.isEmpty(data.getSort())) { data.setSort("1"); } if (StringUtils.isEmpty(data.getId())) { data.setId(ContextUtil.generateId()); data.setCreateBy(ContextUtil.getLoginUserName()); data.setCreateTime(new Date()); } if (StringUtils.isEmpty(data.getCompanyId())) { data.setCompanyId(ContextUtil.getCompanyId()); } if (StringUtils.isEmpty(data.getDeptId())) { data.setDeptId(ContextUtil.subDeptId(null)); } data.setUpdateBy(ContextUtil.getLoginUserName()); data.setUpdateTime(new Date()); inoutConfRepository.save(data); return null; } /** * JPA-å é¤è®¾å¤é ç½® * @param data * @return */ public String delData(InoutConf data) { inoutConfRepository.delete(data); return null; } /** * 设置ç¼å * @param companyId * @param deptId */ public void flushInoutConfCache(String companyId, String deptId) { List<InoutConf> list = this.getInoutConfList(companyId, deptId); String key = RedisConst.buildKey(companyId, Constant.CACHE_INOUT_CONF_LIST, deptId); redisCache.setCacheObject(key, list); } /** * è·åç¼å * @param companyId * @param deptId * @return */ public List<InoutConf> getCacheInoutConf(String companyId, String deptId) { String key = RedisConst.buildKey(companyId, Constant.CACHE_INOUT_CONF_LIST, deptId); List<InoutConf> list = redisCache.getCacheObject(key); if(null == list){ list = this.getInoutConfList(companyId, deptId); redisCache.setCacheObject(key, list); } return list; } /** * è·åç¼å * @param companyId * @param deptId * @param confId * @return */ public InoutConf getCacheInoutConf(String companyId, String deptId, String confId) { if (null == companyId || null == deptId || null == confId) { return null; } List<InoutConf> list = getCacheInoutConf(companyId, deptId); if (null == list || list.isEmpty()) { return null; } for (InoutConf inoutConf : list) { if (inoutConf.getId().equals(confId)) { return inoutConf; } } return null; } /** * æ´æ°åºå ¥åºè®¾å¤ç¶æ * @param ip * @param port * @param status */ public void updateInoutConfStatus(String ip, Integer port, String status) { inoutConfRepository.updateInoutConfStatus(status, ip, port); } } fzzy-igdss-core/src/main/java/com/fzzy/igds/service/QuantityService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,239 @@ package com.fzzy.igds.service; import com.fzzy.igds.constant.RedisConst; import com.fzzy.igds.domain.QuantityConf; import com.fzzy.igds.repository.QuantityConfRepository; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.utils.StringUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.ArrayList; import java.util.Collection; import java.util.Date; import java.util.List; /** * @Description * @Author CZT * @Date 2025/11/28 16:55 */ @Slf4j @Service public class QuantityService { @Resource private QuantityConfRepository quantityConfRepository; @Resource private RedisCache redisCache; /** * JPA - æ¥è¯¢é 置信æ¯ï¼æ ¹æ®åºåºç¼ç è·å * * @param companyId * @param deptId * @return */ public List<QuantityConf> getConfList(String companyId, String deptId) { if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } if (StringUtils.isEmpty(deptId)) { deptId = ContextUtil.subDeptId(null); } return quantityConfRepository.listQuantityConf(companyId, deptId); } /** * JPA - æ¥è¯¢é 置信æ¯ï¼æ ¹æ®ç»ç»ç¼ç è·å * * @param companyId * @return */ public List<QuantityConf> getConfList(String companyId) { if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } return quantityConfRepository.listQuantityConf(companyId); } /** * JPA - æ´æ°ä¿åæ°æ® * * @param conf */ public void saveConf(QuantityConf conf) { if (StringUtils.isEmpty(conf.getDepotId())) { return; } if (StringUtils.isEmpty(conf.getCompanyId())) { conf.setCompanyId(ContextUtil.getCompanyId()); } if (StringUtils.isEmpty(conf.getDeptId())) { conf.setDeptId(ContextUtil.subDeptId(null)); conf.setCreateBy(ContextUtil.getLoginUserName()); conf.setCreateTime(new Date()); } conf.setUpdateBy(ContextUtil.getLoginUserName()); conf.setUpdateTime(new Date()); quantityConfRepository.save(conf); //å·æ°ç¼å setCacheQuantityConf(conf); } /** * JPA- æ´æ°é ç½®åæ··ä¸ªå¤ª * * @param conf */ public void updateQuantityConfBySn(QuantityConf conf) { //æ´æ°ç¶æ quantityConfRepository.updateConfStatus(conf.getIp(), conf.getPort(), conf.getStatus(), conf.getSn()); setCacheQuantityConf(conf); } /** * JPA - å 餿°æ® * * @param conf * @return */ public String delQuantityConf(QuantityConf conf) { quantityConfRepository.delete(conf); //å é¤é ç½®ä¿¡æ¯ flushConfCache(conf.getCompanyId(), conf.getDeptId()); return null; } /** * å·æ°ç¼å * * @param companyId * @param deptId */ public void flushConfCache(String companyId, String deptId) { if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } if (StringUtils.isEmpty(deptId)) { deptId = ContextUtil.subDeptId(null); } List<QuantityConf> list = this.getConfList(companyId, deptId); this.setCacheQuantityConf(list); } /** * 设置ç¼å * * @param list */ public void setCacheQuantityConf(List<QuantityConf> list) { if (null == list || list.isEmpty()) { return; } String key; for (QuantityConf conf : list) { if (StringUtils.isEmpty(conf.getSn())) { conf.setSn(conf.getYtIp()); } key = RedisConst.buildKeyByPrefix(RedisConst.KEY_QUANTITY_CONF, conf.getSn()); redisCache.setCacheObject(key, conf); } } /** * 设置ç¼å * * @param conf */ public void setCacheQuantityConf(QuantityConf conf) { if (StringUtils.isEmpty(conf.getSn())) { conf.setSn(conf.getYtIp()); } String key = RedisConst.buildKeyByPrefix(RedisConst.KEY_QUANTITY_CONF, conf.getSn()); redisCache.setCacheObject(key, conf); } /** * è·åææé ç½®ç¼å * * @return */ public List<QuantityConf> getCacheConfList(String companyId) { String pattern = RedisConst.buildKeyByPrefix(RedisConst.KEY_QUANTITY_CONF, null) + "*"; Collection<String> keys = redisCache.keys(pattern); if (null == keys || keys.isEmpty()) { return null; } List<QuantityConf> list = new ArrayList<>(); QuantityConf conf; for (String key : keys) { conf = (QuantityConf) redisCache.getCacheObject(key); if (null == conf) { continue; } list.add(conf); } if (list.isEmpty()) { if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } list = this.getConfList(companyId); this.setCacheQuantityConf(list); } return list; } /** * æ ¹æ®ä»åºç¼ç è·åè·åç¼å * * @param companyId * @param depotId * @return */ public QuantityConf getCacheQuantityConf(String companyId, String depotId) { if (StringUtils.isEmpty(depotId)) { return null; } List<QuantityConf> list = getCacheConfList(companyId); if (null == list || list.isEmpty()) { return null; } for (QuantityConf conf : list) { if (conf.getCompanyId().equals(companyId) && conf.getDepotId().equals(depotId)) { return conf; } } return null; } /** * æ ¹æ®SNè·åé ç½®ä¿¡æ¯ * * @param sn * @return */ public QuantityConf getCacheQuantityConfBySn(String sn) { if (StringUtils.isEmpty(sn)) { return null; } List<QuantityConf> list = getCacheConfList(null); if (null == list || list.isEmpty()) { return null; } for (QuantityConf conf : list) { if (conf.getSn().equals(sn)) { return conf; } } return null; } } fzzy-igdss-core/src/main/java/com/fzzy/igds/service/SecCameraService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,177 @@ package com.fzzy.igds.service; import com.fzzy.igds.constant.RedisConst; import com.fzzy.igds.domain.Camera; import com.fzzy.igds.repository.SecCameraRepository; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.utils.StringUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.domain.Specification; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.ArrayList; import java.util.Date; import java.util.List; /** * @Description * @Author CZT * @Date 2025/11/28 10:48 */ @Slf4j @Service public class SecCameraService { @Resource private SecCameraRepository secCameraRepository; @Resource private RedisCache redisCache; /** * JPAå页æ¥è¯¢æ°æ® * * @param specification * @param pageable * @return */ public Page<Camera> findAll(Specification<Camera> specification, Pageable pageable) { return secCameraRepository.findAll(specification, pageable); } /** * JPA - æ¥è¯¢åºåºä¸ææçæ§ * @return */ public List<Camera> listCamera() { return secCameraRepository.listCamera(ContextUtil.getCompanyId(), ContextUtil.subDeptId(null)); } /** * JPA - ä¿åæ°æ® * @param data */ public void saveCamera(Camera data) { if (StringUtils.isEmpty(data.getCompanyId())) { data.setCompanyId(ContextUtil.getCompanyId()); } if (StringUtils.isEmpty(data.getDeptId())) { data.setDeptId(ContextUtil.subDeptId(null)); } if (data.getChanNum() == 0) { data.setChanNum(1); } if(StringUtils.isEmpty(data.getId())){ data.setId(ContextUtil.generateId()); data.setCreateBy(ContextUtil.getLoginUserName()); data.setCreateTime(new Date()); } data.setUpdateBy(ContextUtil.getLoginUserName()); data.setUpdateTime(new Date()); secCameraRepository.save(data); } /** * JPA - å 餿°æ® * @param data * @return */ public String delCamera(Camera data) { secCameraRepository.delete(data); return null; } /** * 设置ç¼å * @param companyId */ public void refreshCache(String companyId) { if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } List<Camera> list = secCameraRepository.listCameraByCompanyId(companyId); redisCache.setCacheObject(RedisConst.buildKey(companyId, RedisConst.KEY_CAMERA_LIST), list); } /** * è·åç¼åä¸çæ§ä¿¡æ¯ * @param companyId * @return */ public List<Camera> getAllCacheCamera(String companyId) { if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } String key = RedisConst.buildKey(companyId, RedisConst.KEY_CAMERA_LIST); List<Camera> list = redisCache.getCacheObject(key); if (null == list || list.isEmpty()) { list = secCameraRepository.listCameraByCompanyId(companyId); redisCache.setCacheObject(key, list); } return list; } /** * æ ¹æ®åºåºç¼ç è·åçæ§ä¿¡æ¯ * @param companyId * @param deptId * @return */ public List<Camera> getCameraByDeptId(String companyId, String deptId) { if (StringUtils.isEmpty(deptId)) { return null; } if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } List<Camera> list = this.getAllCacheCamera(companyId); if (null == list || list.isEmpty()){ return null; } List<Camera> result = new ArrayList<>(); for (Camera data : list) { if (data.getDeptId().equals(deptId)){ result.add(data); } } return result; } /** * æ ¹æ®çæ§IDè·åçæ§ä¿¡æ¯ * @param companyId * @param cameraId * @return */ public Camera getCameraById(String companyId, String cameraId) { if (StringUtils.isEmpty(companyId)) { companyId = ContextUtil.getCompanyId(); } List<Camera> list = this.getAllCacheCamera(companyId); if (null == list || list.isEmpty()){ return null; } for (Camera data : list) { if (data.getId().equals(cameraId)){ return data; } } return null; } /** * æ´æ°è®¾ç½®ä½ç½® * @param param */ public void updatePos(Camera param) { secCameraRepository.updatePosById(param.getId(), param.getPosX(), param.getPosY()); } } fzzy-igdss-core/src/main/java/com/fzzy/igds/utils/ContextUtil.java
@@ -26,6 +26,11 @@ public static Map<String, String> contextUserDept = new HashMap<>(); /** * å ¨å±ç¨äºåæ¾SNä¸ç»ç»ç¼ç çå ³ç³»ï¼ä¾å¦åæºSNåç»ç»ç¼ç å ³ç³» */ public static Map<String, String> contextSnCompanyIdMap = new HashMap<>(); /** * çæé¡ºåºIDï¼å¹´ææ¥æ¶åç§æ¯«ç§(17ä½) + åºåå·(4ä½) = 21ä½ * * @return @@ -122,4 +127,24 @@ } return orderId; } /** * åæ¾SN䏿å±ç»ç»çå ³ç³» * * @param sn * @param companyId */ public static void addSerCompany(String sn, String companyId) { contextSnCompanyIdMap.put(sn, companyId); } /** * éè¿SNè·åå½åSNæå±çç»ç» * * @param sn * @return */ public static String getCompanyIdBySn(String sn) { return contextSnCompanyIdMap.get(sn); } } fzzy-igdss-view/src/main/java/com/fzzy/igds/DepotConf.view.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,322 @@ <?xml version="1.0" encoding="UTF-8"?> <ViewConfig> <Arguments/> <Context/> <Model/> <View layout="padding:10"> <ClientEvent name="onReady">var depotList = null;
 </ClientEvent> <Property name="packages">font-awesome,css-common</Property> <DataSet id="dsMain"> <Property name="dataProvider">depotConfPR#getConfList</Property> <Property name="dataType">[dtDepotConf]</Property> </DataSet> <Container> <Property name="className">c-param</Property> <ToolBar> <ToolBarButton> <ClientEvent name="onClick">view.get("#dsMain").insert();
 view.get("#depotId").set("readOnly",false);
 view.get("#dgMain").show();</ClientEvent> <Property name="caption">æ°å¢</Property> <Property name="exClassName">btn1</Property> <Property name="width">100</Property> <Property name="iconClass">fa fa-plus</Property> </ToolBarButton> <ToolBarButton> <ClientEvent name="onClick">var select = view.get("#dataGridMain").get("selection");
 if(select){
 view.get("#dgMain").show();
 view.get("#depotId").set("readOnly",true);
 }else{
 $notify("è¯·éæ©éè¦ä¿®æ¹çæ°æ®â¦â¦");
 }</ClientEvent> <Property name="caption">ä¿®æ¹</Property> <Property name="exClassName">btn2</Property> <Property name="width">100</Property> <Property name="iconClass">fa fa-pencil-square-o</Property> </ToolBarButton> <ToolBarButton> <ClientEvent name="onClick">
 
 var select = view.get("#dataGridMain").get("selection");
 if(select){
 view.get("#ajaxDel2").set("parameter",select).execute(function(result){
 if(result){
 $alert(result);
 }else{
 entity.remove();
 }
 });
 }else{
 $notify("è¯·éæ©éè¦å é¤çæ°æ®â¦â¦");
 }</ClientEvent> <Property name="caption">å é¤</Property> <Property name="exClassName">btn3</Property> <Property name="width">100</Property> <Property name="iconClass">fa fa-times</Property> </ToolBarButton> <ToolBarButton> <Property name="caption">å·æ°ç¼å</Property> <Property name="exClassName">btn4</Property> <Property name="iconClass">fa fa-refresh</Property> <Property name="width">100</Property> <Property name="action">ajaxRefreshCache</Property> </ToolBarButton> </ToolBar> <DataGrid id="dataGridMain" layoutConstraint="padding:8"> <ClientEvent name="onDataRowClick">view.get("#dataGridMain").set("selection",arg.data);</ClientEvent> <Property name="dataSet">dsMain</Property> <Property name="readOnly">true</Property> <Property name="selectionMode">singleRow</Property> <RowSelectorColumn/> <RowNumColumn/> <DataColumn name="depotId"> <Property name="property">depotId</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="grainSer"> <Property name="property">grainSer</Property> <Property name="align">center</Property> </DataColumn> <DataColumn> <Property name="property">cableRule</Property> <Property name="align">center</Property> <Property name="name">cableRule</Property> </DataColumn> <DataColumn name="cableCir"> <Property name="property">cableCir</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="tempMax"> <Property name="property">tempMax</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="grainFreq"> <Property name="property">grainFreq</Property> </DataColumn> <DataColumn name="updateBy"> <Property name="property">updateBy</Property> </DataColumn> <DataColumn name="updateTime"> <Property name="property">updateTime</Property> </DataColumn> </DataGrid> </Container> <UpdateAction id="uaMain"> <Property name="dataResolver">depotConfPR#saveConf</Property> <UpdateItem> <Property name="dataSet">dsMain</Property> <Property name="dataPath">[#current]</Property> </UpdateItem> </UpdateAction> <AjaxAction id="ajaxRefreshCache"> <Property name="service">depotConfPR#flushConfCache</Property> <Property name="successMessage">å·æ°æåï¼</Property> <Property name="confirmMessage">ç¡®å®è¦å·æ°ç¼åä¹ï¼</Property> </AjaxAction> <Dialog id="dgMain" layout="regionPadding:8"> <ClientEvent name="onShow">//æ ¹æ®ä»åºç±»åä¸åï¼æ¾ç¤ºä¸åçé 置信æ¯</ClientEvent> <Property name="iconClass">fa fa-tasks</Property> <Property name="caption">æ£æµé ç½®åæ°</Property> <Property name="width">75%</Property> <Property name="closeable">false</Property> <Buttons> <Button> <ClientEvent name="onClick">view.get("#uaMain").execute(function(){
 view.get("#dgMain").hide();
 });</ClientEvent> <Property name="caption">ä¿å</Property> <Property name="iconClass">fa fa-check-circle</Property> <Property name="exClassName">btn1</Property> <Property name="width">120</Property> </Button> <Button> <ClientEvent name="onClick">view.get("#dsMain.data:#").cancel();
 view.get("#dgMain").hide();</ClientEvent> <Property name="caption">åæ¶</Property> <Property name="exClassName">btn3</Property> <Property name="iconClass">fa fa-times-circle</Property> <Property name="width">120</Property> </Button> </Buttons> <Children> <FieldSet layout="padding:5"> <Property name="caption">ç²®æ¸©æ£æµé ç½®</Property> <Buttons/> <Children> <AutoForm layoutConstraint="padding:5"> <Property name="dataSet">dsMain</Property> <Property name="cols">*,*,*</Property> <Property name="labelSeparator">ï¼</Property> <Property name="labelWidth">120</Property> <AutoFormElement id="depotId"> <Property name="name">depotId</Property> <Property name="property">depotId</Property> <Property name="readOnly">true</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">cableRule</Property> <Property name="property">cableRule</Property> <Property name="label">å¸çº¿è§å</Property> <Editor/> </AutoFormElement> <Label> <Property name="text">说æï¼å¹³æ¹ä»ï¼å±-è¡-åï¼çä»ï¼ç¬¬1åæ ¹æ°-第2åæ ¹æ°-第nåæ ¹æ°</Property> <Property name="style"> <Property name="color">blue</Property> </Property> </Label> <AutoFormElement> <Property name="name">grainSer</Property> <Property name="property">grainSer</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">cableCir</Property> <Property name="property">cableCir</Property> <Property name="label">å±è§å</Property> <Editor/> </AutoFormElement> <Label> <Property name="text">说æï¼åªé对çä»ï¼ç¬¬1å屿°-第2å屿°-第nå屿°</Property> <Property name="style"> <Property name="color">blue</Property> </Property> </Label> <AutoFormElement> <Property name="name">cableStart</Property> <Property name="property">cableStart</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">cableEnd</Property> <Property name="property">cableEnd</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="property">startRow</Property> <Property name="name">startRow</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">thSer</Property> <Property name="property">thSer</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">thConf</Property> <Property name="property">thConf</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="property">tempMax</Property> <Property name="name">tempMax</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">temperature</Property> <Property name="property">temperature</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">isOnlyTH</Property> <Property name="property">isOnlyTH</Property> <Editor/> </AutoFormElement> <Label> <Property name="text">说æï¼é»è®¤ç²®æ çµç¼ï¼ä¸ºæ¸©æ¹¿åº¦è®¾å¤ééæ©ï¼</Property> <Property name="style"> <Property name="color">blue</Property> </Property> </Label> <AutoFormElement> <Property name="property">cableCone</Property> <Property name="name">cableCone</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="property">startOrientation</Property> <Property name="name">startOrientation</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="property">startDirection</Property> <Property name="name">startDirection</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="property">grainAuto</Property> <Property name="name">grainAuto</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="property">startPoint</Property> <Property name="name">startPoint</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="property">startConvert</Property> <Property name="name">startConvert</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">grainFreq</Property> <Property name="property">grainFreq</Property> <Editor/> </AutoFormElement> <Button> <ClientEvent name="onClick">var grainFreq = view.get("#dsMain.data:#").get("grainFreq");
 
 if(grainFreq){
 view.get("#ajaxUpdateFreq").set("parameter",grainFreq).execute(function(){
 view.get("#dgMain").hide();
 view.get("#dsMain").flushAsync();
 });
 }else{
 $alert("请å é ç½®æ´æ°é¢çï¼")
 }</ClientEvent> <Property name="caption">é¢ç忥</Property> <Property name="tip">æ´æ°ææä»åºé¢çä¸è´</Property> <Property name="iconClass">fa fa-refresh</Property> <Property name="exClassName">btn2</Property> </Button> <AutoFormElement> <Property name="name">createBy</Property> <Property name="property">createBy</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">createTime</Property> <Property name="property">createTime</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">updateBy</Property> <Property name="property">updateBy</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">updateTime</Property> <Property name="property">updateTime</Property> <Editor/> </AutoFormElement> </AutoForm> </Children> </FieldSet> </Children> <Tools/> </Dialog> <AjaxAction id="ajaxUpdateFreq"> <Property name="confirmMessage">ç¡®å®è¦æ´æ°ææä»åºï¼</Property> <Property name="service">depotConfPR#updateFreq</Property> </AjaxAction> <AjaxAction id="ajaxDel2"> <Property name="successMessage">å 餿å</Property> <Property name="service">depotConfPR#delDepotConf</Property> <Property name="executingMessage">æ£å¨å é¤</Property> <Property name="confirmMessage">ç¡®å®è¦å é¤ä¹ï¼</Property> </AjaxAction> </View> </ViewConfig> fzzy-igdss-view/src/main/java/com/fzzy/igds/DepotConfPR.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,77 @@ package com.fzzy.igds; import com.bstek.dorado.annotation.DataProvider; import com.bstek.dorado.annotation.DataResolver; import com.bstek.dorado.annotation.Expose; import com.fzzy.igds.domain.DepotConf; import com.fzzy.igds.service.DepotConfService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; import javax.annotation.Resource; import java.util.List; /** * @Description * @Author CZT * @Date 2025/11/28 15:44 */ @Slf4j @Component public class DepotConfPR { @Resource private DepotConfService depotConfService; /** * åæ°é ç½®å表 depotConfPR#getConfList * * @return */ @DataProvider public List<DepotConf> getConfList() { return depotConfService.getConfList(null,null); } /** * depotConfPR#saveConf åæ°é ç½®æ´æ°ï¼å æ¬æ°å¢åä¿®æ¹ * * @param conf */ @DataResolver public void saveConf(DepotConf conf) { DepotConf depotConf = new DepotConf(); BeanUtils.copyProperties(conf, depotConf); depotConfService.saveConf(depotConf); } /** * depotConfPR#delDepotConf å é¤åæ°é ç½® * * @param conf */ @Expose public void delDepotConf(DepotConf conf) { DepotConf depotConf = new DepotConf(); BeanUtils.copyProperties(conf, depotConf); depotConfService.deleteDepotConf(depotConf); } /** * depotConfPR#flushConfCache å·æ°é ç½®ç¼å */ @Expose public void flushConfCache() { depotConfService.flushConfCache(null); } /** * depotConfPR#updateFreq æ´æ°ææç²®åºçç²®æ é¢ç */ @Expose public void updateFreq(String freq) { depotConfService.updateFreq(freq); } } fzzy-igdss-view/src/main/java/com/fzzy/igds/DeptPR.java
@@ -24,6 +24,18 @@ @Resource private CoreDeptService coreDeptService; /** * æ¥è¯¢è®¾å¤,å°æä½ä¿¡æ¯è°æ´ä¸ºç©ºï¼é»è®¤å æ¬ååºåæ° * * deptPR#getAllData * * @return */ @DataProvider public List<Dept> getAllData() { return coreDeptService.getAllDeptData(); } /** * æ¥è¯¢è®¾å¤,å°æä½ä¿¡æ¯è°æ´ä¸ºç©ºï¼é»è®¤å æ¬ååºåæ° fzzy-igdss-view/src/main/java/com/fzzy/igds/DeviceIot.view.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,324 @@ <?xml version="1.0" encoding="UTF-8"?> <ViewConfig> <Arguments/> <Context/> <Model> <DataType name="dataTypeC"> <PropertyDef name="depotId"> <Property></Property> <Property name="label">æå±ä»åº</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("depotPR#getAllCache").getResult()}</Property> <Property name="keyProperty">id</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="type"> <Property></Property> <Property name="label">设å¤ç±»å</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("DEVICE_IOT_TYPE")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="serId"> <Property></Property> <Property name="label">æå±åæº</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("deviceSerPR#getAllSerCache").getResult()}</Property> <Property name="keyProperty">id</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> </DataType> </Model> <View layout="padding:10"> <ClientEvent name="onReady">view.get("#dataSetC").insert();</ClientEvent> <Property name="packages">font-awesome,css-common</Property> <DataSet id="dsDeviceIot"> <Property name="dataProvider">deviceIotPR#loadDeviceIotPage</Property> <Property name="pageSize">20</Property> <Property name="loadMode">lazy</Property> <Property name="dataType">[dtDeviceIot]</Property> </DataSet> <DataSet id="dataSetC"> <Property name="dataType">dataTypeC</Property> </DataSet> <Container> <Property name="className">c-param</Property> <AutoForm> <Property name="cols">*,*,*,90,90,*</Property> <Property name="labelWidth">100</Property> <Property name="labelAlign">right</Property> <Property name="dataSet">dataSetC</Property> <AutoFormElement> <Property name="name">depotId</Property> <Property name="property">depotId</Property> <Property name="trigger">autoOpenMappingDropDown2</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">serId</Property> <Property name="property">serId</Property> <Property name="trigger">autoOpenMappingDropDown2</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">type</Property> <Property name="property">type</Property> <Property name="trigger">autoOpenMappingDropDown2</Property> <Editor/> </AutoFormElement> <Button> <Property name="action">actionDeviceIotQuery</Property> <Property name="caption">æç´¢</Property> <Property name="iconClass">fa fa-search</Property> <Property name="exClassName">btn-q1</Property> </Button> <Button> <ClientEvent name="onClick">view.get("#dataSetC").setData({});</ClientEvent> <Property name="caption">éç½®</Property> <Property name="exClassName">btn-q2</Property> <Property name="iconClass">fa fa-refresh</Property> </Button> </AutoForm> </Container> <Container> <Property name="className">c-data</Property> <ToolBar> <ToolBarButton> <Property name="caption">æ°å¢</Property> <Property name="exClassName">btn1</Property> <Property name="width">100</Property> <Property name="iconClass">fa fa-plus</Property> <Property name="action">actionDeviceIotAdd</Property> </ToolBarButton> <ToolBarButton> <Property name="action">actionDeviceIotUpdate</Property> <Property name="caption">ä¿®æ¹</Property> <Property name="exClassName">btn2</Property> <Property name="width">100</Property> <Property name="iconClass">fa fa-pencil-square-o</Property> </ToolBarButton> <ToolBarButton> <Property name="action">actionDeviceIotDelete</Property> <Property name="caption">å é¤</Property> <Property name="exClassName">btn3</Property> <Property name="width">100</Property> <Property name="iconClass">fa fa-times</Property> </ToolBarButton> <ToolBarButton> <Property name="caption">å·æ°ç¼å</Property> <Property name="action">ajaxRefreshCache</Property> <Property name="exClassName">btn4</Property> <Property name="iconClass">fa fa-refresh</Property> <Property name="width">100</Property> </ToolBarButton> </ToolBar> <DataGrid id="gridDeviceIot" layoutConstraint="padding:8"> <ClientEvent name="onDataRowClick">view.get("#gridDeviceIot").set("selection",arg.data);</ClientEvent> <Property name="dataSet">dsDeviceIot</Property> <Property name="readOnly">true</Property> <Property name="selectionMode">singleRow</Property> <RowSelectorColumn/> <RowNumColumn/> <DataColumn name="depotId"> <Property name="property">depotId</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="name"> <Property name="property">name</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="serId"> <Property name="property">serId</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="passCode"> <Property name="property">passCode</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="type"> <Property name="property">type</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="remark"> <Property name="property">remark</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="updateBy"> <Property name="property">updateBy</Property> <Property name="align">center</Property> <Property name="width">120</Property> </DataColumn> <DataColumn name="updateTime"> <Property name="property">updateTime</Property> <Property name="align">center</Property> <Property name="width">160</Property> </DataColumn> </DataGrid> </Container> <Container layoutConstraint="bottom"> <Property name="className">c-bottom</Property> <DataPilot layoutConstraint="right"> <Property name="dataSet">dsDeviceIot</Property> <Property name="itemCodes">pageSize,pages</Property> </DataPilot> </Container> <Dialog id="dialogDeviceIot" layout="regionPadding:8"> <ClientEvent name="onHide">view.id("dsDeviceIot").getData().cancel();</ClientEvent> <Property name="iconClass">fa fa-tasks</Property> <Property name="caption">设å¤ä¿¡æ¯</Property> <Property name="width">800</Property> <Buttons> <Button> <Property name="action">actionDeviceIotSave</Property> <Property name="caption">ä¿å</Property> <Property name="iconClass">fa fa-check-circle</Property> <Property name="exClassName">btn1</Property> <Property name="width">120</Property> </Button> <Button> <ClientEvent name="onClick">view.get("#dialogDeviceIot").hide();</ClientEvent> <Property name="caption">åæ¶</Property> <Property name="exClassName">btn3</Property> <Property name="iconClass">fa fa-times-circle</Property> <Property name="width">120</Property> </Button> </Buttons> <Children> <AutoForm> <Property name="dataSet">dsDeviceIot</Property> <Property name="cols">*,*</Property> <Property name="labelWidth">100</Property> <AutoFormElement> <Property name="name">depotId</Property> <Property name="property">depotId</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">name</Property> <Property name="property">name</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">passCode</Property> <Property name="property">passCode</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">serId</Property> <Property name="property">serId</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">type</Property> <Property name="property">type</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">remark</Property> <Property name="property">remark</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">createBy</Property> <Property name="property">createBy</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">createTime</Property> <Property name="property">createTime</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">updateBy</Property> <Property name="property">updateBy</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">updateTime</Property> <Property name="property">updateTime</Property> <Editor/> </AutoFormElement> </AutoForm> </Children> <Tools/> </Dialog> <Action id="actionDeviceIotQuery"> <ClientEvent name="onExecute">var entity = view.get("#dataSetC.data");
 view.get("#dsDeviceIot").set("parameter",entity).flushAsync();</ClientEvent> <ClientEvent name="onFailure">dorado.MessageBox.alert(arg.error,{
 title: 'ç³»ç»æç¤ºä¿¡æ¯'
 });
 arg.processDefault = false;</ClientEvent> <Property name="hotkey">alt+q</Property> </Action> <Action id="actionDeviceIotAdd"> <ClientEvent name="onExecute">var dialog=view.get("#dialogDeviceIot");
 var visible=dialog.get("actualVisible");
 if(!visible){
 view.get("#dsDeviceIot").insert();
 dialog.set("caption","æ°å¢è®¾å¤");
 dialog.show();
 }</ClientEvent> </Action> <Action id="actionDeviceIotUpdate"> <ClientEvent name="onExecute">var entity = view.id("dsDeviceIot").getData("#");
 var dialog=view.get("#dialogDeviceIot");
 var visible = dialog.get("actualVisible");
 var select = view.get("#gridDeviceIot").get("selection");
 if(!visible){
 dialog.set("caption","ä¿®æ¹è®¾å¤");
 if(select){
 dialog.show();
 }else{
 dorado.MessageBox.alert("è¯·éæ©éè¦ä¿®æ¹çæ°æ®â¦â¦");
 }
 }
 view.get("^isKey").each(function(item){
 item.set("readOnly",true);
 });</ClientEvent> </Action> <Action id="actionDeviceIotDelete"> <ClientEvent name="onExecute">var dialog=view.get("#dialogDeviceIot");
 var visible = dialog.get("actualVisible");
 var dsDeviceIot=view.get("#dsDeviceIot");
 var actionDeviceIotSave=view.get("#actionDeviceIotSave");
 var select = view.get("#gridDeviceIot").get("selection");
 if(!visible){
 if(!select){
 dorado.MessageBox.alert("请å éæ©è¦æä½çæ°æ®ï¼");
 return;
 }else{
 dorado.MessageBox.confirm("ç¡®å®è¦å é¤è¿æ¡è®°å½åï¼",{
 detailCallback: function(button,text){
 if("yes"==button){
 select.remove();
 actionDeviceIotSave.execute();
 }
 }});
 }
 }</ClientEvent> </Action> <UpdateAction id="actionDeviceIotSave"> <ClientEvent name="onFailure">if(arg.error){
 dorado.MessageBox.alert(arg.error,{
 title: 'ç³»ç»æç¤ºä¿¡æ¯'
 });
 arg.processDefault = false;
 }</ClientEvent> <ClientEvent name="onSuccess">view.get("#dialogDeviceIot").close();</ClientEvent> <Property name="dataResolver">deviceIotPR#saveAll</Property> <UpdateItem> <Property name="dataSet">dsDeviceIot</Property> </UpdateItem> </UpdateAction> <AjaxAction id="ajaxRefreshCache"> <Property name="service">deviceIotPR#refreshCache</Property> <Property name="successMessage">å·æ°æåï¼</Property> <Property name="confirmMessage">ç¡®å®è¦å·æ°ç¼åä¹ï¼</Property> </AjaxAction> </View> </ViewConfig> fzzy-igdss-view/src/main/java/com/fzzy/igds/DeviceIotPR.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,132 @@ package com.fzzy.igds; import com.bstek.dorado.annotation.DataProvider; import com.bstek.dorado.annotation.DataResolver; import com.bstek.dorado.annotation.Expose; import com.bstek.dorado.data.entity.EntityState; import com.bstek.dorado.data.entity.EntityUtils; import com.bstek.dorado.data.provider.Page; import com.fzzy.igds.domain.DeviceIot; import com.fzzy.igds.service.DeviceIotService; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.utils.StringUtils; import org.springframework.beans.BeanUtils; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; import org.springframework.data.jpa.domain.Specification; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Predicate; import javax.persistence.criteria.Root; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * @Description * @Author CZT * @Date 2025/11/28 14:53 */ @Component public class DeviceIotPR { @Resource private DeviceIotService deviceIotService; /** * æ¥è¯¢è®¾å¤,å°æä½ä¿¡æ¯è°æ´ä¸ºç©º * * deviceIotPR#loadDeviceIotPage * * @param page * @param param * @return */ @DataProvider public void loadDeviceIotPage(Page<DeviceIot> page, Map<String, Object> param) { if (null == param) { param = new HashMap<>(); } Map<String, Object> finalParam = param; //å¤åæ°å页æ¥è¯¢ Pageable pageable = PageRequest.of(page.getPageNo() - 1, page.getPageSize(), Sort.Direction.ASC, DeviceIot.SORT_PROP); Specification<DeviceIot> specification = new Specification<DeviceIot>() { private static final long serialVersionUID = 1L; public Predicate toPredicate(Root<DeviceIot> root, CriteriaQuery<?> query, CriteriaBuilder cb) { List<Predicate> predicates = new ArrayList<Predicate>(); //ææçæè¨ Predicate predicate1 = cb.equal(root.get("companyId"), ContextUtil.getCompanyId()); predicates.add(predicate1); predicate1 = cb.equal(root.get("deptId"), ContextUtil.subDeptId(null)); predicates.add(predicate1); String key = (String) finalParam.get("depotId"); if (StringUtils.isNotEmpty(key)) { predicate1 = cb.equal(root.get("depotId"), key); predicates.add(predicate1); } key = (String) finalParam.get("type"); if (StringUtils.isNotEmpty(key)) { predicate1 = cb.equal(root.get("type"), key); predicates.add(predicate1); } key = (String) finalParam.get("serId"); if (StringUtils.isNotEmpty(key)) { predicate1 = cb.equal(root.get("serId"), key); predicates.add(predicate1); } return cb.and(predicates.toArray(new Predicate[0])); } }; org.springframework.data.domain.Page<DeviceIot> japPage = deviceIotService.findAll(specification, pageable); page.setEntityCount((int) japPage.getTotalElements()); page.setEntities(japPage.getContent()); } /** * ä¿å devicePR#saveAll * * @param depotDeviceIots * @return */ @DataResolver @Transactional public String saveAll(List<DeviceIot> depotDeviceIots) { String msg = ""; DeviceIot deviceIot; for (DeviceIot depotDeviceIot : depotDeviceIots) { EntityState state = EntityUtils.getState(depotDeviceIot); deviceIot = new DeviceIot(); BeanUtils.copyProperties(depotDeviceIot, deviceIot); if (state == EntityState.NEW) { deviceIotService.updateDeviceIot(deviceIot); msg = "æ·»å æå!"; } if (state == EntityState.DELETED) { deviceIotService.delDepotDeviceIot(deviceIot); msg = "å 餿å!"; } if (state == EntityState.MODIFIED) { deviceIotService.updateDeviceIot(deviceIot); msg = "ä¿®æ¹æå!"; } } return msg; } /** * devicePR#refreshCache */ @Expose public void refreshCache(){ deviceIotService.refreshCache(null); } } fzzy-igdss-view/src/main/java/com/fzzy/igds/DeviceSer.view.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,427 @@ <?xml version="1.0" encoding="UTF-8"?> <ViewConfig> <Arguments/> <Context/> <Model/> <View layout="padding:10"> <ClientEvent name="onReady">
 addData = function(){
 view.get("#dsDeviceSer").insert();
 view.get("#dialog1").set("caption","æ·»å åæº");
 
 view.get("#dialog1").show();
 };
 
 delData = function(){
 var cur = view.get("#dsDeviceSer.data:#");
 if(!cur) return;
 cur.setState(dorado.Entity.STATE_DELETED);
 $confirm("ç¡®å®è¦å é¤è¯¥æ°æ®ä¹ï¼",function(){
 view.get("#uaSave").execute(function(){
 cur.remove();
 });
 });
 };
 
 btnCancel = function(){
 view.get("#dialog1").hide();
 };
 
 onDialogHide = function(){
 var cur = view.get("#dsDeviceSer.data:#");
 cur.cancel();
 };</ClientEvent> <Property name="packages">font-awesome,css-common</Property> <Property name="cache"> <Property name="mode">clientSide</Property> </Property> <DataSet id="dsDeviceSer"> <Property name="parameter"></Property> <Property name="dataProvider">deviceSerPR#getAllSer</Property> <Property name="dataType">[dtDeviceSer]</Property> </DataSet> <Container> <Property name="className">c-param</Property> <ToolBar> <ToolBarButton> <ClientEvent name="onClick">addData();</ClientEvent> <Property name="caption">æ°å¢</Property> <Property name="exClassName">btn1</Property> <Property name="width">100</Property> <Property name="iconClass">fa fa-plus</Property> </ToolBarButton> <ToolBarButton> <ClientEvent name="onClick">
 var select = view.get("#dataGridMain").get("selection");
 if(select){
 view.get("#dialog1").show();
 }else{
 $notify("è¯·éæ©éè¦ä¿®æ¹çæ°æ®â¦â¦");
 }</ClientEvent> <Property name="caption">ä¿®æ¹</Property> <Property name="exClassName">btn2</Property> <Property name="width">100</Property> <Property name="iconClass">fa fa-pencil-square-o</Property> </ToolBarButton> <ToolBarButton> <ClientEvent name="onClick"> var select = view.get("#dataGridMain").get("selection");
 if(select){
 view.get("#ajaxActionDel").set("parameter",{
id: select.get("id")
 }).execute(function(){
 select.remove();
 });
 }else{
 $notify("è¯·éæ©éè¦å é¤çæ°æ®â¦â¦");
 }
</ClientEvent> <Property name="caption">å é¤</Property> <Property name="exClassName">btn3</Property> <Property name="width">100</Property> <Property name="iconClass">fa fa-times</Property> <Property name="action">ajaxActionDel</Property> </ToolBarButton> <ToolBarButton> <ClientEvent name="onClick">view.get("#dsDeviceSer").flushAsync();
 </ClientEvent> <Property name="caption">å·æ°æ°æ®</Property> <Property name="exClassName">btn2</Property> <Property name="iconClass">fa fa-refresh</Property> </ToolBarButton> <ToolBarButton> <Property name="caption">å·æ°ç¼å</Property> <Property name="exClassName">btn4</Property> <Property name="iconClass">fa fa-refresh</Property> <Property name="width">100</Property> <Property name="action">ajaxRefreshCache</Property> </ToolBarButton> <ToolBarButton> <Property name="caption">è¿ç¨æä½</Property> <Property name="exClassName">btn2</Property> <Property name="iconClass">fa fa-flag-checkered</Property> <Property name="width">120</Property> <Property name="menu">menuPull</Property> </ToolBarButton> </ToolBar> <DataGrid id="dataGridMain" layoutConstraint="padding:8"> <ClientEvent name="onDataRowClick">view.get("#dataGridMain").set("selection",arg.data);</ClientEvent> <Property name="dataSet">dsDeviceSer</Property> <Property name="readOnly">true</Property> <Property name="selectionMode">singleRow</Property> <RowSelectorColumn/> <RowNumColumn/> <DataColumn name="id"> <Property name="property">id</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="name"> <Property name="property">name</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="deptId"> <Property name="property">deptId</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="ip"> <Property name="property">ip</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="port"> <Property name="property">port</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="status"> <ClientEvent name="onRenderCell">arg.dom.style.background = arg.data.get("status")== 'Y' ?"":"#FF5722";
 arg.processDefault = true;</ClientEvent> <Property name="property">status</Property> <Property name="align">center</Property> <Property name="width">120</Property> </DataColumn> <DataColumn name="protocol"> <Property name="property">protocol</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="updateBy"> <Property name="property">updateBy</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="updateTime"> <Property name="property">updateTime</Property> <Property name="align">center</Property> <Property name="width">180</Property> </DataColumn> </DataGrid> </Container> <Dialog id="dialog1" layout="regionPadding:8"> <ClientEvent name="onHide">onDialogHide();</ClientEvent> <Property name="iconClass">fa fa-tasks</Property> <Property name="width">1200</Property> <Property name="caption">åæºä¿¡æ¯</Property> <Property name="closeable">false</Property> <Buttons> <Button> <ClientEvent name="onClick">var cur = view.get("#dsDeviceSer.data:#");
 if(cur.validate() == 'ok'){
 view.get("#updateAction").execute(function(){
 view.get("#dialog1").close();
 });
 }else{
 $alert("æ°æ®æ ¡éªå¤±è´¥ï¼");
 }</ClientEvent> <Property name="caption">ä¿å</Property> <Property name="iconClass">fa fa-check-circle</Property> <Property name="exClassName">btn1</Property> <Property name="width">120</Property> </Button> <Button> <ClientEvent name="onClick">btnCancel();</ClientEvent> <Property name="caption">åæ¶</Property> <Property name="exClassName">btn3</Property> <Property name="iconClass">fa fa-times-circle</Property> <Property name="width">120</Property> </Button> </Buttons> <Children> <FieldSet layout="padding:5"> <Property name="caption">åºæ¬ä¿¡æ¯</Property> <Buttons/> <Children> <AutoForm> <Property name="dataSet">dsDeviceSer</Property> <Property name="cols">*,*,*</Property> <Property name="labelSeparator">ï¼</Property> <Property name="labelAlign">right</Property> <Property name="labelWidth">100</Property> <AutoFormElement> <Property name="name">id</Property> <Property name="property">id</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">name</Property> <Property name="property">name</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">deptId</Property> <Property name="property">deptId</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">sn</Property> <Property name="property">sn</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">ip</Property> <Property name="property">ip</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">port</Property> <Property name="property">port</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">type</Property> <Property name="property">type</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">protocol</Property> <Property name="property">protocol</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">controlModel</Property> <Property name="property">controlModel</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">powerModel</Property> <Property name="property">powerModel</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">networkType</Property> <Property name="property">networkType</Property> <Property name="label">ç»ç«¯èç½</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">status</Property> <Property name="property">status</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">isMoreDepot</Property> <Property name="property">isMoreDepot</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">orderNum</Property> <Property name="property">orderNum</Property> <Editor/> </AutoFormElement> </AutoForm> </Children> </FieldSet> <FieldSet layout="padding:5"> <Property name="caption">é 置信æ¯</Property> <Buttons/> <Children> <AutoForm> <Property name="dataSet">dsDeviceSer</Property> <Property name="cols">*,*,*,*</Property> <Property name="labelSeparator">ï¼</Property> <Property name="labelAlign">right</Property> <Property name="labelWidth">100</Property> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">producer</Property> <Property name="property">producer</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">contactPhone</Property> <Property name="property">contactPhone</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">cableFormat</Property> <Property name="property">cableFormat</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">cableZ</Property> <Property name="property">cableZ</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">cableY</Property> <Property name="property">cableY</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">cableX</Property> <Property name="property">cableX</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">cableStart</Property> <Property name="property">cableStart</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">remark</Property> <Property name="property">remark</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">cableType</Property> <Property name="property">cableType</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">orgId</Property> <Property name="property">orgId</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">createBy</Property> <Property name="property">createBy</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">createTime</Property> <Property name="property">createTime</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">updateBy</Property> <Property name="property">updateBy</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">updateTime</Property> <Property name="property">updateTime</Property> <Editor/> </AutoFormElement> </AutoForm> </Children> </FieldSet> </Children> <Tools/> </Dialog> <UpdateAction id="updateAction"> <Property name="dataResolver">deviceSerPR#updateSer</Property> <UpdateItem> <Property name="dataSet">dsDeviceSer</Property> <Property name="dataPath">[#current]</Property> </UpdateItem> </UpdateAction> <AjaxAction id="ajaxActionDel"> <Property name="service">deviceSerPR#delSerById</Property> <Property name="confirmMessage">ç¡®å®è¦å é¤ä¹ï¼</Property> <Property name="executingMessage">æ£å¨å é¤</Property> <Property name="successMessage">å 餿å</Property> </AjaxAction> <AjaxAction id="ajaxRefreshCache"> <Property name="service">deviceSerPR#refreshCache</Property> <Property name="successMessage">å·æ°æåï¼</Property> <Property name="confirmMessage">ç¡®å®è¦å·æ°ç¼åä¹ï¼</Property> </AjaxAction> <Menu id="menuPull"> <MenuItem> <ClientEvent name="onClick">var cur = view.get("#dsDeviceSer.data:#");
 view.get("#ajaxUpdateDepot").set("parameter",cur.get("id")).execute(function(result){
 if(result){
 $alert(result);
 }else{
 $alert("å½ä»¤åéæåï¼è¯·çå¾ ç»ç«¯è¿åï¼ï¼");
 }
 });</ClientEvent> <Property name="caption">è¿ç¨åæ¥ä»åº</Property> <Property name="iconClass">fa fa-thumbs-o-up</Property> </MenuItem> <MenuItem> <ClientEvent name="onClick">var cur = view.get("#dsDeviceSer.data:#");
 view.get("#ajaxUpdateDevice").set("parameter",cur.get("id")).execute(function(result){
 if(result){
 $alert(result);
 }else{
 $alert("å½ä»¤åéæåï¼è¯·çå¾ ç»ç«¯è¿åï¼ï¼");
 }
 });</ClientEvent> <Property name="caption">è¿ç¨åæ¥è®¾å¤</Property> <Property name="iconClass">fa fa-thumbs-o-up</Property> </MenuItem> <MenuItem> <ClientEvent name="onClick">var cur = view.get("#dsDeviceSer.data:#");
 dorado.MessageBox.prompt("请è¾å ¥ææç ï¼",function(txt){
 view.get("#ajaxAccess").set("parameter",{serId:cur.get("id"),accessCode:txt}).execute(function(result){
 if(result){
 $alert(result);
 }else{
 $alert("å½ä»¤åéæåï¼è¯·çå¾ ç»ç«¯è¿åï¼ï¼");
 }
 });
 });</ClientEvent> <Property name="caption">è¿ç¨ææ</Property> <Property name="iconClass">fa fa-thumbs-o-up</Property> </MenuItem> </Menu> <AjaxAction id="ajaxUpdateDevice"> <Property name="service">pullPR#pullDeviceBySer</Property> <Property name="confirmMessage">ç¡®å®è¦åæ¥è¿ç¨æ§å¶æä¸ç设å¤é ç½®å°å¹³å°ä¹ï¼</Property> <Property name="executingMessage">æä»¤åéä¸â¦â¦</Property> </AjaxAction> <AjaxAction id="ajaxUpdateDepot"> <Property name="service">pullPR#pullDepotBySer</Property> <Property name="confirmMessage">ç¡®å®è¦åæ¥è¿ç¨æ§å¶æä¸çä»åºé ç½®å°å¹³å°ä¹ï¼</Property> <Property name="executingMessage">æä»¤åéä¸â¦â¦</Property> </AjaxAction> <AjaxAction id="ajaxAccess"> <Property name="service">pullPR#pullAccess</Property> <Property name="executingMessage">æä»¤åéä¸â¦â¦</Property> </AjaxAction> </View> </ViewConfig> fzzy-igdss-view/src/main/java/com/fzzy/igds/DeviceSerPR.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,105 @@ package com.fzzy.igds; import com.bstek.dorado.annotation.DataProvider; import com.bstek.dorado.annotation.DataResolver; import com.bstek.dorado.annotation.Expose; import com.fzzy.igds.domain.DeviceSer; import com.fzzy.igds.service.DeviceSerService; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; import java.util.List; /** * @Description * @Author CZT * @Date 2025/11/28 13:50 */ @Component public class DeviceSerPR { @Resource private DeviceSerService deviceSerService; /** * deviceSerPR#getAllSer * * @return */ @DataProvider public List<DeviceSer> getAllSer() { return deviceSerService.getAllSer(); } /** * deviceSerPR#getDataById * * @param id * @return */ @Expose public DeviceSer getDataById(String id) { return deviceSerService.getDataById(null, id); } /** * deviceSerPR#updateSer * * @param data */ @DataResolver public void updateSer(DeviceSer data) { DeviceSer deviceSer = new DeviceSer(); BeanUtils.copyProperties(data, deviceSer); if(null == data.getOrderNum()){ data.setOrderNum(1); } deviceSerService.saveSer(deviceSer); } /** * æ ¹æ®åæºidååç§°å é¤åæº */ @Expose @Transactional public void delSerById(String id) { DeviceSer ser = deviceSerService.getDataById(null, id); deviceSerService.delSer(ser); } /** * deviceSerPR#refreshCache * * @throws * @Title: refreshCache * @Description: å·æ°ç¼å void */ @Expose public void refreshCache() { deviceSerService.refreshCache(null); } /** * ${dorado.getDataProvider("deviceSerPR#getAllSerCache").getResult()} * * @return */ @DataProvider public List<DeviceSer> getAllSerCache() { return deviceSerService.getCacheSerList(null); } /** * ${dorado.getDataProvider("deviceSerPR#getSerCacheByType").getResult("01")} * * @param type * @return */ @DataProvider public List<DeviceSer> getSerCacheByType(String type) { return deviceSerService.getSerCacheByType(null, type); } } fzzy-igdss-view/src/main/java/com/fzzy/igds/DicArea.view.xml
@@ -135,7 +135,7 @@ $notify("æ°æ®æ§è¡å®æï¼ï¼");
 self.get("parent").hide();
 });</ClientEvent> <Property name="caption">ç¡®å®</Property> <Property name="caption">ä¿å</Property> <Property name="iconClass">fa fa-check-circle</Property> <Property name="exClassName">btn1</Property> <Property name="width">120</Property> fzzy-igdss-view/src/main/java/com/fzzy/igds/DicPR.java
@@ -222,4 +222,59 @@ return dicService.triggerNoticeType(); } /** * çµç¼èµ·å§æ¹ä½ * ${dorado.getDataProvider("dicPR#triggerStartOrientation").getResult()} * * @return */ @DataProvider public List<SysDictData> triggerStartOrientation() { return dicService.triggerStartOrientation(); } /** * çµç¼å¸çº¿æ¹å * ${dorado.getDataProvider("dicPR#triggerStartDirection").getResult()} * * @return */ @DataProvider public List<SysDictData> triggerStartDirection() { return dicService.triggerStartDirection(); } /** * çµç¼èµ·å§ç¹ä½ * ${dorado.getDataProvider("dicPR#triggerStartPoint").getResult()} * * @return */ @DataProvider public List<SysDictData> triggerStartPoint() { return dicService.triggerStartPoint(); } /** * å±è¡è½¬æ¢ * ${dorado.getDataProvider("dicPR#triggerStartConvert").getResult()} * * @return */ @DataProvider public List<SysDictData> triggerStartConvert() { return dicService.triggerStartConvert(); } /** * çä»é¥å½¢ * ${dorado.getDataProvider("dicPR#triggerCableCone").getResult()} * * @return */ @DataProvider public List<SysDictData> triggerCableCone() { return dicService.triggerCableCone(); } } fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutConf.view.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,804 @@ <?xml version="1.0" encoding="UTF-8"?> <ViewConfig> <Arguments/> <Context/> <Model> <DataType name="dtMain"> <Property name="creationType">com.fzzy.igds.domain.InoutConf</Property> <PropertyDef name="id"> <Property></Property> <Property name="label">主é®</Property> </PropertyDef> <PropertyDef name="companyId"> <Property></Property> <Property name="label">ç»ç»ç¼ç </Property> </PropertyDef> <PropertyDef name="deptId"> <Property></Property> <Property name="label">æå±åºåº</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("deptPR#getAllData").getResult()}</Property> <Property name="keyProperty">id</Property> <Property name="valueProperty">kqmc</Property> </Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="sort"> <Property name="label">æå±é å¥å·</Property> <Property name="required">true</Property> <Property name="mapping"> <Property name="mapValues"> <Collection> <Entity> <Property name="code">1</Property> <Property name="name">æµç¨é ç½®#1</Property> </Entity> <Entity> <Property name="code">2</Property> <Property name="name">æµç¨é ç½®#2</Property> </Entity> </Collection> </Property> <Property name="keyProperty">code</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="inOrder"> <Property name="dataType">int</Property> <Property name="label">设å¤é¡ºåº</Property> </PropertyDef> <PropertyDef name="inoutProgress"> <Property></Property> <Property name="label">æå±æµç¨</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("PROCESS_STATUS_")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="name"> <Property></Property> <Property name="label">设å¤åç§°</Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="sn"> <Property></Property> <Property name="label">设å¤åºåå·</Property> </PropertyDef> <PropertyDef name="ip"> <Property></Property> <Property name="label">IPå°å</Property> </PropertyDef> <PropertyDef name="port"> <Property name="dataType">Integer</Property> <Property name="label">设å¤ç«¯å£</Property> </PropertyDef> <PropertyDef name="loginId"> <Property></Property> <Property name="label">ç»å½å¸å·</Property> </PropertyDef> <PropertyDef name="pwd"> <Property></Property> <Property name="label">ç»å½å¯ç </Property> </PropertyDef> <PropertyDef name="chanNum"> <Property name="dataType">int</Property> <Property name="label">ééå·</Property> </PropertyDef> <PropertyDef name="portCtrl"> <Property name="dataType">Integer</Property> <Property name="label">æ§å¶ç«¯å£</Property> </PropertyDef> <PropertyDef name="type"> <Property></Property> <Property name="label">设å¤ç±»å</Property> <Property name="mapping"> <Property name="mapValues"> <Collection> <Entity> <Property name="code">10</Property> <Property name="name">车çè¯å«è®¾å¤</Property> </Entity> <Entity> <Property name="code">20</Property> <Property name="name">æ¦æ ·æºè®¾å¤</Property> </Entity> <Entity> <Property name="code">30</Property> <Property name="name">å°ç£ 设å¤</Property> </Entity> <Entity> <Property name="code">21</Property> <Property name="name">åéªæº</Property> </Entity> <Entity> <Property name="code">40</Property> <Property name="name">LEDæ¾ç¤ºå±</Property> </Entity> <Entity> <Property name="code">60</Property> <Property name="name">è¿ç¨æå头</Property> </Entity> <Entity> <Property name="code">70</Property> <Property name="name">ç§°éæ§å¶å¨</Property> </Entity> <Entity> <Property name="code">80</Property> <Property name="name">æºæ §å¡</Property> </Entity> </Collection> </Property> <Property name="keyProperty">code</Property> <Property name="valueProperty">name</Property> </Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="status"> <Property></Property> <Property name="label">设å¤ç¶æ</Property> <Property name="mapping"> <Property name="mapValues"> <Collection> <Entity> <Property name="code">NONE</Property> <Property name="name">æªç¥</Property> </Entity> <Entity> <Property name="code">NORMAL</Property> <Property name="name">æ£å¸¸å¨çº¿</Property> </Entity> <Entity> <Property name="code">NO_SIGNAL</Property> <Property name="name">æªè¿æ¥</Property> </Entity> </Collection> </Property> <Property name="keyProperty">code</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="protocol"> <Property></Property> <Property name="label">æå±åè®®</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("PROTOCOL")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="playType"> <Property></Property> <Property name="label">ææ¾æ¹å¼</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#triggerPlayType").getResult()}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="snapType"> <Property></Property> <Property name="label">æææ¹å¼</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#triggerSnapType").getResult()}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="plateSnapType"> <Property></Property> <Property name="label">æå¾è¯å«</Property> <Property name="mapping"> <Property name="mapValues"> <Collection> <Entity> <Property name="code">Y</Property> <Property name="name">æ¯</Property> </Entity> <Entity> <Property name="code">N</Property> <Property name="name">å¦</Property> </Entity> </Collection> </Property> <Property name="keyProperty">code</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="urlIn"> <Property></Property> <Property name="label">å ç½å°å</Property> </PropertyDef> <PropertyDef name="urlOut"> <Property></Property> <Property name="label">å¤ç½å°å</Property> </PropertyDef> <PropertyDef name="mediaAddr"> <Property></Property> <Property name="label">RTSPå°å</Property> </PropertyDef> <PropertyDef name="remark"> <Property></Property> <Property name="label">夿³¨ä¿¡æ¯</Property> </PropertyDef> <PropertyDef name="errorMsg"> <Property></Property> <Property name="label">å¼å¸¸è¯´æ</Property> </PropertyDef> <PropertyDef name="createTime"> <Property name="dataType">DateTime</Property> <Property name="label">å建æ¶é´</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="createBy"> <Property></Property> <Property name="label">å建人</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="updateTime"> <Property name="dataType">DateTime</Property> <Property name="label">æ´æ°æ¶é´</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="updateBy"> <Property></Property> <Property name="label">æ´æ°äºº</Property> <Property name="readOnly">true</Property> </PropertyDef> </DataType> </Model> <View layout="padding:10"> <ClientEvent name="onReady">var deptId = "${request.getParameter('deptId')}";
 //æ¥è¯¢
 query = function(){
 var data = {deptId:deptId};
 view.get("#dsMain").set("parameter",data).flushAsync();
 };
 query();
 
 
 add = function(){
 view.get("#dsMain").insert({
 deptId:deptId,
 inOrder:1,
 chanNum:1
 });
 view.get("#dialogMain").show();
 }</ClientEvent> <Property name="packages">font-awesome,css-common</Property> <DataSet id="dsMain"> <Property name="dataProvider">inoutConfPR#getData</Property> <Property name="dataType">[dtMain]</Property> <Property name="loadMode">manual</Property> </DataSet> <Container> <Property name="className">c-param</Property> <ToolBar> <ToolBarButton> <ClientEvent name="onClick">add();</ClientEvent> <Property name="caption">æ°å¢</Property> <Property name="exClassName">btn1</Property> <Property name="width">100</Property> <Property name="iconClass">fa fa-plus</Property> </ToolBarButton> <ToolBarButton> <ClientEvent name="onClick">
 var select = view.get("#dataGridMain").get("selection");
 if(select){
 view.get("#dialogMain").show();;
 }else{
 $notify("è¯·éæ©éè¦ä¿®æ¹çæ°æ®â¦â¦");
 } </ClientEvent> <Property name="caption">ä¿®æ¹</Property> <Property name="exClassName">btn2</Property> <Property name="width">100</Property> <Property name="iconClass">fa fa-pencil-square-o</Property> </ToolBarButton> <ToolBarButton> <ClientEvent name="onClick"> 
 var select = view.get("#dataGridMain").get("selection");
 if(select){
 view.get("#ajaxDel").set("parameter",select).execute(function(){
 select.remove();
 });
 }else{
 $notify("è¯·éæ©éè¦å é¤çæ°æ®â¦â¦");
 }
</ClientEvent> <Property name="caption">å é¤</Property> <Property name="exClassName">btn3</Property> <Property name="width">100</Property> <Property name="iconClass">fa fa-times</Property> </ToolBarButton> <ToolBarButton> <ClientEvent name="onClick">var data = view.get("#dsMain.data:#");
 if(!data){
 return;
 }
 view.get("#ajaxFlushCache").set("parameter",data).execute();</ClientEvent> <Property name="caption">å·æ°ç¼å</Property> <Property name="exClassName">btn4</Property> <Property name="iconClass">fa fa-refresh</Property> <Property name="width">100</Property> <Property name="action">ajaxRefreshCache</Property> </ToolBarButton> </ToolBar> <DataGrid id="dataGridMain" layoutConstraint="padding:8"> <ClientEvent name="onDataRowClick">view.get("#dataGridMain").set("selection",arg.data);</ClientEvent> <Property name="dataSet">dsMain</Property> <Property name="selectionMode">singleRow</Property> <Property name="readOnly">true</Property> <Property name="groupProperty">sort</Property> <RowSelectorColumn/> <RowNumColumn/> <DataColumn name="sort"> <Property name="property">sort</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="name"> <Property name="property">name</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="inoutProgress"> <Property name="property">inoutProgress</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="type"> <Property name="property">type</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="status"> <Property name="property">status</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="sn"> <Property name="property">sn</Property> </DataColumn> <DataColumn name="protocol"> <Property name="property">protocol</Property> </DataColumn> <DataColumn name="updateBy"> <Property name="property">updateBy</Property> <Property name="align">center</Property> <Property name="width">100</Property> </DataColumn> <DataColumn name="updateTime"> <Property name="property">updateTime</Property> <Property name="align">center</Property> <Property name="width">160</Property> </DataColumn> </DataGrid> </Container> <Dialog id="dialogMain" layout="regionPadding:8"> <Property name="iconClass">fa fa-tasks</Property> <Property name="caption">åºå ¥åºé å¥è®¾å¤</Property> <Property name="width">70%</Property> <Property name="closeable">false</Property> <Buttons> <Button> <ClientEvent name="onClick">var data = view.get("#dsMain.data:#");
 
 if(data.validate() != 'ok'){
 $notify("æ°æ®æ ¡éªå¤±è´¥ï¼ï¼");
 return;
 }
 
 view.get("#ajaxSave").set("parameter",data).execute(function(result){
 if(result){
 $alert(result);
 return;
 }
 $notify("æ°æ®æ§è¡å®æï¼ï¼");
 self.get("parent").hide();
 });</ClientEvent> <Property name="caption">ç¡®å®</Property> <Property name="iconClass">fa fa-check</Property> <Property name="exClassName">btn1</Property> </Button> <Button> <ClientEvent name="onClick">view.get("#dsMain.data:#").cancel();
 self.get("parent").hide();</ClientEvent> <Property name="caption">åæ¶</Property> <Property name="iconClass">fa fa-times</Property> <Property name="exClassName">btn3</Property> </Button> </Buttons> <Children> <FieldSet layout="padding:5"> <Property name="caption">设å¤ä¿¡æ¯</Property> <Buttons/> <Children> <AutoForm> <Property name="dataSet">dsMain</Property> <Property name="cols">*,*,*</Property> <Property name="labelAlign">right</Property> <Property name="labelSeparator">ï¼</Property> <Property name="labelWidth">100</Property> <AutoFormElement> <Property name="name">name</Property> <Property name="property">name</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">type</Property> <Property name="property">type</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">sort</Property> <Property name="property">sort</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">inoutProgress</Property> <Property name="property">inoutProgress</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">protocol</Property> <Property name="property">protocol</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">status</Property> <Property name="property">status</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">ip</Property> <Property name="property">ip</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">createBy</Property> <Property name="property">createBy</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">createTime</Property> <Property name="property">createTime</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">port</Property> <Property name="property">port</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">updateBy</Property> <Property name="property">updateBy</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">updateTime</Property> <Property name="property">updateTime</Property> <Editor/> </AutoFormElement> </AutoForm> </Children> </FieldSet> <FieldSet layoutConstraint="padding:5"> <Property name="caption">çæ§ä¿¡æ¯</Property> <Buttons/> <Children> <AutoForm> <Property name="dataSet">dsMain</Property> <Property name="cols">*,*,*</Property> <Property name="labelAlign">right</Property> <Property name="labelSeparator">ï¼</Property> <Property name="labelWidth">100</Property> <AutoFormElement> <Property name="name">loginId</Property> <Property name="property">loginId</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">pwd</Property> <Property name="property">pwd</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">portCtrl</Property> <Property name="property">portCtrl</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">playType</Property> <Property name="property">playType</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">chanNum</Property> <Property name="property">chanNum</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">inOrder</Property> <Property name="property">inOrder</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">snapType</Property> <Property name="property">snapType</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">sn</Property> <Property name="property">sn</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">plateSnapType</Property> <Property name="property">plateSnapType</Property> <Editor/> </AutoFormElement> <Label layoutConstraint="colSpan:2"> <Property name="style"> <Property name="color">blue</Property> </Property> <Property name="text">æ³¨ï¼æ¤é ç½®éç¨äºé£æ£è´è¿API-HTTPåè®®</Property> </Label> </AutoForm> </Children> </FieldSet> <FieldSet layoutConstraint="padding:5"> <Property name="caption">ææ¾é ç½®</Property> <Buttons/> <Children> <AutoForm> <Property name="dataSet">dsMain</Property> <Property name="cols">*,*</Property> <Property name="labelAlign">right</Property> <Property name="labelSeparator">ï¼</Property> <Property name="labelWidth">100</Property> <AutoFormElement> <Property name="name">urlIn</Property> <Property name="property">urlIn</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">urlOut</Property> <Property name="property">urlOut</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">mediaAddr</Property> <Property name="property">mediaAddr</Property> <Property name="trigger">triggerMedia</Property> <Editor> <TextEditor id="mediaAddr"/> </Editor> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">remark</Property> <Property name="property">remark</Property> <Editor/> </AutoFormElement> </AutoForm> </Children> </FieldSet> </Children> <Tools/> </Dialog> <AjaxAction id="ajaxSave"> <Property name="service">inoutConfPR#saveData</Property> </AjaxAction> <AjaxAction id="ajaxDel"> <Property name="service">inoutConfPR#delData</Property> <Property name="confirmMessage">ç¡®å®è¦å é¤ä¹ï¼</Property> </AjaxAction> <AjaxAction id="ajaxFlushCache"> <Property name="service">inoutConfPR#flushCache</Property> </AjaxAction> <Trigger id="triggerMedia"> <ClientEvent name="onExecute">view.get("#dialogMeidaSelect").show();</ClientEvent> </Trigger> <Dialog id="dialogMeidaSelect" layout="vbox padding:10"> <Property name="width">650</Property> <Property name="caption">æµåªä½å°åéæ©</Property> <Property name="height">500</Property> <Buttons/> <Children> <Container> <Label> <Property name="text">海康RTSPï¼æ§ç-ä¸»ç æµï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text1"> <Property name="text">rtsp://{0}:{1}@{2}:{3}/h264/ch{4}/main/av_stream</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text1.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">海康RTSPï¼æ§ç-åç æµï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text2"> <Property name="text">rtsp://{0}:{1}@{2}:{3}/mpeg4/ch{4}/sub/av_stream</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text2.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">海康RTSPï¼æ°ç-ä¸»ç æµï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text3"> <Property name="text">rtsp://{0}:{1}@{2}:{3}/Streaming/Channels/{4}01</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text3.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">海康RTSPï¼æ°ç-åç æµï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text4"> <Property name="text">rtsp://{0}:{1}@{2}:{3}/Streaming/Channels/{4}02</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text4.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">大åRTSPï¼ä¸»ç æµï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text5"> <Property name="text">rtsp://{0}:{1}@{2}:{3}/cam/realmonitor?channel={4}&subtype=0</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text5.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">大åRTSPï¼è¾ ç æµï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text6"> <Property name="text">rtsp://{0}:{1}@{2}:{3}/cam/realmonitor?channel={4}&subtype=1</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text6.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">éè¿RTSPï¼ä¸»ç æµï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text7"> <Property name="text">rtsp://{2}:{3}/user={0}&password={1}&channel={4}&stream=0.sdp?real_stream</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text7.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">éè¿RTSPï¼æ¬¡ç æµï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text8"> <Property name="text">rtsp://{2}:{3}/user={0}&password={1}&channel={4}&stream=1.sdp?real_stream</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text8.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">䏿RTSPï¼é«ç çï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text9"> <Property name="text">rtsp://{0}:{1}@{2}:{3}/onvif/profile2/media.smp</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text9.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">䏿RTSPï¼ä½ç çï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text10"> <Property name="text">rtsp://{0}:{1}@{2}:{3}/onvif/profile3/media.smp</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text10.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">å®è§RTSP</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text11"> <Property name="text">rtsp://{0}:{1}@{2}/media/video1/multicast</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text11.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> </Children> <Tools/> </Dialog> </View> </ViewConfig> fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutConfPR.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,71 @@ package com.fzzy.igds; import com.bstek.dorado.annotation.DataProvider; import com.bstek.dorado.annotation.Expose; import com.fzzy.igds.service.InoutConfService; import com.fzzy.igds.domain.InoutConf; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; import javax.annotation.Resource; import java.util.List; /** * @Description * @Author CZT * @Date 2025/11/28 09:23 */ @Component public class InoutConfPR { @Resource private InoutConfService inoutConfService; /** * inoutConfPR#getData è·åå½å人æå¨çååºä¸çé ç½®ä¿¡æ¯ * * @return */ @DataProvider public List<InoutConf> getData() { return inoutConfService.getInoutConfList(null,null); } /** * inoutConfPR#saveData ä¿åé ç½® * * @return */ @Expose public String saveData(InoutConf data) { InoutConf inoutConf = new InoutConf(); BeanUtils.copyProperties(data, inoutConf); return inoutConfService.saveData(inoutConf); } /** * inoutConfPR#delData å é¤é ç½® * * @param data * @return */ @Expose public String delData(InoutConf data) { InoutConf inoutConf = new InoutConf(); BeanUtils.copyProperties(data, inoutConf); return inoutConfService.delData(inoutConf); } /** * inoutConfPR#flushCache * * @return */ @Expose public void flushCache(InoutConf data) { inoutConfService.flushInoutConfCache(data.getCompanyId(), data.getDeptId()); } } fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutSysConf.view.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,254 @@ <?xml version="1.0" encoding="UTF-8"?> <ViewConfig> <Arguments/> <Context/> <Model> <DataType name="dtMain"> <Property name="creationType">com.fzzy.igds.domain.InoutSysConf</Property> <PropertyDef name="deptId"> <Property></Property> <Property name="label">æå±åºåº</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("deptPR#getAllData").getResult()}</Property> <Property name="keyProperty">id</Property> <Property name="valueProperty">kqmc</Property> </Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="companyId"> <Property></Property> <Property name="label">ç³»ç»ç»ç»ç¼ç </Property> </PropertyDef> <PropertyDef name="progressIn"> <Property></Property> <Property name="label">å ¥åºæµç¨</Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="progressOut"> <Property></Property> <Property name="label">åºåºæµç¨</Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="noticeWx"> <Property></Property> <Property name="label">微信éç¥</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("sys_yes_no")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="weightEditTag"> <Property></Property> <Property name="label">å°ç£ ç¼è¾</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("sys_yes_no")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="remark"> <Property></Property> <Property name="label">夿³¨è¯´æ</Property> </PropertyDef> <PropertyDef name="createTime"> <Property name="dataType">DateTime</Property> <Property name="label">å建æ¶é´</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="createBy"> <Property></Property> <Property name="label">å建人</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="updateTime"> <Property name="dataType">DateTime</Property> <Property name="label">æ´æ°æ¶é´</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="updateBy"> <Property></Property> <Property name="label">æ´æ°äºº</Property> <Property name="readOnly">true</Property> </PropertyDef> </DataType> </Model> <View layout="padding:10"> <Property name="packages">font-awesome,css-common</Property> <DataSet id="dsMain"> <Property name="dataProvider">inoutSysConfPR#getSysConfData</Property> <Property name="dataType">[dtMain]</Property> </DataSet> <Container> <Property name="className">c-param</Property> <ToolBar> <ToolBarButton> <ClientEvent name="onClick">var select = view.get("#dgMain").get("selection");
 if(select){
 view.get("#dialogMain").show();;
 }else{
 $notify("è¯·éæ©éè¦ç¼è¾çæ°æ®â¦â¦");
 }</ClientEvent> <Property name="caption">ä¿®æ¹</Property> <Property name="exClassName">btn2</Property> <Property name="width">100</Property> <Property name="iconClass">fa fa-pencil-square-o</Property> </ToolBarButton> <ToolBarButton> <ClientEvent name="onClick">view.get("#dsMain").flushAsync();
 </ClientEvent> <Property name="caption">å·æ°ç¼å</Property> <Property name="exClassName">btn4</Property> <Property name="iconClass">fa fa-refresh</Property> <Property name="width">100</Property> <Property name="action">ajaxRefreshCache</Property> </ToolBarButton> </ToolBar> <DataGrid id="dgMain" layoutConstraint="padding:8"> <ClientEvent name="onDataRowClick">view.get("#dgMain").set("selection",arg.data);</ClientEvent> <Property name="dataSet">dsMain</Property> <Property name="readOnly">true</Property> <Property name="selectionMode">singleRow</Property> <RowSelectorColumn/> <RowNumColumn/> <DataColumn name="deptId"> <Property name="property">deptId</Property> </DataColumn> <DataColumn name="progressIn"> <Property name="property">progressIn</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="progressOut"> <Property name="property">progressOut</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="noticeWx"> <Property name="property">noticeWx</Property> <Property name="align">center</Property> <Property name="width">120</Property> </DataColumn> <DataColumn name="weightEditTag"> <Property name="property">weightEditTag</Property> <Property name="align">center</Property> <Property name="width">120</Property> </DataColumn> <DataColumn name="updateBy"> <Property name="property">updateBy</Property> <Property name="align">center</Property> <Property name="width">100</Property> </DataColumn> <DataColumn name="updateTime"> <Property name="property">updateTime</Property> <Property name="align">center</Property> <Property name="width">160</Property> </DataColumn> </DataGrid> </Container> <Dialog id="dialogMain"> <Property name="width">1200</Property> <Property name="caption">æµç¨é ç½®</Property> <Property name="closeable">false</Property> <Property name="iconClass">fa fa-tasks</Property> <Buttons> <Button id="btnOk"> <ClientEvent name="onClick">view.get("#uaSave").execute(function(result){
 if(result){
 $alert(result);
 }else{
 $notify("ä¿åæåï¼ï¼");
 view.get("#dialogMain").hide();
 }
 });</ClientEvent> <Property name="caption">ä¿å</Property> <Property name="iconClass">fa fa-check-circle</Property> <Property name="exClassName">btn1</Property> <Property name="width">120</Property> </Button> <Button> <ClientEvent name="onClick">view.get("#dsMain.data:#").cancel();
 self.get("parent").hide();</ClientEvent> <Property name="caption">åæ¶</Property> <Property name="exClassName">btn3</Property> <Property name="iconClass">fa fa-times-circle</Property> <Property name="width">120</Property> </Button> </Buttons> <Children> <AutoForm> <Property name="dataSet">dsMain</Property> <Property name="cols">*,*,*,*</Property> <Property name="labelAlign">right</Property> <Property name="labelSeparator"> : </Property> <Property name="labelWidth">120</Property> <AutoFormElement layoutConstraint="colSpan:4"> <Property name="name">deptId</Property> <Property name="property">deptId</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:4"> <Property name="name">progressIn</Property> <Property name="property">progressIn</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:4"> <Property name="name">progressOut</Property> <Property name="property">progressOut</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">noticeWx</Property> <Property name="property">noticeWx</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">weightEditTag</Property> <Property name="property">weightEditTag</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:4"> <Property name="name">remark</Property> <Property name="property">remark</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">createBy</Property> <Property name="property">createBy</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">createTime</Property> <Property name="property">createTime</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">updateBy</Property> <Property name="property">updateBy</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">updateTime</Property> <Property name="property">updateTime</Property> <Editor/> </AutoFormElement> </AutoForm> </Children> <Tools/> </Dialog> <UpdateAction id="uaSave"> <Property name="dataResolver">inoutSysConfPR#saveSysConfData</Property> <Property name="successMessage">æ°æ®ä¿å宿ï¼</Property> <UpdateItem> <Property name="dataSet">dsMain</Property> <Property name="dataPath">[#current]</Property> <Property name="validateData">false</Property> </UpdateItem> </UpdateAction> <AjaxAction id="ajaxRefreshCache"> <Property name="service">inoutSysConfPR#flushCache</Property> <Property name="successMessage">å·æ°æåï¼</Property> <Property name="confirmMessage">ç¡®å®è¦å·æ°ç¼åä¹ï¼</Property> </AjaxAction> </View> </ViewConfig> fzzy-igdss-view/src/main/java/com/fzzy/igds/InoutSysConfPR.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,65 @@ package com.fzzy.igds; import com.bstek.dorado.annotation.DataProvider; import com.bstek.dorado.annotation.DataResolver; import com.bstek.dorado.annotation.Expose; import com.fzzy.igds.service.InoutConfService; import com.fzzy.igds.domain.InoutSysConf; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; import javax.annotation.Resource; import java.util.List; /** * @Description åºå ¥åºæµç¨é ç½® * @Author CZT * @Date 2024/12/12 15:32 */ @Component public class InoutSysConfPR { @Resource private InoutConfService inoutConfService; /** * inoutSysConfPR#getSysConfData è·åå½ååºå ¥åºæµç¨é ç½® * * @return * @throws Exception */ @DataProvider public List<InoutSysConf> getSysConfData() { return inoutConfService.getSysConfData(); } /** * inoutSysConfPR#saveSysConfData * * @throws Exception * @returns */ @DataResolver public String saveSysConfData(InoutSysConf data) { InoutSysConf inoutSysConf = new InoutSysConf(); BeanUtils.copyProperties(data,inoutSysConf); inoutConfService.saveSysConfData(inoutSysConf); return null; } /** * inoutSysConfPR#flushCache */ @Expose public void flushCache() { List<InoutSysConf> list = getSysConfData(); if(null != list && list.size() > 0){ for (InoutSysConf inoutSysConf : list) { inoutConfService.flushInoutSysConfCache(inoutSysConf); } } } } fzzy-igdss-view/src/main/java/com/fzzy/igds/QuantityConf.view.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,741 @@ <?xml version="1.0" encoding="UTF-8"?> <ViewConfig> <Arguments/> <Context/> <Model> <DataType name="dtQuantityConf"> <Property name="creationType">com.fzzy.igds.domain.QuantityConf</Property> <PropertyDef name="companyId"> <Property></Property> <Property name="label">ç»ç»ç¼ç </Property> </PropertyDef> <PropertyDef name="depotId"> <Property></Property> <Property name="label">æå±ä»åº</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("depotPR#getAllCache").getResult()}</Property> <Property name="keyProperty">id</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="deptId"> <Property></Property> <Property name="label">æå±ååº</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("deptPR#getAllData").getResult()}</Property> <Property name="keyProperty">id</Property> <Property name="valueProperty">kqmc</Property> </Property> </PropertyDef> <PropertyDef name="name"> <Property></Property> <Property name="label">设å¤åç§°</Property> </PropertyDef> <PropertyDef name="sn"> <Property></Property> <Property name="label">设å¤åºåå·</Property> </PropertyDef> <PropertyDef name="ip"> <Property></Property> <Property name="label">é讯IP</Property> </PropertyDef> <PropertyDef name="port"> <Property></Property> <Property name="label">é讯端å£</Property> <Property name="dataType">Integer</Property> </PropertyDef> <PropertyDef name="loginId"> <Property></Property> <Property name="label">ç»å½è´¦å·</Property> </PropertyDef> <PropertyDef name="pwd"> <Property></Property> <Property name="label">ç»å½å¯ç </Property> </PropertyDef> <PropertyDef name="status"> <Property></Property> <Property name="label">æ¯å¦å¨çº¿</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("sys_yes_no")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="protocol"> <Property></Property> <Property name="label">é讯åè®®</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("PROTOCOL")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="length1"> <Property name="dataType">Double</Property> <Property name="label">è·ç¦»1</Property> </PropertyDef> <PropertyDef name="length2"> <Property name="dataType">Double</Property> <Property name="label">è·ç¦»2</Property> </PropertyDef> <PropertyDef name="length3"> <Property name="dataType">Double</Property> <Property name="label">è·ç¦»3</Property> </PropertyDef> <PropertyDef name="length4"> <Property name="dataType">Double</Property> <Property name="label">è·ç¦»4</Property> </PropertyDef> <PropertyDef name="width"> <Property name="dataType">Double</Property> <Property name="label">仿¿å®½</Property> </PropertyDef> <PropertyDef name="height"> <Property name="dataType">Double</Property> <Property name="label">æ¢å¤´é«</Property> </PropertyDef> <PropertyDef name="lineHeight"> <Property name="dataType">Double</Property> <Property name="label">å 粮线é«</Property> </PropertyDef> <PropertyDef name="ytIp"> <Property></Property> <Property name="label">çæ§ip</Property> </PropertyDef> <PropertyDef name="cameraSn"> <Property></Property> <Property name="label">çæ§SN</Property> </PropertyDef> <PropertyDef name="portCtrl"> <Property></Property> <Property name="label">æ§å¶ç«¯å£</Property> <Property name="dataType">Integer</Property> </PropertyDef> <PropertyDef name="portWeb"> <Property></Property> <Property name="label">web端å£</Property> <Property name="dataType">Integer</Property> </PropertyDef> <PropertyDef name="playType"> <Property></Property> <Property name="label">ææ¾æ¹å¼</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#triggerPlayType").getResult()}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="snapType"> <Property></Property> <Property name="label">æææ¹å¼</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#triggerSnapType").getResult()}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="urlIn"> <Property></Property> <Property name="label">å ç½å°å</Property> </PropertyDef> <PropertyDef name="urlOut"> <Property></Property> <Property name="label">å¤ç½å°å</Property> </PropertyDef> <PropertyDef name="mediaAddr"> <Property></Property> <Property name="label">RTSPå°å</Property> </PropertyDef> <PropertyDef name="remark"> <Property></Property> <Property name="label">夿³¨</Property> </PropertyDef> <PropertyDef name="chanNum"> <Property></Property> <Property name="label">ééå·</Property> <Property name="dataType">Integer</Property> </PropertyDef> <PropertyDef name="createTime"> <Property name="dataType">DateTime</Property> <Property name="label">å建æ¶é´</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="createBy"> <Property></Property> <Property name="label">å建人</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="updateTime"> <Property name="dataType">DateTime</Property> <Property name="label">æ´æ°æ¶é´</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="updateBy"> <Property></Property> <Property name="label">æ´æ°äºº</Property> <Property name="readOnly">true</Property> </PropertyDef> </DataType> </Model> <View layout="padding:10"> <Property name="packages">font-awesome,css-common</Property> <DataSet id="dsMain"> <Property name="dataProvider">quantityConfPR#getConfList</Property> <Property name="dataType">[dtQuantityConf]</Property> </DataSet> <Container> <Property name="className">c-param</Property> <ToolBar> <ToolBarButton> <ClientEvent name="onClick">view.get("#dsMain").insert();
 view.get("#depotId").set("readOnly",false);
 view.get("#dgMain").show();</ClientEvent> <Property name="caption">æ°å¢</Property> <Property name="exClassName">btn1</Property> <Property name="width">100</Property> <Property name="iconClass">fa fa-plus</Property> </ToolBarButton> <ToolBarButton> <ClientEvent name="onClick">
 var select = view.get("#dataGridMain").get("selection");
 if(select){
 view.get("#depotId").set("readOnly",true)
 view.get("#dgMain").show();
 }else{
 $notify("è¯·éæ©éè¦ä¿®æ¹çæ°æ®â¦â¦");
 }</ClientEvent> <Property name="caption">ä¿®æ¹</Property> <Property name="exClassName">btn2</Property> <Property name="width">100</Property> <Property name="iconClass">fa fa-pencil-square-o</Property> </ToolBarButton> <ToolBarButton> <ClientEvent name="onClick">
 var select = view.get("#dataGridMain").get("selection");
 if(select){
 view.get("#ajaxDel").set("parameter",select).execute(function(result){
 select.remove();
 });
 }else{
 $notify("è¯·éæ©éè¦å é¤çä»åºâ¦â¦");
 }</ClientEvent> <Property name="caption">å é¤</Property> <Property name="exClassName">btn3</Property> <Property name="width">100</Property> <Property name="iconClass">fa fa-times</Property> </ToolBarButton> <ToolBarButton> <Property name="caption">å·æ°ç¼å</Property> <Property name="exClassName">btn4</Property> <Property name="iconClass">fa fa-refresh</Property> <Property name="width">100</Property> <Property name="action">ajaxRefreshCache</Property> </ToolBarButton> </ToolBar> <DataGrid id="dataGridMain" layoutConstraint="padding:8"> <ClientEvent name="onDataRowClick">view.get("#dataGridMain").set("selection",arg.data);</ClientEvent> <Property name="dataSet">dsMain</Property> <Property name="readOnly">true</Property> <Property name="selectionMode">singleRow</Property> <RowSelectorColumn/> <RowNumColumn/> <DataColumn> <Property name="property">name</Property> <Property name="align">center</Property> <Property name="name">name</Property> <Property name="width">150</Property> </DataColumn> <DataColumn name="depotId"> <Property name="property">depotId</Property> <Property name="align">center</Property> <Property name="width">150</Property> </DataColumn> <DataColumn> <Property name="property">ip</Property> <Property name="align">center</Property> <Property name="name">ip</Property> <Property name="width">120</Property> </DataColumn> <DataColumn> <Property name="property">port</Property> <Property name="align">center</Property> <Property name="name">port</Property> <Property name="width">80</Property> </DataColumn> <DataColumn> <Property name="property">status</Property> <Property name="align">center</Property> <Property name="name">status</Property> <Property name="width">80</Property> </DataColumn> <DataColumn> <Property name="property">protocol</Property> <Property name="align">center</Property> <Property name="name">protocol</Property> <Property name="width">180</Property> </DataColumn> <DataColumn> <Property name="property">playType</Property> <Property name="align">center</Property> <Property name="name">playType</Property> <Property name="width">180</Property> </DataColumn> <DataColumn> <Property name="property">ytIp</Property> <Property name="align">center</Property> <Property name="name">ytIp</Property> </DataColumn> <DataColumn name="updateBy"> <Property name="property">updateBy</Property> <Property name="align">center</Property> </DataColumn> <DataColumn name="updateTime"> <Property name="property">updateTime</Property> <Property name="align">center</Property> </DataColumn> </DataGrid> </Container> <UpdateAction id="uaMain"> <Property name="dataResolver">quantityConfPR#saveConf</Property> <UpdateItem> <Property name="dataSet">dsMain</Property> <Property name="dataPath">[#current]</Property> </UpdateItem> </UpdateAction> <AjaxAction id="ajaxRefreshCache"> <Property name="service">quantityConfPR#flushConfCache</Property> <Property name="successMessage">å·æ°æåï¼</Property> <Property name="confirmMessage">ç¡®å®è¦å·æ°ç¼åä¹ï¼</Property> </AjaxAction> <Dialog id="dgMain" layout="regionPadding:8"> <ClientEvent name="onShow">//æ ¹æ®ä»åºç±»åä¸åï¼æ¾ç¤ºä¸åçé 置信æ¯</ClientEvent> <Property name="iconClass">fa fa-tasks</Property> <Property name="caption">æ°éæ£æµåæ°</Property> <Property name="width">1100</Property> <Property name="closeable">false</Property> <Buttons> <Button> <ClientEvent name="onClick">view.get("#uaMain").execute(function(){
 view.get("#dgMain").hide();
 });</ClientEvent> <Property name="caption">ä¿å</Property> <Property name="iconClass">fa fa-check-circle</Property> <Property name="exClassName">btn1</Property> <Property name="width">120</Property> </Button> <Button> <ClientEvent name="onClick">view.get("#dsMain.data:#").cancel();
 view.get("#dgMain").hide();</ClientEvent> <Property name="caption">åæ¶</Property> <Property name="exClassName">btn3</Property> <Property name="iconClass">fa fa-times-circle</Property> <Property name="width">120</Property> </Button> </Buttons> <Children> <GroupBox layoutConstraint="padding:5"> <Property name="caption">åºæ¬ä¿¡æ¯</Property> <Buttons/> <Children> <AutoForm> <Property name="dataSet">dsMain</Property> <Property name="cols">*,*,*</Property> <Property name="labelSeparator">ï¼</Property> <Property name="labelAlign">right</Property> <Property name="labelWidth">110</Property> <AutoFormElement> <Property name="name">name</Property> <Property name="property">name</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">sn</Property> <Property name="property">sn</Property> <Editor/> </AutoFormElement> <AutoFormElement id="depotId"> <Property name="name">depotId</Property> <Property name="property">depotId</Property> <Property name="readOnly">false</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">ip</Property> <Property name="property">ip</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">port</Property> <Property name="property">port</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">protocol</Property> <Property name="property">protocol</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">status</Property> <Property name="property">status</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">remark</Property> <Property name="property">remark</Property> <Editor/> </AutoFormElement> </AutoForm> </Children> </GroupBox> <GroupBox layoutConstraint="padding:5"> <Property name="caption">æå头é ç½®</Property> <Buttons/> <Children> <AutoForm> <Property name="dataSet">dsMain</Property> <Property name="cols">*,*,*</Property> <Property name="labelSeparator">ï¼</Property> <Property name="labelAlign">right</Property> <Property name="labelWidth">110</Property> <AutoFormElement> <Property name="name">ytIp</Property> <Property name="property">ytIp</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">portCtrl</Property> <Property name="property">portCtrl</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">portWeb</Property> <Property name="property">portWeb</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">loginId</Property> <Property name="property">loginId</Property> <Property name="readOnly">false</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">pwd</Property> <Property name="property">pwd</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">chanNum</Property> <Property name="property">chanNum</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">playType</Property> <Property name="property">playType</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">urlIn</Property> <Property name="property">urlIn</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">snapType</Property> <Property name="property">snapType</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">urlOut</Property> <Property name="property">urlOut</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">cameraSn</Property> <Property name="property">cameraSn</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">mediaAddr</Property> <Property name="property">mediaAddr</Property> <Property name="trigger">triggerMedia</Property> <Editor> <TextEditor id="mediaAddr"> <Property name="blankText"> -- ç¹å»å³ä¾§éæ©ï¼æè æå¨å¡«å --</Property> </TextEditor> </Editor> </AutoFormElement> </AutoForm> </Children> </GroupBox> <GroupBox layoutConstraint="padding:5"> <Property name="caption">æ°éæ£æµåæ°</Property> <Buttons/> <Children> <AutoForm> <Property name="dataSet">dsMain</Property> <Property name="cols">*,*,*,*</Property> <Property name="labelSeparator">ï¼</Property> <Property name="labelAlign">right</Property> <Property name="labelWidth">110</Property> <AutoFormElement> <Property name="name">length1</Property> <Property name="property">length1</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">length2</Property> <Property name="property">length2</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">length3</Property> <Property name="property">length3</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">length4</Property> <Property name="property">length4</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">width</Property> <Property name="property">width</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">height</Property> <Property name="property">height</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">lineHeight</Property> <Property name="property">lineHeight</Property> <Editor/> </AutoFormElement> </AutoForm> </Children> </GroupBox> </Children> <Tools/> </Dialog> <AjaxAction id="ajaxDel"> <Property name="successMessage">å 餿å</Property> <Property name="service">quantityConfPR#delQuantityConf</Property> <Property name="executingMessage">æ£å¨å é¤</Property> <Property name="confirmMessage">ç¡®å®è¦å é¤ä¹ï¼</Property> </AjaxAction> <Trigger id="triggerMedia"> <ClientEvent name="onExecute">view.get("#dialogMeidaSelect").show();
 </ClientEvent> </Trigger> <Dialog id="dialogMeidaSelect" layout="vbox padding:10"> <Property name="width">650</Property> <Property name="caption">æµåªä½å°åéæ©</Property> <Buttons/> <Children> <Container> <Label> <Property name="text">海康RTSPï¼æ§ç-ä¸»ç æµï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text1"> <Property name="text">rtsp://{0}:{1}@{2}:{3}/h264/ch{4}/main/av_stream</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text1.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">海康RTSPï¼æ§ç-åç æµï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text2"> <Property name="text">rtsp://{0}:{1}@{2}:{3}/mpeg4/ch{4}/sub/av_stream</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text2.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">海康RTSPï¼æ°ç-ä¸»ç æµï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text3"> <Property name="text">rtsp://{0}:{1}@{2}:{3}/Streaming/Channels/{4}01</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text3.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">海康RTSPï¼æ°ç-åç æµï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text4"> <Property name="text">rtsp://{0}:{1}@{2}:{3}/Streaming/Channels/{4}02</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text4.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">大åRTSPï¼ä¸»ç æµï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text5"> <Property name="text">rtsp://{0}:{1}@{2}:{3}/cam/realmonitor?channel={4}&subtype=0</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text5.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">大åRTSPï¼è¾ ç æµï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text6"> <Property name="text">rtsp://{0}:{1}@{2}:{3}/cam/realmonitor?channel={4}&subtype=1</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text6.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">éè¿RTSPï¼ä¸»ç æµï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text7"> <Property name="text">rtsp://{2}:{3}/user={0}&password={1}&channel={4}&stream=0.sdp?real_stream</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text7.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">éè¿RTSPï¼æ¬¡ç æµï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text8"> <Property name="text">rtsp://{2}:{3}/user={0}&password={1}&channel={4}&stream=1.sdp?real_stream</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text8.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">䏿RTSPï¼é«ç çï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text9"> <Property name="text">rtsp://{0}:{1}@{2}:{3}/onvif/profile2/media.smp</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text9.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">䏿RTSPï¼ä½ç çï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text10"> <Property name="text">rtsp://{0}:{1}@{2}:{3}/onvif/profile3/media.smp</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text10.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">å®è§RTSP</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text11"> <Property name="text">rtsp://{0}:{1}@{2}/media/video1/multicast</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text11.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> </Children> <Tools/> </Dialog> <AjaxAction id="ajaxRemoteConf"> <Property name="service">quantityConfPR#remoteConf</Property> </AjaxAction> </View> </ViewConfig> fzzy-igdss-view/src/main/java/com/fzzy/igds/QuantityConfPR.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,68 @@ package com.fzzy.igds; import com.bstek.dorado.annotation.DataProvider; import com.bstek.dorado.annotation.DataResolver; import com.bstek.dorado.annotation.Expose; import com.fzzy.igds.domain.QuantityConf; import com.fzzy.igds.service.DepotService; import com.fzzy.igds.service.QuantityService; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Component; import javax.annotation.Resource; import java.util.List; /** * @Description * @Author CZT * @Date 2025/11/28 16:58 */ @Component public class QuantityConfPR { @Resource private QuantityService quantityService; @Resource private DepotService depotService; /** * åæ°é ç½®å表 quantityConfPR#getConfList * * @return */ @DataProvider public List<QuantityConf> getConfList() { return quantityService.getConfList(null, null); } /** * quantityConfPR#saveConf åæ°é ç½®æ´æ°ï¼å æ¬æ°å¢åä¿®æ¹ * * @param conf */ @DataResolver public void saveConf(QuantityConf conf) { QuantityConf quantityConf = new QuantityConf(); BeanUtils.copyProperties(conf, quantityConf); quantityService.saveConf(quantityConf); } /** * quantityConfPR#delQuantityConf * * @return */ @Expose public String delQuantityConf(QuantityConf conf) { QuantityConf quantityConf = new QuantityConf(); BeanUtils.copyProperties(conf, quantityConf); return quantityService.delQuantityConf(quantityConf); } /** * quantityConfPR#flushConfCache å·æ°é ç½®ç¼å */ @Expose public void flushConfCache() { quantityService.flushConfCache(null, null); } } fzzy-igdss-view/src/main/java/com/fzzy/igds/SecCamera.view.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,1207 @@ <?xml version="1.0" encoding="UTF-8"?> <ViewConfig> <Arguments/> <Context/> <Model> <DataType name="dtSecCameraParam"> <Property name="creationType">com.fzzy.igds.domain.Camera</Property> <PropertyDef name="name"> <Property></Property> <Property name="label">çæ§åç§°</Property> </PropertyDef> <PropertyDef name="brand"> <Property></Property> <Property name="label">çæ§åç</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("CAMERA_BRAND")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="spjklx"> <Property></Property> <Property name="label">ä¸å¡ç±»å</Property> <Property name="mapping"> <Property name="keyProperty">key</Property> <Property name="valueProperty">value</Property> <Property name="mapValues"> <Collection> <Entity> <Property name="key">1</Property> <Property name="value">1-ä»å </Property> </Entity> <Entity> <Property name="key">2</Property> <Property name="value">2-ä¸å¡ç±»</Property> </Entity> <Entity> <Property name="key">3</Property> <Property name="value">3-å®é²ç±»</Property> </Entity> </Collection> </Property> </Property> </PropertyDef> <PropertyDef name="spdwlx"> <Property></Property> <Property name="label">ç¹ä½ç±»å</Property> <Property name="mapping"> <Property name="keyProperty">key</Property> <Property name="valueProperty">value</Property> <Property name="mapValues"> <Collection> <Entity> <Property name="key">1</Property> <Property name="value">1-åºå ¥å£</Property> </Entity> <Entity> <Property name="key">2</Property> <Property name="value">2-æ¦æ ·æº</Property> </Entity> <Entity> <Property name="key">3</Property> <Property name="value">3-åéªå®¤</Property> </Entity> <Entity> <Property name="key">4</Property> <Property name="value">4-ç»ç®å®¤</Property> </Entity> <Entity> <Property name="key">5</Property> <Property name="value">5-å°ç£ 室</Property> </Entity> <Entity> <Property name="key">6</Property> <Property name="value">6-åºåºä¸»å¹²é</Property> </Entity> <Entity> <Property name="key">7</Property> <Property name="value">7-ä»é´çæ§</Property> </Entity> <Entity> <Property name="key">8</Property> <Property name="value">8-ä»å </Property> </Entity> <Entity> <Property name="key">9</Property> <Property name="value">9-è¯åæ¿å å¤</Property> </Entity> <Entity> <Property name="key">10</Property> <Property name="value">10-卿室å å¤</Property> </Entity> <Entity> <Property name="key">11</Property> <Property name="value">11-å¶é«ç¹</Property> </Entity> <Entity> <Property name="key">12</Property> <Property name="value">12-æ²¹åºç½åº</Property> </Entity> <Entity> <Property name="key">13</Property> <Property name="value">13-æ¶å油设å¤</Property> </Entity> <Entity> <Property name="key">14</Property> <Property name="value">14-æ³µæ¿</Property> </Entity> <Entity> <Property name="key">15</Property> <Property name="value">15-æ²¹åºä¸»è¦è¾é管é</Property> </Entity> <Entity> <Property name="key">16</Property> <Property name="value">16-å¨ç</Property> </Entity> </Collection> </Property> </Property> </PropertyDef> </DataType> <DataType name="dtSecCamera"> <Property name="creationType">com.fzzy.igds.domain.Camera</Property> <PropertyDef name="id"> <Property></Property> <Property name="label">çæ§ç¼ç </Property> </PropertyDef> <PropertyDef name="companyId"> <Property></Property> <Property name="label">ç»ç»ç¼ç </Property> </PropertyDef> <PropertyDef name="deptId"> <Property></Property> <Property name="label">æå±åºåº</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("deptPR#getAllData").getResult()}</Property> <Property name="keyProperty">id</Property> <Property name="valueProperty">kqmc</Property> </Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="name"> <Property></Property> <Property name="label">çæ§åç§°</Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="type"> <Property></Property> <Property name="label">设å¤ç±»å</Property> <Property name="required">true</Property> <Property name="mapping"> <Property name="mapValues"> <Collection> <Entity> <Property name="code">01</Property> <Property name="name">01-æªæº</Property> </Entity> <Entity> <Property name="code">02</Property> <Property name="name">02-çæº</Property> </Entity> <Entity> <Property name="code">03</Property> <Property name="name">03-åç</Property> </Entity> <Entity> <Property name="code">09</Property> <Property name="name">09-å ¶ä»</Property> </Entity> </Collection> </Property> <Property name="keyProperty">code</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="brand"> <Property></Property> <Property name="label">设å¤åç</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("CAMERA_BRAND")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="sn"> <Property></Property> <Property name="label">åºåå·</Property> </PropertyDef> <PropertyDef name="sort"> <Property name="label">é å¥åºå·</Property> <Property name="required">true</Property> <Property name="mapping"> <Property name="mapValues"> <Collection> <Entity> <Property name="code">1</Property> <Property name="name">é å¥åºå·#1</Property> </Entity> <Entity> <Property name="code">2</Property> <Property name="name">é å¥åºå·#2</Property> </Entity> </Collection> </Property> <Property name="keyProperty">code</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="playType"> <Property></Property> <Property name="label">ææ¾æ¹å¼</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#triggerPlayType").getResult()}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="loginId"> <Property></Property> <Property name="label">å¸å·</Property> </PropertyDef> <PropertyDef name="pwd"> <Property></Property> <Property name="label">å¯ç </Property> </PropertyDef> <PropertyDef name="ip"> <Property></Property> <Property name="label">IPå°å</Property> </PropertyDef> <PropertyDef name="controlPort"> <Property name="dataType">Integer</Property> <Property name="label">æ§å¶ç«¯å£</Property> <Property name="defaultValue">554</Property> </PropertyDef> <PropertyDef name="webPort"> <Property name="dataType">Integer</Property> <Property name="label">WEB端å£</Property> <Property name="defaultValue">80</Property> </PropertyDef> <PropertyDef name="chanNum"> <Property name="dataType">Integer</Property> <Property name="label">ééå·</Property> <Property name="defaultValue">1</Property> </PropertyDef> <PropertyDef name="urlIn"> <Property></Property> <Property name="label">å ç½å°å</Property> </PropertyDef> <PropertyDef name="urlOut"> <Property></Property> <Property name="label">å¤ç½å°å</Property> </PropertyDef> <PropertyDef name="mediaAddr"> <Property></Property> <Property name="label">RTSPå°å</Property> </PropertyDef> <PropertyDef name="snapType"> <Property></Property> <Property name="label">æææ¹å¼</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#triggerSnapType").getResult()}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="spjklx"> <Property></Property> <Property name="label">ä¸å¡ç±»å</Property> <Property name="mapping"> <Property name="keyProperty">key</Property> <Property name="valueProperty">value</Property> <Property name="mapValues"> <Collection> <Entity> <Property name="key">1</Property> <Property name="value">1-ä»å </Property> </Entity> <Entity> <Property name="key">2</Property> <Property name="value">2-ä¸å¡ç±»</Property> </Entity> <Entity> <Property name="key">3</Property> <Property name="value">3-å®é²ç±»</Property> </Entity> </Collection> </Property> </Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="spdwlx"> <Property></Property> <Property name="label">ç¹ä½ç±»å</Property> <Property name="mapping"> <Property name="keyProperty">key</Property> <Property name="valueProperty">value</Property> <Property name="mapValues"> <Collection> <Entity> <Property name="key">1</Property> <Property name="value">1-åºå ¥å£</Property> </Entity> <Entity> <Property name="key">2</Property> <Property name="value">2-æ¦æ ·æº</Property> </Entity> <Entity> <Property name="key">3</Property> <Property name="value">3-åéªå®¤</Property> </Entity> <Entity> <Property name="key">4</Property> <Property name="value">4-ç»ç®å®¤</Property> </Entity> <Entity> <Property name="key">5</Property> <Property name="value">5-å°ç£ 室</Property> </Entity> <Entity> <Property name="key">6</Property> <Property name="value">6-åºåºä¸»å¹²é</Property> </Entity> <Entity> <Property name="key">7</Property> <Property name="value">7-ä»é´çæ§</Property> </Entity> <Entity> <Property name="key">8</Property> <Property name="value">8-ä»å </Property> </Entity> <Entity> <Property name="key">9</Property> <Property name="value">9-è¯åæ¿å å¤</Property> </Entity> <Entity> <Property name="key">10</Property> <Property name="value">10-卿室å å¤</Property> </Entity> <Entity> <Property name="key">11</Property> <Property name="value">11-å¶é«ç¹</Property> </Entity> <Entity> <Property name="key">12</Property> <Property name="value">12-æ²¹åºç½åº</Property> </Entity> <Entity> <Property name="key">13</Property> <Property name="value">13-æ¶å油设å¤</Property> </Entity> <Entity> <Property name="key">14</Property> <Property name="value">14-æ³µæ¿</Property> </Entity> <Entity> <Property name="key">15</Property> <Property name="value">15-æ²¹åºä¸»è¦è¾é管é</Property> </Entity> <Entity> <Property name="key">16</Property> <Property name="value">16-å¨ç</Property> </Entity> </Collection> </Property> </Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="posX"> <Property></Property> <Property name="label">åæ X</Property> <Property name="dataType">Double</Property> </PropertyDef> <PropertyDef name="posY"> <Property></Property> <Property name="label">åæ Y</Property> <Property name="dataType">Double</Property> </PropertyDef> <PropertyDef name="screenShow"> <Property></Property> <Property name="label">大屿¾ç¤º</Property> <Property name="required">false</Property> <Property name="defaultValue">N</Property> <Property name="mapping"> <Property name="mapValues"> <Collection> <Entity> <Property name="code">Y</Property> <Property name="name">å±ç¤º</Property> </Entity> <Entity> <Property name="code">N</Property> <Property name="name">ä¸å±ç¤º</Property> </Entity> </Collection> </Property> <Property name="keyProperty">code</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="phoneShowTag"> <Property></Property> <Property name="label">APPæ¾ç¤º</Property> <Property name="defaultValue">N</Property> <Property name="mapping"> <Property name="mapValues"> <Collection> <Entity> <Property name="code">Y</Property> <Property name="name">å±ç¤º</Property> </Entity> <Entity> <Property name="code">N</Property> <Property name="name">ä¸å±ç¤º</Property> </Entity> </Collection> </Property> <Property name="keyProperty">code</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="orderNum"> <Property></Property> <Property name="label">æ¾ç¤ºé¡ºåº</Property> <Property name="dataType">Integer</Property> </PropertyDef> <PropertyDef name="vld"> <Property></Property> <Property name="label">æ¯å¦ä½¿ç¨</Property> <Property name="defaultValue">Y</Property> <Property name="mapping"> <Property name="mapValues"> <Collection> <Entity> <Property name="code">Y</Property> <Property name="name">å¯ç¨</Property> </Entity> <Entity> <Property name="code">N</Property> <Property name="name">ç¦ç¨</Property> </Entity> </Collection> </Property> <Property name="keyProperty">code</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="remark"> <Property></Property> <Property name="label">夿³¨è¯´æ</Property> </PropertyDef> <PropertyDef name="createTime"> <Property name="dataType">DateTime</Property> <Property name="label">å建æ¶é´</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="createBy"> <Property></Property> <Property name="label">å建人</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="updateTime"> <Property name="dataType">DateTime</Property> <Property name="label">æ´æ°æ¶é´</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="updateBy"> <Property></Property> <Property name="label">æ´æ°äºº</Property> <Property name="readOnly">true</Property> </PropertyDef> </DataType> </Model> <View layout="padding:10"> <ClientEvent name="onClick">
 /**
 * æ¥è¯¢
 */
 query = function(){
 view.get("#dsMain").flushAsync();
 }
 /**
 * 访é®
 */
 showWeb = function(){
 var cur = view.get("#dsMain.data:#");
 if(!cur.get("ip")){
 $alert("没æé 置访é®IPï¼æ æ³è®¿é®ã");
 return;
 }
 if(!cur.get("webPort")){
 $alert("没æé 置访é®ç«¯å£ï¼æ æ³è®¿é®ã");
 return;
 }
 var url = "http://"+cur.get("ip")+":"+cur.get("webPort");
 window.open(url);
 };
 
 /**
 * é¢è§
 */
 showVideo = function(){
 var cur = view.get("#dsMain.data:#");
 var playType = cur.get("playType");
 
 if(!playType){
 $alert("没æé ç½®ææ¾æ¹å¼ï¼æ æ³é¢è§ã");
 return;
 }
 if(!cur.get("ip")){
 $alert("没æé ç½®å é¨è®¿é®IPï¼æ æ³è®¿é®ã");
 return;
 }
 if(!cur.get("controlPort")){
 $alert("没æé ç½®å 鍿§å¶ç«¯å£ï¼æ æ³è®¿é®ã");
 return;
 }
 if(!cur.get("loginId")){
 $alert("没æé ç½®ç¨æ·åï¼æ æ³è®¿é®ã");
 return;
 }
 if (!cur.get("pwd")) {
 $alert("没æé ç½®å¯ç ï¼æ æ³è®¿é®ã");
 return;
 }
 
 var url = "./basic/security/video-play?cameraId="+cur.get("id")+"&playType="+playType+"&time="+ new Date().getTime();
 
 view.get("#iFrameVideo").set("path",url);
 view.get("#dialogVideo").show();
 };
 </ClientEvent> <Property name="packages">font-awesome,css-common</Property> <DataSet id="dsMain"> <Property name="loadMode">lazy</Property> <Property name="dataProvider">secCameraPR#listPageCamera</Property> <Property name="pageSize">20</Property> <Property name="dataType">[dtSecCamera]</Property> </DataSet> <DataSet id="dsParam"> <ClientEvent name="onReady">self.insert({});</ClientEvent> <Property name="dataType">dtSecCameraParam</Property> </DataSet> <Container> <Property name="className">c-param</Property> <AutoForm> <Property name="cols">*,*,*,*,90,90</Property> <Property name="dataSet">dsParam</Property> <Property name="labelAlign">right</Property> <Property name="labelWidth">100</Property> <AutoFormElement> <Property name="name">name</Property> <Property name="property">name</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">brand</Property> <Property name="property">brand</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">spjklx</Property> <Property name="property">spjklx</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">spdwlx</Property> <Property name="property">spdwlx</Property> <Editor/> </AutoFormElement> <Button> <ClientEvent name="onClick">var param = view.get("#dsParam.data");
 view.get("#dsMain").set("parameter",param.toJSON()).flushAsync();</ClientEvent> <Property name="caption">æç´¢</Property> <Property name="iconClass">fa fa-search</Property> <Property name="exClassName">btn-q1</Property> </Button> <Button> <ClientEvent name="onClick">view.get("#dsParam").setData({});</ClientEvent> <Property name="caption">éç½®</Property> <Property name="exClassName">btn-q2</Property> <Property name="iconClass">fa fa-refresh</Property> </Button> </AutoForm> </Container> <Container> <Property name="className">c-data</Property> <ToolBar> <ToolBarButton> <ClientEvent name="onClick">view.get("#dsMain").insert();
 view.get("#dialogMain").show();</ClientEvent> <Property name="caption">æ°å¢</Property> <Property name="exClassName">btn1</Property> <Property name="width">100</Property> <Property name="iconClass">fa fa-plus</Property> </ToolBarButton> <ToolBarButton> <ClientEvent name="onClick">var data = view.get("#dataGridCamera").get("selection");
 if(data){
 view.get("#dialogMain").show();
 }else{
 $notify("è¯·éæ©éè¦ä¿®æ¹ççæ§ä¿¡æ¯â¦â¦");
 }</ClientEvent> <Property name="caption">ä¿®æ¹</Property> <Property name="exClassName">btn2</Property> <Property name="width">100</Property> <Property name="iconClass">fa fa-pencil-square-o</Property> </ToolBarButton> <ToolBarButton> <ClientEvent name="onClick">var select = view.get("#dataGridCamera").get("selection");
 if(select){
 view.get("#ajaxDel").set("parameter",select).execute(function(result){
 if(result){
 $alert(result);
 }else{
 query();
 }
 }); }else{
 $notify("è¯·éæ©éè¦å é¤ççæ§ä¿¡æ¯â¦â¦");
 }</ClientEvent> <Property name="caption">å é¤</Property> <Property name="exClassName">btn3</Property> <Property name="width">100</Property> <Property name="iconClass">fa fa-times</Property> </ToolBarButton> <ToolBarButton> <Property name="caption">å·æ°ç¼å</Property> <Property name="exClassName">btn4</Property> <Property name="iconClass">fa fa-refresh</Property> <Property name="width">100</Property> <Property name="action">refreshCache</Property> </ToolBarButton> </ToolBar> <DataGrid id="dataGridCamera" layoutConstraint="padding:8"> <ClientEvent name="onDataRowClick">view.get("#dataGridCamera").set("selection",arg.data);</ClientEvent> <Property name="dataSet">dsMain</Property> <Property name="selectionMode">singleRow</Property> <Property name="readOnly">true</Property> <RowSelectorColumn/> <RowNumColumn> <Property name="width">50</Property> </RowNumColumn> <DataColumn name="name"> <Property name="property">name</Property> </DataColumn> <DataColumn name="type"> <Property name="property">type</Property> <Property name="align">center</Property> <Property name="width">90</Property> </DataColumn> <DataColumn name="spjklx"> <Property name="property">spjklx</Property> <Property name="align">center</Property> <Property name="width">90</Property> </DataColumn> <DataColumn name="spdwlx"> <Property name="property">spdwlx</Property> <Property name="align">center</Property> <Property name="width">100</Property> </DataColumn> <DataColumn> <Property name="property">playType</Property> <Property name="align">center</Property> <Property name="name">playType</Property> <Property name="width">160</Property> </DataColumn> <DataColumn> <Property name="property">snapType</Property> <Property name="align">center</Property> <Property name="name">snapType</Property> <Property name="width">160</Property> </DataColumn> <DataColumn name="ip"> <Property name="property">ip</Property> <Property name="align">center</Property> <Property name="width">120</Property> </DataColumn> <DataColumn name="controlPort"> <Property name="property">controlPort</Property> <Property name="align">center</Property> <Property name="width">100</Property> </DataColumn> <DataColumn name="chanNum"> <Property name="property">chanNum</Property> <Property name="align">center</Property> <Property name="width">80</Property> </DataColumn> <DataColumn name="brand"> <Property name="property">brand</Property> <Property name="align">center</Property> <Property name="width">100</Property> </DataColumn> <DataColumn name="updateTime"> <Property name="property">updateTime</Property> <Property name="align">center</Property> <Property name="width">160</Property> </DataColumn> <DataColumn> <ClientEvent name="onRenderCell">arg.dom.innerHTML = "<a href='javascript:;' onClick='showVideo()' class='a-btn1'>é¢è§</a>&nbsp;|&nbsp;<a href='javascript:;' onClick='showWeb()' class='a-btn3'>访é®</a>";</ClientEvent> <Property name="width">160</Property> <Property name="caption">æä½</Property> <Property name="align">center</Property> <Editor/> </DataColumn> </DataGrid> </Container> <Container layoutConstraint="bottom"> <Property name="className">c-bottom</Property> <DataPilot layoutConstraint="right"> <Property name="dataSet">dsMain</Property> <Property name="itemCodes">pageSize,pages</Property> </DataPilot> </Container> <Dialog id="dialogMain" layout="regionPadding:8"> <Property name="iconClass">fa fa-tasks</Property> <Property name="width">1200</Property> <Property name="caption">çæ§ä¿¡æ¯</Property> <Property name="closeable">false</Property> <Buttons> <Button> <ClientEvent name="onClick">var data = view.get("#dsMain.data:#");
 if(data.validate() != 'ok'){
 $notify("æ°æ®æ ¡éªå¤±è´¥ï¼ï¼");
 return;
 }
 view.get("#uaAction").set("parameter",data).execute(function(){
 self.get("parent").hide();
 query();
 });</ClientEvent> <Property name="caption">ä¿å</Property> <Property name="iconClass">fa fa-check-circle</Property> <Property name="exClassName">btn1</Property> <Property name="width">120</Property> </Button> <Button> <ClientEvent name="onClick">var cur = view.get("#dsMain.data:#");
 if(cur) cur.cancel();
 self.get("parent").hide();</ClientEvent> <Property name="caption">åæ¶</Property> <Property name="exClassName">btn3</Property> <Property name="iconClass">fa fa-times-circle</Property> <Property name="width">120</Property> </Button> </Buttons> <Children> <FieldSet layout="padding:5"> <Property name="caption">åºæ¬ä¿¡æ¯</Property> <Buttons/> <Children> <AutoForm> <Property name="dataSet">dsMain</Property> <Property name="cols">*,*,*,*</Property> <Property name="labelWidth">100</Property> <Property name="labelAlign">right</Property> <Property name="labelSeparator">ï¼</Property> <AutoFormElement> <Property name="name">name</Property> <Property name="property">name</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">type</Property> <Property name="property">type</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">brand</Property> <Property name="property">brand</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">deptId</Property> <Property name="property">deptId</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">loginId</Property> <Property name="property">loginId</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">pwd</Property> <Property name="property">pwd</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">chanNum</Property> <Property name="property">chanNum</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">spjklx</Property> <Property name="property">spjklx</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">ip</Property> <Property name="property">ip</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">controlPort</Property> <Property name="property">controlPort</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">webPort</Property> <Property name="property">webPort</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">spdwlx</Property> <Property name="property">spdwlx</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">sort</Property> <Property name="property">sort</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">screenShow</Property> <Property name="property">screenShow</Property> <Editor> <RadioGroup> <RadioButton> <Property name="text">å±ç¤º</Property> <Property name="value">Y</Property> </RadioButton> <RadioButton> <Property name="text">ä¸å±ç¤º</Property> <Property name="value">N</Property> </RadioButton> </RadioGroup> </Editor> </AutoFormElement> <AutoFormElement> <Property name="name">phoneShowTag</Property> <Property name="property">phoneShowTag</Property> <Editor> <RadioGroup> <RadioButton> <Property name="text">å±ç¤º</Property> <Property name="value">Y</Property> </RadioButton> <RadioButton> <Property name="text">ä¸å±ç¤º</Property> <Property name="value">N</Property> </RadioButton> </RadioGroup> </Editor> </AutoFormElement> </AutoForm> </Children> </FieldSet> <FieldSet layout="padding:5"> <Property name="caption">ææ¾é ç½®</Property> <Buttons/> <Children> <AutoForm> <Property name="dataSet">dsMain</Property> <Property name="cols">*,*,*,*,*</Property> <Property name="labelWidth">100</Property> <Property name="labelAlign">right</Property> <Property name="labelSeparator">ï¼</Property> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">playType</Property> <Property name="property">playType</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:3"> <Property name="name">urlIn</Property> <Property name="property">urlIn</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">snapType</Property> <Property name="property">snapType</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:3"> <Property name="name">urlOut</Property> <Property name="property">urlOut</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">sn</Property> <Property name="property">sn</Property> <Editor> <TextEditor id="sn"> <Property name="blankText"> -- æµåªä½å¹³å°ä¸è®¾å¤SN --</Property> </TextEditor> </Editor> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:3"> <Property name="name">mediaAddr</Property> <Property name="property">mediaAddr</Property> <Property name="trigger">triggerMedia</Property> <Editor> <TextEditor id="mediaAddr"> <Property name="blankText"> -- ç¹å»å³ä¾§éæ©ï¼æè æå¨å¡«å --</Property> </TextEditor> </Editor> </AutoFormElement> </AutoForm> </Children> </FieldSet> <FieldSet layout="padding:5"> <Property name="caption">å ¶ä»ä¿¡æ¯</Property> <Buttons/> <Children> <AutoForm> <Property name="dataSet">dsMain</Property> <Property name="cols">*,*,*</Property> <Property name="labelWidth">100</Property> <Property name="labelAlign">right</Property> <Property name="labelSeparator">ï¼</Property> <AutoFormElement> <Property name="name">vld</Property> <Property name="property">vld</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">orderNum</Property> <Property name="property">orderNum</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">updateTime</Property> <Property name="property">updateTime</Property> <Editor/> </AutoFormElement> <AutoFormElement layoutConstraint="colSpan:2"> <Property name="name">remark</Property> <Property name="property">remark</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">createBy</Property> <Property name="property">createBy</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">createTime</Property> <Property name="property">createTime</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">updateBy</Property> <Property name="property">updateBy</Property> <Editor/> </AutoFormElement> <AutoFormElement> <Property name="name">updateTime</Property> <Property name="property">updateTime</Property> <Editor/> </AutoFormElement> </AutoForm> </Children> </FieldSet> </Children> <Tools/> </Dialog> <UpdateAction id="uaAction"> <Property name="dataResolver">secCameraPR#saveCamera</Property> <UpdateItem> <Property name="dataSet">dsMain</Property> <Property name="dataPath">[#current]</Property> </UpdateItem> </UpdateAction> <AjaxAction id="ajaxDel"> <Property name="confirmMessage">ç¡®å®è¦å é¤åï¼</Property> <Property name="service">secCameraPR#delCamera</Property> </AjaxAction> <Dialog id="dialogVideo"> <Property name="width">1320</Property> <Property name="caption">è§é¢é¢è§</Property> <Property name="contentOverflow">hidden</Property> <Property name="height">620</Property> <Buttons/> <Children> <IFrame id="iFrameVideo" layoutConstraint="center"/> </Children> <Tools/> </Dialog> <AjaxAction id="refreshCache"> <Property name="service">secCameraPR#refreshCache</Property> <Property name="successMessage">ç¼åæ´æ°æåï¼</Property> </AjaxAction> <Trigger id="triggerMedia"> <ClientEvent name="onExecute">view.get("#dialogMeidaSelect").show();
 </ClientEvent> </Trigger> <Dialog id="dialogMeidaSelect" layout="vbox padding:10"> <Property name="width">650</Property> <Property name="caption">æµåªä½å°åéæ©</Property> <Buttons/> <Children> <Container> <Label> <Property name="text">海康RTSPï¼æ§ç-ä¸»ç æµï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text1"> <Property name="text">rtsp://{0}:{1}@{2}:{3}/h264/ch{4}/main/av_stream</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text1.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">海康RTSPï¼æ§ç-åç æµï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text2"> <Property name="text">rtsp://{0}:{1}@{2}:{3}/mpeg4/ch{4}/sub/av_stream</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text2.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">海康RTSPï¼æ°ç-ä¸»ç æµï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text3"> <Property name="text">rtsp://{0}:{1}@{2}:{3}/Streaming/Channels/{4}01</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text3.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">海康RTSPï¼æ°ç-åç æµï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text4"> <Property name="text">rtsp://{0}:{1}@{2}:{3}/Streaming/Channels/{4}02</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text4.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">大åRTSPï¼ä¸»ç æµï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text5"> <Property name="text">rtsp://{0}:{1}@{2}:{3}/cam/realmonitor?channel={4}&subtype=0</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text5.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">大åRTSPï¼è¾ ç æµï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text6"> <Property name="text">rtsp://{0}:{1}@{2}:{3}/cam/realmonitor?channel={4}&subtype=1</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text6.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">éè¿RTSPï¼ä¸»ç æµï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text7"> <Property name="text">rtsp://{2}:{3}/user={0}&password={1}&channel={4}&stream=0.sdp?real_stream</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text7.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">éè¿RTSPï¼æ¬¡ç æµï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text8"> <Property name="text">rtsp://{2}:{3}/user={0}&password={1}&channel={4}&stream=1.sdp?real_stream</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text8.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">䏿RTSPï¼é«ç çï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text9"> <Property name="text">rtsp://{0}:{1}@{2}:{3}/onvif/profile2/media.smp</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text9.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">䏿RTSPï¼ä½ç çï¼</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text10"> <Property name="text">rtsp://{0}:{1}@{2}:{3}/onvif/profile3/media.smp</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text10.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> <Container> <Label> <Property name="text">å®è§RTSP</Property> <Property name="style"> <Property name="font-weight">bold</Property> </Property> </Label> <Label id="text11"> <Property name="text">rtsp://{0}:{1}@{2}/media/video1/multicast</Property> </Label> <Button layoutConstraint="right"> <ClientEvent name="onClick">view.get("#mediaAddr").set("text",view.get("#text11.text"));
 view.get("#dialogMeidaSelect").hide();
 </ClientEvent> <Property name="caption">éæ©</Property> <Property name="iconClass">fa fa-check</Property> </Button> </Container> </Children> <Tools/> </Dialog> <AjaxAction id="ajaxRemoteMedia"> <Property name="confirmMessage">ç¡®å®è¦åæ¥ä¹ï¼</Property> <Property name="service">secCameraPR#flushByMedia</Property> </AjaxAction> </View> </ViewConfig> fzzy-igdss-view/src/main/java/com/fzzy/igds/SecCameraPR.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,183 @@ package com.fzzy.igds; import com.bstek.dorado.annotation.DataProvider; import com.bstek.dorado.annotation.DataResolver; import com.bstek.dorado.annotation.Expose; import com.bstek.dorado.data.provider.Page; import com.fzzy.igds.domain.Camera; import com.fzzy.igds.service.SecCameraService; import com.fzzy.igds.utils.ContextUtil; import com.ruoyi.common.utils.StringUtils; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; import org.springframework.data.jpa.domain.Specification; import org.springframework.stereotype.Component; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Predicate; import javax.persistence.criteria.Root; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * @Description * @Author CZT * @Date 2025/11/28 10:48 */ @Slf4j @Component public class SecCameraPR { @Autowired private SecCameraService secCameraService; /** * secCameraPR#listPageCamera æ ¹æ®æ¡ä»¶è·åææçæåæºé ç½®ä¿¡æ¯ * * @param param */ @DataProvider public void listPageCamera(Page<Camera> page, Map<String, Object> param) { org.springframework.data.domain.Page<Camera> japPage = pageCamera(page, param); page.setEntityCount((int) japPage.getTotalElements()); page.setEntities(japPage.getContent()); } public org.springframework.data.domain.Page<Camera> pageCamera(Page<Camera> page, Map<String, Object> param) { if (null == param) { param = new HashMap<>(); } Map<String, Object> finalParam = param; //å¤åæ°å页æ¥è¯¢ Pageable pageable = PageRequest.of(page.getPageNo() - 1, page.getPageSize(), Sort.Direction.ASC, Camera.SORT_PROP); Specification<Camera> specification = new Specification<Camera>() { private static final long serialVersionUID = 1L; public Predicate toPredicate(Root<Camera> root, CriteriaQuery<?> query, CriteriaBuilder cb) { List<Predicate> predicates = new ArrayList<Predicate>(); //ææçæè¨ Predicate predicate1 = cb.equal(root.get("companyId"), ContextUtil.getCompanyId()); predicates.add(predicate1); Predicate predicate2 = cb.equal(root.get("deptId"), ContextUtil.subDeptId(null)); predicates.add(predicate2); String key = (String) finalParam.get("bizType"); if (StringUtils.isNotEmpty(key)) { Predicate predicate3 = cb.equal(root.get("bizType"), key); predicates.add(predicate3); } key = (String) finalParam.get("name"); if (StringUtils.isNotEmpty(key)) { Predicate predicate4 = cb.like(root.get("name"), "%" + key + "%"); predicates.add(predicate4); } key = (String) finalParam.get("brand"); if (StringUtils.isNotEmpty(key)) { Predicate predicate5 = cb.equal(root.get("brand"), key); predicates.add(predicate5); } key = (String) finalParam.get("spjklx"); if (StringUtils.isNotEmpty(key)) { Predicate predicate5 = cb.equal(root.get("spjklx"), key); predicates.add(predicate5); } key = (String) finalParam.get("spdwlx"); if (StringUtils.isNotEmpty(key)) { Predicate predicate5 = cb.equal(root.get("spdwlx"), key); predicates.add(predicate5); } return cb.and(predicates.toArray(new Predicate[0])); } }; org.springframework.data.domain.Page<Camera> japPage = secCameraService.findAll(specification, pageable); return japPage; } /** * secCameraPR#listCamera è·åææçæåæºé ç½®ä¿¡æ¯ * ${dorado.getDataProvider("secCameraPR#listCamera").getResult()} * @return */ @DataProvider public List<Camera> listCamera() { return secCameraService.listCamera(); } /** * secCameraPR#saveCamera * * @param data */ @DataResolver public void saveCamera(Camera data) { Camera secCamera = new Camera(); BeanUtils.copyProperties(data, secCamera); secCameraService.saveCamera(secCamera); } /** * secCameraPR#delCamera * * @param data * @return */ @Expose public String delCamera(Camera data) { Camera secCamera = new Camera(); BeanUtils.copyProperties(data, secCamera); return secCameraService.delCamera(secCamera); } /*** * secCameraPR#refreshCache * @return */ @Expose public String refreshCache() { secCameraService.refreshCache(ContextUtil.getCompanyId()); return null; } /*** * securityPR#flushByMedia * * è·åæå头åè¡¨ä¿¡æ¯ * @return */ @Expose public String flushByMedia(String playType) { if (null == playType){ return "没æéæ©ææ¾æ¹å¼ï¼æ§è¡å¤±è´¥"; } // try { // if (CameraUtil.PLAY_TYPE_MEDIA_HIK.equals(playType)) { // ApiCameraData apiCameraData = new ApiCameraData(); // apiCameraData.setCompanyId(ContextUtil.getCompanyId()); // apiCameraData.setDeptId(ContextUtil.subDeptId(null)); // apiCameraData.setPlayType(playType); // List<SecCameraDto> list = apiCameraManager.getApiCameraService(playType).searchCamera(apiCameraData); // if(list == null){ // return "åæ¥å¤±è´¥ï¼"; // }else { // return "忥æåï¼"; // } // } return "å½åææ¾æ¹å¼æ²¡ææ¤åè½ï¼"; // // }catch (Exception e){ // log.error("-----忥æå头å表失败-----åå ={}", e.toString()); // return "è¿ç¨æ¥å£æå¡å¼å¸¸ï¼è¯·æ ¸æ¥åéè¯ï¼"; // } } } fzzy-igdss-view/src/main/java/models/core.model.xml
@@ -163,9 +163,9 @@ <Property></Property> <Property name="label">æå±ååº</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("deptPR#getData").getResult()}</Property> <Property name="keyProperty">deptId</Property> <Property name="valueProperty">deptName</Property> <Property name="mapValues">${dorado.getDataProvider("deptPR#getAllData").getResult()}</Property> <Property name="keyProperty">id</Property> <Property name="valueProperty">kqmc</Property> </Property> <Property name="readOnly">true</Property> </PropertyDef> @@ -433,4 +433,482 @@ <Property name="readOnly">true</Property> </PropertyDef> </DataType> <DataType name="dtDeviceSer"> <Property name="creationType">com.fzzy.igds.domain.DeviceSer</Property> <PropertyDef name="id"> <Property></Property> <Property name="label">åæºç¼ç </Property> </PropertyDef> <PropertyDef name="deptId"> <Property></Property> <Property name="label">æå±åºåº</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("deptPR#getAllData").getResult()}</Property> <Property name="keyProperty">id</Property> <Property name="valueProperty">kqmc</Property> </Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="companyId"> <Property></Property> <Property name="label">ç»ç»ç¼ç </Property> </PropertyDef> <PropertyDef name="sn"> <Property></Property> <Property name="label">åºåå·</Property> </PropertyDef> <PropertyDef name="name"> <Property></Property> <Property name="label">åæºåç§°</Property> </PropertyDef> <PropertyDef name="ip"> <Property></Property> <Property name="label">åæºIP</Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="port"> <Property name="dataType">Integer</Property> <Property name="label">åæºç«¯å£</Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="type"> <Property></Property> <Property name="label">åæºç±»å</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("SER_TYPE")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="status"> <Property></Property> <Property name="label">æ¯å¦å¨çº¿</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("sys_yes_no")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="controlModel"> <Property></Property> <Property name="label">æä½æ¨¡å¼</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#controlModel").getResult()}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="networkType"> <Property></Property> <Property name="label">ç½ç»æ¨¡å¼</Property> <Property name="mapping"> <Property name="mapValues"> <Collection> <Entity> <Property name="code">01</Property> <Property name="name">æçº¿æ¨¡å¼</Property> </Entity> <Entity> <Property name="code">02</Property> <Property name="name">æ 线模å¼</Property> </Entity> </Collection> </Property> <Property name="keyProperty">code</Property> <Property name="valueProperty">name</Property> </Property> <Property name="required">false</Property> </PropertyDef> <PropertyDef name="protocol"> <Property></Property> <Property name="label">åæºåè®®</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("PROTOCOL")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="isMoreDepot"> <Property></Property> <Property name="label">å¤ä»å¹¶å</Property> <Property name="mapping"> <Property name="mapValues"> <Collection> <Entity> <Property name="code">Y</Property> <Property name="name">æ¯</Property> </Entity> <Entity> <Property name="code">N</Property> <Property name="name">å¦</Property> </Entity> </Collection> </Property> <Property name="keyProperty">code</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="producer"> <Property></Property> <Property name="label">åååç§°</Property> </PropertyDef> <PropertyDef name="remark"> <Property></Property> <Property name="label">夿³¨</Property> </PropertyDef> <PropertyDef name="orderNum"> <Property name="dataType">Integer</Property> <Property name="label">顺åºå·</Property> </PropertyDef> <PropertyDef name="contactPhone"> <Property></Property> <Property name="label">èç³»çµè¯</Property> </PropertyDef> <PropertyDef name="powerModel"> <Property></Property> <Property name="label">ä¾çµæ¨¡å¼</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("POWER_TYPE")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="cableStart"> <Property name="dataType">int</Property> <Property name="label">å¼å§å</Property> </PropertyDef> <PropertyDef name="cableZ"> <Property name="dataType">int</Property> <Property name="label">å±é ç½®</Property> </PropertyDef> <PropertyDef name="cableY"> <Property name="dataType">int</Property> <Property name="label">è¡é ç½®</Property> </PropertyDef> <PropertyDef name="cableX"> <Property name="dataType">int</Property> <Property name="label">åé ç½®</Property> </PropertyDef> <PropertyDef name="cableType"> <Property></Property> <Property name="label">çµç¼ç±»å</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("CABLE_TYPE")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="cableFormat"> <Property></Property> <Property name="label">çµç¼å¶å¼</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("CABLE_FORMAT")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="orgId"> <Property></Property> <Property name="label">ç»ç»å·</Property> </PropertyDef> <PropertyDef name="createTime"> <Property name="dataType">DateTime</Property> <Property name="label">å建æ¶é´</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="createBy"> <Property></Property> <Property name="label">å建人</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="updateTime"> <Property name="dataType">DateTime</Property> <Property name="label">æ´æ°æ¶é´</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="updateBy"> <Property></Property> <Property name="label">æ´æ°äºº</Property> <Property name="readOnly">true</Property> </PropertyDef> </DataType> <DataType name="dtDeviceIot"> <Property name="creationType">com.fzzy.igds.domain.DeviceIot</Property> <PropertyDef name="id"> <Property></Property> <Property name="label">设å¤ç¼ç </Property> </PropertyDef> <PropertyDef name="deptId"> <Property></Property> <Property name="label">æå±åºåº</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("deptPR#getAllData").getResult()}</Property> <Property name="keyProperty">id</Property> <Property name="valueProperty">kqmc</Property> </Property> </PropertyDef> <PropertyDef name="companyId"> <Property></Property> <Property name="label">ç»ç»ç¼ç </Property> </PropertyDef> <PropertyDef name="depotId"> <Property></Property> <Property name="label">æå±ä»åº</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("depotPR#getAllCache").getResult()}</Property> <Property name="keyProperty">id</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="name"> <Property></Property> <Property name="label">åç§°</Property> </PropertyDef> <PropertyDef name="passCode"> <Property name="dataType">int</Property> <Property name="label">设å¤ç¼å·</Property> </PropertyDef> <PropertyDef name="serId"> <Property></Property> <Property name="label">æå±åæº</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("deviceSerPR#getAllSerCache").getResult()}</Property> <Property name="keyProperty">id</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="type"> <Property></Property> <Property name="label">设å¤ç±»å</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("DEVICE_IOT_TYPE")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="remark"> <Property></Property> <Property name="label">夿³¨</Property> </PropertyDef> <PropertyDef name="posX"> <Property name="dataType">Double</Property> <Property name="label">Xåæ </Property> </PropertyDef> <PropertyDef name="posY"> <Property name="dataType">Double</Property> <Property name="label">Yåæ </Property> </PropertyDef> <PropertyDef name="createTime"> <Property name="dataType">DateTime</Property> <Property name="label">å建æ¶é´</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="createBy"> <Property></Property> <Property name="label">å建人</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="updateTime"> <Property name="dataType">DateTime</Property> <Property name="label">æ´æ°æ¶é´</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="updateBy"> <Property></Property> <Property name="label">æ´æ°äºº</Property> <Property name="readOnly">true</Property> </PropertyDef> </DataType> <DataType name="dtDepotConf"> <Property name="creationType">com.fzzy.igds.domain.DepotConf</Property> <PropertyDef name="depotId"> <Property></Property> <Property name="label">æå±ä»åº</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("depotPR#getAllCache").getResult()}</Property> <Property name="keyProperty">id</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="deptId"> <Property></Property> <Property name="label">æå±åºåº</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("deptPR#getAllData").getResult()}</Property> <Property name="keyProperty">id</Property> <Property name="valueProperty">kqmc</Property> </Property> </PropertyDef> <PropertyDef name="companyId"> <Property></Property> <Property name="label">ç»ç»ç¼ç </Property> </PropertyDef> <PropertyDef name="grainSer"> <Property></Property> <Property name="label">ç²®æ åæº</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("deviceSerPR#getAllSerCache").getResult()}</Property> <Property name="keyProperty">id</Property> <Property name="valueProperty">name</Property> </Property> <Property name="required">true</Property> </PropertyDef> <PropertyDef name="thSer"> <Property></Property> <Property name="label">æ¸©æ¹¿åº¦åæº</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("deviceSerPR#getAllSerCache").getResult()}</Property> <Property name="keyProperty">id</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="grainFreq"> <Property></Property> <Property name="label">ä¿åé¢ç</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#sysDictData").getResult("GRAIN_FREQ")}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="thConf"> <Property></Property> <Property name="label">温湿度éé</Property> </PropertyDef> <PropertyDef name="cableRule"> <Property></Property> <Property name="label">å¸çº¿è§å</Property> </PropertyDef> <PropertyDef name="cableCir"> <Property></Property> <Property name="label">çä»å±è§å</Property> </PropertyDef> <PropertyDef name="cableCone"> <Property name="label">çä»é¥å½¢</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#triggerCableCone").getResult()}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="cableStart"> <Property name="dataType">int</Property> <Property name="label">çµç¼å¼å§å</Property> </PropertyDef> <PropertyDef name="cableEnd"> <Property name="dataType">int</Property> <Property name="label">çµç¼æªè³å</Property> </PropertyDef> <PropertyDef name="startOrientation"> <Property></Property> <Property name="label">çµç¼èµ·å§æ¹ä½</Property> <Property name="mapping"> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> <Property name="mapValues">${dorado.getDataProvider("dicPR#triggerStartOrientation").getResult()}</Property> </Property> </PropertyDef> <PropertyDef name="startDirection"> <Property name="label">çµç¼å¸çº¿æ¹å</Property> <Property name="mapping"> <Property name="mapValues">${dorado.getDataProvider("dicPR#triggerStartDirection").getResult()}</Property> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> </Property> </PropertyDef> <PropertyDef name="startPoint"> <Property name="label">çµç¼èµ·å§ç¹ä½</Property> <Property name="mapping"> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> <Property name="mapValues">${dorado.getDataProvider("dicPR#triggerStartPoint").getResult()}</Property> </Property> </PropertyDef> <PropertyDef name="startConvert"> <Property name="label">å±è¡è½¬æ¢</Property> <Property name="mapping"> <Property name="keyProperty">dictValue</Property> <Property name="valueProperty">dictLabel</Property> <Property name="mapValues">${dorado.getDataProvider("dicPR#triggerStartConvert").getResult()}</Property> </Property> </PropertyDef> <PropertyDef name="tempMax"> <Property name="dataType">Double</Property> <Property name="label">温度ä¸é</Property> </PropertyDef> <PropertyDef name="temperature"> <Property name="dataType">Double</Property> <Property name="label">温差éå¼</Property> </PropertyDef> <PropertyDef name="startRow"> <Property name="dataType">Integer</Property> <Property name="label">èµ·å§æ ¹å·</Property> </PropertyDef> <PropertyDef name="grainAuto"> <Property></Property> <Property name="label">ç²®æ ä¼å</Property> <Property name="mapping"> <Property name="mapValues"> <Collection> <Entity> <Property name="code">Y</Property> <Property name="name">æ¯</Property> </Entity> <Entity> <Property name="code">N</Property> <Property name="name">å¦</Property> </Entity> </Collection> </Property> <Property name="keyProperty">code</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="depotName"> <Property></Property> </PropertyDef> <PropertyDef name="depotType"> <Property></Property> </PropertyDef> <PropertyDef name="isOnlyTH"> <Property></Property> <Property name="label">ç²®æ ç±»å</Property> <Property name="mapping"> <Property name="mapValues"> <Collection> <Entity> <Property name="code">Y</Property> <Property name="name">温湿度设å¤</Property> </Entity> <Entity> <Property name="code">N</Property> <Property name="name">ç²®æ çµç¼</Property> </Entity> </Collection> </Property> <Property name="keyProperty">code</Property> <Property name="valueProperty">name</Property> </Property> </PropertyDef> <PropertyDef name="createTime"> <Property name="dataType">DateTime</Property> <Property name="label">å建æ¶é´</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="createBy"> <Property></Property> <Property name="label">å建人</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="updateTime"> <Property name="dataType">DateTime</Property> <Property name="label">æ´æ°æ¶é´</Property> <Property name="readOnly">true</Property> </PropertyDef> <PropertyDef name="updateBy"> <Property></Property> <Property name="label">æ´æ°äºº</Property> <Property name="readOnly">true</Property> </PropertyDef> </DataType> </Model>