czt
2025-05-29 753abfcaf090f79a4226693c2829a2d47b422058
增加后台管理功能,及基础信息页面
已添加132个文件
已修改4个文件
13098 ■■■■■ 文件已修改
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/AiSerType.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/AreationConst.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/AreationModel.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/AuditStatus.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/BizType.java 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/CameraPlayType.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/CameraSnapType.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/Constant.java 219 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/ControlModel.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/DepotStatus.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/DepotType.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/DeviceIotType.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/DeviceLocation.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/DeviceSerType.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/DeviceStatus.java 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/DeviceType.java 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/FoodLevel.java 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/FoodType.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/FoodVariety.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/GrainAnalysisModel.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/GrainFrequence.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/InoutConstant.java 265 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/ModbusConstant.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/N2ModelTag.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/NoticeType.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/OrderRespEnum.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/ProtocolEnum.java 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/RedisConst.java 228 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/RespCodeEnum.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/TransType.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/WarnLevel.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/WarnStatus.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/WarnType.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/data/BaseParam.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/data/GrainData.java 121 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/data/GrainIotData.java 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/data/GrainLay.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/data/GrainPoint.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/data/GrainRow.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/data/Page.java 97 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/Building.java 112 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/CheckItem.java 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/CheckItemKey.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/Company.java 155 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/Depot.java 219 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/DepotStatusConfirm.java 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/DepotStore.java 170 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/Dept.java 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/DicArea.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/Grain.java 114 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/GrainKey.java 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/Granary.java 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/MQuality.java 173 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/BuildingService.java 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/CoreCompanyService.java 92 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/CoreDeptService.java 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/DepotService.java 300 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/DepotStatusConfirmService.java 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/DepotStoreService.java 129 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/DicAreaService.java 124 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/DicService.java 471 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/GranaryService.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/SysDeptService.java 140 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/SysUserService.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/mapper/DicAreaMapper.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/repository/BuildingRepository.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/repository/CompanyRepository.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/repository/DepotRepository.java 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/repository/DepotStatusConfirmRepository.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/repository/DepotStoreRepository.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/repository/DeptRepository.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/repository/DicAreaRepository.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/repository/GranaryRepository.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/util/ContextUtil.java 380 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/util/WeatherUtil.java 52 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/resources/mapper/DicAreaMapper.xml 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/Building.view.xml 503 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/Company.view.xml 607 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/Depot.view.xml 804 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/Dept.view.xml 440 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/DicArea.view.xml 285 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/Granary.view.xml 318 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/BuildingPR.java 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/CompanyPR.java 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/DepotPR.java 115 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/DepotStatusConfirmPR.java 123 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/DepotStorePR.java 163 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/DeptPR.java 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/DicAreaPR.java 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/DicPR.java 338 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/GranaryPR.java 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/SysUserPR.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-view/src/main/java/models/igds.model.xml 416 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/java/com/fzzy/sys/controller/SysIndexController.java 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/dzhwk/sys.css 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/dzhwk/welcome/welcome.css 134 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/sys/a1-1.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/sys/a1.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/n2-zn.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/se-conf.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/se-fk.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/se-jk.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/se-mj.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/se-rq.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/sys-depot.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/sys-device.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/sys-grain.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/sys-url.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/sys-user.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/sys-warn.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/temp-control.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/temp-log.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/temp-mode.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/title-n2.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/title-online.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/title-security.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/title-sys.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/title-zhgl.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/wel-bg1.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/wel-bg2.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/wel-bg3.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/wel-bg4.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/wel-bg5.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/wel-body_03.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/wel-tit.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/zhgl-ht.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/zhgl-jh.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/zhgl-kh.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/zhgl-xz.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/zhgl-zc.png 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/static/ruoyi/home.js 671 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/templates/dzhwk/sys.html 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/templates/dzhwk/welcome.html 92 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/templates/home-static.html 416 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/templates/home-topnav.html 447 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-web/src/main/resources/templates/home.html 304 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/AiSerType.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,36 @@
package com.fzzy.igds.dzhwk.constant;
/**
 *
 */
public enum AiSerType {
    TYPE_01("01", "01-AI服务器"),
    TYPE_02("02", "02-AI摄像头"),
    TYPE_99("99", "99-独立终端");
    private String code;
    private String msg;
    AiSerType(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public String getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
    public static String getMsg(String code) {
        if (null == code) return null;
        if (DeviceSerType.TYPE_01.getCode().equals(code)) return DeviceSerType.TYPE_01.getMsg();
        if (DeviceSerType.TYPE_02.getCode().equals(code)) return DeviceSerType.TYPE_02.getMsg();
        return DeviceSerType.TYPE_99.getMsg();
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/AreationConst.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,32 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * @Description
 * @Author CZT
 * @Date 2024/12/24 10:05
 */
public class AreationConst {
    /** æ‰‹åŠ¨æ¨¡å¼æ‰§è¡Œæ¨¡å¼ 01 = ç³»ç»Ÿæ‰§è¡Œ **/
    public static String EXE_MODE_01 = "01";
    /** æ‰‹åŠ¨æ¨¡å¼æ‰§è¡Œæ¨¡å¼ 02 = ç»ˆç«¯æ‰§è¡Œ **/
    public static String EXE_MODE_02 = "02";
    /**
     * æ™ºèƒ½ä»»åŠ¡çŠ¶æ€-运行中
     */
    public static String ARESTION_TASK_RUN = "01";
    /**
     * æ™ºèƒ½ä»»åŠ¡çŠ¶æ€-停止
     */
    public static String ARESTION_TASK_STOP = "02";
    /**
     * æ™ºèƒ½ä»»åŠ¡çŠ¶æ€-超时无效
     */
    public static String ARESTION_TASK_NOUSE = "03";
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/AreationModel.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,30 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * é€šé£Žæ¨¡å¼æžšä¸¾
 */
public enum AreationModel {
    MODEL_01("01", "降温通风"),
    MODEL_02("02", "自然通风"),
    MODEL_03("03", "保水降温通风"),
    MODEL_04("04", "除湿通风"),
    MODEL_05("05", "排积热通风"),
    MODEL_99("99", "自定义模式");
    private String code;
    private String msg;
    AreationModel(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public String getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/AuditStatus.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,51 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * å·¥å•状态
 * @author chen
 *
 */
public enum AuditStatus {
    Status_10("10", "待审核"),
    Status_11("11", "待仓储审核"),
    Status_12("12", "待质检审核"),
    Status_13("13", "待统计审核"),
    Status_14("14", "待会计审核"),
    Status_15("15", "待领导审核"),
    Status_20("20", "通过"),
    Status_30("30", "拒绝"),
    Status_40("40", "退回");
    private String code;
    private String msg;
    AuditStatus(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public String getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
    public static String getMsg(String code) {
        if(null == code) return null;
        if(AuditStatus.Status_10.getCode().equals(code)) return AuditStatus.Status_10.getMsg();
        if(AuditStatus.Status_11.getCode().equals(code)) return AuditStatus.Status_11.getMsg();
        if(AuditStatus.Status_12.getCode().equals(code)) return AuditStatus.Status_12.getMsg();
        if(AuditStatus.Status_13.getCode().equals(code)) return AuditStatus.Status_13.getMsg();
        if(AuditStatus.Status_14.getCode().equals(code)) return AuditStatus.Status_14.getMsg();
        if(AuditStatus.Status_15.getCode().equals(code)) return AuditStatus.Status_15.getMsg();
        if(AuditStatus.Status_20.getCode().equals(code)) return AuditStatus.Status_20.getMsg();
        if(AuditStatus.Status_30.getCode().equals(code)) return AuditStatus.Status_30.getMsg();
        if(AuditStatus.Status_40.getCode().equals(code)) return AuditStatus.Status_40.getMsg();
        return "";
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/BizType.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,66 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * æ•´ä¸ªç³»ç»Ÿçš„业务分类
 *
 * //    PRESSURE("pressure", "气压检测"),
 */
public enum BizType {
    GRAIN("grain", "粮情模块"),
    PEST("pest", "虫害模块"),
    GAS("gas", "气体模块"),
    AREATION("areation", "通风模块"),
    DEVICE_CONTROL("deviceControl", "设备操作"),
    N2("n2", "气调模块"),
    INOUT_IN("intou_in", "入库"),
    INOUT_OUT("intou_out", "出库"),
    TEMPCONTROL("temp", "环流控温"),
    WEATHER("weather", "气象站模块"),
    ES("es", "能耗模块"),
    SECURITY("security", "安防模块"),
    SYS("sys", "系统服务"),
    QUANTITY("quantity", "数量监管"),
    WARN("warn", "预警分析"),
    SCREEN("screen", "大屏模块"),
    SCREEN_INOUT("screen_inout", "出入库大屏模块"),
    SCREEN_CHECK("screen_check", "化验大屏模块");
    private String code;
    private String msg;
    private BizType(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public String getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
    public static String getMsg(String code) {
        if(null == code) return null;
        if(BizType.GRAIN.getCode().equals(code)) return BizType.GRAIN.getMsg();
        if(BizType.PEST.getCode().equals(code)) return BizType.PEST.getMsg();
        if(BizType.GAS.getCode().equals(code)) return BizType.GAS.getMsg();
        if(BizType.AREATION.getCode().equals(code)) return BizType.AREATION.getMsg();
        if(BizType.N2.getCode().equals(code)) return BizType.N2.getMsg();
        if(BizType.INOUT_IN.getCode().equals(code)) return BizType.INOUT_IN.getMsg();
        if(BizType.INOUT_OUT.getCode().equals(code)) return BizType.INOUT_OUT.getMsg();
        if(BizType.TEMPCONTROL.getCode().equals(code)) return BizType.TEMPCONTROL.getMsg();
        if(BizType.WEATHER.getCode().equals(code)) return BizType.WEATHER.getMsg();
        if(BizType.ES.getCode().equals(code)) return BizType.ES.getMsg();
        if(BizType.SECURITY.getCode().equals(code)) return BizType.SECURITY.getMsg();
        if(BizType.SYS.getCode().equals(code)) return BizType.SYS.getMsg();
        if(BizType.QUANTITY.getCode().equals(code)) return BizType.QUANTITY.getMsg();
        if(BizType.WARN.getCode().equals(code)) return BizType.WARN.getMsg();
        if(BizType.SCREEN.getCode().equals(code)) return BizType.SCREEN.getMsg();
        if(BizType.SCREEN_INOUT.getCode().equals(code)) return BizType.SCREEN_INOUT.getMsg();
        if(BizType.SCREEN_CHECK.getCode().equals(code)) return BizType.SCREEN_CHECK.getMsg();
        return code;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/CameraPlayType.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,49 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * @Description æŠ“拍方式
 * @Author CZT
 * @Date 2024/12/10 16:48
 */
public enum CameraPlayType {
    PLAY_TYPE_DEFAULT("DEFAULT", "系统默认"),
    PLAY_TYPE_WEB_RTC_DH("WEB_RTC_DH", "WEB-RTC-大华"),
    PLAY_TYPE_WEB_RTC_HIK("WEB_RTC_HIK", "WEB-RTC-海康"),
    PLAY_TYPE_HIK_WEB_WS("HIK_WEB_WS", "海康web无插件"),
    PLAY_TYPE_DH_WEB_WS("DH_WEB_WS", "大华web无插件"),
    PLAY_TYPE_VLC("VLC", "VLC插件"),
    PLAY_TYPE_HIK_WEB4("HIK_WEB4", "海康web插件"),
    PLAY_TYPE_HIK_MEDIA("MEDIA_HIK", "海康综合安防平台");
    private String code;
    private String name;
    private CameraPlayType(String code, String name) {
        this.code = code;
        this.name = name;
    }
    public String getCode() {
        return code;
    }
    public String getName() {
        return name;
    }
    public static String getName(String code){
        if(null == code) {
            return null;
        }
        if(CameraPlayType.PLAY_TYPE_DEFAULT.getCode().equals(code)) return CameraPlayType.PLAY_TYPE_DEFAULT.getName();
        if(CameraPlayType.PLAY_TYPE_WEB_RTC_DH.getCode().equals(code)) return CameraPlayType.PLAY_TYPE_WEB_RTC_DH.getName();
        if(CameraPlayType.PLAY_TYPE_WEB_RTC_HIK.getCode().equals(code)) return CameraPlayType.PLAY_TYPE_WEB_RTC_HIK.getName();
        if(CameraPlayType.PLAY_TYPE_HIK_WEB_WS.getCode().equals(code)) return CameraPlayType.PLAY_TYPE_HIK_WEB_WS.getName();
        if(CameraPlayType.PLAY_TYPE_DH_WEB_WS.getCode().equals(code)) return CameraPlayType.PLAY_TYPE_DH_WEB_WS.getName();
        if(CameraPlayType.PLAY_TYPE_VLC.getCode().equals(code)) return CameraPlayType.PLAY_TYPE_VLC.getName();
        if(CameraPlayType.PLAY_TYPE_HIK_WEB4.getCode().equals(code)) return CameraPlayType.PLAY_TYPE_HIK_WEB4.getName();
        if(CameraPlayType.PLAY_TYPE_HIK_MEDIA.getCode().equals(code)) return CameraPlayType.PLAY_TYPE_HIK_MEDIA.getName();
        return code;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/CameraSnapType.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,38 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * @Description æŠ“拍方式
 * @Author CZT
 * @Date 2024/12/10 16:38
 */
public enum CameraSnapType {
    SNAP_TYPE_FZZY_PLUGIN("FZZY-PLUGIN", "风正致远插件抓拍"),
    SNAP_TYPE_MEDIA("MEDIA", "流媒体"),
    SNAP_TYPE_OPEN_API("OPEN_API", "风正致远API抓拍");
    private String code;
    private String msg;
    private CameraSnapType(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public String getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
    public static String getMsg(String code) {
        if (null == code) return null;
        if (CameraSnapType.SNAP_TYPE_FZZY_PLUGIN.getCode().equals(code))
            return CameraSnapType.SNAP_TYPE_FZZY_PLUGIN.getMsg();
        if (CameraSnapType.SNAP_TYPE_MEDIA.getCode().equals(code)) return CameraSnapType.SNAP_TYPE_MEDIA.getMsg();
        if (CameraSnapType.SNAP_TYPE_OPEN_API.getCode().equals(code)) return CameraSnapType.SNAP_TYPE_OPEN_API.getMsg();
        return code;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/Constant.java
@@ -1,6 +1,225 @@
package com.fzzy.igds.dzhwk.constant;
import java.util.HashMap;
import java.util.Map;
public class Constant {
    /**
     * ç”¨äºŽå­˜æ”¾ç²®é£Ÿå“ç§code -name
     */
    public static Map<String, String> mapFoodVariety = new HashMap<>();
    /**
     * ç”¨äºŽå­˜æ”¾ç²®ç±»åž‹code -name
     */
    public static Map<String, String> mapFoodType = new HashMap<>();
    /**
     * åˆå§‹åŒ–存放流程各个环节的名称,名称通过更新字典表的时候同步
     */
    public static Map<String,String> mapProgressName = new HashMap<>();
    public static final String MODEL_DZHWK = "dzhwk";// ç³»ç»Ÿæ¨¡å—标记-电子货位卡
    /**
     * éƒ¨é—¨ç±»åž‹
     */
    public static String DEPT_TYPE_10 = "10";  //公司
    public static String DEPT_TYPE_20 = "20";  //库区
    public static String DEPT_TYPE_30 = "30";  //部门
    //-粮温备用点
    public static final double ERROR_TEMP = -100;
    //-粮温故障点
    public static final double FAULT_TEMP = -101;
    //-粮温补偿点-针对锥形仓补点使用
    public static final double ADD_TEMP = -102;
    public static final String EMPTY = "NULL";
    // ç”¨äºŽæŠ¥æ–‡ä¸­çš„TAG标签识别,表示分库名称
    public static final String TAG_SUB_NAME = "SUB_NAME";
    /**
     * è¿ç®—符
     */
    public static final String OPERA_LE = "<=";
    /**
     * è¿ç®—符
     */
    public static final String OPERA_GE = ">=";
    /**
     * ç³»ç»Ÿåç§°
     */
    public static final String APP_NAME = "igds";
    public static final String MODEL_GRAIN = "grain";// ç³»ç»Ÿæ¨¡å—标记-粮情管理
    public static final String MODEL_VERB = "verb";// ç³»ç»Ÿæ¨¡å—标记-通风管理
    public static final String MODEL_N2 = "n2";// ç³»ç»Ÿæ¨¡å—标记-气调管理
    public static final String MODEL_TEMP = "temp";// ç³»ç»Ÿæ¨¡å—标记-内环流温控
    public static final String MODEL_HLXZ = "hlxz";// çŽ¯æµç†è’¸
    public static final String MODEL_QUANTITY = "quantity";// ç³»ç»Ÿæ¨¡å—标记-数量检测
    public static final String MODEL_INOUT = "inout";// ç³»ç»Ÿæ¨¡å—标记-出入库管理
    public static final String MODEL_MANAGER = "manager";// ç³»ç»Ÿæ¨¡å—标记-综合业务
    public static final String MODEL_SECURITY = "security";// ç³»ç»Ÿæ¨¡å—标记-安防管理
    public static final String MODEL_ES = "es";// ç³»ç»Ÿæ¨¡å—标记-能耗管理
    public static final String MODEL_SYS = "sys";// ç³»ç»Ÿæ¨¡å—标记-系统管理
    public static final String MODEL_WARN = "warn";// ç³»ç»Ÿæ¨¡å—标记-通用模块
    public static final String MODEL_COMMON = "common";// ç³»ç»Ÿæ¨¡å—标记-通用模块
    public static final String MODEL_GROUP = "group";// ç³»ç»Ÿæ¨¡å—标记-监管
    /**
     * é»˜è®¤é¡¶çº§èŠ‚ç‚¹ç¼–ç 
     */
    public static final String DEFAULT_PARENT_CODE = "0";
    public static final String DEFAULT_DEPT_ID = "0000";
    public static final String SYS_USER = "SYS";
    public static final String YN_Y = "Y";
    public static final String YN_N = "N";
    public static final String YN_E = "E";//代表错误;
    public static final int TR_TRUE = 1;
    public static final int TR_FALSE = 0;
    public static final String NETWORK_01 = "01";// æœ‰çº¿æ¨¡å¼
    public static final String NETWORK_02 = "02";// æ— çº¿æ¨¡å¼
    public static final String MODEL_KEY_LOGIN_USER = "loginUser";
    public static final String MODEL_KEY_DEFAULT_COMPANY = "company";
    public static final String MODEL_KEY_DEPT_ID = "deptId";// æ‰€å±žåˆ†åº“
    // ä»“库列表
    public static final String MODEL_KEY_DEPOT_LIST = "listDepot";
    public static final String MODEL_KEY_BIZ_TYPE = "bizType";
    // ç²®æƒ…列表
    public static final String MODEL_KEY_GRAIN_MAP = "mapGrain";
    // æ°”体列表
    public static final String MODEL_KEY_GAS_MAP = "mapGas";
    /**
     * å®šæ—¶ç±»åž‹-每天执行
     */
    public static final String TIM_TYPE_DAY = "day";
    /**
     * å®šæ—¶ç±»åž‹-每周
     */
    public static final String TIM_TYPE_WEEK = "week";
    /**
     * å®šæ—¶ç±»åž‹-指定具体小时时间
     */
    public static final String TIM_TYPE_HOUR = "hour";
    /**
     * æ¯å¤© H点 M分 æ‰§è¡Œè¡¨è¾¾å¼
     */
    public static final String CRON_DAY = "0 M H ? * *";
    /**
     * æ¯å‘¨W H点 M分 æ‰§è¡Œè¡¨è¾¾å¼
     */
    public static final String CRON_WEEK = "0 M H ? * W";
    /**
     * å…·ä½“某个时间点-每年
     */
    public static final String CRON_HOUR = "S M H D & ?";
    /**
     * ä¸‹æ‹‰æ¡†ç‰¹æ®Šçˆ¶ç¼–码 -通风目的
     */
    public static final String TRIGGER_PARENT_AREATION_TARGIT = "AREATION_TARGIT";
    // å­—å…¸-粮食等级
    public static final String TRIGGER_PARENT_FOOD_LEVEL = "FOOD_LEVEL_";
    // å­—å…¸-粮食品种
    public static final String TRIGGER_PARENT_FOOD_VARIETY = "FOOD_VARIETY_";
    // å­—å…¸-粮食类型
    public static final String TRIGGER_PARENT_FOOD_TYPE = "FOOD_TYPE_";
    /**
     * é£Žæ­£è‡´è¿œçš„视频协议定义
     */
    public static final String PROTOCOL_VIDEO_FZZY = "PROTOCOL_VIDEO_FZZY";
    // å­—å…¸-出入库流程
    public static final String TRIGGER_PARENT_PROCESS_STATUS = "PROCESS_STATUS_";
    /**
     * ç²®æƒ…检测定时器
     */
    public static final String JOB_BEAN_GRAIN = "JobGrainService";
    /**
     * ç²®æƒ…检测定时器
     */
    public static final String JOB_BEAN_GAS = "JobGasService";
    /**
     * ç²®æƒ…检测定时器
     */
    public static final String JOB_BEAN_PEST = "JobPestService";
    /**
     * ç…§æ˜ŽæŽ§åˆ¶å®šæ—¶å™¨
     */
    public static final String JOB_BEAN_LAMP = "JobLampService";
    /**
     * ç©ºè°ƒæŽ§åˆ¶å®šæ—¶å™¨
     */
    public static final String JOB_BEAN_TEMP = "JobTempService";
    /**
     * åˆ†æœºåœ¨ä½¿ç”¨ä¸­çš„状态,例如:通风中、气体采集中、虫害采集中等
     */
    public static String STATUS_SER_RUN = "RUN";
    /**
     * æŸæº¢ç±»åž‹-损耗
     */
    public static final String LOSS_OVER_LOSS = "LOSS";
    /**
     * æŸæº¢ç±»åž‹-溢出
     */
    public static final String LOSS_OVER_OVER = "OVER";
    /**
     * ç²®æƒ…电缆起始方位(默认右边)
     */
    public static final String GRAIN_START_ORIENTATION_RIGHT = "right"; //右边
    public static final String GRAIN_START_ORIENTATION_RIGHT_UP = "right-up"; //右上
    public static final String GRAIN_START_ORIENTATION_LEFT = "left";  //左边
    public static final String GRAIN_START_ORIENTATION_LEFT_UP = "left-up";  //左上
    /**
     * ç²®æƒ…电缆布线方向(默认纵向)
     */
    public static final String GRAIN_START_DIRECTION_PORTRAIT = "portrait";  //纵向
    public static final String GRAIN_START_DIRECTION_TRANSVERSE = "transverse";  //横向
    /**
     * ç²®æƒ…电缆起始点位(默认顶部)
     */
    public static final String GRAIN_START_POINT_TOP = "top";    //顶部
    public static final String GRAIN_START_POINT_BELOW = "below";  //底部
    /**
     * è¡Œå±‚转换(默认不转换)
     */
    public static final String GRAIN_CONVERT_DEFAULT = "default";    //默认
    public static final String GRAIN_CONVERT_CLOCKWISE = "clockwise";    //顺时针
    public static final String GRAIN_CONVERT_ANTICLOCKWISE = "anticlockwise";  //逆时针
    //筒仓锥形-无验证
    public static final String CABLE_CONE_0 = "0";
    //筒仓锥形-上锥形
    public static final String CABLE_CONE_1 = "1";
    //筒仓锥形-下锥形
    public static final String CABLE_CONE_2 = "2";
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/ControlModel.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,26 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * æŽ§åˆ¶æŸœæ“ä½œæ¨¡å¼
 */
public enum ControlModel {
    MODEL_01("01", "本地模式"), MODEL_02("02", "远程模式");
    private String code;
    private String msg;
    ControlModel(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public String getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/DepotStatus.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,62 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * ä»“库状态枚举
 */
public enum DepotStatus {
    STATUS_1("1", "空仓"),
    STATUS_2("2", "入库中"),
    STATUS_3("3", "封仓"),
    STATUS_31("31", "封仓-气调中"),
    STATUS_32("32", "封仓-熏蒸中"),
    STATUS_33("33", "封仓-通风中"),
    STATUS_34("34", "封仓-温控中"),
    STATUS_4("4", "出库中"),
    STATUS_9("9", "其他");
    private String code;
    private String msg;
    DepotStatus(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public String getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
    public static String getMsg(String code) {
        if (null == code) return null;
        if (DepotStatus.STATUS_1.getCode().equals(code)) return DepotStatus.STATUS_1.getMsg();
        if (DepotStatus.STATUS_2.getCode().equals(code)) return DepotStatus.STATUS_2.getMsg();
        if (DepotStatus.STATUS_3.getCode().equals(code)) return DepotStatus.STATUS_3.getMsg();
        if (DepotStatus.STATUS_4.getCode().equals(code)) return DepotStatus.STATUS_4.getMsg();
        if (DepotStatus.STATUS_31.getCode().equals(code)) return DepotStatus.STATUS_31.getMsg();
        if (DepotStatus.STATUS_32.getCode().equals(code)) return DepotStatus.STATUS_32.getMsg();
        if (DepotStatus.STATUS_33.getCode().equals(code)) return DepotStatus.STATUS_33.getMsg();
        if (DepotStatus.STATUS_34.getCode().equals(code)) return DepotStatus.STATUS_34.getMsg();
        return DepotStatus.STATUS_9.getMsg();
    }
    public static String getGBCode(String code) {
        if (null == code) DepotStatus.STATUS_9.getCode();
        if (DepotStatus.STATUS_31.equals(code)) return DepotStatus.STATUS_3.getCode();
        if (DepotStatus.STATUS_32.equals(code)) return DepotStatus.STATUS_3.getCode();
        if (DepotStatus.STATUS_33.equals(code)) return DepotStatus.STATUS_3.getCode();
        if (DepotStatus.STATUS_34.equals(code)) return DepotStatus.STATUS_3.getCode();
        return code;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/DepotType.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,49 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * ä»“库类型,针对当前系统所支持的仓房类型,非国标类型
 *
 * @author jiazx
 */
public enum DepotType {
    TYPE_01("01", "平房仓"),
    TYPE_02("02", "浅圆仓"),
    TYPE_03("03", "储油罐"),
    TYPE_04("04", "立筒仓"),
    TYPE_05("05", "楼房仓"),
    TYPE_99("99", "其他");
    private String code;
    private String msg;
    DepotType(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public String getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
    public static String getMsg(String code) {
        if (null == code) return null;
        if (DepotType.TYPE_01.getCode().equals(code)) return DepotType.TYPE_01.getMsg();
        if (DepotType.TYPE_02.getCode().equals(code)) return DepotType.TYPE_02.getMsg();
        if (DepotType.TYPE_03.getCode().equals(code)) return DepotType.TYPE_03.getMsg();
        if (DepotType.TYPE_04.getCode().equals(code)) return DepotType.TYPE_04.getMsg();
        if (DepotType.TYPE_05.getCode().equals(code)) return DepotType.TYPE_05.getMsg();
        return TYPE_99.getMsg();
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/DeviceIotType.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,34 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * ç‰©è”网拓展设备类型枚举类
 */
public enum DeviceIotType {
    TYPE_01("01", "01-温湿度"),
    TYPE_02("02", "02-液位计");
    private String code;
    private String msg;
    DeviceIotType(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public String getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
    public static String getMsg(String code) {
        if(null == code) return null;
        if(DeviceIotType.TYPE_01.getCode().equals(code)) return DeviceIotType.TYPE_01.getMsg();
        if(DeviceIotType.TYPE_02.getCode().equals(code)) return DeviceIotType.TYPE_02.getMsg();
        return "其他";
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/DeviceLocation.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,39 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * è®¾å¤‡ä½ç½®
 */
public enum DeviceLocation {
    L_01("01", "01-正面"),
    L_02("02", "02-背面"),
    L_03("03", "03-左侧"),
    L_04("04", "04-右侧"),
    L_05("05", "05-仓内");
    private String code;
    private String msg;
    DeviceLocation(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public String getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
    public static String getMsg(String code) {
        if (null == code) return null;
        if (DeviceLocation.L_01.getCode().equals(code)) return DeviceLocation.L_01.getMsg();
        if (DeviceLocation.L_02.getCode().equals(code)) return DeviceLocation.L_02.getMsg();
        if (DeviceLocation.L_03.getCode().equals(code)) return DeviceLocation.L_03.getMsg();
        if (DeviceLocation.L_04.getCode().equals(code)) return DeviceLocation.L_04.getMsg();
        if (DeviceLocation.L_05.getCode().equals(code)) return DeviceLocation.L_05.getMsg();
        return "未配置";
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/DeviceSerType.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,37 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * åˆ†æœºç±»åž‹ï¼šå…¶ä¸­ç‹¬ç«‹ç»ˆç«¯åŒ…括:独立终端(地磅、扦样机、车牌识别、化验设备、库区气象站、智能终端、制氮机等)
 */
public enum DeviceSerType {
    TYPE_01("01", "01-综合控制柜"),
    TYPE_02("02", "02-独立粮情分机"),
    TYPE_03("03", "02-独立通风分机"),
    TYPE_99("99", "99-独立终端");
    private String code;
    private String msg;
    DeviceSerType(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public String getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
    public static String getMsg(String code) {
        if (null == code) return null;
        if (DeviceSerType.TYPE_01.getCode().equals(code)) return DeviceSerType.TYPE_01.getMsg();
        if (DeviceSerType.TYPE_02.getCode().equals(code)) return DeviceSerType.TYPE_02.getMsg();
        return DeviceSerType.TYPE_99.getMsg();
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/DeviceStatus.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,137 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * è®¾å¤‡çŠ¶æ€æžšä¸¾
 */
public enum DeviceStatus {
    // é»˜è®¤ç±»
    CLOSE("CLOSE", "关闭"), OPEN("OPEN", "打开"),
    // é£Žæœºç±»è®¾å¤‡çŠ¶æ€
    W_CLOSE("W_CLOSE", "风口关"), W_OPEN("W_OPEN", "风口开"), F_OPEN("F_OPEN", "风机正转"), F_OPEN_F(
            "F_OPEN_F", "风机反转"), F_CLOSE("F_CLOSE", "风机关"), ERROR("ERROR", "故障"), ZERO(
            "ZERO", "无操作");
    private String code;
    private String msg;
    DeviceStatus(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public String getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
    public static String getDeviceStatus(String code) {
        if (null == code)
            return "";
        if (DeviceStatus.CLOSE.getCode().equals(code)) {
            return DeviceStatus.CLOSE.getMsg();
        }
        if (DeviceStatus.F_CLOSE.getCode().equals(code)) {
            return DeviceStatus.F_CLOSE.getMsg();
        }
        if (DeviceStatus.F_OPEN.getCode().equals(code)) {
            return DeviceStatus.F_OPEN.getMsg();
        }
        if (DeviceStatus.OPEN.getCode().equals(code)) {
            return DeviceStatus.OPEN.getMsg();
        }
        if (DeviceStatus.W_CLOSE.getCode().equals(code)) {
            return DeviceStatus.W_CLOSE.getMsg();
        }
        if (DeviceStatus.W_OPEN.getCode().equals(code)) {
            return DeviceStatus.W_OPEN.getMsg();
        }
        return "";
    }
    /**
     * æ ¹æ®å½“前通道状态和关联状态获取实际的设备状态
     *
     * @param status
     * @param linkStatus
     * @param deviceType
     * @return
     */
    public static String getStatus(String status, String linkStatus,
            String deviceType) {
        if (null == status || Constant.EMPTY.equalsIgnoreCase(status))
            status = ERROR.code;
        if(null == linkStatus) linkStatus = Constant.EMPTY;
        // if (null == linkStatus ||
        // Constant.EMPTY.equalsIgnoreCase(linkStatus)){
        // linkStatus = ERROR.code;
        // }
        //只有轴流风机和混流风机才考虑关联设备,其他忽略关联
        if(!DeviceType.TYPE_0C.getCode().equals(deviceType) && !DeviceType.TYPE_02.getCode().equals(deviceType)){
            linkStatus = null;
        }
        if (ERROR.code.equals(status) && OPEN.getCode().equals(linkStatus)) {
            return W_OPEN.getCode();
        }
        if (ERROR.code.equals(status) && CLOSE.getCode().equals(linkStatus)) {
            return W_CLOSE.getCode();
        }
        // é£Žæœºç±»çš„设备处理
        // é£Žæœºå…³ çª—口 å¼€
        if (F_CLOSE.getCode().equals(status)
                && OPEN.getCode().equals(linkStatus)) {
            return W_OPEN.getCode();
        }
        // é£Žæœºå…³ çª—口关
        if (F_CLOSE.getCode().equals(status)
                && CLOSE.getCode().equals(linkStatus)) {
            return W_CLOSE.getCode();
        }
        // é£Žæœºå¼€ çª—口开
        if (F_OPEN.getCode().equals(status)
                && OPEN.getCode().equals(linkStatus)) {
            return F_OPEN.getCode();
        }
        // é£Žæœºå¼€ çª—口关
//        if (F_OPEN.getCode().equals(status)
//                && CLOSE.getCode().equals(linkStatus)) {
//            return ERROR.getCode();
//        }
        if (F_OPEN.getCode().equals(status)) {
            return F_OPEN.getCode();
        }
        // é£Žæœºåå¼€ çª—口开
        if (F_OPEN_F.getCode().equals(status)
                && OPEN.getCode().equals(linkStatus)) {
            return F_OPEN_F.getCode();
        }
        // é£Žæœºåå¼€ çª—口关
//        if (F_OPEN_F.getCode().equals(status)
//                && CLOSE.getCode().equals(linkStatus)) {
//            return ERROR.getCode();
//        }
        if (F_OPEN_F.getCode().equals(status)) {
            return F_OPEN_F.getCode();
        }
        return status;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/DeviceType.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,60 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * è®¾å¤‡ç±»åž‹æžšä¸¾ç±»
 */
public enum DeviceType {
    TYPE_01("01", "01-风窗"),
    TYPE_02("02", "02-轴流风窗"),
    TYPE_03("03", "03-离心风机"),
    TYPE_04("04", "04-环流风机"),
    TYPE_05("05", "05-空调"),
    TYPE_06("06", "06-照明"),
    TYPE_07("07", "07-阀门"),
    TYPE_071("071", "071-空调阀门"),  //拓展设备类型
    TYPE_08("08", "08-气泵"),
    TYPE_09("09", "09-主阀门"),
//    TYPE_0A("0A", "0A-轴流风窗"),
    TYPE_0B("0B", "0B-通风口"),
    TYPE_0C("0C", "0C-混流风口"),
    TYPE_0D("0D", "0D-加压风机"),
    TYPE_0E("0E", "0E-门禁设备");
    private String code;
    private String msg;
    DeviceType(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public String getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
    public static String getMsg(String code) {
        if(null == code) return null;
        if(DeviceType.TYPE_01.getCode().equals(code)) return DeviceType.TYPE_01.getMsg();
        if(DeviceType.TYPE_02.getCode().equals(code)) return DeviceType.TYPE_02.getMsg();
        if(DeviceType.TYPE_03.getCode().equals(code)) return DeviceType.TYPE_03.getMsg();
        if(DeviceType.TYPE_04.getCode().equals(code)) return DeviceType.TYPE_04.getMsg();
        if(DeviceType.TYPE_05.getCode().equals(code)) return DeviceType.TYPE_05.getMsg();
        if(DeviceType.TYPE_071.getCode().equals(code)) return DeviceType.TYPE_071.getMsg();
        if(DeviceType.TYPE_06.getCode().equals(code)) return DeviceType.TYPE_06.getMsg();
        if(DeviceType.TYPE_07.getCode().equals(code)) return DeviceType.TYPE_07.getMsg();
        if(DeviceType.TYPE_08.getCode().equals(code)) return DeviceType.TYPE_08.getMsg();
        if(DeviceType.TYPE_09.getCode().equals(code)) return DeviceType.TYPE_09.getMsg();
        if(DeviceType.TYPE_0B.getCode().equals(code)) return DeviceType.TYPE_0B.getMsg();
        if(DeviceType.TYPE_0C.getCode().equals(code)) return DeviceType.TYPE_0C.getMsg();
        if(DeviceType.TYPE_0D.getCode().equals(code)) return DeviceType.TYPE_0D.getMsg();
        if(DeviceType.TYPE_0E.getCode().equals(code)) return DeviceType.TYPE_0E.getMsg();
        return "其他";
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/FoodLevel.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,43 @@
package com.fzzy.igds.dzhwk.constant;
/**
 *粮食等级
 *
 * æ›´æ–°è®°å½•:
 * 1,删除特等,从1等开始
 */
public enum FoodLevel {
    LEVEL_01("01", "一等"),
    LEVEL_02("02", "二等"),
    LEVEL_03("03", "三等"),
    LEVEL_04("04", "四等"),
    LEVEL_05("05", "五等"),
    LEVEL_06("06", "等外");
    private String code;
    private String msg;
    private FoodLevel(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public String getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
    public static String getMsg(String code){
        if(null == code) return null;
        if(FoodLevel.LEVEL_01.getCode().equals(code)) return FoodLevel.LEVEL_01.getMsg();
        if(FoodLevel.LEVEL_02.getCode().equals(code)) return FoodLevel.LEVEL_02.getMsg();
        if(FoodLevel.LEVEL_03.getCode().equals(code)) return FoodLevel.LEVEL_03.getMsg();
        if(FoodLevel.LEVEL_04.getCode().equals(code)) return FoodLevel.LEVEL_04.getMsg();
        if(FoodLevel.LEVEL_05.getCode().equals(code)) return FoodLevel.LEVEL_05.getMsg();
        return FoodLevel.LEVEL_06.getMsg();
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/FoodType.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,15 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * ä»“储性质枚举
 * åœ¨LS/T 1702粮食属性分类与代码结
 */
public class FoodType {
    public static String getMsg(String code) {
        if (null == code) {
            return "";
        }
        return Constant.mapFoodType.get(code);
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/FoodVariety.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,41 @@
package com.fzzy.igds.dzhwk.constant;
import java.util.Set;
/**
 * ç²®é£Ÿå“ç§ï¼Œ
 * <p>
 * æ›´æ–°è®°å½•:
 * å‚考:LST1703-2017 æ ‡å‡†é‡æ–°å®šä¹‰
 */
public class FoodVariety {
    /**
     * æ ¹æ®åç§°æ‰¾ç¼–码
     *
     * @param msg
     * @return
     */
    public static String getCode(String msg) {
        Set<String> keys = Constant.mapFoodVariety.keySet();
        if (null == keys || keys.isEmpty()) return msg;
        for (String key : keys) {
            if (Constant.mapFoodVariety.get(key).equals(msg)) {
                return key;
            }
        }
        return msg;
    }
    /**
     * æ ¹æ®ç¼–码找名称
     * @param code
     * @return
     */
    public static String getMsg(String code) {
        if (null == code) return "未配置";
        return Constant.mapFoodVariety.get(code);
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/GrainAnalysisModel.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * é€šé£Žæ¨¡å¼æžšä¸¾
 */
public enum GrainAnalysisModel {
    MODEL_01("01", "粮温异常点位分析");
    private String code;
    private String msg;
    GrainAnalysisModel(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public String getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/GrainFrequence.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,29 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * ç²®æƒ…保存频次
 *
 * @author jiazx
 *
 */
public enum GrainFrequence {
    FREQ_01("01", "一日多次"), FREQ_02("02", "一日一次"), FREQ_03("03", "一日两次");
    private String code;
    private String msg;
    GrainFrequence(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public String getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/InoutConstant.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,265 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * å‡ºå…¥åº“常量定义
 *
 * @author: andy.jia
 * @description:
 * @version:
 * @data:2020å¹´2月19日
 */
public class InoutConstant {
    /**
     * é»˜è®¤èº«ä»½è¯
     */
    public static final String DEFAULT_ID_CARD = "100000000000000000";
    /**
     * ç¼“å­˜-入库ID
     */
    public static final String CACHE_RECORD_ID = "RECORD_ID";
    /**
     * ç¼“å­˜KEY-出入库配置信息缓存
     */
    public static final String CACHE_INOUT_CONF_LIST = "INOUT_CONF";
    /**
     * ç¼“å­˜KEY-出入库流程配置信息
     */
    public static final String CACHE_INOUT_SYS_CONF = "INOUT_SYS_CONF";
    /**
     * ä¸´æ—¶ç¼“存,存放当前的出入库信息
     */
    public static final String KEY_INOUT_LIST = "INOUT_LIST";
    /**
     * ä¸´æ—¶ç¼“存,存放当前的出入库信息时间,出入库缓存可能存在两天完成的情况,时间调整为48小时
     */
    public static final Integer KEY_INOUT_LIST_TIME = 72 * 60 * 60;
    /**
     * ä¸´æ—¶ç¼“存,存放当日已经完成的出入库信息
     */
    public static final String KEY_INOUT_COMPLETE_LIST = "INOUT_COMPLETE";
    /**
     * å½“日完成的出入库信息任务列表
     */
    public static final long KEY_INOUT_COMPLETE_LIST_TIME = 8 * 60 * 60;
    // æ‰¦æ ·-化验状态
    public static final String STATUS_NONE = "NONE";
    // æ‰¦æ ·-化验状态
    public static final String STATUS_PASS = "PASS";
    // æ‰¦æ ·-化验状态
    public static final String STATUS_UNPASS = "UNPASS";
    /**
     * åŒ–验不合格进行方式
     */
    public static final String CHECK_NOPASS_NORMAL = "0";  //正常流转
    public static final String CHECK_NOPASS_BACK = "1";   //出库收卡
    public static final String CHECK_NOPASS_RECORD = "2";   //流程结束
    // å®ŒæˆçŠ¶æ€-未完成
    public static final String COMPLETE_STATUS_NONE = "NONE";
    // å®ŒæˆçŠ¶æ€-已完成
    public static final String COMPLETE_STATUS_COMPLETE = "COMPLETE";
    /**
     * è®¾å¤‡çŠ¶æ€-未知状态
     */
    public static final String MAC_STATUS_NONE = "NONE";
    /**
     * è®¾å¤‡çŠ¶æ€-正常状态
     */
    public static final String MAC_STATUS_NORMAL = "NORMAL";
    /**
     * è®¾å¤‡çŠ¶æ€-未连接、无信号
     */
    public static final String MAC_STATUS_NO_SIGNAL = "NO_SIGNAL";
    /**
     * å‡ºå…¥åº“配置的类型 10 = è½¦ç‰Œè¯†åˆ«
     */
    public static final String CONF_TYPE_10 = "10";
    /**
     * å‡ºå…¥åº“配置的类型 20 = æ‰¦æ ·æœºå™¨
     */
    public static final String CONF_TYPE_20 = "20";
    /**
     * å‡ºå…¥åº“配置的类型 21 = åŒ–验机
     */
    public static final String CONF_TYPE_21 = "21";
    /**
     * å‡ºå…¥åº“配置的类型 30 = åœ°ç£…
     */
    public static final String CONF_TYPE_30 = "30";
    /**
     * å‡ºå…¥åº“配置的类型40 = LED显示屏幕
     */
    public static final String CONF_TYPE_40 = "40";
    /**
     * åŒ–验大屏视频
     */
    public static final String CONF_TYPE_50 = "50";
    /**
     * å‡ºå…¥åº“抓拍摄像头
     */
    public static final String CONF_TYPE_60 = "60";
    /**
     * ç§°é‡ä¸»æŽ§åˆ¶å™¨
     */
    public static final String CONF_TYPE_70 = "70";
    /**
     * æ™ºæ…§å¡
     */
    public static final String CONF_TYPE_80 = "80";
    // å‡ºå…¥åº“类型-入库
    public static final String TYPE_IN = "IN";
    // å‡ºå…¥åº“类型-出库
    public static final String TYPE_OUT = "OUT";
    public static final String TYPE_NONE = "NONE";
    // æ•°æ®çŠ¶æ€-正常
    public static final String RECORD_STATUS_NORMAL = "NORMAL";
    // æ•°æ®çŠ¶æ€-补录
    public static final String RECORD_STATUS_ADD = "ADD";
    // æ•°æ®çŠ¶æ€-已删除
    public static final String RECORD_STATUS_DEL = "DEL";
    // æµç¨‹-登记
    public static final String PROGRESS_REGISTER = "REGISTER";
    // æµç¨‹-入库质检
    public static final String PROGRESS_CHECK = "CHECK";
    // æµç¨‹-值仓
    public static final String PROGRESS_HANDLE = "HANDLE";
    // æµç¨‹-称重,包括满车称重或者空车称重,当前状态比较特殊,不作为流程节点,只作为标签
    public static final String PROGRESS_WEIGHT_TAG = "WEIGHT_TAG";
    // æµç¨‹-满车称重
    public static final String PROGRESS_WEIGHT_FULL = "WEIGHT_FULL";
    // æµç¨‹-空车称重
    public static final String PROGRESS_WEIGHT_EMPTY = "WEIGHT_EMPTY";
    // æµç¨‹-结算
    public static final String PROGRESS_PAY = "PAY";
    // æµç¨‹-卡片回收
    public static final String PROGRESS_CARD_BACK = "CARD_BACK";
    // æµç¨‹-备案(表示流程整体完成后备案)
    public static final String PROGRESS_RECORD = "RECORD";
    /**
     * è®¡åˆ’类型 -轮换计划
     **/
    public static final String PLAN_TYPE_01 = "01";
    /**
     * è®¡åˆ’类型 -采购计划
     **/
    public static final String PLAN_TYPE_02 = "02";
    /**
     * è®¡åˆ’类型 -销售计划
     **/
    public static final String PLAN_TYPE_03 = "03";
    /**
     * è®¡åˆ’类型 -生产加工计划
     **/
    public static final String PLAN_TYPE_04 = "04";
    /**
     * è®¡åˆ’明细类型 -轮出计划
     **/
    public static final String PLAN_DETAIL_TYPE_1 = "1";
    /**
     * è®¡åˆ’明细类型 -轮入计划
     **/
    public static final String PLAN_DETAIL_TYPE_2 = "2";
    /**
     * æ£€æµ‹ç»“æžœ -合格
     */
    public static final String RESULT_1 = "1";
    /**
     * æ£€æµ‹ç»“æžœ -不合格
     */
    public static final String RESULT_0 = "0";
    public static final String SAMPLE_TYPE_MANUAL = "0";
    public static final String SAMPLE_TYPE_AUTOMATIC = "1";
    public static final String SAMPLE_TYPE_RANDOM = "2";
    /**
     * å‡ºå…¥åº“时视频类型
     */
    public static String IMG_NAME_TYPE_DJ = "DJ";    //登记照片
    public static String IMG_NAME_TYPE_RK = "RK";    //车辆入库照片
    public static String IMG_NAME_TYPE_CK = "CK";    //车辆出库照片
    public static String IMG_NAME_TYPE_GL = "GL";    //称毛重前照片
    public static String IMG_NAME_TYPE_GR = "GR";    //称毛重后照片
    public static String IMG_NAME_TYPE_GT = "GT";    //称毛重顶照片
    public static String IMG_NAME_TYPE_TL = "TL";    //称皮重前照片
    public static String IMG_NAME_TYPE_TR = "TR";    //称皮重后照片
    public static String IMG_NAME_TYPE_TT = "TT";    //称皮重顶照片
    public static String IMG_NAME_TYPE_SL = "SL";    //结算时售粮人照片
    public static String IMG_NAME_TYPE_SF = "SF";    //售粮人身份证照片
    public static String IMG_NAME_TYPE_IVG = "IVG";  //入库称毛重视频
    public static String IMG_NAME_TYPE_IVT = "IVT";  //入库称皮重视频
    public static String IMG_NAME_TYPE_OVG = "OVG";  //出库称毛重视频
    public static String IMG_NAME_TYPE_OVT = "OVT";  //出库称皮重视频
    public static String IMG_NAME_TYPE_DJV = "DJV";  //登记时视频
    public static String IMG_NAME_TYPE_RKV = "RKV";  //车辆入库时视频
    public static String IMG_NAME_TYPE_CKV = "CKV";  //车辆出库时视频
    /**
     * æ ¹æ®ä¸šåŠ¡ç±»åž‹å’Œ å½“前状态返回当前状态的流程名称
     *
     * @param type
     * @param progress
     * @return
     */
    public static String getProcessName(String type, String progress) {
        if (PROGRESS_REGISTER.equals(progress))
            return "登记";
        if (PROGRESS_CHECK.equals(progress))
            return "入库扦样流程";
        if (PROGRESS_HANDLE.equals(progress))
            return "值仓流程";
        if (PROGRESS_WEIGHT_FULL.equals(progress))
            return "满车称重流程";
        if (PROGRESS_WEIGHT_EMPTY.equals(progress))
            return "空车称重流程";
        if (PROGRESS_PAY.equals(progress))
            return "结算流程";
        if (PROGRESS_CARD_BACK.equals(progress))
            return "卡片回收";
        if (PROGRESS_RECORD.equals(progress))
            return "流程完成";
        return "";
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/ModbusConstant.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,36 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * MOdBUS-基础常量信息
 */
public class ModbusConstant {
    //01-读线圈
    public static final String FUN_01 = "01";
    //02-读离散量输入
    public static final String FUN_02 = "02";
    //03-读保持寄存器
    public static final String FUN_03 = "03";
    //04-读输入寄存器
    public static final String FUN_04 = "04";
    //05-写单个线圈
    public static final String FUN_05 = "05";
    //06-写单个寄存器
    public static final String FUN_06 = "06";
    //15-写多个线圈
    public static final String FUN_15 = "15";
    //16-写多个寄存器
    public static final String FUN_16 = "16";
    //99-不操作
    public static final String FUN_99 = "99";
    public static final String MODBUS_DEVICE_CACHE = "MODBUS_DEVICE";
    public static final String MODBUS_GAS_CACHE_LIST = "MODBUS_GAS_LIST";
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/N2ModelTag.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,46 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * æ°”调中氮气集中模式,包括动作和部分流程模式,流程主要包括:气密性检测和智能气调
 */
public enum N2ModelTag {
    //动作类
    MODEL_01("01", "抽负压"),
    MODEL_02("02", "排气"),
    MODEL_03("03", "充氮"),
    MODEL_04("04", "均氮"),
    //动作类-氮气回收
    MODEL_20("20", "氮气回收-排气"),
    MODEL_21("21", "氮气回收-充氮"),
    //流程类
    MODEL_30("30", "气密性检测"),
    MODEL_31("31", "智能气调"),
    //隐藏执行类-检测类
    MODEL_40("40", "检测类-粮情检测"),
    MODEL_41("41", "检测类-气体检测"),
    MODEL_42("42", "检测类-压力检测"),
    MODEL_43("43", "检测类-半衰期检测"),
    MODEL_99("99", "自定义模式");
    private String code;
    private String msg;
    N2ModelTag(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public String getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/NoticeType.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,35 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * è­¦å‘Šé€šçŸ¥ç±»åž‹
 * çŸ­ä¿¡ï¼Œè¯­éŸ³
 *
 * @author Andy
 */
public enum NoticeType {
    /**
     *
     */
    NONE("NONE", "不通知"),
    SMS("SMS", "短信通知"),
    EMAIL("EMAIL", "邮箱通知"),
    VOICE("VOICE", "语音通知"),
    WECHAT("WECHAT", "微信通知");
    private String code;
    private String name;
    NoticeType(String code, String name) {
        this.code = code;
        this.name = name;
    }
    public String getCode() {
        return code;
    }
    public String getName() {
        return name;
    }}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/OrderRespEnum.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,51 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * æ“ä½œå“åº”码
 *
 * @author Andy
 *
 */
public enum OrderRespEnum {
    ORDER_SUCCESS("ORDER_SUCCESS", "命令发送成功"),
    ORDER_ERROR("ORDER_ERROR", "命令发送出现异常"),
    ORDER_INORDER("ORDER_INORDER","命令执行排队中"),
    ORDER_INPROGRESS("ORDER_INPROGRESS","命令继续执行中"),
    NO_PROTOCOL("NO_PROTOCOL", "当前协议未实现"),
    NO_SIGN("NO_SIGN", "连接异常,没有获取到连接"),
    NO_FUNCTION("NO_FUNCTION", "终端暂不支持该功能"),
    MSG_SUCCESS("MSG_SUCCESS", "信息解析成功"),
    MSG_ERROR("MSG_ERROR", "信息解析异常"),
    MSG_TIMEOUT("MSG_TIMEOUT", "解析超时"),
    LOGOUT("LOGOUT", "离线")
    ;
    private String code;
    private String msg;
    OrderRespEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getMsg() {
        return msg;
    }
    public void setMsg(String msg) {
        this.msg = msg;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/ProtocolEnum.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,60 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * ç³»ç»Ÿä¸­çš„协议配置,没新增新的协议均需要在当前枚举中添加
 *
 * @author Andy
 */
public enum ProtocolEnum {
    TCP_DEFAULT("TCP_DEFAULT", "系统默认协议"),
    DG_TCP_01("TCP_DG", "大公-TCP协议第一版议"),
    DG_TCP_03("DG_TCP_03", "大公-TCP协议第三版"),
    DG_TCP_LZ("TCP_WSM_LZ", "大公-TCP-林芝"),
    DG_TCP_MS("TCP_DG_MS", "大公-TCP-眉山"),
    TY_N2("TY_N2", "氮气-同悦协议"),
    TCP_CD_WEATHER("TCP_CD_WEATHER", "成都气象站协议"),
    TCP_LZ_WEATHER("TCP_LZ_WEATHER", "林芝气象站协议"),
    TCP_MS_STORAGE("TCP_MS_STORAGE", "眉山数量检测协议"),
    TCP_XSX_V1("TCP_XSX_V1", "鑫胜鑫主协议1.0"),
    TCP_ZLDZ_GRAIN_V1("TCP_ZLDZ_GRAIN_V1", "正来电子粮情协议1.0"),
    TCP_FZZY_V3("TCP_FZZY_V3", "风正致远V3.0协议"),
    TCP_DGCC_HNZK("TCP_DGCC_HNZK", "大公仓储,河南周口粮库"),
    TCP_FZZY_IOT_V3("TCP_FZZY_IOT_V3", "风正致远物联网V3.0协议"),
    TCP_SHUHAN_V1("TCP_SHUHAN_V1", "蜀汉数量检测V1"),
    TCP_FZZY_WEIGHT("TCP_FZZY_WEIGHT", "FZZY-地磅主控协议"),
    RK_WEATHER_V30("RK_WEATHER_V30", "建大仁科气象站云V30"),
    TCP_FZZY_N2_V3("TCP_FZZY_N2_V3", "FZZY-制氮机协议"),
    TCP_ZCL_N2("TCP_ZCL_N2", "中储粮制氮机协议"),
    TCP_LT_SAMPLE_V3("TCP_LT_SAMPLE_V3", "扦样机协议"),
    TCP_FZZY_QUANTITY_V35("TCP_FZZY_QUANTITY_V35", "数量检测V35"),
    TCP_BHZH_GRAIN_FM_V1("TCP_BHZH_GRAIN_FM_V1", "邦海智能无线主机版V1"),
    TCP_BHZH_GRAIN_V2("TCP_BHZH_GRAIN_V2", "邦海智能有线版V2"),
    TCP_BHZH_VERB_V2("TCP_BHZH_VERB_V2", "邦海控制柜智能有线版V2"),
    TCP_BHZH_INOUT_V1("TCP_BHZH_INOUT_V1", "邦海智能出入库控制器协议"),
    TCP_BEIBO_GRAIN_V1("TCP_BEIBO_GRAIN_V1", "贝博粮情分机服务端协议"),
    TCP_ES_DLT645_V1("TCP_ES_DLT645_V1", "DL/T 645多功能电表协议"),
    FZZY_OPENAPI_HTTP("FZZY_OPENAPI_HTTP", "风正致远API-HTTP协议"),
    SDK_HK_ALL("SDK_HK", "SDK-海康协议"),
    TCP_MODBUS("TCP_MODBUS", "Modbus-TCP协议"),
    TCP_SHYB_LED_BX06("TCP_SHYB_LED_BX06", "LED-上海仰邦V6"),
    TCP_ZH_LED_E3L("TCP_ZH_LED_E3L", "LED-中航E3L"),
    FRID_REMOTE_SN("FRID_REMOTE_SN", "LED-远程协议-山南粮库");
    private String code;
    private String msg;
    ProtocolEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public String getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/RedisConst.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,228 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * Redis缓存使用的系统常量配置 ä¸»è¦ç”¨äºŽé…ç½®ç³»ç»Ÿç¼“存的KEY配置
 */
public class RedisConst {
    /**
     * æ ¹æ®ç»„织编码构建实际使用的KEY
     *
     * @param key1 ç»„织编码
     * @param key2 ç¼“å­˜KEY
     * @return
     */
    public static String buildKey(String key1, String key2) {
        return Constant.APP_NAME + ":" + key1 + ":" + key2;
    }
    /**
     * ä¸‰å±‚结构的KEY
     *
     * @param key1
     * @param key2
     * @param tag
     * @return
     */
    public static String buildKey(String key1, String key2, String tag) {
        return Constant.APP_NAME + ":" + key1 + ":" + key2 + ":" + tag;
    }
    /**
     * å››å±‚结构的KEY
     *
     * @param companyId
     * @param key
     * @param tag1
     * @param tag2
     * @return
     */
    public static String buildKey(String companyId, String key, String tag1, String tag2) {
        return Constant.APP_NAME + ":" + companyId + ":" + key + ":" + tag1 + ":" + tag2;
    }
    /**
     * åˆ›å»ºè®¾å¤‡åˆ—表的KEY,以分机为分组创建
     *
     * @param companyId
     * @param key
     * @param tag1
     * @return
     */
    public static String buildDeviceKey(String companyId, String key, String tag1) {
        return Constant.APP_NAME + ":" + companyId + ":" + key + ":" + tag1;
    }
    /**
     * æ ¹æ®ç¼“å­˜KEY的前缀生成缓存KEy
     *
     * @param prefix
     * @param bizId
     */
    public static String buildKeyByPrefix(String prefix, String bizId) {
        if (null == bizId) return Constant.APP_NAME + ":" + prefix;
        return Constant.APP_NAME + ":" + prefix + ":" + bizId;
    }
    /**
     * å­—典表缓存配置
     */
    public static final String KEY_DIC_TRIGGER = "KEY_DIC_TRIGGER";
    /**
     * ä»“库列表KEY
     */
    public static final String KEY_DEPOT = "DEPOT_DATA";
    /**
     * ä»“库参数列表KEY
     */
    public static final String KEY_DEPOT_CONF = "DEPOT_CONF";
    /**
     * åˆ†æœºåˆ—表KEY
     */
    public static final String KEY_DEVICE_SER_LIST = "SER_LIST";
    /**
     * è®¾å¤‡åˆ—表
     */
    public static final String KEY_DEVICE_LIST = "DEVICE_LIST";
    /**
     * å•个色号吧
     */
    public static final String KEY_DEVICE = "DEVICE";
    /**
     * è®¾å¤‡åˆ—表
     */
    public static final String KEY_DEVICE_IOT_LIST = "DEVICE_IOT_LIST";
    /**
     * ä»“库和分机的多对多关系集合
     */
    public static final String KEY_DEPOT_SER_LIST = "DEPOT_SER_LIST";
    /**
     * å»ºç­‘物信息
     */
    public static final String KEY_BUILDING_LIST = "BUILDING_LIST";
    /**
     * æ‰§è¡Œå‘½ä»¤KEY前缀
     */
    public static final String KEY_ORDER_PRE = "ORDER";
    /**
     * æœ€æ–°ç²®æƒ…信息缓存列表,用于存放当前最新的粮情信息
     */
    public static final String KEY_GRAIN = "GRAIN_DATA";
    /**
     * æœ€æ–°æ°”体信息缓存列表
     */
    public static final String KEY_GAS_DATA = "GAS_DATA";
    /**
     * ç³»ç»Ÿé…ç½®KEY
     */
    public static final String KEY_SYS_CONF = "SYS_CONF";
    /**
     * ç²®åº“的温湿度信息缓存
     */
    public static final String KEY_DEPOT_TH_PREFIX = "DEPOT_TH_PREFIX";
    /**
     * ä»¥åˆ†æœºæˆ–者仓库为单位存储的仓温仓湿缓存标标签
     */
    public static final String KEY_T_TH = "T_TH";
    /**
     * å­˜æ”¾æ°”象信息的KEY
     */
    public static final String KEY_WEATHER_INFO = "WEATHER_INFO";
    /**
     * æ ¹æ®ä»“库编码存放最新的能耗数据信息
     */
    public static final String KEY_ES_DATA_MAP = "ES_DATA_MAP";
    /**
     * ç³»ç»Ÿä¸­ç»„织列表
     */
    public static final String KEY_DEPT_LIST = "DEPT_LIST";
    /**
     * åˆ¶æ°®æœºé…ç½®åˆ—表
     */
    public static final String KEY_N2_CONF_LIST = "N2_CONF_LIST";
    /**
     * æœ€æ–°æ°”压信息缓存列表
     */
    public static final String KEY_PRESSURE_DATA = "PRESSURE_DATA";
    /**
     * ç³»ç»Ÿé…ç½®çš„æ‘„像机信息缓存
     */
    public static final String KEY_CAMERA_LIST = "CAMERA_LIST";
    /**
     * ä¸‰ç»´é…ç½®å…³è”信息key
     */
    public static final String KEY_THREE_CONF = "THREE_CONF";
    /**
     * ä¸´æ—¶ç¼“å­˜KEY前缀
     */
    public static final String KEY_TEMP_PREFIX = "TEMP_";
    /**
     * æ•°é‡ç›‘测参数列表KEY--单个设备
     */
    public static final String KEY_QUANTITY_CONF = "QUANTITY_CONF";
    /**
     * ä»“库质量巡检数据缓存
     */
    public static final String KEY_DEPOT_QUALITY = "DEPOT_QUALITY";
    /**
     * ä»“库液位数据缓存
     */
    public static final String KEY_DEPOT_HEIGHT = "DEPOT_HEIGHT";
    /**
     * ä»“库物联网关iot设备温湿度缓存key
     */
    public static final String KEY_IOT_DEPOT_TEMP_HUM = "IOT_DEPOT_TEMP_HUM";
    /**
     * å•个数量检测服务
     */
    public static final String PREFIX_QUANTITY_SER = "QUANTITY_SER";
    /**
     * è­¦å‘Šé…ç½®åˆ—表KEY
     */
    public static final String KEY_WARN_CONF = "WARN_CONF";
    /**
     * é—¨ç£è®¾å¤‡é…ç½®åˆ—表
     */
    public static final String KEY_DOOR_SENSOR_LIST = "DOOR_SENSOR_LIST";
    /**
     * æŠ“拍分机缓存前缀
     */
    public static final String CACHE_KEY_PRE = "SNAP_SER";
    /**
     * AI设备缓存key
     */
    public static final String KEY_AI_SER = "AI_SER";
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/RespCodeEnum.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,37 @@
package com.fzzy.igds.dzhwk.constant;
import lombok.Getter;
/**
 * å“åº”码定义
 *
 * @author Andy
 *
 */
@Getter
public enum RespCodeEnum {
    /**
     *
     */
    CODE_0000("0000", "成功"),
    CODE_1111("1111", "后端服务异常"),
    CODE_1001("1001","数据格式校验失败"),
    CODE_1002("1002","该应用无激活授权"),
    CODE_1003("1003","该应用已经授权成功"),
    CODE_1004("1004","设备通讯失败"),
    CODE_1005("1005","该设备不存在"),
    CODE_1006("1006","当前登录人已掉线"),
    CODE_1007("1007","请求参数异常"),
    CODE_1008("1008","流程不正确"),
    CODE_2000("2000","响应数据为空")
    ;
    private String code;
    private String msg;
    RespCodeEnum(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/TransType.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,35 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * è¿è¾“方式
 */
public enum TransType {
    TYPE_1("1", "汽车"),
    TYPE_2("2", "火车"),
    TYPE_3("3", "轮船"),
    TYPE_9("9", "其他");
    private String code;
    private String name;
    TransType(String code, String name) {
        this.code = code;
        this.name = name;
    }
    public String getCode() {
        return code;
    }
    public String getName() {
        return name;
    }
    public static String getName(String code) {
        if(null == code) return "";
        if(TransType.TYPE_1.getCode().equals(code)) return TransType.TYPE_1.getName();
        if(TransType.TYPE_2.getCode().equals(code)) return TransType.TYPE_2.getName();
        if(TransType.TYPE_3.getCode().equals(code)) return TransType.TYPE_3.getName();
        return TransType.TYPE_9.getName();
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/WarnLevel.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,38 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * è­¦å‘Šç­‰çº§1
 * @author
 */
public enum WarnLevel {
    LEVEL_01("01", "一级警告"),
    LEVEL_02("02", "二级警告"),
    LEVEL_03("03", "三级警告");
    private String code;
    private String msg;
    WarnLevel(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public String getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
    public static String getMsg(String code) {
        if(null == code) return "";
        if(WarnLevel.LEVEL_01.getCode().equals(code)) return WarnLevel.LEVEL_01.getMsg();
        if(WarnLevel.LEVEL_02.getCode().equals(code)) return WarnLevel.LEVEL_02.getMsg();
        if(WarnLevel.LEVEL_03.getCode().equals(code)) return WarnLevel.LEVEL_03.getMsg();
        return "";
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/WarnStatus.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,48 @@
package com.fzzy.igds.dzhwk.constant;
import lombok.Getter;
import java.util.ArrayList;
import java.util.List;
/**
 * æŠ¥è­¦çŠ¶æ€
 * @author
 */
@Getter
public enum WarnStatus {
    STATUS_10("10", "未处理"),
    STATUS_20("20", "延迟处理"),
    STATUS_30("30", "已处理"),
    STATUS_40("40", "忽略");
    private String code;
    private String name;
    WarnStatus(String code, String name) {
        this.code = code;
        this.name = name;
    }
    public static List<String> getListDesc(){
        List<String> result = new ArrayList<>(5);
        result.add(WarnStatus.STATUS_30.getName());
        result.add(WarnStatus.STATUS_10.getName());
        result.add(WarnStatus.STATUS_40.getName());
        result.add(WarnStatus.STATUS_20.getName());
        return result;
    }
    /**
     * æ ¹æ®code获取对应的name
     * @param code
     * @return
     */
    public static String getNameByCode(String code){
        for(WarnStatus warnStatus:WarnStatus.values()){
            if(warnStatus.getCode().equals(code)){
                return warnStatus.getName();
            }
        }
        return null;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/constant/WarnType.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,38 @@
package com.fzzy.igds.dzhwk.constant;
/**
 * è­¦å‘Šç±»åž‹
 * @author
 */
public enum WarnType {
    TYPE_01("01", "警告"),
    TYPE_02("02", "预警"),
    TYPE_03("03", "通知");
    private String code;
    private String msg;
    WarnType(String code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public String getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
    public static String getMsg(String code) {
        if(null == code) return "";
        if(WarnType.TYPE_01.getCode().equals(code)) return WarnType.TYPE_01.getMsg();
        if(WarnType.TYPE_02.getCode().equals(code)) return WarnType.TYPE_02.getMsg();
        if(WarnType.TYPE_03.getCode().equals(code)) return WarnType.TYPE_03.getMsg();
        return "";
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/data/BaseParam.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,42 @@
package com.fzzy.igds.dzhwk.data;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
 * @author: andy.jia
 * @description:
 * @date:2019.03.21
 **/
@Data
public class BaseParam {
    private int limit = 10;// LAYUI ä¸“用,每页显示的条数。laypage将会借助 count å’Œ limit è®¡ç®—出分页数
    private int curr = 1;// LAYUI ä¸“用 èµ·å§‹é¡µã€‚一般用于刷新类型的跳页以及HASH跳页
    private int page = 1;// ç›®æ ‡é¡µé¢
    public int getPage() {
        return page;
    }
    public void setPage(int page) {
        this.page = page;
    }
    private String companyId;// ç»„织编码
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date start;
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date end;
    private String depotId;// ä»“库编码
    private String deptId;// åº“区编码
    private String key;//关键字
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/data/GrainData.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,121 @@
package com.fzzy.igds.dzhwk.data;
import com.bstek.dorado.annotation.PropertyDef;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fzzy.igds.dzhwk.domain.Depot;
import com.fzzy.igds.dzhwk.domain.MQuality;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
 * ç”¨äºŽå°è£…的粮情信息,每次获取粮情数据,封装为当前对象
 *
 * @author jiazx
 */
@Data
public class GrainData implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    @Excel(name = "批次编号", sort = 2)
    @PropertyDef(label = "批次编号")
    private String batchId;
    @PropertyDef(label = "组织编码", description = "")
    private String companyId;
    @Excel(name = "所属仓库", sort = 1)
    @PropertyDef(label = "所属仓库", description = "仓库编号")
    private String depotId;
    @Excel(name = "最低温粮温", sort = 7)
    @PropertyDef(label = "最低温粮温", description = "单位℃,粮情最低温")
    private Double tempMin = 0.0;
    @Excel(name = "最高粮温", sort = 8)
    @PropertyDef(label = "最高粮温", description = "单位℃,粮情最高温")
    private Double tempMax = 0.0;
    @Excel(name = "平均粮温", sort = 9)
    @PropertyDef(label = "平均粮温", description = "单位℃,粮情平均温度")
    private Double tempAve = 0.0;
    @Excel(name = "仓内湿", sort = 4)
    @PropertyDef(label = "仓内湿度")
    private Double humidityIn;
    @Excel(name = "仓外温", sort = 3)
    @PropertyDef(label = "仓内温度")
    private Double tempIn;
    @Excel(name = "仓外湿", sort = 5)
    @PropertyDef(label = "仓外湿度")
    private Double humidityOut;
    @Excel(name = "仓外温", sort = 6)
    @PropertyDef(label = "仓外温度")
    private Double tempOut;
    @PropertyDef(label = "层行列", description = "用-隔开的配置信息")
    private String cable;
    @PropertyDef(label = "筒仓层配置", description = "用-隔开的配置信息")
    private String cableCir;
    @PropertyDef(label = "油面高度", description = "用-隔开的两个值,油面高度-建筑高度")
    private String oilHeight;
    @PropertyDef(label = "天气", description = "直接填写中文信息,晴,阴雨天")
    private String weather = "#";
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    @PropertyDef(label = "接收时间")
    private Date receiveDate;
    @PropertyDef(label = "检测人")
    private String checkUser;
    @PropertyDef(label = "备注")
    private String remark;
    @PropertyDef(label = "采集点信息", description = "用逗号隔开的温度信息信息")
    private String points;
    @PropertyDef(label = "各个采集点的信息", description = "关系字段")
    private List<GrainPoint> listPoints;
    @PropertyDef(label = "各层粮温", description = "关系字段")
    private List<GrainLay> listLays;
    @PropertyDef(label = "各行温度", description = "关系字段")
    private List<GrainRow> listRows;
    @PropertyDef(label = "仓房信息", description = "关系字段")
    private Depot depotData;
    @PropertyDef(label = "化验信息", description = "关系字段")
    private MQuality mquality;
    @PropertyDef(label = "系统时间", description = "关系字段")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date sysDate = new Date();
    @PropertyDef(label = "建筑高度")
    private String depotHeight;
    @PropertyDef(label = "检测储量", description = "单位KG")
    private Double storage;
    @Transient
    @PropertyDef(label = "当前仓iot设备的温湿度数据")
    private List<GrainIotData> grainIotData;
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/data/GrainIotData.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,57 @@
package com.fzzy.igds.dzhwk.data;
import lombok.Data;
import java.io.Serializable;
/**
 * ç”¨äºŽå°è£…成品粮温湿度信息
 *
 * @author chen
 */
@Data
public class GrainIotData implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    /**
     * ç»„织编码
     */
    private String companyId;
    /**
     * ä»“库编码
     */
    private String depotId;
    /**
     * è®¾å¤‡ç¼–码
     */
    private String deviceId;
    /**
     * è®¾å¤‡åç§°
     */
    private String name;
    /**
     * æ—¶é—´
     */
    private String time;
    /**
     * æ¸©åº¦
     */
    private Double temp = 0.0;
    /**
     * æ¹¿åº¦
     */
    private Double hum = 0.0;
    /**
     * å¤–温
     */
    private Double outTemp = 0.0;
    /**
     * å¤–湿
     */
    private Double outHum = 0.0;
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/data/GrainLay.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,56 @@
package com.fzzy.igds.dzhwk.data;
import com.bstek.dorado.annotation.PropertyDef;
import lombok.Data;
/**
 * ç²®æƒ…数据解析对象-层信息
 */
@Data
public class GrainLay {
    @PropertyDef(label = "所在层")
    private int fz;
    @PropertyDef(label = "所在层")
    private int z;
    @PropertyDef(label = "层最低温")
    private Double tempMin;
    @PropertyDef(label = "层最高温")
    private Double tempMax;
    @PropertyDef(label = "层平均温")
    private Double tempAve = 0.0;
    @PropertyDef(label = "内圈平均温度", description = "单位℃,粮情平均温度")
    private Double tempAveIn = 0.0;
    @PropertyDef(label = "外圈平均温度", description = "单位℃,粮情平均温度")
    private Double tempAveOut = 0.0;
    private int sumNum;//当前层总数
    private int sumInNum;//内圈个数
    private int sumOutNum;//外圈个数
    private double sumTemp;//层总温度
    private double sumInTemp;
    private double sumOutTemp;
    public GrainLay() {
        super();
    }
    public GrainLay(int fz, int z) {
        super();
        this.fz = fz;
        this.z = z;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/data/GrainPoint.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,41 @@
package com.fzzy.igds.dzhwk.data;
import com.bstek.dorado.annotation.PropertyDef;
import lombok.Data;
/**
 * ç²®æƒ…数据解析对象-采集点对象信息,XYZ表示的列行层,数值从1开始。
 *
 */
@Data
public class GrainPoint {
    @PropertyDef(label = "所在层")
    private int z;
    @PropertyDef(label = "所在层")
    private int fz;
    @PropertyDef(label = "所在列,筒仓所在圈数")
    private int x;
    @PropertyDef(label = "所在行,筒仓根号,总根号")
    private int y;
    @PropertyDef(label = "采集点温度")
    private Double temp = 0.0;
    public GrainPoint() {
        super();
    }
    public GrainPoint(Double temp, int x, int y, int z, int fz) {
        super();
        this.z = z;
        this.x = x;
        this.y = y;
        this.fz = fz;
        this.temp = temp;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/data/GrainRow.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,36 @@
package com.fzzy.igds.dzhwk.data;
import com.bstek.dorado.annotation.PropertyDef;
import lombok.Data;
/**
 * ç²®æƒ…数据解析对象-列信息
 */
@Data
public class GrainRow {
    @PropertyDef(label = "所在行", description = "数据从0开始,如果是筒仓的话,用于记录筒仓的根数")
    private int y;
    @PropertyDef(label = "层最低温")
    private Double tempMin;
    @PropertyDef(label = "层最高温")
    private Double tempMax;
    @PropertyDef(label = "层平均温")
    private Double tempAve = 0.0;
    private int sumNum;// å½“前层总数
    private double sumTemp;// å±‚总温度
    public GrainRow() {
        super();
    }
    public GrainRow(int y) {
        super();
        this.y = y;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/data/Page.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,97 @@
package com.fzzy.igds.dzhwk.data;
import java.util.Collections;
import java.util.List;
/**
 * æ ¹æ®éœ€è¦é‡å†™å°è£…系统使用的Page对象,主要是为了满足LayUI前端的使用
 *
 * @author Andy
 */
public class Page<T> extends com.baomidou.mybatisplus.extension.plugins.pagination.Page<T> {
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    private List<T> data = Collections.emptyList();// LAYUI中使用的数据信息
    private String code = "0";// LAYUI ä¸­çš„定义
    private String msg;// LAYUI使用的提示信息
    private int count;// LAYUI使用的总数
    private int limit;// æ¯é¡µæ˜¾ç¤ºçš„æ¡æ•°ã€‚laypage将会借助 count å’Œ limit è®¡ç®—出分页数
    private int curr;// èµ·å§‹é¡µã€‚一般用于刷新类型的跳页以及HASH跳页
    public int getLimit() {
        Long size1 = super.getSize();
        limit = size1.intValue();
        return limit;
    }
    public void setLimit(int limit) {
        this.limit = limit;
        this.setSize(limit);
    }
    public int getCurr() {
        Long size1 = super.getCurrent();
        curr = size1.intValue();
        return curr;
    }
    public void setCurr(int curr) {
        this.curr = curr;
        super.setCurrent(curr);
    }
    public List<T> getData() {
        data = super.getRecords();
        return data;
    }
    public void setData(List<T> data) {
        this.data = data;
        super.setRecords(data);
    }
    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getMsg() {
        return msg;
    }
    public void setMsg(String msg) {
        this.msg = msg;
    }
    public int getCount() {
        Long size1 = super.getTotal();
        count = size1.intValue();
        return count;
    }
    public void setCount(int count) {
        this.count = count;
        super.setTotal(count);
    }
    public Page() {
    }
    public Page(int current, int size) {
        super(current, size);
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/Building.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,112 @@
package com.fzzy.igds.dzhwk.domain;
import com.bstek.dorado.annotation.PropertyDef;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
 * @Description ä»“房实体
 * @Author CZT
 * @Date 2025/05/28 18:55
 */
@Data
@Entity
@Table(name = "D_BUILDING")
public class Building implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "ID_", length = 50)
    @PropertyDef(label = "仓房编码")
    private String id;
    @Column(name = "COMPANY_ID_", length = 10)
    @PropertyDef(label = "组织编码")
    private String companyId;
    @Column(name = "DEPT_ID_", length = 40)
    @PropertyDef(label = "所属库点")
    private String deptId;
    @Column(name = "NAME_", length = 50)
    @PropertyDef(label = "仓房名称")
    private String name;
    @Column(name = "STORAGE_")
    @PropertyDef(label = "设计储量", description = "单位:吨")
    private Double storage;
    @Column(name = "USER_DATE_")
    @PropertyDef(label = "使用日期")
    private Date userDate;
    @Column(name = "HEIGHT_", precision = 16, scale = 2)
    @PropertyDef(label = "仓房高度", description = "单位:米")
    private Double height;
    @Column(name = "LENGTH_", precision = 16, scale = 2)
    @PropertyDef(label = "仓房长度", description = "单位:米")
    private Double length;
    @Column(name = "WIDTH_", precision = 16, scale = 2)
    @PropertyDef(label = "仓房宽度", description = "单位:米")
    private Double width;
    @Column(name = "DIAMETER_", precision = 16, scale = 2)
    @PropertyDef(label = "筒仓直径", description = "单位:米")
    private Double diameter;
    @Column(name = "VOLUME_", precision = 16, scale = 2)
    @PropertyDef(label = "筒仓体积", description = "单位:立方米")
    private Double volume;
    @Column(name = "DE_VOLUME_", precision = 16, scale = 2)
    @PropertyDef(label = "扣除体积", description = "单位:立方米")
    private Double deVolume;
    @Column(name = "DOOR_NUM_")
    @PropertyDef(label = "仓门数")
    private Integer doorNum;
    @Column(name = "GROUND_", length = 20)
    @PropertyDef(label = "地面结构")
    private String ground;
    @Column(name = "WALL_", length = 20)
    @PropertyDef(label = "墙体结构")
    private String wall;
    @Column(name = "ROOF_", length = 20)
    @PropertyDef(label = "屋顶结构")
    private String roof;
    @Column(name = "ROOF_TRUSS_", length = 20)
    @PropertyDef(label = "屋架结构")
    private String roofTruss;
    @Column(name = "CREATE_DATE_")
    @PropertyDef(label = "建造日期")
    private Date createDate;
    @Column(name = "LON_", precision = 16, scale = 4)
    @PropertyDef(label = "经度")
    private Double lon;
    @Column(name = "LAT_", precision = 16, scale = 4)
    @PropertyDef(label = "纬度")
    private Double lat;
    @Column(name = "UPDATE_TIME_")
    @PropertyDef(label = "更新时间")
    private Date updateTime;
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/CheckItem.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,119 @@
package com.fzzy.igds.dzhwk.domain;
import com.bstek.dorado.annotation.PropertyDef;
import lombok.Data;
import javax.persistence.*;
import java.io.Serializable;
/**
 * @Description åŒ–验项
 * @Author CZT
 * @Date 2025/05/28 19:06
 */
@Data
@Entity
@IdClass(CheckItemKey.class)
@Table(name = "D_CHECK_ITEM")
public class CheckItem implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    @Id
    @Column(name = "CHECK_ID_", length = 40)
    @PropertyDef(label = "检测编码")
    private String checkId;
    @Id
    @Column(name = "COMPANY_ID_", length = 10)
    @PropertyDef(label = "组织编码")
    private String companyId;
    @Id
    @Column(name = "STANDARD_ID_", length = 10)
    @PropertyDef(label = "检测项编码")
    private String standardId;
    @Column(name = "STANDARD_NAME_", length = 50)
    @PropertyDef(label = "化验项")
    private String standardName;
    @Column(name = "UNIT_", length = 20)
    @PropertyDef(label = "单位")
    private String unit;
    @Column(name = "UPPER_LIMIT_")
    @PropertyDef(label = "标准伐值")
    private Double upperLimit;
    @Column(name = "OPERA_SYMBOL_", length = 4)
    @PropertyDef(label = "运算符号")
    private String operaSymbol;
    @Column(name = "RULE_NUM_")
    @PropertyDef(label = "扣重系数")
    private Double ruleNum;
    @Column(name = "RULE_ADD_")
    @PropertyDef(label = "增重%")
    private Double ruleAdd;
    @Column(name = "RULE_ADD_END_")
    @PropertyDef(label = "增重上限%")
    private Double ruleAddEnd;
    @Column(name = "RULE_REDUCE_")
    @PropertyDef(label = "扣重值%")
    private Double ruleReduce;
    @Column(name = "VALUE_", length = 40)
    @PropertyDef(label = "检测值")
    private String value;
    @Column(name = "RULE_PRICE_")
    @PropertyDef(label = "扣费系数")
    private Double rulePrice;
    @Column(name = "RULE_REDUCE_PRICE_")
    @PropertyDef(label = "扣费")
    private Double ruleReducePrice;
    @Column(name = "ADD_NUM_")
    @PropertyDef(label = "增重", description = "单位:kG")
    private Double addNum;
    @Column(name = "DE_NUM_")
    @PropertyDef(label = "扣重", description = "单位:kG")
    private Double deNum;
    @Column(name = "ADD_PRICE_")
    @PropertyDef(label = "增价", description = "单位:元")
    private Double addPrice;
    @Column(name = "DE_PRICE_")
    @PropertyDef(label = "扣价", description = "单位:元")
    private Double dePrice;
    @Column(name = "RESULT_", length = 2)
    @PropertyDef(label = "检验结果", description = "0=不合格 1=合格")
    private String result;
    @Column(name = "REMARKS_", length = 50)
    @PropertyDef(label = "备注")
    private String remarks;
    @Transient
    @PropertyDef(label = "运算符号值,只做页面显示用")
    private String operaSymbolValue;
    @Transient
    @PropertyDef(label = "湿度")
    private double perWet;
    @Transient
    @PropertyDef(label = "杂质")
    private double perImpurity;
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/CheckItemKey.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,18 @@
package com.fzzy.igds.dzhwk.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.io.Serializable;
@Data
@AllArgsConstructor
public class CheckItemKey implements Serializable {
        private String checkId;
        private String companyId;
        private String standardId;
    public CheckItemKey(){
            super();
        }
    }
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/Company.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,155 @@
package com.fzzy.igds.dzhwk.domain;
import com.bstek.dorado.annotation.PropertyDef;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
 * @Description ä»“储单位实体
 * @Author CZT
 * @Date 2025/05/28 18:58
 */
@Data
@Entity
@Table(name = "D_COMPANY")
public class Company implements Serializable {
    @Id
    @Column(name = "ID_", length = 40)
    @PropertyDef(label = "部门id",description = "系统内使用,绑定部门表")
    private String id;
    @Column(name = "COMPANY_ID_", length = 10)
    @PropertyDef(label = "组织编码")
    private String companyId;
    /*----------国标字段----------*/
    @PropertyDef(label = "单位代码")
    @Column(name = "dwdm", length = 18)
    private String dwdm;
    @PropertyDef(label = "统一单位编码")
    @Column(name = "tydwbm", length = 20)
    private String tydwbm;
    @PropertyDef(label = "单位名称")
    @Column(name = "dwmc", length = 256)
    private String dwmc;
    @PropertyDef(label = "单位类型")
    @Column(name = "dwlx", length = 2)
    private String dwlx;
    @PropertyDef(label = "注册日期")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Column(name = "zcrq")
    private Date zcrq;
    @PropertyDef(label = "注册资本")
    @Column(name = "zczb", precision = 20, scale = 6)
    private Double zczb;
    @PropertyDef(label = "资产总额")
    @Column(name = "zcze", precision = 20, scale = 6)
    private Double zcze;
    @PropertyDef(label = "法定代表人")
    @Column(name = "fddbr", length = 100)
    private String fddbr;
    @PropertyDef(label = "法人身份证号")
    @Column(name = "frsfzh", length = 18)
    private String frsfzh;
    @PropertyDef(label = "法人联系方式")
    @Column(name = "frlxfs", length = 50)
    private String frlxfs;
    @PropertyDef(label = "企业联系人")
    @Column(name = "qylxr", length = 100)
    private String qylxr;
    @PropertyDef(label = "办公电话")
    @Column(name = "bgdh", length = 50)
    private String bgdh;
    @PropertyDef(label = "注册地址")
    @Column(name = "zcdz", length = 512)
    private String zcdz;
    @PropertyDef(label = "电子邮箱")
    @Column(name = "dzyx", length = 50)
    private String dzyx;
    @PropertyDef(label = "企业官方网站地址")
    @Column(name = "qygfwzdz", length = 128)
    private String qygfwzdz;
    @PropertyDef(label = "传真号码")
    @Column(name = "czhm", length = 32)
    private String czhm;
    @PropertyDef(label = "邮政编码")
    @Column(name = "yzbm", length = 6)
    private String yzbm;
    @PropertyDef(label = "行政区划代码")
    @Column(name = "xzqhdm", length = 6)
    private String xzqhdm;
    @PropertyDef(label = "行政区划名称")
    @Column(name = "xzqhmc", length = 6)
    private String xzqhmc;
    @PropertyDef(label = "上级单位名称")
    @Column(name = "sjdwmc", length = 256)
    private String sjdwmc;
    @PropertyDef(label = "上级单位代码")
    @Column(name = "sjdwdm", length = 18)
    private String sjdwdm;
    @PropertyDef(label = "上级单位统一编码")
    @Column(name = "sjdwtybm", length = 20)
    private String sjdwtybm;
    @PropertyDef(label = "库区数")
    @Column(name = "kqs")
    private Integer kqs;
    @PropertyDef(label = "仓房数")
    @Column(name = "cfs")
    private Integer cfs;
    @PropertyDef(label = "油罐数")
    @Column(name = "ygs")
    private Integer ygs;
    @PropertyDef(label = "经度")
    @Column(name = "jd", precision = 20, scale = 6)
    private Double jd;
    @PropertyDef(label = "纬度")
    @Column(name = "wd", precision = 20, scale = 6)
    private Double wd;
    @PropertyDef(label = "单位状态")
    @Column(name = "dwzt",length = 1)
    private String dwzt;
    @PropertyDef(label = "更新时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "zhgxsj")
    private Date zhgxsj;
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/Depot.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,219 @@
package com.fzzy.igds.dzhwk.domain;
import com.bstek.dorado.annotation.PropertyDef;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fzzy.igds.dzhwk.constant.*;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
/**
 * @Description è´§ä½å®žä½“
 * @Author CZT
 * @Date 2025/05/28 18:45
 */
@Data
@Entity
@Table(name = "D_DEPOT")
public class Depot implements Serializable {
    @Id
    @Column(name = "ID_", length = 50)
    @PropertyDef(label = "货位编号")
    private String id;
    @Column(name = "COMPANY_ID_", length = 10)
    @PropertyDef(label = "组织编码")
    private String companyId;
    @Column(name = "DEPT_ID_", length = 40)
    @PropertyDef(label = "所属分库")
    private String deptId;
    @Excel(name = "货位名称", sort = 1)
    @Column(name = "NAME_", length = 50)
    @PropertyDef(label = "货位名称")
    private String name;
    @Column(name = "BUILDING_ID_", length = 40)
    @PropertyDef(label = "所属仓房")
    private String buildingId;
    @Column(name = "GRANARY_ID_", length = 40)
    @PropertyDef(label = "所属廒间")
    private String granaryId;
    @Excel(name = "仓库类型", sort = 11, readConverterExp = "01=平房仓,02=立筒仓,03=浅圆仓,04=储油罐,05=楼房仓,99=其他")
    @Column(name = "DEPOT_TYPE_", length = 10)
    @PropertyDef(label = "仓库类型", description = "根据国标配置类型,平房仓、立筒仓、浅圆仓、储油罐")
    private String depotType;
    @Excel(name = "货位状态", sort = 2, readConverterExp = "1=空仓,2=入库中,3=封仓,31=封仓-气调中,32=封仓-熏蒸中,33=封仓-通风中")
    @Column(name = "DEPOT_STATUS_", length = 10)
    @PropertyDef(label = "仓库状态", description = "与库存表关联,通过库存变更")
    private String depotStatus;
    @Column(name = "STORE_TYPE_", length = 6)
    @PropertyDef(label = "储粮方式", description = "与库存表关联")
    private String storeType;
    @Column(name = "STORAGE_MAX_")
    @PropertyDef(label = "设计储量", description = "单位:KG")
    private Double storageMax;
    @Excel(name = "实际储量(KG)", sort = 6)
    @Column(name = "STORAGE_REAL_")
    @PropertyDef(label = "实际储量", description = "单位:KG,通过库存变更")
    private Double storageReal;
    @Excel(name = "粮食性质", sort = 4, dictType = "FOOD_TYPE_")
    @Column(name = "FOOD_TYPE_", length = 10)
    @PropertyDef(label = "粮食性质", description = "与库存表关联,通过库存变更")
    private String foodType;
    @Excel(name = "粮食品种", sort = 3, dictType = "FOOD_VARIETY_")
    @Column(name = "FOOD_VARIETY_", length = 10)
    @PropertyDef(label = "粮食品种", description = "与库存表关联,通过库存变更")
    private String foodVariety;
    @Excel(name = "粮食等级", sort = 5, dictType = "FOOD_LEVEL_")
    @Column(name = "FOOD_LEVEL_", length = 10)
    @PropertyDef(label = "粮食等级", description = "与库存表关联,通过库存变更")
    private String foodLevel;
    @Column(name = "FOOD_LOCATION_ID_", length = 50)
    @PropertyDef(label = "粮食产地")
    private String foodLocationId;
    @Excel(name = "粮食产地", sort = 8)
    @Column(name = "FOOD_LOCATION_", length = 50)
    @PropertyDef(label = "粮食产地", description = "与库存表关联,通过库存变更")
    private String foodLocation;
    @Excel(name = "粮食年份", sort = 7)
    @Column(name = "FOOD_YEAR_", length = 10)
    @PropertyDef(label = "粮食年份", description = "与库存表关联,通过库存变更")
    private String foodYear;
    @Column(name = "PER_WET_")
    @PropertyDef(label = "水分", description = "百分比,默认为空,来源质检信息")
    private Double perWet;
    @Column(name = "PER_IMPURITY_")
    @PropertyDef(label = "杂质", description = "百分比,默认为空,来源质检信息")
    private Double perImpurity;
    @Column(name = "BULK_WEIGHT_")
    @PropertyDef(label = "容重 g/L", description = "容重 g/L")
    private Double bulkWeight;
    @Column(name = "STORE_KEEPER_", length = 30)
    @PropertyDef(label = "保管员账号")
    private String storeKeeper;
    @Excel(name = "保管员", sort = 10)
    @Column(name = "STORE_KEEPER_NAME_", length = 50)
    @PropertyDef(label = "保管员", description = "中文名称")
    private String storeKeeperName;
    @Excel(name = "入库日期", sort = 9, dateFormat = "yyyy-MM-dd")
    @Column(name = "STORE_DATE_")
    @PropertyDef(label = "入库时间", description = "默认空,通过库存变更")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date storeDate;
    @Column(name = "CHECK_DATE_")
    @PropertyDef(label = "最后质检时间", description = "默认空,来源质检信息")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date checkDate;
    @Column(name = "REMARK_", length = 200)
    @PropertyDef(label = "备注", description = "备注信息")
    private String remark;
    @Column(name = "UPDATE_TIME_")
    @PropertyDef(label = "数据更新时间")
    private Date updateTime;
    @Column(name = "BH_ID_", length = 50)
    @PropertyDef(label = "邦海粮情分机仓库编码")
    private String bhId;
    @Column(name = "ORDER_NUM_")
    @PropertyDef(label = "显示顺序")
    private Integer orderNum = 1;
    // ------------其他属性信息------------//
    @Transient
    @PropertyDef(label = "粮食品种")
    private String foodVarietyName;
    @Transient
    @PropertyDef(label = "粮食性质")
    private String foodTypeName;
    @Transient
    @PropertyDef(label = "仓库类型")
    private String depotTypeName;
    @Transient
    @PropertyDef(label = "仓库类型")
    private String depotStatusName;
    @Transient
    @PropertyDef(label = "粮食等级")
    private String foodLevelName;
    @Transient
    @PropertyDef(label = "X坐标", description = "三维模型中坐标,页面无需维护")
    private Double posX;
    @Transient
    @PropertyDef(label = "Y坐标", description = "三维模型中坐标,页面无需维护")
    private Double posY;
    @Transient
    @PropertyDef(label = "保管员等级")
    private String storeKeeperLevel = "高级保管员";
    @Transient
    @PropertyDef(label = "保管员等级")
    private String storeKeeperPhone = "####";
    public String getFoodLevelName() {
        if (null != this.foodLevel) {
            return FoodLevel.getMsg(this.foodLevel);
        }
        return null;
    }
    public String getFoodVarietyName() {
        if (null != this.foodVariety) {
            return FoodVariety.getMsg(this.foodVariety);
        }
        return null;
    }
    public String getFoodTypeName() {
        if (null != this.foodType) {
            return FoodType.getMsg(this.foodType);
        }
        return null;
    }
    public String getDepotTypeName() {
        if (null != this.depotType) {
            return DepotType.getMsg(this.depotType);
        }
        return null;
    }
    public String getDepotStatusName() {
        if (null != this.depotStatus) {
            return DepotStatus.getMsg(this.depotStatus);
        }
        return null;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/DepotStatusConfirm.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,111 @@
package com.fzzy.igds.dzhwk.domain;
import com.bstek.dorado.annotation.PropertyDef;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
/**
 * @Desc: ä»“房状态确认表
 * @author:
 * @update-time:
 */
@Data
@Entity
@Table(name = "D_DEPOT_STATUS_CONFIRM")
public class DepotStatusConfirm {
    public static String SORT_PROP = "fcqrdh";
    /**
     * 21yyyyMMdd+四位顺序号
     * 21202405041234
     */
    @Id
    @Column(name = "fcqrdh", length = 14)
    @PropertyDef(label = "封仓确认单号", description = "根据一定的规则生成")
    private String fcqrdh;
    @Column(name = "COMPANY_ID_", length = 10)
    @PropertyDef(label = "组织编码")
    private String companyId;
    @Column(name = "DEPT_ID_", length = 50)
    @PropertyDef(label = "库区编码")
    private String deptId;
    @Column(name = "DEPOT_ID_", length = 28)
    @PropertyDef(label = "货位编码")
    private String depotId;
    /*** ------------------------确认内容-------------------------------------**/
    @Column(name = "fcrq")
    @PropertyDef(label = "封仓日期", description = "yyyy-MM-dd")
    private Date fcrq;
    @Column(name = "FOOD_VARIETY_", length = 20)
    @PropertyDef(label = "粮食品种")
    private String foodVariety;
    @Column(name = "FOOD_TYPE_", length = 20)
    @PropertyDef(label = "粮食性质")
    private String foodType;
    @Column(name = "FOOD_LEVEL_", length = 10)
    @PropertyDef(label = "粮食等级")
    private String foodLevel;
    @Column(name = "FOOD_LOCATION_ID_", length = 20)
    @PropertyDef(label = "产地名称代码")
    private String foodLocationId;
    @Column(name = "FOOD_LOCATION_", length = 40)
    @PropertyDef(label = "产地名称")
    private String foodLocation;
    @Column(name = "FOOD_YEAR_", length = 10)
    @PropertyDef(label = "收货年度")
    private String foodYear;
    @Column(name = "COUNTRY_", length = 10)
    @PropertyDef(label = "国别")
    private String country;
    @Column(name = "STORE_KEEPER_NAME_", length = 64)
    @PropertyDef(label = "保管员", description = "中文名称")
    private String storeKeeperName;
    @Column(name = "fcsl")
    @PropertyDef(label = "封仓数量", description = "所有入库信息中的净重之和,单位KG")
    private Double fcsl = 0.0;
    /*** ------------------------公共字段-------------------------------------**/
    @Column(name = "APPLY_USER_", length = 50)
    @PropertyDef(label = "申请人")
    private String applyUser;
    @Column(name = "DEPT_AUDIT_USER_", length = 50)
    @PropertyDef(label = "部门审核人")
    private String deptAuditUser;
    @Column(name = "LEADER_AUDIT_USER_", length = 50)
    @PropertyDef(label = "领导审核人")
    private String leaderAuditUser;
    // å¤‡æ³¨
    @Column(name = "REMARKS_", length = 200)
    @PropertyDef(label = "备注信息")
    private String remarks;
    @Column(name = "UPDATE_TIME_")
    @PropertyDef(label = "更新时间")
    private Date updateTime;
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/DepotStore.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,170 @@
package com.fzzy.igds.dzhwk.domain;
import com.bstek.dorado.annotation.PropertyDef;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
 * @Desc: ç²®é£Ÿåº“存管理,根据国标标结果要求创建
 * @author: Andy
 * @update-time: 2022/11/17
 */
@Data
@Entity
@Table(name = "D_DEPOT_STORE")
public class DepotStore implements Serializable {
    public static String SORT_PROP = "id";
    @Id
    @Column(name = "ID_", length = 40)
    private String id;
    @Column(name = "COMPANY_ID_", length = 10)
    @PropertyDef(label = "组织编码")
    private String companyId;
    @Column(name = "DEPT_ID_", length = 40)
    @PropertyDef(label = "所属库区")
    private String deptId;
    @Column(name = "DEPOT_ID_", length = 50)
    @PropertyDef(label = "所属仓库")
    private String depotId;
    @Column(name = "COUNTRY_", length = 10)
    @PropertyDef(label = "国别")
    private String country;
    @Column(name = "STORE_TYPE_", length = 6)
    @PropertyDef(label = "储粮方式", description = "1:散装储粮 2:包装储粮 3:围包散存 9:其他")
    private String storeType;
    @Column(name = "MANAGE_TYPE_", length = 6)
    @PropertyDef(label = "管理方式", description = "01 ç›´å‚¨02 ä»£å‚¨03 ç§Ÿä»“04 å§”托")
    private String manageType;
    @Column(name = "FOOD_TYPE_", length = 10)
    @PropertyDef(label = "粮食性质")
    private String foodType;
    @Column(name = "FOOD_VARIETY_", length = 10)
    @PropertyDef(label = "粮食品种")
    private String foodVariety;
    @Column(name = "FOOD_LEVEL_", length = 10)
    @PropertyDef(label = "粮食等级")
    private String foodLevel;
    @Column(name = "FOOD_LOCATION_ID_", length = 50)
    @PropertyDef(label = "粮食产地")
    private String foodLocationId;
    @Column(name = "FOOD_LOCATION_", length = 50)
    @PropertyDef(label = "粮食产地")
    private String foodLocation;
    @Column(name = "FOOD_YEAR_", length = 10)
    @PropertyDef(label = "收货年度")
    private String foodYear;
    @Column(name = "DEPOT_STATUS_", length = 10)
    @PropertyDef(label = "仓库状态", description = "1=空仓、2=入库中、3=满仓、4=出库中、9=其他")
    private String depotStatus;
    @Column(name = "STORE_DATE_")
    @PropertyDef(label = "入库时间", description = "入库时间,第一车粮食入仓时间,格式:yyyy-MM-dd HH:mm:ss")
    private Date storeDate;
    @Column(name = "FULL_DATE_")
    @PropertyDef(label = "封仓日期", description = "当货位(油罐)状态为封仓时,此项为必填项")
    private Date fullDate;
    @Column(name = "OUT_DATE_")
    @PropertyDef(label = "出仓时间", description = "出库时间,最后一车粮食出仓完成时间,格式:yyyy-MM-dd HH:mm:ss")
    private Date outDate;
    @Column(name = "STORAGE_REAL_")
    @PropertyDef(label = "实际储量", description = "单位:KG")
    private Double storageReal;
    @Column(name = "STORE_SETTLE__")
    @PropertyDef(label = "计价数量", description = "单位:KG")
    private Double storageSettle;
    @Column(name = "GRAIN_HEIGHT_")
    @PropertyDef(label = "装粮线高", description = "单位:米")
    private Double grainHeight;
    @Column(name = "GRAIN_VOLUME_")
    @PropertyDef(label = "装粮体积", description = "单位:立方米")
    private Double grainVolume;
    @Column(name = "REMARK_", length = 250)
    @PropertyDef(label = "备注", description = "备注信息")
    private String remark;
    @Column(name = "UPDATE_USER_", length = 50)
    @PropertyDef(label = "修改人")
    private String updateUser;
    @PropertyDef(label = "粮权归属单位代码")
    @Column(name = "lqgsdwdm", length = 18)
    private String lqgsdwdm;
    @Column(name = "UPDATE_DATE_")
    @PropertyDef(label = "修改时间")
    private Date updateDate;
    @Column(name = "CREATE_DATE_")
    private Date createDate;
    public DepotStore() {
    }
    public DepotStore(String id, String companyId, String deptId, String depotId, String storeType, String foodType, String foodVariety, String foodLevel, String foodLocation, String depotStatus, String foodYear, Date storeDate, Double storageReal, Date fullDate, Date outDate, Double grainHeight, Double grainVolume, String remark, String updateUser, Date updateDate, Date createDate) {
        this.id = id;
        this.companyId = companyId;
        this.deptId = deptId;
        this.depotId = depotId;
        this.storeType = storeType;
        this.foodType = foodType;
        this.foodVariety = foodVariety;
        this.foodLevel = foodLevel;
        this.foodLocation = foodLocation;
        this.depotStatus = depotStatus;
        this.foodYear = foodYear;
        this.storeDate = storeDate;
        this.storageReal = storageReal;
        this.fullDate = fullDate;
        this.outDate = outDate;
        this.grainHeight = grainHeight;
        this.grainVolume = grainVolume;
        this.remark = remark;
        this.updateUser = updateUser;
        this.updateDate = updateDate;
    }
    public DepotStore(Depot depot, String depotStatus) {
        this.companyId = depot.getCompanyId();
        this.deptId = depot.getDeptId();
        this.depotId = depot.getId();
        this.storeType = depot.getStoreType();
        this.foodType = depot.getFoodType();
        this.foodVariety = depot.getFoodVariety();
        this.foodLevel = depot.getFoodLevel();
        this.foodLocation = depot.getFoodLocation();
        this.depotStatus = depotStatus;
        this.foodYear = depot.getFoodYear();
        this.storageReal = depot.getStorageReal();
        this.storeDate = new Date();
        this.updateDate = new Date();
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/Dept.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,107 @@
package com.fzzy.igds.dzhwk.domain;
import com.bstek.dorado.annotation.PropertyDef;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
 * @Description åº“区实体
 * @Author CZT
 * @Date 2025/05/28 19:02
 */
@Data
@Entity
@Table(name = "D_DEPT")
public class Dept implements Serializable {
    @Id
    @Column(name = "ID_", length = 40)
    @PropertyDef(label = "部门id",description = "系统内使用,绑定部门表")
    private String id;
    @Column(name = "COMPANY_ID_", length = 10)
    @PropertyDef(label = "组织编码")
    private String companyId;
    /*----------国标字段----------*/
    @PropertyDef(label = "库区代码")
    @Column(name = "kqdm", length = 21)
    private String kqdm;
    @PropertyDef(label = "统一库区编码")
    @Column(name = "tykqbm", length = 22)
    private String tykqbm;
    @PropertyDef(label = "单位代码")
    @Column(name = "dwdm", length = 18)
    private String dwdm;
    @PropertyDef(label = "统一单位编码")
    @Column(name = "tydwbm", length = 20)
    private String tydwbm;
    @PropertyDef(label = "库区名称")
    @Column(name = "kqmc", length = 256)
    private String kqmc;
    @PropertyDef(label = "库区地址")
    @Column(name = "kqdz", length = 512)
    private String kqdz;
    @PropertyDef(label = "行政区划代码")
    @Column(name = "xzqhdm", length = 6)
    private String xzqhdm;
    @PropertyDef(label = "行政区划名称")
    @Column(name = "xzqhmc", length = 6)
    private String xzqhmc;
    @PropertyDef(label = "库区产权", description = "1: è‡ªæœ‰ 2:租赁 3:共有 4:混合 9:其他")
    @Column(name = "kqcq", length = 1)
    private String kqcq;
    @PropertyDef(label = "有效仓容")
    @Column(name = "yxcr", precision = 20, scale = 6)
    private Double yxcr;
    @PropertyDef(label = "有效罐容")
    @Column(name = "yxgr", precision = 20, scale = 6)
    private Double yxgr;
    @PropertyDef(label = "占地面积")
    @Column(name = "zdmj", precision = 20, scale = 6)
    private Double zdmj;
    @PropertyDef(label = "仓房数")
    @Column(name = "cfs")
    private Integer cfs;
    @PropertyDef(label = "油罐数")
    @Column(name = "ygs")
    private Integer ygs;
    @PropertyDef(label = "库区经度")
    @Column(name = "jd", precision = 20, scale = 6)
    private Double jd;
    @PropertyDef(label = "库区纬度")
    @Column(name = "wd", precision = 20, scale = 6)
    private Double wd;
    @PropertyDef(label = "库区状态", description = "1:正常(默认) 2:退出储备粮承储")
    @Column(name = "kqzt", length = 1)
    private String kqzt;
    @PropertyDef(label = "最后更新时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Column(name = "zhgxsj")
    private Date zhgxsj;
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/DicArea.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,53 @@
package com.fzzy.igds.dzhwk.domain;
import com.bstek.dorado.annotation.PropertyDef;
import com.fzzy.igds.dzhwk.constant.Constant;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
/**
 * åœ°åŒºåŒºåŸŸç 
 *
 * @author
 */
@Data
@Entity
@Table(name = "D_DIC_AREA")
public class DicArea implements Serializable {
    public static String SORT_PROP = "code";
    @Id
    @Column(name = "CODE_", length = 20)
    @PropertyDef(label = "编号")
    private String code;
    @Column(name = "NAME_", length = 50)
    @PropertyDef(label = "名称")
    private String name;
    @Column(name = "PARENT_CODE_", length = 20)
    @PropertyDef(label = "父编号", description = "省级默认为0")
    private String parentCode;
    @Column(name = "TYPE_", length = 50)
    @PropertyDef(label = "类型", description = "1-省;2-市;3-区县")
    private String type;
    @PropertyDef(label = "简拼")
    @Column(name = "SIMPLE_", length = 20)
    private String simple;
    @PropertyDef(label = "是否禁用")
    @Column(name = "DISABLED_TAG_", length = 1)
    private String disabledTag = Constant.YN_N;
    @Column(name = "REMARK_", length = 200)
    @PropertyDef(label = "备注信息")
    private String remark;
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/Grain.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,114 @@
package com.fzzy.igds.dzhwk.domain;
import com.bstek.dorado.annotation.PropertyDef;
import lombok.Data;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
/**
 * ç²®æƒ…数据-主表
 * <p>
 * æ›´æ–°è®°å½•:
 * 1,删除行数据的表记录,调整为数据直接文本保存主表中
 * 2,保留点位坐标信息,便于以后点位走势图查看
 *
 * @author Andy
 */
@Entity
@Table(name = "D_GRAIN")
@Data
@IdClass(GrainKey.class)
public class Grain implements Serializable {
    public static String SORT_PROP = "batchId";
    @Id
    @Column(name = "BATCH_ID_", length = 30)
    @PropertyDef(label = "批次编号")
    private String batchId;
    @Id
    @Column(name = "COMPANY_ID_", length = 10)
    @PropertyDef(label = "组织编码", description = "")
    private String companyId;
    @Id
    @Column(name = "DEPOT_ID_", length = 50)
    @PropertyDef(label = "所属仓库", description = "仓库编号")
    private String depotId;
    @Column(name = "TEMP_MIN_")
    @PropertyDef(label = "最低温粮温", description = "单位℃,粮情最低温")
    private Double tempMin = 0.0;
    @Column(name = "TEMP_MAX_")
    @PropertyDef(label = "最高粮温", description = "单位℃,粮情最高温")
    private Double tempMax = 0.0;
    @Column(name = "TEMP_AVE_")
    @PropertyDef(label = "平均粮温", description = "单位℃,粮情平均温度")
    private Double tempAve = 0.0;
    @Column(name = "HUMIDITY_IN_")
    @PropertyDef(label = "仓内湿度")
    private Double humidityIn;
    @Column(name = "TEMP_IN_")
    @PropertyDef(label = "仓内温度")
    private Double tempIn;
    @Column(name = "HUMIDITY_OUT_")
    @PropertyDef(label = "仓外湿度")
    private Double humidityOut;
    @Column(name = "TEMP_OUT_")
    @PropertyDef(label = "仓外温度")
    private Double tempOut;
    @Column(name = "CABLE_", length = 20)
    @PropertyDef(label = "层行列", description = "用逗号隔开的配置信息,层-行-列")
    private String cable;
    @PropertyDef(label = "筒仓层配置", description = "用-隔开的配置信息")
    @Column(name = "CABLE_CIR_", length = 20)
    private String cableCir;
    @PropertyDef(label = "油面高度", description = "用-隔开的两个值,油面高度-建筑高度")
    @Column(name = "OIL_HEIGHT_", length = 20)
    private String oilHeight;
    @Column(name = "WEATHER_", length = 20)
    @PropertyDef(label = "天气", description = "直接填写中文信息,晴,阴雨天")
    private String weather = "";
    @Column(name = "RECEIVE_DATE_")
    @PropertyDef(label = "接收时间")
    private Date receiveDate;
    @Column(name = "CHECK_USER_", length = 30)
    @PropertyDef(label = "检测人")
    private String checkUser;
    @Column(name = "REMARK_", length = 500)
    @PropertyDef(label = "备注", description = "备注")
    private String remark;
    @Column(name = "POINTS_", length = 2000)
    @PropertyDef(label = "采集点信息", description = "用逗号隔开的温度信息信息")
    private String points;
    @Column(name = "PUSH_TAG_", length = 2)
    @PropertyDef(label = "推送标记", description = "推送平台标记")
    private String pushTag = "N";
    @Column(name = "BATCH_TAG_", length = 2)
    @PropertyDef(label = "生成方式", description = "01-设备采集;02-手动补录")
    private String batchTag = "01";
    @Transient
    @PropertyDef(label = "所属分库", description = "分库编码,非数据库字段")
    private String deptId;
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/GrainKey.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,20 @@
package com.fzzy.igds.dzhwk.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.io.Serializable;
@Data
@AllArgsConstructor
public class GrainKey implements Serializable {
    private String batchId;
    private String companyId;
    private String depotId;
    public GrainKey() {
        super();
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/Granary.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,80 @@
package com.fzzy.igds.dzhwk.domain;
import com.alibaba.fastjson.annotation.JSONField;
import com.bstek.dorado.annotation.PropertyDef;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;
/**
 * @Description å»’间实体
 * @Author CZT
 * @Date 2025/05/28 18:48
 */
@Data
@Entity
@Table(name = "D_GRANARY")
public class Granary implements Serializable {
    public static String SORT_PROP = "ajdh";
    @Id
    @PropertyDef(label = "廒间代码")
    @Column(name = "ajdh", length = 28)
    private String ajdh;
    @Column(name = "COMPANY_ID_", length = 10)
    @PropertyDef(label = "组织编码")
    private String companyId;
    @Column(name = "DEPT_ID_", length = 40)
    @PropertyDef(label = "所属分库")
    private String deptId;
    @PropertyDef(label = "廒间名称")
    @Column(name = "ajmc", length = 100)
    private String ajmc;
    @PropertyDef(label = "仓房(或油罐)编码")
    @Column(name = "cfbh", length = 25)
    private String cfbh;
    @PropertyDef(label = "廒间长度")
    @Column(name = "ajcd", precision = 8, scale = 4)
    private double ajcd;
    @PropertyDef(label = "廒间宽度")
    @Column(name = "ajkd", precision = 8, scale = 4)
    private double ajkd;
    @PropertyDef(label = "廒间高度")
    @Column(name = "ajgd", precision = 8, scale = 4)
    private double ajgd;
    @PropertyDef(label = "廒间设计仓容")
    @Column(name = "ajsjcr", precision = 20, scale = 3)
    private double ajsjcr;
    @PropertyDef(label = "廒间联系电话")
    @Column(name = "ajlxdh", length = 20)
    private String ajlxdh;
    @JSONField(format = "yyyy-MM-dd")
    @PropertyDef(label = "廒间启用日期")
    @Column(name = "ajqyrq")
    private Date ajqyrq;
    @PropertyDef(label = "廒间状态")
    @Column(name = "ajzt", length = 1)
    private String ajzt;
    @Column(name = "UPDATE_TIME_")
    @PropertyDef(label = "数据更新时间")
    private Date updateTime;
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/dzhwk/domain/MQuality.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,173 @@
package com.fzzy.igds.dzhwk.domain;
import com.alibaba.fastjson.annotation.JSONField;
import com.bstek.dorado.annotation.PropertyDef;
import lombok.Data;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
 * @Description è´¨æ£€å®žä½“
 * @Author CZT
 * @Date 2025/05/28 19:06
 */
@Data
@Entity
@Table(name = "D_M_QUALITY")
public class MQuality implements Serializable {
    public static String SORT_PROP = "id";
    @Id
    @Column(name = "ID_", length = 40)
    @PropertyDef(label = "主键ID", description = "yyyyMMdd + 4位顺序号")
    private String id;
    @Column(name = "COMPANY_ID_", length = 10)
    @PropertyDef(label = "组织编码")
    private String companyId;
    @Column(name = "DEPT_ID_", length = 40)
    @PropertyDef(label = "库区编码")
    private String deptId;
    @Column(name = "DEPOT_ID_", length = 50)
    @PropertyDef(label = "仓库编码")
    private String depotId;
    @Column(name = "FOOD_VARIETY_", length = 10)
    @PropertyDef(label = "粮食品种")
    private String foodVariety;
    @Column(name = "FOOD_LEVEL_", length = 10)
    @PropertyDef(label = "粮食等级")
    private String foodLevel;
    @PropertyDef(label = "入库日期")
    @Column(name = "STORE_DATE_")
    private Date storeDate;
    @Column(name = "TYPE_", length = 10)
    @PropertyDef(label = "检验类别", description = "01:入仓验收 02:出仓检验 03:3 æœˆæœ«æ™®æ£€04:9 æœˆæœ«æ™®æ£€ 05:入仓初检 06:月度检查 07:3 æœˆæœ«åº“内普查 08:9 æœˆæœ«åº“内普查")
    private String type;
    @Column(name = "TIME_")
    @PropertyDef(label = "检验时间")
    private Date time;
    @Column(name = "UNIT_", length = 50)
    @PropertyDef(label = "检验单位")
    private String unit;
    @Column(name = "USER_", length = 50)
    @PropertyDef(label = "检验人", description = "检验人员姓名,若有多个保管员")
    private String user;
    @Column(name = "STANDARD_", length = 4)
    @PropertyDef(label = "检验依据", description = "1-国标,0-其他")
    private String standard;
    @PropertyDef(label = "指标类别", description = "1: è´¨é‡æŒ‡æ ‡æ£€éªŒ2:储存品质检验3:食品安全检验 å¦‚果同时检验了多个,用#隔开,例如:1#2#3")
    @Column(name = "zblb", length = 8)
    private String zblb;
    @Column(name = "RESULT_", length = 40)
    @PropertyDef(label = "检验结论", description = "1、质量指标填写/达标/不达标 2、储存品质指标填写“宜存”、轻度不宜存”、“重度不宜存”3、食品安全指标填写“合格”、不合格” å¤šé¡¹æŒ‡æ ‡æ—¶ä»¥#分隔,例如:达标|综合判定#宜存#合格 ")
    private String result;
    @Column(name = "spaqzbsfhg", length = 40)
    @PropertyDef(label = "食品安全指标是否合格", description = "0-不合格,1-合格")
    private String spaqzbsfhg;
    @JSONField(format = "yyyy-MM-dd")
    @PropertyDef(label = "签发日期")
    @Column(name = "qfrq")
    private Date qfrq;
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @PropertyDef(label = "报告出具时间")
    @Column(name = "bgcjsj")
    private Date bgcjsj;
    @PropertyDef(label = "审核人姓名")
    @Column(name = "shrxm", length = 64)
    private String shrxm;
    @PropertyDef(label = "扦样单编号")
    @Column(name = "qydbh", length = 64)
    private String qydbh;
    @Column(name = "CHECK_TIME_")
    @PropertyDef(label = "扦样时间", required = true)
    private Date checkTime;
    @Column(name = "CHECK_AREA_", length = 50)
    @PropertyDef(label = "扦样区域")
    private String checkArea;
    @Column(name = "CHECK_USER_", length = 50)
    @PropertyDef(label = "扦样人", required = true)
    private String checkUser;
    @PropertyDef(label = "监督人姓名")
    @Column(name = "jdrxm", length = 64)
    private String jdrxm;
    @PropertyDef(label = "样品编号")
    @Column(name = "ypbh", length = 64)
    private String ypbh;
    @PropertyDef(label = "样品数量", required = true)
    @Column(name = "ypsl", precision = 20, scale = 6)
    private Double ypsl;
    @PropertyDef(label = "代表数量")
    @Column(name = "dbsl", precision = 20, scale = 6)
    private Double dbsl;
    @PropertyDef(label = "样品等级")
    @Column(name = "ypdj", length = 2)
    private String ypdj;
    @Column(name = "NORMAL_YEAR_", length = 10)
    @PropertyDef(label = "是否正常存储年限")
    private String normalYear;
    @Column(name = "REMARK_", length = 200)
    @PropertyDef(label = "备注", description = "备注信息")
    private String remark;
    @Column(name = "UPDATE_TIME_")
    @PropertyDef(label = "数据更新时间")
    private Date updateTime;
    @Column(name = "REPORT_TYPE_", length = 10)
    @PropertyDef(label = "报告类型", description = "1-单位检验,2-整体检验(加权平均),3-其他")
    private String reportType;
    /**
     * åŒ–验项目明细
     */
    @Transient
    private List<CheckItem> checkItems;
    /**
     * --------附件--------
     **/
    @Column(name = "FILE_ID_", length = 30)
    @PropertyDef(label = "附件id")
    private String fileId;
    @Column(name = "FILE_NAME_", length = 50)
    @PropertyDef(label = "附件名称")
    private String fileName;
    @Column(name = "FILE_TIME_")
    @PropertyDef(label = "附件上传时间")
    private Date fileTime;
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/BuildingService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,137 @@
package com.fzzy.igds.sys;
import com.fzzy.igds.dzhwk.constant.RedisConst;
import com.fzzy.igds.dzhwk.domain.Building;
import com.fzzy.igds.sys.repository.BuildingRepository;
import com.fzzy.igds.util.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.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
 * @Description ä»“房service层
 * @Author CZT
 * @Date 2024/11/20 19:03
 */
@Slf4j
@Service("sys.buildingService")
public class BuildingService {
    @Resource
    private BuildingRepository buildingRepository;
    @Resource
    private RedisCache redisCache;
    /**
     * jpa查询仓房信息
     * @param companyId
     * @param deptId
     * @return
     */
    public List<Building> getBuilding(String companyId, String deptId) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        if (StringUtils.isEmpty(deptId)) {
            deptId = ContextUtil.subDeptId(null);
        }
        return buildingRepository.getBuilding(companyId, deptId);
    }
    /**
     * ä¿å­˜ä»“房信息
     * @param data
     */
    public void saveOrUpdate(Building data) {
        if (StringUtils.isEmpty(data.getCompanyId())) {
            data.setCompanyId(ContextUtil.getCompanyId());
        }
        if (StringUtils.isEmpty(data.getDeptId())) {
            data.setDeptId(ContextUtil.subDeptId(null));
        }
        data.setUpdateTime(new Date());
        buildingRepository.save(data);
        refreshCacheBuilding(data.getCompanyId());
    }
    /**
     * åˆ é™¤ä»“房信息
     * @param data
     * @return
     */
    public String delData(Building data) {
        buildingRepository.delete(data);
        return null;
    }
    /**
     * èŽ·å–ç¼“å­˜ä¸­ä»“æˆ¿ä¿¡æ¯
     * @param companyId
     * @param deptId
     * @return
     */
    public List<Building> getCacheBuilding(String companyId, String deptId) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        if (StringUtils.isEmpty(deptId)) {
            deptId = ContextUtil.subDeptId(null);
        }
        String key = RedisConst.buildKey(companyId, RedisConst.KEY_BUILDING_LIST);
        List<Building> result = redisCache.getCacheObject(key);
        if (null == result) {
            refreshCacheBuilding(companyId);
            return null;
        }
        String finalDeptId = deptId;
        return result.stream().filter(item -> item.getDeptId().equals(finalDeptId))
                .collect(Collectors.toList());
    }
    /**
     * èŽ·å–ç¼“å­˜ä¸­ä»“æˆ¿ä¿¡æ¯
     * @param companyId
     * @param deptId
     * @param buildingId
     * @return
     */
    public Building getCacheBuilding(String companyId, String deptId, String buildingId) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        if (StringUtils.isEmpty(deptId)) {
            deptId = ContextUtil.subDeptId(null);
        }
        List<Building> result = getCacheBuilding(companyId, deptId);
        if (null == result) {
            refreshCacheBuilding(companyId);
            return null;
        }
        for (Building building : result) {
            if (buildingId.equals(building.getId())) {
                return building;
            }
        }
        return null;
    }
    public void refreshCacheBuilding(String companyId) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        List<Building> list = buildingRepository.getBuilding(companyId);
        redisCache.setCacheObject(RedisConst.buildKey(companyId, RedisConst.KEY_BUILDING_LIST), list);
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/CoreCompanyService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,92 @@
package com.fzzy.igds.sys;
import com.fzzy.igds.dzhwk.domain.Company;
import com.fzzy.igds.sys.repository.CompanyRepository;
import com.fzzy.igds.util.ContextUtil;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.utils.StringUtils;
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 2024/11/28 15:03
 */
@Slf4j
@Service("sys.coreCompanyService")
public class CoreCompanyService {
    @Resource
    private CompanyRepository companyRepository;
    /**
     * jpa查询公司信息
     * @param id
     * @return
     */
    public Company getDataById(String id) {
        if (StringUtils.isEmpty(id)) {
            return null;
        }
        return companyRepository.getDataById(id);
    }
    /**
     * jpa查询公司信息
     * @param companyId
     * @return
     */
    public List<Company> getAllData(String companyId) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        return companyRepository.getAllData(companyId);
    }
    /**
     * jpa查询公司信息
     * @param sysDept
     * @return
     */
    public Company initCompanyData(SysDept sysDept) {
        if (null == sysDept) {
            return null;
        }
        Company company = new Company();
        company.setId(sysDept.getDeptId() + "");
        company.setDwmc(sysDept.getDeptName());
        company.setCompanyId(sysDept.getCompanyId());
        this.saveOrUpdate(company);
        return company;
    }
    /**
     * ä¿å­˜ä»“房信息
     * @param data
     */
    public void saveOrUpdate(Company data) {
        if (StringUtils.isEmpty(data.getCompanyId())) {
            data.setCompanyId(ContextUtil.getCompanyId());
        }
        data.setZhgxsj(new Date());
        companyRepository.save(data);
    }
    /**
     * åˆ é™¤ä»“房信息
     * @param data
     * @return
     */
    public void delData(Company data) {
        companyRepository.delete(data);
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/CoreDeptService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,91 @@
package com.fzzy.igds.sys;
import com.fzzy.igds.dzhwk.domain.Dept;
import com.fzzy.igds.sys.repository.DeptRepository;
import com.fzzy.igds.util.ContextUtil;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.utils.StringUtils;
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 2024/11/28 19:03
 */
@Slf4j
@Service("sys.coreDeptService")
public class CoreDeptService {
    @Resource
    private DeptRepository deptRepository;
    /**
     * jpa查询公司信息
     * @param id
     * @return
     */
    public Dept getDataById(String id) {
        if (StringUtils.isEmpty(id)) {
            return null;
        }
        return deptRepository.getDataById(id);
    }
    /**
     * jpa查询信息
     * @param companyId
     * @return
     */
    public List<Dept> getAllData(String companyId) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        return deptRepository.getAllData(companyId);
    }
    /**
     * jpa查询公司信息
     * @param sysDept
     * @return
     */
    public Dept initDeptData(SysDept sysDept) {
        if (null == sysDept) {
            return null;
        }
        Dept dept = new Dept();
        dept.setId(sysDept.getDeptId() + "");
        dept.setKqmc(sysDept.getDeptName());
        dept.setCompanyId(sysDept.getCompanyId());
        this.saveOrUpdate(dept);
        return dept;
    }
    /**
     * ä¿å­˜ä¿¡æ¯
     * @param data
     */
    public void saveOrUpdate(Dept data) {
        if (StringUtils.isEmpty(data.getCompanyId())) {
            data.setCompanyId(ContextUtil.getCompanyId());
        }
        data.setZhgxsj(new Date());
        deptRepository.save(data);
    }
    /**
     * åˆ é™¤ä»“房信息
     * @param data
     * @return
     */
    public void delData(Dept data) {
        deptRepository.delete(data);
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/DepotService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,300 @@
package com.fzzy.igds.sys;
import com.fzzy.igds.dzhwk.constant.*;
import com.fzzy.igds.dzhwk.constant.RedisConst;
import com.fzzy.igds.dzhwk.domain.Depot;
import com.fzzy.igds.dzhwk.domain.DepotStore;
import com.fzzy.igds.sys.repository.DepotRepository;
import com.fzzy.igds.util.ContextUtil;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.mapper.SysDeptMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.*;
/**
 * @Description
 * @Author CZT
 * @Date 2024/11/22 16:56
 */
@Slf4j
@Service("sys.depotService")
public class DepotService {
    @Resource
    private DepotRepository depotRepository;
    @Resource
    private RedisCache redisCache;
    @Resource
    private SysDeptMapper deptMapper;
    @Resource
    private DepotStoreService depotStoreService;
    /**
     * jpa查询仓库列表
     * @param companyId
     * @param deptId
     * @return
     */
    public List<Depot> getData(String companyId, String deptId) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        if (StringUtils.isEmpty(deptId)) {
            deptId = ContextUtil.subDeptId(null);
        }
        return depotRepository.getDepot(companyId, deptId);
    }
    /**
     * jpa查询仓库列表
     * @param ids
     * @return
     */
    public List<Depot> getDepotByIds(List<String> ids) {
        if (null == ids ||ids.isEmpty()) {
            return null;
        }
        return depotRepository.getDepotByIds(ids);
    }
    /**
     * jpa保存更新仓库信息
     * @param depot
     */
    public void saveDepot(Depot depot) {
        if (StringUtils.isEmpty(depot.getCompanyId())) {
            depot.setCompanyId(ContextUtil.getCompanyId());
        }
        if (StringUtils.isEmpty(depot.getDeptId())) {
            depot.setDeptId(ContextUtil.subDeptId(null));
        }
        if(null == depot.getOrderNum()){
            depot.setOrderNum(1);
        }
        depotRepository.save(depot);
        flushCache(depot.getCompanyId());
    }
    /**
     * jpa更新仓库状态
     * @param depotId
     * @param status
     */
    public void updateDepotStatus(String depotId, String status) {
        if (StringUtils.isEmpty(depotId)) {
            return;
        }
        depotRepository.updateDepotStatus(status, depotId);
    }
    /**
     * jpa删除仓库货位信息
     * @param depot
     */
    public void deleteDepot(Depot depot) {
        depotRepository.delete(depot);
        //删除配置缓存
        this.delCacheDepot(depot, depot.getCompanyId());
    }
    /**
     * åˆ·æ–°ä»“库货位缓存
     * @param companyId
     */
    public void flushCache(String companyId) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        List<Depot> list = depotRepository.getDepotByCompanyId(companyId);
        this.setCacheDepotList(list, companyId);
    }
    /**
     * è®¾ç½®ç¼“å­˜
     * @param list
     * @param companyId
     */
    public void setCacheDepotList(List<Depot> list, String companyId) {
        if (null == list) return;
        String key;
        for (Depot depot : list) {
            key = RedisConst.buildKey(companyId, RedisConst.KEY_DEPOT, depot.getId());
            redisCache.setCacheObject(key, depot);
        }
    }
    /**
     * åˆ é™¤ç¼“存信息
     * @param depot
     * @param companyId
     */
    public void delCacheDepot(Depot depot, String companyId) {
        if (null == depot) {
            return;
        }
        if(StringUtils.isEmpty(companyId)){
            companyId = ContextUtil.getCompanyId();
        }
        String key = RedisConst.buildKey(companyId, RedisConst.KEY_DEPOT, depot.getId());
        redisCache.deleteObject(key);
    }
    /**
     * èŽ·å–ç¼“å­˜-根据组织编码获取仓库集合
     * @param companyId
     * @return
     */
    public List<Depot> getCacheDepotList(String companyId) {
        if(StringUtils.isEmpty(companyId)){
            companyId = ContextUtil.getCompanyId();
        }
        String patten = RedisConst.buildKey(companyId, RedisConst.KEY_DEPOT) + "*";
        Collection<String> keys = redisCache.keys(patten);
        if (null == keys) {
            return null;
        }
        List<Depot> list = new ArrayList<>();
        for (String key : keys) {
            list.add((Depot) redisCache.getCacheObject(key));
        }
        //缓存获取为空,则查询数据库
        if(list.size() < 1){
            list = depotRepository.getDepotByCompanyId(companyId);
            setCacheDepotList(list, companyId);
        }
        //重新排序
        Collections.sort(list, (p1, p2) -> p1.getOrderNum() - p2.getOrderNum());
        return list;
    }
    /**
     * èŽ·å–ç¼“å­˜-根据组织编码和库区编码获取仓库集合
     * @param companyId
     * @param deptId
     * @return
     */
    public List<Depot> getCacheDepotList(String companyId, String deptId) {
        if (StringUtils.isEmpty(deptId)) {
            return null;
        }
        List<Depot> list = getCacheDepotList(companyId);
        if(null == list || list.isEmpty()){
            return null;
        }
        List<Depot> result = new ArrayList<>();
        for (Depot depot : list) {
            if (deptId.equals(depot.getDeptId())) {
                result.add(depot);
            }
        }
        //重新排序
        Collections.sort(result, (p1, p2) -> p1.getOrderNum() - p2.getOrderNum());
        return result;
    }
    /**
     * èŽ·å–ä»“åº“ä¿¡æ¯-根据仓库编码获取缓存信息
     * @param companyId
     * @param depotId
     * @return
     */
    public Depot getCacheDepot(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, depotId);
        Depot depot = redisCache.getCacheObject(key);
        if(null == depot){
            depot = depotRepository.getDepotById(companyId, depotId);
            redisCache.setCacheObject(key, depot);
        }
        return depot;
    }
    /**
     * æ ¹æ®å½“前仓库编号信息获取与当前仓库相同建筑物的所有仓库集合
     * @param companyId
     * @param depotId
     * @return
     */
    public List<Depot> getCacheCommonBuildingDepot(String companyId, String depotId) {
        //若仓库未配置仓房编码,则直接返回对应仓库
        Depot depot = getCacheDepot(companyId, depotId);
        if (StringUtils.isEmpty(depot.getBuildingId())) {
            List<Depot> list = new ArrayList<>();
            list.add(depot);
            return list;
        }
        List<Depot> list = getCacheDepotList(companyId);
        if (null == list) {
            return null;
        }
        String buildingId = null;
        Map<String, List<Depot>> mapList = new HashMap<>();// å®šä¹‰ä¸€ä¸ªä»¥å»ºç­‘物ID为KEY的MAP集合对象
        for (Depot item : list) {
            if (item.getId().equals(depotId)) {
                buildingId = item.getBuildingId();
            }
            if (null == mapList.get(item.getBuildingId())) {
                mapList.put(item.getBuildingId(), new ArrayList<>());
            }
            mapList.get(item.getBuildingId()).add(item);
        }
        return mapList.get(buildingId);
    }
    /**
     * æ ¹æ®åº“存信息更新仓库信息
     * @param data
     */
    public void updateByStore(DepotStore data) {
        Depot depot = this.getCacheDepot(data.getCompanyId(), data.getDepotId());
        if (null == depot) {
            return;
        }
        depot.setStorageReal(data.getStorageReal());
        depot.setDepotStatus(data.getDepotStatus());
        depot.setFoodLevel(data.getFoodLevel());
        depot.setFoodLocation(data.getFoodLocation());
        depot.setFoodVariety(data.getFoodVariety());
        depot.setFoodType(data.getFoodType());
        depot.setFoodYear(data.getFoodYear());
        if (null != data.getStoreDate()) {
            depot.setStoreDate(data.getStoreDate());
        }
        this.saveDepot(depot);
    }
    /**
     * åˆå§‹åŒ–控制柜仓库的虚拟用户
     * @param companyId
     */
    public void initUserDeptMap(String companyId) {
        List<Depot> list = this.getCacheDepotList(companyId);
        if (null == list || list.isEmpty()) return;
        for (Depot depot : list) {
            ContextUtil.updateSubDept(depot.getId(), depot.getDeptId());
        }
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/DepotStatusConfirmService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,106 @@
package com.fzzy.igds.sys;
import com.fzzy.igds.dzhwk.constant.RedisConst;
import com.fzzy.igds.dzhwk.domain.DepotStatusConfirm;
import com.fzzy.igds.sys.repository.DepotStatusConfirmRepository;
import com.fzzy.igds.util.ContextUtil;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.time.DateFormatUtils;
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.Date;
import java.util.List;
/**
 * @Description
 * @Author CZT
 * @Date 2024/11/23 10:48
 */
@Slf4j
@Service("sys.depotStatusConfirmService")
public class DepotStatusConfirmService {
    public static final String CACHE_DEPOT_STATUS_CONFIRM_ID = "DEPOT_STATUS_CONFIRM_ID";
    @Resource
    private DepotStatusConfirmRepository DepotStatusConfirmRepository;
    @Resource
    private RedisCache redisCache;
    /**
     * JPA分页查询数据
     *
     * @param specification
     * @param pageable
     * @return
     */
    public Page<DepotStatusConfirm> findAll(Specification<DepotStatusConfirm> specification, Pageable pageable) {
        return DepotStatusConfirmRepository.findAll(specification, pageable);
    }
    /**
     * JPA更新保存
     * @param data
     */
    public void saveOrUpdate(DepotStatusConfirm data) {
        if (StringUtils.isEmpty(data.getCompanyId())) {
            data.setCompanyId(ContextUtil.getCompanyId());
        }
        if (StringUtils.isEmpty(data.getDeptId())) {
            data.setDeptId(ContextUtil.subDeptId(null));
        }
        data.setUpdateTime(new Date());
        if (StringUtils.isEmpty(data.getFcqrdh())) {
            data.setFcqrdh(buildId(data.getFcrq()));
        }
        DepotStatusConfirmRepository.save(data);
    }
    /**
     * JPA删除
     * @param data
     */
    public void delData(DepotStatusConfirm data) {
        DepotStatusConfirmRepository.delete(data);
    }
    /**
     * èŽ·å–å°ä»“å•å·
     * @param time
     * @return
     */
    public String buildId(Date time) {
        String timeKey = "21" + DateFormatUtils.format(time, "yyyyMMdd");
        // ä»Žç¼“存中获取已有的组织编码
        String cacheKey = RedisConst.buildKey(ContextUtil.getCompanyId(), CACHE_DEPOT_STATUS_CONFIRM_ID);
        String cacheId = (String) redisCache.getCacheObject(cacheKey);
        if (null != cacheId && cacheId.indexOf(timeKey) >= 0) {
            String temp = cacheId.substring(cacheId.length() - 4);
            Integer i = Integer.valueOf(temp);
            cacheId = timeKey + String.format("%04d", ++i);
        } else {
            List<DepotStatusConfirm> list = DepotStatusConfirmRepository.getDataByFcqrdh(timeKey + "%");
            if (null == list || list.isEmpty()) {
                cacheId = timeKey + "0001";
            } else {
                String temp = list.get(0).getFcqrdh();
                String tempNum = temp.substring(temp.length() - 4);
                Integer i = Integer.valueOf(tempNum);
                cacheId = timeKey + String.format("%04d", ++i);
            }
        }
        // æ›´æ–°ç¼“å­˜
        redisCache.setCacheObject(cacheKey, cacheId);
        return cacheId;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/DepotStoreService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,129 @@
package com.fzzy.igds.sys;
import com.fzzy.igds.dzhwk.domain.DepotStatusConfirm;
import com.fzzy.igds.dzhwk.domain.DepotStore;
import com.fzzy.igds.sys.repository.DepotStoreRepository;
import com.fzzy.igds.util.ContextUtil;
import com.ruoyi.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.time.DateFormatUtils;
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.Date;
import java.util.List;
/**
 * @Description
 * @Author CZT
 * @Date 2024/11/23 11:29
 */
@Slf4j
@Service("sys.depotStoreService")
public class DepotStoreService {
    @Resource
    private DepotStoreRepository depotStoreRepository;
    /**
     * JPA分页查询数据
     *
     * @param specification
     * @param pageable
     * @return
     */
    public Page<DepotStore> findAll(Specification<DepotStore> specification, Pageable pageable) {
        return depotStoreRepository.findAll(specification, pageable);
    }
    /**
     * JPA更新保存数据
     * @param data
     */
    public void saveDepotStore(DepotStore data) {
        if (StringUtils.isEmpty(data.getCompanyId())) {
            data.setCompanyId(ContextUtil.getCompanyId());
        }
        if (StringUtils.isEmpty(data.getDeptId())) {
            data.setDeptId(ContextUtil.subDeptId(null));
        }
        data.setUpdateUser(ContextUtil.getLoginUserCName());
        data.setUpdateDate(new Date());
        data.setId(data.getDepotId() + "_" + DateFormatUtils.format(data.getStoreDate(), "yyyyMMddHHmmss") + "_" + DateFormatUtils.format(data.getUpdateDate(), "yyyyMMddHHmmss"));
        data.setCreateDate(new Date());
        data.setRemark("系统生成");
        depotStoreRepository.save(data);
    }
    /**
     * JPA删除数据
     * @param data
     * @return
     */
    public String delDepotStore(DepotStore data) {
        depotStoreRepository.delete(data);
        return null;
    }
    /**
     * JPA获取仓库最后一条库存数据
     * @param depotId
     * @param time
     * @return
     */
    public DepotStore getLastData(String depotId, Date time) {
        List<DepotStore> list = depotStoreRepository.getDataByDepotId(depotId, time);
        if(null == list || list.isEmpty()){
            return null;
        }
        return list.get(0);
    }
    /**
     * æ ¹æ®å°ä»“确认单信息增加库存
     * @param data
     */
    public void depotStoreStatus(DepotStatusConfirm data) {
        // æ ¹æ®æœ€åŽä¸€è½¦è¿›è¡Œæ±‡æ€»ç»Ÿè®¡ï¼Œå¼€å§‹æ—¶é—´æ˜¯ä»“库库存最后一个时间截止到当前
        DepotStore lastStore = this.getLastData(data.getDepotId(), new Date());
        lastStore.setRemark("封仓确认");
        lastStore.setFullDate(data.getFcrq());
        lastStore.setDepotStatus("3");
        lastStore.setUpdateUser("系统管理员");
        lastStore.setStorageReal(data.getFcsl());
        lastStore.setUpdateDate(new Date());
        lastStore.setCreateDate(new Date());
        lastStore.setId(null);
        this.saveDepotStore(lastStore);
    }
    public void addDepotStore(DepotStore store, boolean updateDepot) {
//        if (null == store.getUpdateDate()) store.setUpdateDate(new Date());
//        if (null == store.getId()) store.setId(ContextUtil.getUUID());
//        if (null == store.getManageType() || "".equals(store.getManageType())) {
//            store.setManageType("01");
//        }
//
//        commonMapper.addDepotStore(store);
//
//
//        if (updateDepot) {
//            DepotParam param = new DepotParam();
//            param.setCompanyId(store.getCompanyId());
//            param.setDepotId(store.getDepotId());
//            param.setWeight(store.getStorageReal());
//            param.setDepotStatus(store.getDepotStatus());
//
//            commonMapper.updateDepotStorage(param);
//        }
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/DicAreaService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,124 @@
package com.fzzy.igds.sys;
import com.fzzy.igds.dzhwk.data.BaseParam;
import com.fzzy.igds.dzhwk.domain.DicArea;
import com.fzzy.igds.sys.mapper.DicAreaMapper;
import com.fzzy.igds.sys.repository.DicAreaRepository;
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.List;
/**
 * @Description
 * @Author CZT
 * @Date 2024/11/23 09:56
 */
@Slf4j
@Service("sys.dicAreaService")
public class DicAreaService {
    @Resource
    private DicAreaRepository dicAreaRepository;
    @Resource
    private DicAreaMapper dicAreaMapper;
    /**
     * JPA分页查询数据
     *
     * @param pageable
     */
    public Page<DicArea> findAll(Pageable pageable) {
        return dicAreaRepository.findAll(pageable);
    }
    /**
     * JPA分页查询数据
     *
     * @param specification
     * @param pageable
     * @return
     */
    public Page<DicArea> findAll(Specification<DicArea> specification, Pageable pageable) {
        return dicAreaRepository.findAll(specification, pageable);
    }
    /**
     * JPA根据父编码查询区域信息
     *
     * @param parentCode
     * @return
     */
    public List<DicArea> getDicAreaByParentCode(String parentCode) {
        if(StringUtils.isEmpty(parentCode)){
            return dicAreaRepository.findAll();
        }
        return dicAreaRepository.getDicAreaByParentCode(parentCode);
    }
    /**
     * JPA保存数据
     *
     * @param data
     * @return
     */
    public String saveDicArea(DicArea data) {
        dicAreaRepository.save(data);
        return null;
    }
    /**
     * JPA删除数据
     *
     * @param data
     * @return
     */
    public String delDicArea(DicArea data) {
        dicAreaRepository.delete(data);
        return null;
    }
    /**
     * æ ¹æ®åç§°èŽ·å–åŒºåŸŸç¼–ç 
     *
     * @param name
     * @return
     */
    public DicArea listDicAreaByName(String name) {
        return dicAreaRepository.listDicAreaByName(name);
    }
    /**
     * æ ¹æ®åŒºåŸŸç¼–码获取名称
     *
     * @param code
     * @return
     */
    public DicArea listDicAreaByCode(String code) {
        return dicAreaRepository.listDicAreaByCode(code);
    }
    /**
     * Mybatis åˆ†é¡µæŸ¥è¯¢æ•°æ®
     *
     * @param specification
     * @param pageable
     * @return
     */
    /**
     *
     * @param page
     * @param param
     * @return
     */
    public List<DicArea> listDicArea(com.fzzy.igds.dzhwk.data.Page<DicArea> page, BaseParam param) {
        return dicAreaMapper.listDicArea(page,param);
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/DicService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,471 @@
package com.fzzy.igds.sys;
import com.fzzy.igds.dzhwk.constant.*;
import com.fzzy.igds.util.ContextUtil;
import com.fzzy.igds.util.WeatherUtil;
import com.ruoyi.common.core.domain.entity.SysDictData;
import com.ruoyi.common.utils.DictUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.mapper.SysDictDataMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/**
 * @Description
 * @Author CZT
 * @Date 2024/11/22 16:30
 */
@Slf4j
@Service("sys.dicService")
public class DicService {
    @Autowired
    private SysDictDataMapper dictDataMapper;
    /**
     * åˆå§‹åŒ–常用字典到内存
     *
     * @param companyId
     */
    public void initDicMap(String companyId) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getDefaultCompanyId();
        }
        //初始化粮食品种字典
        List<SysDictData> dicList = DictUtils.getDictCache(Constant.TRIGGER_PARENT_FOOD_VARIETY, companyId);
        if (null != dicList) {
            for (SysDictData sysDictData : dicList) {
                Constant.mapFoodVariety.put(sysDictData.getDictValue(), sysDictData.getDictLabel());
            }
        }
        //初始化粮食性质字典
        dicList = DictUtils.getDictCache(Constant.TRIGGER_PARENT_FOOD_TYPE, companyId);
        if (null != dicList) {
            for (SysDictData sysDictData : dicList) {
                Constant.mapFoodType.put(sysDictData.getDictValue(), sysDictData.getDictLabel());
            }
        }
        //初始化出入库流程字典
        dicList = DictUtils.getDictCache(Constant.TRIGGER_PARENT_PROCESS_STATUS, companyId);
        if (null != dicList) {
            for (SysDictData sysDictData : dicList) {
                Constant.mapProgressName.put(sysDictData.getDictValue(), sysDictData.getDictLabel());
            }
        }
    }
    /**
     * æ ¹æ®type和组织编码获取字典,先从缓存获取,缓存没有则查询数据库
     *
     * @param dictType
     * @param companyId
     * @return
     */
    public List<SysDictData> getDictDataByType(String dictType, String companyId) {
        if (StringUtils.isEmpty(dictType)) {
            return null;
        }
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        List<SysDictData> list = DictUtils.getDictCache(dictType, companyId);
        if (null == list || list.isEmpty()) {
            list = dictDataMapper.selectDictDataByType(dictType, companyId);
            DictUtils.setDictCache(dictType, list, companyId);
        }
        return list;
    }
    /**
     * ä»“房类型-非国标定义
     *
     * @return
     */
    public List<SysDictData> triggerDepotType() {
        List<SysDictData> list = new ArrayList<SysDictData>();
        list.add(new SysDictData(DepotType.TYPE_01.getMsg(), DepotType.TYPE_01.getCode()));
        list.add(new SysDictData(DepotType.TYPE_02.getMsg(), DepotType.TYPE_02.getCode()));
        list.add(new SysDictData(DepotType.TYPE_03.getMsg(), DepotType.TYPE_03.getCode()));
        list.add(new SysDictData(DepotType.TYPE_04.getMsg(), DepotType.TYPE_04.getCode()));
        list.add(new SysDictData(DepotType.TYPE_05.getMsg(), DepotType.TYPE_05.getCode()));
        list.add(new SysDictData(DepotType.TYPE_99.getMsg(), DepotType.TYPE_99.getCode()));
        return list;
    }
    /**
     * ä»“房状态
     *
     * @return
     */
    public List<SysDictData> triggerDepotStatus() {
        List<SysDictData> list = new ArrayList<SysDictData>();
        list.add(new SysDictData(DepotStatus.STATUS_1.getMsg(), DepotStatus.STATUS_1.getCode()));
        list.add(new SysDictData(DepotStatus.STATUS_2.getMsg(), DepotStatus.STATUS_2.getCode()));
        list.add(new SysDictData(DepotStatus.STATUS_3.getMsg(), DepotStatus.STATUS_3.getCode()));
        list.add(new SysDictData(DepotStatus.STATUS_4.getMsg(), DepotStatus.STATUS_4.getCode()));
        list.add(new SysDictData(DepotStatus.STATUS_31.getMsg(), DepotStatus.STATUS_31.getCode()));
        list.add(new SysDictData(DepotStatus.STATUS_32.getMsg(), DepotStatus.STATUS_32.getCode()));
        list.add(new SysDictData(DepotStatus.STATUS_33.getMsg(), DepotStatus.STATUS_33.getCode()));
        list.add(new SysDictData(DepotStatus.STATUS_34.getMsg(), DepotStatus.STATUS_34.getCode()));
        list.add(new SysDictData(DepotStatus.STATUS_9.getMsg(), DepotStatus.STATUS_9.getCode()));
        return list;
    }
    /**
     * ç²®é£Ÿç­‰çº§
     *
     * @return
     */
    public List<SysDictData> triggerFoodLevel() {
        List<SysDictData> list = new ArrayList<SysDictData>();
        list.add(new SysDictData(FoodLevel.LEVEL_01.getMsg(), FoodLevel.LEVEL_01.getCode()));
        list.add(new SysDictData(FoodLevel.LEVEL_02.getMsg(), FoodLevel.LEVEL_02.getCode()));
        list.add(new SysDictData(FoodLevel.LEVEL_03.getMsg(), FoodLevel.LEVEL_03.getCode()));
        list.add(new SysDictData(FoodLevel.LEVEL_04.getMsg(), FoodLevel.LEVEL_04.getCode()));
        list.add(new SysDictData(FoodLevel.LEVEL_05.getMsg(), FoodLevel.LEVEL_05.getCode()));
        list.add(new SysDictData(FoodLevel.LEVEL_06.getMsg(), FoodLevel.LEVEL_06.getCode()));
        return list;
    }
    /**
     * å‚¨ç²®æ–¹å¼
     *
     * @return
     */
    public List<SysDictData> triggerStoreType() {
        List<SysDictData> list = new ArrayList<SysDictData>();
        list.add(new SysDictData("散装储粮", "1"));
        list.add(new SysDictData("包装储粮", "2"));
        list.add(new SysDictData("围包存", "3"));
        list.add(new SysDictData("其他", "9"));
        return list;
    }
    /**
     * ç®¡ç†æ–¹å¼
     *
     * @return
     */
    public List<SysDictData> triggerManagerType() {
        List<SysDictData> list = new ArrayList<SysDictData>();
        list.add(new SysDictData("直储", "01"));
        list.add(new SysDictData("代储", "02"));
        list.add(new SysDictData("租仓", "03"));
        list.add(new SysDictData("委托", "04"));
        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;
    }
    /**
     * æ˜¯å¦
     *
     * @return
     */
    public List<SysDictData> triggerYN() {
        List<SysDictData> list = new ArrayList<SysDictData>();
        list.add(new SysDictData("是", Constant.YN_Y));
        list.add(new SysDictData("否", Constant.YN_N));
        return list;
    }
    /**
     * é€šè®¯çŠ¶æ€
     *
     * @return
     * @throws Exception
     */
    public List<SysDictData> conStatus() {
        List<SysDictData> list = new ArrayList<>();
        list.add(new SysDictData("正常", Constant.YN_Y));
        list.add(new SysDictData("断开", Constant.YN_N));
        return list;
    }
    /**
     * æœ¬åœ°è¿œç¨‹æ¨¡å¼
     *
     * @return
     */
    public List<SysDictData> controlModel() {
        List<SysDictData> list = new ArrayList<SysDictData>();
        list.add(new SysDictData(ControlModel.MODEL_01.getMsg(), ControlModel.MODEL_01.getCode()));
        list.add(new SysDictData(ControlModel.MODEL_02.getMsg(), ControlModel.MODEL_02.getCode()));
        return list;
    }
    /**
     * åŠŸèƒ½æ¨¡å—
     *
     * @return
     */
    public List<SysDictData> triggerBizType() {
        List<SysDictData> list = new ArrayList<SysDictData>();
        list.add(new SysDictData(BizType.GRAIN.getMsg(), BizType.GRAIN.getCode()));
        list.add(new SysDictData(BizType.PEST.getMsg(), BizType.PEST.getCode()));
        list.add(new SysDictData(BizType.GAS.getMsg(), BizType.GAS.getCode()));
        list.add(new SysDictData(BizType.AREATION.getMsg(), BizType.AREATION.getCode()));
        list.add(new SysDictData(BizType.N2.getMsg(), BizType.N2.getCode()));
        list.add(new SysDictData(BizType.INOUT_IN.getMsg(), BizType.INOUT_IN.getCode()));
        list.add(new SysDictData(BizType.INOUT_OUT.getMsg(), BizType.INOUT_OUT.getCode()));
        list.add(new SysDictData(BizType.TEMPCONTROL.getMsg(), BizType.TEMPCONTROL.getCode()));
        list.add(new SysDictData(BizType.WEATHER.getMsg(), BizType.WEATHER.getCode()));
        list.add(new SysDictData(BizType.ES.getMsg(), BizType.ES.getCode()));
        list.add(new SysDictData(BizType.SECURITY.getMsg(), BizType.SECURITY.getCode()));
        list.add(new SysDictData(BizType.SYS.getMsg(), BizType.SYS.getCode()));
        list.add(new SysDictData(BizType.SCREEN.getMsg(), BizType.SCREEN.getCode()));
        return list;
    }
    /**
     * æ°”象来源
     *
     * @return
     */
    public List<SysDictData> triggerSource() {
        List<SysDictData> list = new ArrayList<SysDictData>();
        list.add(new SysDictData(WeatherUtil.SOURCE_01, "库区气象站"));
        list.add(new SysDictData(WeatherUtil.SOURCE_01, "外网气象站"));
        return list;
    }
    /**
     * æ£€éªŒç±»åˆ«
     *
     * @return
     */
    public List<SysDictData> triggerType() {
        List<SysDictData> list = new ArrayList<SysDictData>();
        list.add(new SysDictData("入仓验收", "01"));
        list.add(new SysDictData("出仓检验", "02"));
        list.add(new SysDictData("3月末普检", "03"));
        list.add(new SysDictData("9月末普检", "04"));
        list.add(new SysDictData("入库初检", "05"));
        list.add(new SysDictData("月度检查", "06"));
        list.add(new SysDictData("3月末库内普查", "07"));
        list.add(new SysDictData("9月末库内普查", "08"));
        return list;
    }
    /**
     * æŒ‡æ ‡ç±»åˆ«
     *
     * @return
     */
    public List<SysDictData> triggerStandard() {
        List<SysDictData> list = new ArrayList<SysDictData>();
        list.add(new SysDictData("国标", "1"));
        list.add(new SysDictData("其他", "0"));
        return list;
    }
    /**
     * æ£€éªŒä¾æ®
     *
     * @return
     */
    public List<SysDictData> triggerMetrics() {
        List<SysDictData> list = new ArrayList<SysDictData>();
        list.add(new SysDictData("质量指标检验", "1"));
        list.add(new SysDictData("储存品质检验", "2"));
        list.add(new SysDictData("食品安全检验", "3"));
        return list;
    }
    /**
     * å®¡æ ¸çŠ¶æ€
     *
     * @return
     */
    public List<SysDictData> triggerStatusType() {
        List<SysDictData> list = new ArrayList<SysDictData>();
        for (AuditStatus w : AuditStatus.values()) {
            list.add(new SysDictData(w.getMsg(), w.getCode()));
        }
        return list;
    }
    /**
     * è­¦å‘Šç±»åž‹
     *
     * @return
     */
    public List<SysDictData> triggerWarnType() {
        List<SysDictData> list = new ArrayList<SysDictData>();
        for (WarnType w : WarnType.values()) {
            list.add(new SysDictData(w.getMsg(), w.getCode()));
        }
        return list;
    }
    /**
     * è­¦å‘Šç­‰çº§
     *
     * @return
     */
    public List<SysDictData> triggerWarnLevel() {
        List<SysDictData> list = new ArrayList<SysDictData>();
        for (WarnLevel w : WarnLevel.values()) {
            list.add(new SysDictData(w.getMsg(), w.getCode()));
        }
        return list;
    }
    /**
     * è­¦å‘ŠçŠ¶æ€
     *
     * @return
     */
    public List<SysDictData> triggerWarnStatus() {
        List<SysDictData> list = new ArrayList<SysDictData>();
        for (WarnStatus w : WarnStatus.values()) {
            list.add(new SysDictData(w.getName(), w.getCode()));
        }
        return list;
    }
    /**
     * è­¦å‘Šé€šçŸ¥æ–¹å¼
     *
     * @return
     */
    public List<SysDictData> triggerNoticeType() {
        List<SysDictData> list = new ArrayList<SysDictData>();
        for (NoticeType w : NoticeType.values()) {
            list.add(new SysDictData(w.getName(), w.getCode()));
        }
        return list;
    }
    /**
     * AI设备类型
     * @return
     */
    public List<SysDictData> triggerAiSerType() {
        List<SysDictData> list = new ArrayList<SysDictData>();
        for (AiSerType w : AiSerType.values()) {
            list.add(new SysDictData(w.getMsg(), w.getCode()));
        }
        return list;
    }
    /**
     * é€šé£Žä»»åŠ¡çŠ¶æ€
     * @return
     */
    public List<SysDictData> triggerVerbStatus() {
        List<SysDictData> list = new ArrayList<SysDictData>();
        list.add(new SysDictData("运行中", AreationConst.ARESTION_TASK_RUN));
        list.add(new SysDictData("停止", AreationConst.ARESTION_TASK_STOP));
        list.add(new SysDictData("超时无效", AreationConst.ARESTION_TASK_NOUSE));
        return list;
    }
    /**
     * é€šé£Žæ¨¡å¼
     * @return
     */
    public List<SysDictData> triggerAreationModel() {
        List<SysDictData> list = new ArrayList<SysDictData>();
        for (AreationModel w : AreationModel.values()) {
            list.add(new SysDictData(w.getMsg(), w.getCode()));
        }
        return list;
    }
    /**
     * æ°”调模式
     * @return
     */
    public List<SysDictData> triggerN2ModelTag() {
        List<SysDictData> list = new ArrayList<SysDictData>();
        for (N2ModelTag w : N2ModelTag.values()) {
            list.add(new SysDictData(w.getMsg(), w.getCode()));
        }
        return list;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/GranaryService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,53 @@
package com.fzzy.igds.sys;
import com.fzzy.igds.dzhwk.domain.Granary;
import com.fzzy.igds.sys.repository.GranaryRepository;
import com.fzzy.igds.util.ContextUtil;
import com.ruoyi.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
/**
 * @Description
 * @Author CZT
 * @Date 2024/11/22 14:48
 */
@Slf4j
@Service("sys.granaryService")
public class GranaryService {
    @Resource
    private GranaryRepository granaryRepository;
    public List<Granary> getGranary(String companyId, String deptId) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        if (StringUtils.isEmpty(deptId)) {
            deptId = ContextUtil.subDeptId(null);
        }
        return granaryRepository.getGranary(companyId, deptId);
    }
    public void saveOrUpdate(Granary data) {
        if (StringUtils.isEmpty(data.getCompanyId())) {
            data.setCompanyId(ContextUtil.getCompanyId());
        }
        if (StringUtils.isEmpty(data.getDeptId())) {
            data.setDeptId(ContextUtil.subDeptId(null));
        }
        data.setUpdateTime(new Date());
        granaryRepository.save(data);
    }
    public String delData(Granary data) {
        granaryRepository.delete(data);
        return null;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/SysDeptService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,140 @@
package com.fzzy.igds.sys;
import com.fzzy.igds.dzhwk.constant.Constant;
import com.fzzy.igds.dzhwk.constant.RedisConst;
import com.fzzy.igds.util.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.mapper.SysUserMapper;
import com.ruoyi.system.service.ISysDeptService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;
/**
 * @Description
 * @Author CZT
 * @Date 2024/11/22 18:03
 */
@Slf4j
@Service("sys.sysDeptService")
public class SysDeptService {
    @Resource
    private SysUserMapper userMapper;
    @Resource
    private ISysDeptService iSysDeptService;
    @Resource
    private RedisCache redisCache;
    public void initUserDeptMap(String companyId) {
        if(StringUtils.isEmpty(companyId)){
            companyId = ContextUtil.getCompanyId();
        }
        SysUser sysUser = new SysUser();
        sysUser.setCompanyId(companyId);
        List<SysUser> list = userMapper.selectUserList(sysUser);
        if (null == list || list.isEmpty()){
            return;
        }
        for (SysUser userDept : list) {
            ContextUtil.updateSubDept(userDept.getLoginName(), userDept.getDeptId().toString());
        }
    }
    /**
     * åˆ·æ–°éƒ¨é—¨æž¶æž„信息到缓存
     * @param companyId
     */
    public List<SysDept> flushDeptCache(String companyId) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        SysDept sysDept = new SysDept();
        sysDept.setCompanyId(companyId);
        List<SysDept> listSysDept = iSysDeptService.selectDeptList(sysDept);
        String key = RedisConst.buildKey(companyId, RedisConst.KEY_DEPT_LIST);
        redisCache.setCacheObject(key, listSysDept);
        return listSysDept;
    }
    /**
     * æ ¹æ®ç»„织编码获取所有部门信息
     * @param companyId
     * @return
     */
    public List<SysDept> getCacheDept(String companyId) {
        if (StringUtils.isEmpty(companyId)) {
            companyId = ContextUtil.getCompanyId();
        }
        String key = RedisConst.buildKey(companyId, RedisConst.KEY_DEPT_LIST);
        List<SysDept> listSysDept = redisCache.getCacheObject(key);
        if(null == listSysDept){
            listSysDept = flushDeptCache(companyId);
        }
        return listSysDept;
    }
    /**
     * ç¼“存获取组织下所有库区列表
     * @param companyId
     */
    public List<SysDept> getAllDeptByCompanyId(String companyId) {
        List<SysDept> list = getCacheDept(companyId);
        return list.stream()
                .filter(item -> item.getType().equals(Constant.DEPT_TYPE_20))
                .collect(Collectors.toList());
    }
    /**
     * æ ¹æ®id获取部门信息
     * @param companyId
     * @param deptId
     * @return
     */
    public SysDept getCacheDept(String companyId, String deptId) {
        if (StringUtils.isEmpty(deptId)) {
            return null;
        }
        List<SysDept> list = getCacheDept(companyId);
        if (null == list || list.isEmpty()){
            return null;
        }
        for (SysDept dept : list) {
            if (deptId.equals(dept.getDeptId() + ""))
                return dept;
        }
        return null;
    }
    /**
     * æ ¹æ®ç±»åž‹èŽ·å–éƒ¨é—¨ä¿¡æ¯
     * type: 10-公司,20-库区,30-部门
     * @param type
     * @return
     */
    public List<SysDept> getDeptByType(String type) {
        if (StringUtils.isEmpty(type)) {
            return null;
        }
        List<SysDept> list = getCacheDept(null);
        if (null == list || list.isEmpty()) {
            return null;
        }
        //根据类型查询
        return list.stream()
                .filter(item -> type.equals(item.getType()))
                .collect(Collectors.toList());
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/SysUserService.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,47 @@
package com.fzzy.igds.sys;
import com.fzzy.igds.util.ContextUtil;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.mapper.SysUserMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
 * @Description
 * @Author CZT
 * @Date 2024/11/22 18:03
 */
@Slf4j
@Service("sys.sysUserService")
public class SysUserService {
    @Resource
    private SysUserMapper userMapper;
    /**
     * æ ¹æ®ç»„织编码,获取用户列表
     * @param companyId
     * @return
     */
    public List<SysUser> getUser(String companyId) {
        if(StringUtils.isEmpty(companyId)){
            companyId = ContextUtil.getCompanyId();
        }
        SysUser sysUser = new SysUser();
        sysUser.setCompanyId(companyId);
        return userMapper.selectUserList(sysUser);
    }
    /**
     * æ ¹æ®ç™»å½•名称,获取用户信息
     * @param loginName
     * @return
     */
    public SysUser getUserByLoginName(String loginName) {
        return userMapper.selectUserByLoginName(loginName);
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/mapper/DicAreaMapper.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,25 @@
package com.fzzy.igds.sys.mapper;
import com.fzzy.igds.dzhwk.data.BaseParam;
import com.fzzy.igds.dzhwk.data.Page;
import com.fzzy.igds.dzhwk.domain.DicArea;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
 * å­—典相关的核心处理
 *
 * @author jiazx
 */
public interface DicAreaMapper {
    /**
     * èŽ·å–è¡Œæ”¿åŒºåŸŸ
     *
     * @param param
     * @return
     */
    List<DicArea> listDicArea(@Param("page") Page<DicArea> page, @Param("param") BaseParam param);
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/repository/BuildingRepository.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,37 @@
package com.fzzy.igds.sys.repository;
import com.fzzy.igds.dzhwk.domain.Building;
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 2024/11/20 18:33
 */
@Service
public interface BuildingRepository extends JpaRepository<Building, String> {
    /**
     * æ ¹æ®ç»„织编码和库区编码获取系统配置信息
     *
     * @param companyId
     * @param deptId
     * @return
     */
    @Query("from Building where companyId =:companyId and deptId =:deptId order by id")
    List<Building> getBuilding(@Param("companyId") String companyId, @Param("deptId") String deptId);
    /**
     * æ ¹æ®ç»„织编码获取系统配置信息
     *
     * @param companyId
     * @return
     */
    @Query("from Building where companyId =:companyId order by id")
    List<Building> getBuilding(@Param("companyId") String companyId);
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/repository/CompanyRepository.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,36 @@
package com.fzzy.igds.sys.repository;
import com.fzzy.igds.dzhwk.domain.Company;
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 2024/11/28 14:59
 */
@Service
public interface CompanyRepository extends JpaRepository<Company, String> {
    /**
     * æ ¹æ®id获取信息
     *
     * @param id
     * @return
     */
    @Query("from Company where id =:id order by id")
    Company getDataById(@Param("id") String id);
    /**
     * æ ¹æ®companyId获取信息
     *
     * @param companyId
     * @return
     */
    @Query("from Company where companyId =:companyId order by id")
    List<Company> getAllData(@Param("companyId") String companyId);
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/repository/DepotRepository.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,68 @@
package com.fzzy.igds.sys.repository;
import com.fzzy.igds.dzhwk.domain.Depot;
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 2024/11/22 16:59
 */
@Service("sys.depotRepository")
public interface DepotRepository  extends JpaRepository<Depot, String> {
    /**
     * æ ¹æ®ç»„织编码获取仓库货位信息
     *
     * @param companyId
     * @return
     */
    @Query("from Depot where companyId =:companyId order by orderNum")
    List<Depot> getDepotByCompanyId(@Param("companyId") String companyId);
    /**
     * æ ¹æ®ç»„织编码和库区编码获取仓库货位信息
     *
     * @param companyId
     * @param deptId
     * @return
     */
    @Query("from Depot where companyId =:companyId and deptId =:deptId order by orderNum")
    List<Depot> getDepot(@Param("companyId") String companyId, @Param("deptId") String deptId);
    /**
     * æ ¹æ®ç»„织编码和仓库编码获取仓库货位信息
     * @param companyId
     * @param id
     * @return
     */
    @Query("from Depot where companyId =:companyId and id =:id")
    Depot getDepotById(@Param("companyId") String companyId, @Param("id") String id);
    /**
     * æ›´æ–°ä»“库状态
     * @param status
     * @param depotId
     */
    @Transactional
    @Modifying
    @Query("update Depot set depotStatus =:status where id =:depotId")
    void updateDepotStatus(@Param("status") String status, @Param("depotId") String depotId);
    /**
     * æ ¹æ®ids获取仓库
     *
     * @param list
     * @return
     */
    @Query("from Depot where id IN :list order by orderNum")
    List<Depot> getDepotByIds(@Param("list") List<String> list);
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/repository/DepotStatusConfirmRepository.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,28 @@
package com.fzzy.igds.sys.repository;
import com.fzzy.igds.dzhwk.domain.DepotStatusConfirm;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
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 2024/11/23 10:59
 */
@Service
public interface DepotStatusConfirmRepository extends JpaRepository<DepotStatusConfirm, String>, JpaSpecificationExecutor<DepotStatusConfirm> {
    /**
     * æ ¹æ®å°ä»“编号获取信息
     * @param fcqrdh
     * @return
     */
    @Query("from DepotStatusConfirm where fcqrdh like:fcqrdh order by fcqrdh desc")
    List<DepotStatusConfirm> getDataByFcqrdh(@Param("fcqrdh") String fcqrdh);
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/repository/DepotStoreRepository.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,30 @@
package com.fzzy.igds.sys.repository;
import com.fzzy.igds.dzhwk.domain.DepotStore;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
 * @Description
 * @Author CZT
 * @Date 2024/11/23 10:59
 */
@Service
public interface DepotStoreRepository extends JpaRepository<DepotStore, String>, JpaSpecificationExecutor<DepotStore> {
    /**
     * æ ¹æ®ä»“库编码获取最后一条数据
     * @param depotId
     * @param end
     * @return
     */
    @Query("from DepotStore where depotId =:depotId and createDate <:end order by createDate desc")
    List<DepotStore> getDataByDepotId(@Param("depotId") String depotId,@Param("end") Date end);
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/repository/DeptRepository.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,36 @@
package com.fzzy.igds.sys.repository;
import com.fzzy.igds.dzhwk.domain.Dept;
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 2024/11/28 17:59
 */
@Service
public interface DeptRepository extends JpaRepository<Dept, String> {
    /**
     * æ ¹æ®id获取信息
     *
     * @param id
     * @return
     */
    @Query("from Dept where id =:id order by id")
    Dept getDataById(@Param("id") String id);
    /**
     * æ ¹æ®companyId获取信息
     *
     * @param companyId
     * @return
     */
    @Query("from Dept where companyId =:companyId order by id")
    List<Dept> getAllData(@Param("companyId") String companyId);
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/repository/DicAreaRepository.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,47 @@
package com.fzzy.igds.sys.repository;
import com.fzzy.igds.dzhwk.domain.DicArea;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
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 2024/11/23 09:56
 */
@Service
public interface DicAreaRepository extends JpaRepository<DicArea, String>, JpaSpecificationExecutor<DicArea> {
    /**
     * æ ¹æ®çˆ¶ç¼–码查询区域信息
     *
     * @param parentCode
     * @return
     */
    @Query("from DicArea where parentCode =:parentCode order by code")
    List<DicArea> getDicAreaByParentCode(@Param("parentCode") String parentCode);
    /**
     * æ ¹æ®åç§°èŽ·å–åŒºåŸŸä¿¡æ¯
     *
     * @param name
     * @return
     */
    @Query("from DicArea where name =:name order by code")
    DicArea listDicAreaByName(@Param("name") String name);
    /**
     * æ ¹æ®code获取区域信息
     *
     * @param code
     * @return
     */
    @Query("from DicArea where code =:code order by code")
    DicArea listDicAreaByCode(@Param("code") String code);
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/sys/repository/GranaryRepository.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,29 @@
package com.fzzy.igds.sys.repository;
import com.fzzy.igds.dzhwk.domain.Granary;
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 2024/11/22 14:33
 */
@Service
public interface GranaryRepository extends JpaRepository<Granary, String> {
    /**
     * æ ¹æ®ç»„织编码和库区编码获取廒间信息
     *
     * @param companyId
     * @param deptId
     * @return
     */
    @Query("from Granary where companyId =:companyId and deptId =:deptId order by ajdh")
    List<Granary> getGranary(@Param("companyId") String companyId, @Param("deptId") String deptId);
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/util/ContextUtil.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,380 @@
package com.fzzy.igds.util;
import com.fzzy.igds.dzhwk.constant.Constant;
import com.fzzy.igds.dzhwk.constant.GrainFrequence;
import com.ruoyi.common.config.FrameworkConfig;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.StringUtils;
import org.apache.commons.lang3.RandomUtils;
import org.apache.commons.lang3.time.DateFormatUtils;
import java.util.*;
/**
 * ç³»ç»Ÿå…¬ç”¨æ–¹æ³•
 *
 * @author Andy
 */
public class ContextUtil {
    public static Map<String ,Boolean> l = new HashMap<>();
    //全局用户实时坐在部门
    public static Map<String, String> contextUserDept = new HashMap<>();
    /**
     * å…¨å±€ç”¨äºŽå­˜æ”¾SN与组织编码的关系,例如分机SN和组织编码关系
     */
    public static Map<String, String> contextSnCompanyIdMap = new HashMap<>();
    /**
     * å…¨å±€å‘½ä»¤ID
     */
    public static Map<String, Integer> contextOrderId = new HashMap<>();
    /**
     * UUID生成规则
     *
     * @return
     */
    public static String getUUID() {
        return UUID.randomUUID().toString().replaceAll("-", "");
    }
    public static String getCurTimeMillis() {
        return System.currentTimeMillis() + "";
    }
    public static String getTimeId() {
        return DateFormatUtils.format(new Date(), "yyyyMMddHHmmss");
    }
    public static String getTimeId(int start, int end) {
        return DateFormatUtils.format(new Date(), "yyyyMMddHHmmss") + RandomUtils.nextInt(start, end);
    }
    /**
     * æ ¹æ®å‚数生成 æ‰§è¡Œå‘½ä»¤çš„缓存KEY
     *
     * @param companyId
     * @param serId
     * @param bizType
     * @return
     */
    public static final String buildExeOrderId(String companyId, String serId, String bizType) {
        Integer start = contextOrderId.get("ORDER_ID") == null ? 5000 : contextOrderId.get("ORDER_ID");
        contextOrderId.put("ORDER_ID", start + 1);
        return start + "";
    }
    /**
     * è®¾å¤‡ID生成规则
     *
     * @param companyId
     * @param depotId
     * @param passCode
     * @return
     */
    public static final String buildDeviceId(String companyId, String depotId, int passCode) {
        return companyId + "_" + depotId + "_" + passCode;
    }
    /**
     * è®¾å¤‡ID生成规则
     *
     * @param companyId
     * @param depotId
     * @param passCode
     * @return
     */
    public static final String buildDeviceId(String companyId, String depotId, String serId, int passCode) {
        return companyId + depotId + serId + "_" + passCode;
    }
    /**
     * æ ¹æ®ä¿¡æ¯èŽ·å–INFO表的主键ID åœ¨ç²®æƒ…,气体和虫害中均需要当前方法
     *
     * @param companyId
     * @param depotId
     * @param batchId
     * @return
     */
    public static String buildInfoId(String companyId, String depotId,
                                     String batchId) {
        return companyId + "_" + depotId + "_" + batchId;
    }
    public static String getDefaultBatchId() {
        return DateFormatUtils.format(new Date(), "yyyyMMddHHmm");
    }
    /**
     * æ ¹æ®ç³»ç»Ÿé…ç½®çš„æ‰¹æ¬¡é¢‘率获取批次编号
     *
     * @param freq
     * @return
     */
    public static String getBatchIdByFireq(String freq) {
        // ä¸€å¤©ä¸€æ¬¡
        if (GrainFrequence.FREQ_02.getCode().equals(freq)) {
            return DateFormatUtils.format(new Date(), "yyyyMMdd") + "1801";
        }
        // ä¸€å¤©ä¸¤æ¬¡
        if (GrainFrequence.FREQ_03.getCode().equals(freq)) {
            String hour = DateFormatUtils.format(new Date(), "HH");
            if (Integer.valueOf(hour) >= 0 && Integer.valueOf(hour) <= 12) {
                return DateFormatUtils.format(new Date(), "yyyyMMdd") + "1301";
            } else {
                return DateFormatUtils.format(new Date(), "yyyyMMdd") + "1802";
            }
        }
        return getDefaultBatchId();
    }
    /**
     * æ ¹æ®å½“前登陆人获取组织编号,如果没有登陆人获取系统默认的组织编号
     *
     * @return
     */
    public static String getCompanyId() {
        SysUser user = ShiroUtils.getSysUser();
        if (null != user) {
            return user.getCompanyId();
        } else {
            return "Please login first!";
        }
    }
    /**
     * èŽ·å–ç³»ç»Ÿé»˜è®¤çš„=companyId
     *
     * @return
     */
    public static String getDefaultCompanyId() {
        SysUser user = ShiroUtils.getSysUser();
        if (null != user) {
            return user.getCompanyId();
        } else {
            return FrameworkConfig.getCompanyId();
        }
    }
    /**
     * èŽ·å–ç™»é™†äººå¸å·
     *
     * @return
     */
    public static String getLoginUserName() {
        SysUser user = ShiroUtils.getSysUser();
        return null == user ? "SYS" : user.getLoginName();
    }
    /**
     * èŽ·å–ç™»é™†äººä¸­æ–‡åç§°
     *
     * @return
     */
    public static String getLoginUserCName() {
        SysUser user = ShiroUtils.getSysUser();
        return null == user ? "系统" : user.getUserName();
    }
    public static SysUser getLoginUser() {
        return ShiroUtils.getSysUser();
    }
    /**
     * æœ€é«˜çš„编码为:组织编码,然后逐级往下,如:5013,5013_001,5013_002,5013_001_001
     *
     * @param companyId å¿…é¡»
     * @param parentId  å¯ç©º
     * @param endId     å¯ç©º
     * @param format    å¿…é¡» ä¸‰ä½ä¼ 1000,四位传10000
     * @return
     */
    public static String getNextId(String companyId, String parentId,
                                   String endId, int format) {
        if (parentId == null || Constant.DEFAULT_PARENT_CODE.equals(parentId)) {
            return companyId;
        }
        try {
            int endNum = 0;
            if (StringUtils.isNotEmpty(endId)) {
                endNum = Integer.valueOf(endId.substring(endId.length() - 3));
            }
            String endStr = ("" + (endNum + format + 1)).substring(1);
            if (parentId.equals(companyId)) {
                return companyId + "_" + endStr;
            }
            parentId = parentId.substring(parentId.lastIndexOf("_") + 1);
            return companyId + "_" + parentId + "_" + endStr;
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
    /**
     * èŽ·å–ä»“åº“ç¼–ç   æ ¼å¼ï¼š
     *
     * @param deptId 5102_001_001  5102_001_002
     *               å¿…é¡» åˆ†åº“编码
     * @param endId  å¿…é¡» æœ€åŽçš„仓库编码
     * @param format å¿…é¡» ä¸‰ä½ä¼ 1000,四位传10000,默认都传1000
     * @return
     */
    public static String getNextDepotId(String deptId, String endId, int format) {
        try {
            int endNum = 0;
            if (StringUtils.isNotEmpty(endId)) {
                endNum = Integer.valueOf(endId.substring(endId.length() - 3));
            }
            String endStr = ("" + (endNum + format + 1)).substring(1);
            endStr = deptId.substring(deptId.indexOf("_") + 1) + "_" + endStr;
            return endStr.replaceAll("_", "");
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
    /**
     * ç”ŸæˆTCP连接的KEY
     *
     * @param ip
     * @param port
     * @return
     */
    public static String getServerKey(String ip, Integer port) {
        return ip + ":" + port;
    }
    /**
     * æ ¹æ®å½“前登录人获取,获取二级部门ID,当前人所在部门的二级就是 åˆ†åº“ID
     *
     * @param user
     * @return
     */
    public static String subDeptId(SysUser user) {
        if (null == user) {
            user = getLoginUser();
        }
        if (null == user) {
            return getDefaultCompanyId() + "001";
        }
        //从全局获取,如果有则取全局的默认,如果没有则取自己所属
        if (null != contextUserDept.get(user.getLoginName())) {
            return contextUserDept.get(user.getLoginName());
        }
        if (null == user.getDeptId()) {
            return user.getCompanyId();
        }
        return user.getDeptId().toString();
    }
    public static void updateSubDept(String userId, String deptId) {
        if (null == deptId) return;
        contextUserDept.put(userId, deptId);
    }
    /**
     * éªŒè¯ å½“前人是否在主部门,即当前人所属部门默认在最高部门
     *
     * @param user
     * @return
     */
    public static boolean isMainDept(SysUser user) {
        if (null == user) {
            user = getLoginUser();
        }
        if (null == user){
            return false;
        }
        if (user.getDeptId().equals(user.getCompanyId())) {
            return true;
        }
        if (user.getDeptId()>1000000) {
            return true;
        }
        return false;
    }
    /**
     * å­˜æ”¾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);
    }
    public static String buildDeviceStatusKey(String companyId, String serId, String passCode) {
        if (null == passCode) passCode = "NULL";
        return companyId + "_" + serId + "_STATUS_" + passCode;
    }
    public static String buildDeviceStatusKey(String companyId, String serId, int passCode) {
        return companyId + "_" + serId + "_STATUS_" + passCode;
    }
    public static <K extends Comparable<? super K>, V> Map<K, V> sortByKey(Map<K, V> map) {
        Map<K, V> result = new LinkedHashMap<>();
        map.entrySet().stream()
                .sorted(Map.Entry.<K, V>comparingByKey()).forEachOrdered(e -> result.put(e.getKey(), e.getValue()));
        return result;
    }
    /**
     * èŽ·å–é¡ºåºå·
     * @param oldOrderId åŽŸæœ‰é¡ºåºå·
     * @param num ä½æ•°
     * @return
     */
    public static String getOrderId(String oldOrderId, Integer num) {
        Integer index3 = 1001;
        Integer index4 = 10001;
        Integer index5 = 100001;
        Integer index = 0;
        String orderId = "001";
        if(StringUtils.isNotEmpty(oldOrderId)){
            index = Integer.valueOf(oldOrderId);
        }
        if(3 == num){
            orderId = ((index3 + index) + "").substring(1);
        }
        if(4 == num){
            orderId = ((index4 + index) + "").substring(1);
        }
        if(5 == num){
            orderId = ((index5 + index) + "").substring(1);
        }
        return orderId;
    }
}
igds-dzhwk-core/src/main/java/com/fzzy/igds/util/WeatherUtil.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,52 @@
package com.fzzy.igds.util;
import org.apache.commons.lang3.time.DateFormatUtils;
import java.util.Date;
/**
 * å¸¸é‡å®šä¹‰
 *
 * @author: andy.jia
 * @description:
 * @version:
 * @data:2020å¹´2月19日
 */
public class WeatherUtil {
    public static final String SOURCE_01 = "01";
    public static final String SOURCE_02 = "02";
    /**
     * åˆ›å»ºæ°”象信息的主键
     * <p>
     * ç»„织编码+ yyyyMMddHHmm
     *
     * @return
     */
    public static String buildWeatherId(String deptId, Date updateTime) {
        if (null == updateTime)
            updateTime = new Date();
        return deptId + "-" + DateFormatUtils.format(updateTime, "yyyyMMddHHmm");
    }
    /**
     * åˆ¤æ–­å½“前气象信息是否需要持久化,默认系统只保存在上午8点 å’Œä¸‹åˆ3点的气象信。
     *
     * @param updateTime
     * @return
     */
    public static boolean isSave(Date updateTime) {
        String tag = DateFormatUtils.format(updateTime, "HHmm");
        String tag1 = "0800";
        String tag2 = "1500";
        if (tag.equals(tag1) || tag.equals(tag2)) {
            return true;
        }
        return false;
    }
}
igds-dzhwk-core/src/main/resources/mapper/DicAreaMapper.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fzzy.igds.sys.mapper.DicAreaMapper">
    <!-- èŽ·å–åŒºåŸŸåˆ—è¡¨ -->
    <select id="listDicArea" resultType="com.fzzy.igds.dzhwk.domain.DicArea"
            parameterType="com.fzzy.igds.dzhwk.data.BaseParam">
        select
        CODE_ as code,
        NAME_ as name,
        TYPE_ as type,
        SIMPLE_ as simple
        from D_DIC_AREA
        <where>
            <if test="param.key != null">AND (NAME_ like "%"#{param.key}"%" OR SIMPLE_ like "%"#{param.key}"%" )</if>
        </where>
        order by CODE_
    </select>
</mapper>
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/Building.view.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,503 @@
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model>
    <DataType name="dtMain">
      <Property name="creationType">com.fzzy.igds.dzhwk.domain.Building</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(&quot;deptPR#loadParents&quot;).getResult()}</Property>
          <Property name="keyProperty">deptId</Property>
          <Property name="valueProperty">deptName</Property>
        </Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="name">
        <Property></Property>
        <Property name="label">仓房名称</Property>
      </PropertyDef>
      <PropertyDef name="storage">
        <Property name="dataType">Double</Property>
        <Property name="label">设计储量</Property>
        <Property name="displayFormat">#0.000 å¨</Property>
      </PropertyDef>
      <PropertyDef name="userDate">
        <Property name="dataType">Date</Property>
        <Property name="label">使用日期</Property>
      </PropertyDef>
      <PropertyDef name="height">
        <Property name="dataType">Double</Property>
        <Property name="label">仓房高度</Property>
        <Property name="displayFormat">#0.00 ç±³</Property>
      </PropertyDef>
      <PropertyDef name="length">
        <Property name="dataType">Double</Property>
        <Property name="label">仓房长度</Property>
        <Property name="displayFormat">#0.00 ç±³</Property>
      </PropertyDef>
      <PropertyDef name="width">
        <Property name="dataType">Double</Property>
        <Property name="label">仓房宽度</Property>
        <Property name="displayFormat">#0.00 ç±³</Property>
      </PropertyDef>
      <PropertyDef name="diameter">
        <Property name="dataType">Double</Property>
        <Property name="label">筒仓直径</Property>
        <Property name="displayFormat">#0.00 ç±³</Property>
      </PropertyDef>
      <PropertyDef name="volume">
        <Property name="dataType">Double</Property>
        <Property name="label">筒仓体积</Property>
        <Property name="displayFormat">#0.00 ç«‹æ–¹ç±³</Property>
      </PropertyDef>
      <PropertyDef name="deVolume">
        <Property name="dataType">Double</Property>
        <Property name="label">扣除体积</Property>
        <Property name="displayFormat">#0.00 ç«‹æ–¹ç±³</Property>
      </PropertyDef>
      <PropertyDef name="doorNum">
        <Property name="dataType">Integer</Property>
        <Property name="label">仓门数</Property>
        <Property name="displayFormat">#0 ä¸ª</Property>
      </PropertyDef>
      <PropertyDef name="ground">
        <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">01</Property>
                <Property name="value">01-混凝土地面</Property>
              </Entity>
              <Entity>
                <Property name="key">02</Property>
                <Property name="value">02-铺砖地面</Property>
              </Entity>
              <Entity>
                <Property name="key">03</Property>
                <Property name="value">03-水泥砂浆地面</Property>
              </Entity>
              <Entity>
                <Property name="key">04</Property>
                <Property name="value">04-钢筋混凝土楼板式地面</Property>
              </Entity>
              <Entity>
                <Property name="key">05</Property>
                <Property name="value">05-临时地坪</Property>
              </Entity>
              <Entity>
                <Property name="key">06</Property>
                <Property name="value">06-其它</Property>
              </Entity>
              <Entity>
                <Property name="key">07</Property>
                <Property name="value">07-钢筋混凝土地面</Property>
              </Entity>
            </Collection>
          </Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="wall">
        <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">01</Property>
                <Property name="value">01-钢筋砼</Property>
              </Entity>
              <Entity>
                <Property name="key">02</Property>
                <Property name="value">02-砖混</Property>
              </Entity>
              <Entity>
                <Property name="key">03</Property>
                <Property name="value">03-钢结构</Property>
              </Entity>
              <Entity>
                <Property name="key">04</Property>
                <Property name="value">04-ç ¼</Property>
              </Entity>
              <Entity>
                <Property name="key">99</Property>
                <Property name="value">99-其他</Property>
              </Entity>
            </Collection>
          </Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="roof">
        <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">01</Property>
                <Property name="value">01-大型屋面板</Property>
              </Entity>
              <Entity>
                <Property name="key">02</Property>
                <Property name="value">02-现浇钢筋砼板</Property>
              </Entity>
              <Entity>
                <Property name="key">03</Property>
                <Property name="value">03-复合保温钢板(夹芯板)</Property>
              </Entity>
              <Entity>
                <Property name="key">04</Property>
                <Property name="value">04-预应力砼双T板</Property>
              </Entity>
              <Entity>
                <Property name="key">05</Property>
                <Property name="value">05-彩钢板</Property>
              </Entity>
              <Entity>
                <Property name="key">06</Property>
                <Property name="value">06-其它</Property>
              </Entity>
              <Entity>
                <Property name="key">07</Property>
                <Property name="value">07-钢桁架轻型复合板</Property>
              </Entity>
            </Collection>
          </Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="roofTruss">
        <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">01</Property>
                <Property name="value">01-预应力砼折线形屋架</Property>
              </Entity>
              <Entity>
                <Property name="key">02</Property>
                <Property name="value">02-钢筋砼拱板</Property>
              </Entity>
              <Entity>
                <Property name="key">03</Property>
                <Property name="value">03-钢架</Property>
              </Entity>
              <Entity>
                <Property name="key">04</Property>
                <Property name="value">04-木屋架</Property>
              </Entity>
              <Entity>
                <Property name="key">05</Property>
                <Property name="value">05-钢结构门式刚架</Property>
              </Entity>
              <Entity>
                <Property name="key">06</Property>
                <Property name="value">06-预应力砼双T板</Property>
              </Entity>
              <Entity>
                <Property name="key">07</Property>
                <Property name="value">07-钢筋砼门式刚架</Property>
              </Entity>
              <Entity>
                <Property name="key">08</Property>
                <Property name="value">08-其他</Property>
              </Entity>
            </Collection>
          </Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="createDate">
        <Property name="dataType">Date</Property>
        <Property name="label">建造日期</Property>
      </PropertyDef>
      <PropertyDef name="lon">
        <Property name="dataType">Double</Property>
        <Property name="label">经度</Property>
      </PropertyDef>
      <PropertyDef name="lat">
        <Property name="dataType">Double</Property>
        <Property name="label">纬度</Property>
      </PropertyDef>
      <PropertyDef name="updateTime">
        <Property name="dataType">Date</Property>
        <Property name="label">更新时间</Property>
      </PropertyDef>
    </DataType>
  </Model>
  <View layout="regionPadding:10">
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="dataProvider">buildingPR#loadData</Property>
      <Property name="dataType">[dtMain]</Property>
    </DataSet>
    <Container layout="regionPadding:10" layoutConstraint="top">
      <Property name="exClassName">bg-color</Property>
      <Property name="height">55</Property>
      <Property name="contentOverflow">hidden</Property>
      <Label layoutConstraint="left">
        <Property name="text">菜单栏:</Property>
      </Label>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">view.get(&quot;#dsMain&quot;).insert();&#xD;
          view.get(&quot;#dialogMain&quot;).show();</ClientEvent>
        <Property name="caption">新增</Property>
        <Property name="exClassName">btn1</Property>
        <Property name="iconClass">fa fa-plus</Property>
      </Button>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">&#xD;
var select = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;);&#xD;
if(select){&#xD;
    view.get(&quot;#dialogMain&quot;).show();;&#xD;
}else{&#xD;
    $notify(&quot;请选择需要修改的数据……&quot;);&#xD;
}    </ClientEvent>
        <Property name="caption">编辑</Property>
        <Property name="exClassName">btn2</Property>
        <Property name="iconClass">fa fa-pencil</Property>
      </Button>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">  &#xD;
var select = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;);&#xD;
if(select){&#xD;
    view.get(&quot;#ajaxDel&quot;).set(&quot;parameter&quot;,select).execute(function(){&#xD;
        select.remove();&#xD;
    });&#xD;
}else{&#xD;
    $notify(&quot;请选择需要删除的数据……&quot;);&#xD;
}&#xD;
</ClientEvent>
        <Property name="caption">删除</Property>
        <Property name="exClassName">btn3</Property>
        <Property name="iconClass">fa fa-trash-o</Property>
      </Button>
    </Container>
    <Container layout="regionPadding:10" layoutConstraint="center">
      <Property name="exClassName">bg-color</Property>
      <DataGrid id="dgMain">
        <ClientEvent name="onDataRowDoubleClick">var dialog= view.get(&quot;#dialogMain&quot;);&#xD;
          dialog.show();</ClientEvent>
        <Property name="dataSet">dsMain</Property>
        <Property name="readOnly">true</Property>
        <Property name="selectionMode">singleRow</Property>
        <RowSelectorColumn/>
        <RowNumColumn/>
        <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="storage">
          <Property name="property">storage</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="length">
          <Property name="property">length</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="width">
          <Property name="property">width</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="height">
          <Property name="property">height</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="diameter">
          <Property name="property">diameter</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="createDate">
          <Property name="property">createDate</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="userDate">
          <Property name="property">userDate</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="updateTime">
          <Property name="property">updateTime</Property>
          <Property name="align">center</Property>
        </DataColumn>
      </DataGrid>
    </Container>
    <Dialog id="dialogMain">
      <Property name="closeable">false</Property>
      <Property name="caption">仓房信息</Property>
      <Property name="width">60%</Property>
      <Property name="iconClass">fa fa-tasks</Property>
      <Buttons>
        <Button id="btnOk">
          <ClientEvent name="onClick">view.get(&quot;#uaSave&quot;).execute(function(result){&#xD;
            if(result){&#xD;
            $alert(result);&#xD;
            }else{&#xD;
            $notify(&quot;保存成功!!&quot;);&#xD;
            view.get(&quot;#dialogMain&quot;).hide();&#xD;
            }&#xD;
            });</ClientEvent>
          <Property name="caption">确定</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="iconClass">fa fa-check</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">view.get(&quot;#dsMain.data:#&quot;).cancel();&#xD;
            self.get(&quot;parent&quot;).hide();</ClientEvent>
          <Property name="caption">取消</Property>
          <Property name="exClassName">btn3</Property>
          <Property name="iconClass">fa fa-times</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">150</Property>
          <AutoFormElement>
            <Property name="name">id</Property>
            <Property name="property">id</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">deptId</Property>
            <Property name="property">deptId</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">name</Property>
            <Property name="property">name</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">storage</Property>
            <Property name="property">storage</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">length</Property>
            <Property name="property">length</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">diameter</Property>
            <Property name="property">diameter</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">volume</Property>
            <Property name="property">volume</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">doorNum</Property>
            <Property name="property">doorNum</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">ground</Property>
            <Property name="property">ground</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">wall</Property>
            <Property name="property">wall</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">roof</Property>
            <Property name="property">roof</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">roofTruss</Property>
            <Property name="property">roofTruss</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">createDate</Property>
            <Property name="property">createDate</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">userDate</Property>
            <Property name="property">userDate</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">lon</Property>
            <Property name="property">lon</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">lat</Property>
            <Property name="property">lat</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">deVolume</Property>
            <Property name="property">deVolume</Property>
            <Editor/>
          </AutoFormElement>
          <Link>
            <Property name="href">http://api.map.baidu.com/lbsapi/getpoint/</Property>
            <Property name="target">_blank</Property>
            <Property name="style">
              <Property name="padding-left">150px</Property>
            </Property>
            <Property name="text">帮助:点击坐标位置拾取</Property>
          </Link>
        </AutoForm>
      </Children>
      <Tools/>
    </Dialog>
    <UpdateAction id="uaSave">
      <Property name="dataResolver">buildingPR#saveData</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="ajaxDel">
      <Property name="service">buildingPR#delData</Property>
      <Property name="confirmMessage">确定要执行删除么?</Property>
    </AjaxAction>
  </View>
</ViewConfig>
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/Company.view.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,607 @@
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model>
    <DataType name="dtMain">
      <Property name="creationType">com.fzzy.igds.dzhwk.domain.Company</Property>
      <PropertyDef name="id">
        <Property></Property>
        <Property name="label">ID</Property>
      </PropertyDef>
      <PropertyDef name="companyId">
        <Property></Property>
        <Property name="label">系统组织编码</Property>
      </PropertyDef>
      <PropertyDef name="dwdm">
        <Property></Property>
        <Property name="label">单位信用码</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="tydwbm">
        <Property></Property>
        <Property name="label">统一单位编码</Property>
      </PropertyDef>
      <PropertyDef name="dwmc">
        <Property></Property>
        <Property name="label">单位名称</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="dwlx">
        <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">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">19</Property>
                <Property name="value">19-其他仓储企业</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">9</Property>
                <Property name="value">9-其他粮食企业</Property>
              </Entity>
            </Collection>
          </Property>
        </Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="zcrq">
        <Property name="dataType">Date</Property>
        <Property name="label">注册日期</Property>
      </PropertyDef>
      <PropertyDef name="zczb">
        <Property name="dataType">Double</Property>
        <Property name="label">注册资本</Property>
        <Property name="displayFormat">#0.000 ä¸‡å…ƒ</Property>
      </PropertyDef>
      <PropertyDef name="zcze">
        <Property name="dataType">Double</Property>
        <Property name="label">资产总额</Property>
        <Property name="displayFormat">#0.000 ä¸‡å…ƒ</Property>
      </PropertyDef>
      <PropertyDef name="fddbr">
        <Property></Property>
        <Property name="label">法定代表人</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="frsfzh">
        <Property></Property>
        <Property name="label">法人身份证</Property>
      </PropertyDef>
      <PropertyDef name="frlxfs">
        <Property></Property>
        <Property name="label">法人电话</Property>
      </PropertyDef>
      <PropertyDef name="qylxr">
        <Property></Property>
        <Property name="label">企业联系人</Property>
      </PropertyDef>
      <PropertyDef name="bgdh">
        <Property></Property>
        <Property name="label">办公电话</Property>
      </PropertyDef>
      <PropertyDef name="zcdz">
        <Property></Property>
        <Property name="label">注册地址</Property>
      </PropertyDef>
      <PropertyDef name="dzyx">
        <Property></Property>
        <Property name="label">电子邮箱</Property>
      </PropertyDef>
      <PropertyDef name="qygfwzdz">
        <Property></Property>
        <Property name="label">官方网址</Property>
      </PropertyDef>
      <PropertyDef name="czhm">
        <Property></Property>
        <Property name="label">传真号码</Property>
      </PropertyDef>
      <PropertyDef name="yzbm">
        <Property></Property>
        <Property name="label">邮政编码</Property>
      </PropertyDef>
      <PropertyDef name="xzqhdm">
        <Property></Property>
        <Property name="label">区划代码</Property>
      </PropertyDef>
      <PropertyDef name="xzqhmc">
        <Property></Property>
        <Property name="label">区划名称</Property>
      </PropertyDef>
      <PropertyDef name="sjdwmc">
        <Property></Property>
        <Property name="label">单位名称</Property>
      </PropertyDef>
      <PropertyDef name="sjdwdm">
        <Property></Property>
        <Property name="label">单位代码</Property>
      </PropertyDef>
      <PropertyDef name="sjdwtybm">
        <Property></Property>
        <Property name="label">统一编码</Property>
      </PropertyDef>
      <PropertyDef name="kqs">
        <Property name="dataType">Integer</Property>
        <Property name="label">库区数</Property>
        <Property name="displayFormat">#0 ä¸ª</Property>
      </PropertyDef>
      <PropertyDef name="cfs">
        <Property name="dataType">Integer</Property>
        <Property name="label">仓房数</Property>
        <Property name="displayFormat">#0 æ ‹</Property>
      </PropertyDef>
      <PropertyDef name="ygs">
        <Property name="dataType">Integer</Property>
        <Property name="label">油罐数</Property>
        <Property name="displayFormat">#0 ä¸ª</Property>
      </PropertyDef>
      <PropertyDef name="jd">
        <Property name="dataType">Double</Property>
        <Property name="label">经度</Property>
      </PropertyDef>
      <PropertyDef name="wd">
        <Property name="dataType">Double</Property>
        <Property name="label">纬度</Property>
      </PropertyDef>
      <PropertyDef name="dwzt">
        <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>
            </Collection>
          </Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="zhgxsj">
        <Property name="dataType">DateTime</Property>
        <Property name="label">更新时间</Property>
      </PropertyDef>
    </DataType>
  </Model>
  <View layout="regionPadding:10">
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="dataProvider">companyPR#getData</Property>
      <Property name="dataType">[dtMain]</Property>
    </DataSet>
    <Container layout="regionPadding:10" layoutConstraint="top">
      <Property name="exClassName">bg-color</Property>
      <Property name="height">55</Property>
      <Property name="contentOverflow">hidden</Property>
      <Label layoutConstraint="left">
        <Property name="text">菜单栏:</Property>
      </Label>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">&#xD;
var select = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;);&#xD;
if(select){&#xD;
    view.get(&quot;#dialogMain&quot;).show();;&#xD;
}else{&#xD;
    $notify(&quot;请选择需要修改的数据……&quot;);&#xD;
}          </ClientEvent>
        <Property name="caption">详情编辑</Property>
        <Property name="exClassName">btn2</Property>
        <Property name="iconClass">fa fa-pencil</Property>
      </Button>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">  &#xD;
var select = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;);&#xD;
if(select){&#xD;
    view.get(&quot;#ajaxDel&quot;).set(&quot;parameter&quot;,select).execute(function(){&#xD;
        select.remove();&#xD;
    });&#xD;
}else{&#xD;
    $notify(&quot;请选择需要删除的数据……&quot;);&#xD;
}&#xD;
</ClientEvent>
        <Property name="caption">删除</Property>
        <Property name="exClassName">btn3</Property>
        <Property name="iconClass">fa fa-trash-o</Property>
      </Button>
    </Container>
    <Container layout="regionPadding:10" layoutConstraint="center">
      <Property name="exClassName">bg-color</Property>
      <DataGrid id="dgMain">
        <ClientEvent name="onDataRowDoubleClick">var dialog= view.get(&quot;#dialogMain&quot;);&#xD;
          dialog.show();</ClientEvent>
        <Property name="dataSet">dsMain</Property>
        <Property name="readOnly">true</Property>
        <Property name="selectionMode">singleRow</Property>
        <RowSelectorColumn/>
        <RowNumColumn/>
        <DataColumn name="dwmc">
          <Property name="property">dwmc</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="dwdm">
          <Property name="property">dwdm</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="dwlx">
          <Property name="property">dwlx</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="zcze">
          <Property name="property">zcze</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="fddbr">
          <Property name="property">fddbr</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="kqs">
          <Property name="property">kqs</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="cfs">
          <Property name="property">cfs</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="ygs">
          <Property name="property">ygs</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="dwzt">
          <Property name="property">dwzt</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="zhgxsj">
          <Property name="property">zhgxsj</Property>
          <Property name="align">center</Property>
        </DataColumn>
      </DataGrid>
    </Container>
    <Dialog id="dialogMain">
      <Property name="caption">仓储单位信息</Property>
      <Property name="width">1200</Property>
      <Property name="closeable">false</Property>
      <Buttons>
        <Button id="btnOk">
          <ClientEvent name="onClick">view.get(&quot;#uaSave&quot;).execute(function(result){&#xD;
            if(result){&#xD;
            $alert(result);&#xD;
            }else{&#xD;
            $notify(&quot;保存成功!!&quot;);&#xD;
            view.get(&quot;#dialogMain&quot;).hide();&#xD;
            }&#xD;
            });</ClientEvent>
          <Property name="caption">确定</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="iconClass">fa fa-check</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">view.get(&quot;#dsMain.data:#&quot;).cancel();&#xD;
            self.get(&quot;parent&quot;).hide();</ClientEvent>
          <Property name="caption">取消</Property>
          <Property name="exClassName">btn3</Property>
          <Property name="iconClass">fa fa-times</Property>
        </Button>
      </Buttons>
      <Children>
        <FieldSet layout="padding:15">
          <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">120</Property>
              <AutoFormElement>
                <Property name="name">dwmc</Property>
                <Property name="property">dwmc</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">dwdm</Property>
                <Property name="property">dwdm</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">tydwbm</Property>
                <Property name="property">tydwbm</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">dwlx</Property>
                <Property name="property">dwlx</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">dwzt</Property>
                <Property name="property">dwzt</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">zcrq</Property>
                <Property name="property">zcrq</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">zczb</Property>
                <Property name="property">zczb</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">zcze</Property>
                <Property name="property">zcze</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">fddbr</Property>
                <Property name="property">fddbr</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">frsfzh</Property>
                <Property name="property">frsfzh</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">frlxfs</Property>
                <Property name="property">frlxfs</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">qylxr</Property>
                <Property name="property">qylxr</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">bgdh</Property>
                <Property name="property">bgdh</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">zcdz</Property>
                <Property name="property">zcdz</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">dzyx</Property>
                <Property name="property">dzyx</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">qygfwzdz</Property>
                <Property name="property">qygfwzdz</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">czhm</Property>
                <Property name="property">czhm</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">yzbm</Property>
                <Property name="property">yzbm</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">xzqhmc</Property>
                <Property name="property">xzqhmc</Property>
                <Property name="trigger">ddFoodOrigin</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">xzqhdm</Property>
                <Property name="property">xzqhdm</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">zhgxsj</Property>
                <Property name="property">zhgxsj</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">jd</Property>
                <Property name="property">jd</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">wd</Property>
                <Property name="property">wd</Property>
                <Editor/>
              </AutoFormElement>
              <Link>
                <Property name="href">http://api.map.baidu.com/lbsapi/getpoint/</Property>
                <Property name="target">_blank</Property>
                <Property name="style">
                  <Property name="padding-left">150px</Property>
                </Property>
                <Property name="text">帮助:点击坐标位置拾取</Property>
              </Link>
            </AutoForm>
          </Children>
        </FieldSet>
        <Control>
          <Property name="height">10</Property>
        </Control>
        <FieldSet layout="padding:15">
          <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">120</Property>
              <AutoFormElement>
                <Property name="name">sjdwmc</Property>
                <Property name="property">sjdwmc</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">sjdwdm</Property>
                <Property name="property">sjdwdm</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">sjdwtybm</Property>
                <Property name="property">sjdwtybm</Property>
                <Editor/>
              </AutoFormElement>
            </AutoForm>
          </Children>
        </FieldSet>
        <FieldSet layout="padding:15">
          <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">120</Property>
              <AutoFormElement>
                <Property name="name">kqs</Property>
                <Property name="property">kqs</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">cfs</Property>
                <Property name="property">cfs</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">ygs</Property>
                <Property name="property">ygs</Property>
                <Editor/>
              </AutoFormElement>
            </AutoForm>
          </Children>
        </FieldSet>
      </Children>
      <Tools/>
    </Dialog>
    <UpdateAction id="uaSave">
      <Property name="dataResolver">companyPR#saveData</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="ajaxDel">
      <Property name="service">companyPR#delData</Property>
      <Property name="confirmMessage">确定要执行删除么?</Property>
    </AjaxAction>
    <CustomDropDown id="ddFoodOrigin">
      <Property name="minHeight">500</Property>
      <Property name="assignmentMap">xzqhmc=name,xzqhdm=code</Property>
      <Property name="minWidth">500</Property>
      <Container layout="regionPadding:5">
        <DataSet id="dsFoodOrigin">
          <Property name="dataProvider">dicAreaPR#pageList</Property>
          <Property name="dataType">[dtArea]</Property>
          <Property name="parameter"></Property>
          <Property name="pageSize">10</Property>
        </DataSet>
        <Container layout="hbox regionPadding:5">
          <TextEditor id="key2">
            <Property name="blankText"> -- åç§° --</Property>
            <Property name="width">200</Property>
          </TextEditor>
          <Button>
            <ClientEvent name="onClick">var key = view.get(&quot;#key2.value&quot;);&#xD;
view.get(&quot;#dsFoodOrigin&quot;).set(&quot;parameter&quot;,{key:key}).flushAsync();</ClientEvent>
            <Property name="caption">查询</Property>
            <Property name="exClassName">btn4</Property>
            <Property name="iconClass">fa fa-search</Property>
          </Button>
          <Button>
            <ClientEvent name="onClick">var data = view.get(&quot;#dsFoodOrigin.data:#&quot;);&#xD;
              if(data){&#xD;
              view.get(&quot;#ddFoodOrigin&quot;).close(data.toJSON());&#xD;
              }</ClientEvent>
            <Property name="iconClass">fa fa-check</Property>
            <Property name="exClassName">btn1</Property>
            <Property name="caption">确定</Property>
          </Button>
        </Container>
        <DataGrid>
          <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsFoodOrigin.data:#&quot;);&#xD;
            if(data){&#xD;
            view.get(&quot;#ddFoodOrigin&quot;).close(data.toJSON());&#xD;
            }</ClientEvent>
          <Property name="dataSet">dsFoodOrigin</Property>
          <Property name="readOnly">true</Property>
          <DataColumn name="code">
            <Property name="property">code</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="name">
            <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = &quot;bold&quot;;&#xD;
              arg.processDefault = true;</ClientEvent>
            <Property name="property">name</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="simple">
            <Property name="property">simple</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
        </DataGrid>
        <DataPilot layoutConstraint="bottom">
          <Property name="dataSet">dsFoodOrigin</Property>
        </DataPilot>
      </Container>
    </CustomDropDown>
  </View>
</ViewConfig>
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/Depot.view.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,804 @@
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model>
    <DataType name="dataTypeUser">
      <Property name="creationType">com.ruoyi.common.core.domain.entity.SysUser</Property>
      <PropertyDef name="loginName">
        <Property name="dataType">String</Property>
        <Property name="label">用户名</Property>
      </PropertyDef>
      <PropertyDef name="userName">
        <Property name="dataType">String</Property>
        <Property name="label">中文名</Property>
      </PropertyDef>
    </DataType>
    <DataType name="dtDepot" parent="global:dtDepot"/>
    <DataType name="dtConfirm">
      <Property name="creationType">com.fzzy.igds.dzhwk.domain.DepotStatusConfirm</Property>
      <PropertyDef name="fcqrdh">
        <Property></Property>
        <Property name="label">确认单号</Property>
        <Property name="readOnly">true</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(&quot;deptPR#loadParents&quot;).getResult()}</Property>
          <Property name="keyProperty">deptId</Property>
          <Property name="valueProperty">deptName</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="depotId">
        <Property></Property>
        <Property name="label">货位编码</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getAllCache&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="fcrq">
        <Property name="dataType">Date</Property>
        <Property name="label">封仓日期</Property>
      </PropertyDef>
      <PropertyDef name="foodVariety">
        <Property></Property>
        <Property name="label">粮食品种</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;FOOD_VARIETY_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="foodType">
        <Property></Property>
        <Property name="label">粮食性质</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;FOOD_TYPE_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="foodLevel">
        <Property></Property>
        <Property name="label">粮食等级</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerFoodLevel&quot;).getResult()}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="foodLocation">
        <Property></Property>
        <Property name="label">产地名称</Property>
      </PropertyDef>
      <PropertyDef name="foodYear">
        <Property></Property>
        <Property name="label">收货年度</Property>
      </PropertyDef>
      <PropertyDef name="country">
        <Property></Property>
        <Property name="label">国别</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;GB_&quot;)}</Property>
          <Property name="keyProperty">dictValue</Property>
          <Property name="valueProperty">dictLabel</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="storeKeeperName">
        <Property></Property>
        <Property name="label">保管员</Property>
      </PropertyDef>
      <PropertyDef name="fcsl">
        <Property name="dataType">Double</Property>
        <Property name="label">封仓数量</Property>
        <Property name="displayFormat">#,##0 KG</Property>
      </PropertyDef>
      <PropertyDef name="applyUser">
        <Property></Property>
        <Property name="label">封仓申请人</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="deptAuditUser">
        <Property></Property>
        <Property name="label">部门审核人</Property>
      </PropertyDef>
      <PropertyDef name="leaderAuditUser">
        <Property></Property>
        <Property name="label">领导审核人</Property>
      </PropertyDef>
      <PropertyDef name="remarks">
        <Property></Property>
        <Property name="label">备注信息</Property>
      </PropertyDef>
      <PropertyDef name="updateTime">
        <Property name="dataType">DateTime</Property>
        <Property name="label">更新时间</Property>
      </PropertyDef>
    </DataType>
  </Model>
  <View>
    <ClientEvent name="onReady">&#xD;
/**&#xD;
 * æŸ¥è¯¢&#xD;
 */&#xD;
query = function(){&#xD;
    view.get(&quot;#dataSetdepot&quot;).flushAsync();&#xD;
}&#xD;
//打印货位卡&#xD;
printBill = function (htmlStr) {&#xD;
    var LODOP = CLODOP;&#xD;
    LODOP.PRINT_INIT(&quot;货位卡&quot;);&#xD;
    LODOP.SET_PRINT_PAGESIZE(1, 0, 0, &quot;A4&quot;);&#xD;
    //LODOP.SET_PRINT_PAGESIZE(1, 0, '90mm', &quot;A4&quot;);&#xD;
    LODOP.ADD_PRINT_HTM(0, 0, &quot;96%&quot;, &quot;100%&quot;, htmlStr);&#xD;
    LODOP.PREVIEW();&#xD;
};</ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
    <Property name="javaScriptFile">./static/js/plugins/lodop/LodopFuncs.js</Property>
    <DataSet id="dataSetdepot">
      <Property name="dataProvider">depotPR#getData</Property>
      <Property name="dataType">[dtDepot]</Property>
    </DataSet>
    <DataSet id="dataSetUser">
      <Property name="dataType">[dataTypeUser]</Property>
      <Property name="dataProvider">sysUserPR#loadUser</Property>
    </DataSet>
    <DataSet id="dataSetConfirm">
      <Property name="readOnly">false</Property>
      <Property name="dataType">[dtConfirm]</Property>
      <Property name="loadMode">manual</Property>
    </DataSet>
    <Container>
      <Property name="exClassName">c-data</Property>
      <ToolBar>
        <ToolBarLabel>
          <Property name="text">菜单栏:</Property>
          <Property name="exClassName">menu-bar-caption</Property>
        </ToolBarLabel>
        <ToolBarButton>
          <ClientEvent name="onClick">view.get(&quot;#dataSetdepot&quot;).insert();&#xD;
view.get(&quot;#depotdialog&quot;).show();&#xD;
view.get(&quot;#oneId&quot;).set(&quot;readOnly&quot;,false);&#xD;
view.get(&quot;#twoId&quot;).set(&quot;readOnly&quot;,false);</ClientEvent>
          <Property name="caption">新增</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="iconClass">fa fa-plus-circle</Property>
          <Property name="width">80</Property>
        </ToolBarButton>
        <ToolBarButton>
          <ClientEvent name="onClick">var select = view.get(&quot;#dataGridDepot&quot;).get(&quot;selection&quot;);&#xD;
if(select){&#xD;
    view.get(&quot;#depotdialog&quot;).show();&#xD;
    view.get(&quot;#oneId&quot;).set(&quot;readOnly&quot;,true);&#xD;
    view.get(&quot;#twoId&quot;).set(&quot;readOnly&quot;,true);
}else{&#xD;
    $notify(&quot;请选择需要修改的仓库……&quot;);&#xD;
}</ClientEvent>
          <Property name="caption">修改</Property>
          <Property name="exClassName">btn2</Property>
          <Property name="iconClass">fa fa-pencil</Property>
          <Property name="width">80</Property>
        </ToolBarButton>
        <ToolBarButton>
          <ClientEvent name="onClick">var select = view.get(&quot;#dataGridDepot&quot;).get(&quot;selection&quot;);&#xD;
if(select){&#xD;
    view.get(&quot;#deleteAjaxAction&quot;).set(&quot;parameter&quot;,select).execute();&#xD;
    query();&#xD;
}else{&#xD;
    $notify(&quot;请选择需要删除的仓库……&quot;);&#xD;
}</ClientEvent>
          <Property name="caption">删除</Property>
          <Property name="exClassName">btn3</Property>
          <Property name="iconClass">fa fa-minus-circle</Property>
          <Property name="width">80</Property>
        </ToolBarButton>
        <ToolBarButton>
          <Property name="caption">刷新缓存</Property>
          <Property name="exClassName">btn4</Property>
          <Property name="iconClass">fa fa-refresh</Property>
          <Property name="action">ajaxRefreshCache</Property>
        </ToolBarButton>
        <ToolBarButton>
          <ClientEvent name="onClick">var url = &quot;com.fzzy.igds.sys.DepotStore.d&quot;;&#xD;
var panelId = window.frameElement.getAttribute('data-id');
window.parent.$.modal.openTab(&quot;库存管理&quot;, url, false, panelId);</ClientEvent>
          <Property name="caption">库存管理</Property>
          <Property name="exClassName">btn2</Property>
          <Property name="iconClass">fa fa-book</Property>
          <Property name="width">100</Property>
        </ToolBarButton>
        <ToolBarButton>
          <ClientEvent name="onClick">var depot = view.get(&quot;#dataGridDepot&quot;).get(&quot;selection&quot;);&#xD;
if(depot){&#xD;
    var depotId = depot.get(&quot;id&quot;);&#xD;
    var deptId = depot.get(&quot;deptId&quot;);&#xD;
    var fcsl = depot.get(&quot;storageReal&quot;);&#xD;
    var foodType = depot.get(&quot;foodType&quot;);&#xD;
    var foodVariety = depot.get(&quot;foodVariety&quot;);&#xD;
    var foodLevel = depot.get(&quot;foodLevel&quot;);&#xD;
    var foodLocation = depot.get(&quot;foodLocation&quot;);&#xD;
    var foodYear = depot.get(&quot;foodYear&quot;);&#xD;
    var storeKeeperName = depot.get(&quot;storeKeeperName&quot;);&#xD;
    var fcrq = new Date();&#xD;
    var updateTime = new Date();&#xD;
    view.get(&quot;#dataSetConfirm&quot;).insert({&#xD;
        deptId:deptId,&#xD;
        depotId:depotId,&#xD;
        fcrq:fcrq,&#xD;
        foodVariety:foodVariety,&#xD;
        foodType:foodType,&#xD;
        foodLevel:foodLevel,&#xD;
        foodLocation:foodLocation,&#xD;
        foodYear:foodYear,&#xD;
        storeKeeperName:storeKeeperName,&#xD;
        fcsl:fcsl,&#xD;
        updateTime:updateTime&#xD;
    });&#xD;
    view.get(&quot;#statusConfirmlog&quot;).show();&#xD;
}else{&#xD;
    $notify(&quot;请选择需要封仓的仓库……&quot;);&#xD;
}</ClientEvent>
          <Property name="caption">封仓确认</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="iconClass">fa fa-pencil-square-o</Property>
          <Property name="width">100</Property>
        </ToolBarButton>
        <ToolBarButton>
          <ClientEvent name="onClick">var url = &quot;com.fzzy.igds.sys.DepotStatusConfirm.d&quot;;&#xD;
var panelId = window.frameElement.getAttribute('data-id');
window.parent.$.modal.openTab(&quot;封仓记录&quot;, url, false, panelId);</ClientEvent>
          <Property name="caption">封仓记录</Property>
          <Property name="exClassName">btn2</Property>
          <Property name="iconClass">fa fa-file-pdf-o</Property>
          <Property name="width">100</Property>
        </ToolBarButton>
        <ToolBarButton layoutConstraint="right">
          <ClientEvent name="onClick">window.parent.$.table.exportExcelDorado(&quot;./export/depot-excel&quot;, &quot;货位数据&quot;, null);</ClientEvent>
          <Property name="caption">导出Excel</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="iconClass">fa fa-file-excel-o</Property>
          <Property name="width">100</Property>
        </ToolBarButton>
      </ToolBar>
      <DataGrid id="dataGridDepot" layoutConstraint="padding:15px 0px 0px 0px">
        <ClientEvent name="onDataRowClick">view.get(&quot;#dataGridDepot&quot;).set(&quot;selection&quot;,arg.data);</ClientEvent>
        <Property name="dataSet">dataSetdepot</Property>
        <Property name="selectionMode">singleRow</Property>
        <Property name="readOnly">true</Property>
        <RowSelectorColumn/>
        <RowNumColumn/>
        <DataColumn name="name">
          <Property name="property">name</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="depotStatus">
          <Property name="property">depotStatus</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="foodVariety">
          <Property name="property">foodVariety</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="foodType">
          <Property name="property">foodType</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="foodLevel">
          <Property name="property">foodLevel</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="storageReal">
          <Property name="property">storageReal</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="foodYear">
          <Property name="property">foodYear</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="foodLocation">
          <Property name="property">foodLocation</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="storeDate">
          <Property name="property">storeDate</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="storeKeeperName">
          <Property name="property">storeKeeperName</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="depotType">
          <Property name="property">depotType</Property>
          <Property name="align">center</Property>
        </DataColumn>
      </DataGrid>
    </Container>
    <Dialog id="depotdialog" layout="regionPadding:10">
      <Property name="iconClass">fa fa-pencil-square-o</Property>
      <Property name="caption">货位信息</Property>
      <Property name="width">1200</Property>
      <Property name="closeable">false</Property>
      <Buttons>
        <Button id="btnOK">
          <ClientEvent name="onClick">//同时提交历史书&#xD;
var data = view.get(&quot;#dataSetdepot.data:#&quot;);&#xD;
view.get(&quot;#updateactionSave&quot;).execute(function(result){&#xD;
    if(result){&#xD;
        $notify(result);&#xD;
    }else{&#xD;
        self.get(&quot;parent&quot;).hide();&#xD;
        query();&#xD;
    }&#xD;
});</ClientEvent>
          <Property name="caption">确定</Property>
          <Property name="iconClass">fa fa-check-circle</Property>
          <Property name="exClassName">btn1</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">var cur = view.get(&quot;#dataSetdepot.data:#&quot;);&#xD;
if(cur) cur.cancel();&#xD;
self.get(&quot;parent&quot;).hide();</ClientEvent>
          <Property name="caption">取消</Property>
          <Property name="iconClass">fa fa-times-circle</Property>
          <Property name="exClassName">btn3</Property>
        </Button>
      </Buttons>
      <Children>
        <FieldSet layout="padding:5">
          <Property name="caption">基本信息</Property>
          <Buttons/>
          <Children>
            <AutoForm>
              <Property name="dataSet">dataSetdepot</Property>
              <Property name="readOnly">false</Property>
              <Property name="labelSeparator"> : </Property>
              <Property name="labelAlign">right</Property>
              <Property name="cols">*,*,*,*,*,*</Property>
              <Property name="labelWidth">80</Property>
              <AutoFormElement id="oneId" layoutConstraint="colSpan:2">
                <Property name="name">id</Property>
                <Property name="property">id</Property>
                <Editor>
                  <TextEditor>
                    <Property name="blankText">-- è§„则:数字或字母 --</Property>
                  </TextEditor>
                </Editor>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">name</Property>
                <Property name="property">name</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">deptId</Property>
                <Property name="property">deptId</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">storeType</Property>
                <Property name="property">storeType</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">storageMax</Property>
                <Property name="property">storageMax</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">depotType</Property>
                <Property name="property">depotType</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">depotStatus</Property>
                <Property name="property">depotStatus</Property>
                <Property name="trigger">autoMappingDropDown2</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">granaryId</Property>
                <Property name="property">granaryId</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">buildingId</Property>
                <Property name="property">buildingId</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">storeKeeperName</Property>
                <Property name="property">storeKeeperName</Property>
                <Property name="trigger">triggerUserList</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">orderNum</Property>
                <Property name="property">orderNum</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">bhId</Property>
                <Property name="property">bhId</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:3">
                <Property name="name">remark</Property>
                <Property name="property">remark</Property>
                <Editor/>
              </AutoFormElement>
              <Label layoutConstraint="colSpan:3">
                <Property name="text">说明:1、仓库状态:空仓、满仓、出入库中状态变更请使用“库存管理”功能</Property>
                <Property name="style">
                  <Property name="color">blue</Property>
                  <Property name="padding-left">50px</Property>
                </Property>
              </Label>
            </AutoForm>
          </Children>
        </FieldSet>
        <FieldSet layout="padding:5">
          <Property name="caption">储粮信息</Property>
          <Buttons/>
          <Children>
            <AutoForm>
              <Property name="dataSet">dataSetdepot</Property>
              <Property name="readOnly">false</Property>
              <Property name="labelSeparator"> : </Property>
              <Property name="labelAlign">right</Property>
              <Property name="cols">*,*,*,*,*,*</Property>
              <Property name="labelWidth">80</Property>
              <AutoFormElement id="twoId" layoutConstraint="colSpan:2">
                <Property name="name">storageReal</Property>
                <Property name="property">storageReal</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">foodVariety</Property>
                <Property name="property">foodVariety</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">foodType</Property>
                <Property name="property">foodType</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">foodLevel</Property>
                <Property name="property">foodLevel</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">foodYear</Property>
                <Property name="property">foodYear</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">foodLocation</Property>
                <Property name="property">foodLocation</Property>
                <Property name="trigger">ddFoodOrigin</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">storeDate</Property>
                <Property name="property">storeDate</Property>
                <Editor/>
              </AutoFormElement>
              <Label>
                <Property name="text"></Property>
                <Property name="style">
                  <Property name="color">blue</Property>
                  <Property name="padding-left">50px</Property>
                </Property>
              </Label>
              <Label layoutConstraint="colSpan:3">
                <Property name="text">说明:1、实际储量调整请使用“库存管理”功能;</Property>
                <Property name="style">
                  <Property name="color">blue</Property>
                  <Property name="padding-left">50px</Property>
                </Property>
              </Label>
            </AutoForm>
          </Children>
        </FieldSet>
        <FieldSet layout="padding:5">
          <Property name="caption">质检信息</Property>
          <Buttons/>
          <Children>
            <AutoForm>
              <Property name="dataSet">dataSetdepot</Property>
              <Property name="readOnly">false</Property>
              <Property name="labelSeparator"> : </Property>
              <Property name="labelAlign">right</Property>
              <Property name="cols">*,*,*,*,*,*</Property>
              <Property name="labelWidth">80</Property>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">perWet</Property>
                <Property name="property">perWet</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">perImpurity</Property>
                <Property name="property">perImpurity</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">bulkWeight</Property>
                <Property name="property">bulkWeight</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">checkDate</Property>
                <Property name="property">checkDate</Property>
                <Editor/>
              </AutoFormElement>
              <Label>
                <Property name="text"></Property>
                <Property name="style">
                  <Property name="color">blue</Property>
                  <Property name="padding-left">50px</Property>
                </Property>
              </Label>
              <Label layoutConstraint="colSpan:3">
                <Property name="text">说明:储备粮质检信息会根据质量管理 è‡ªåŠ¨åŒæ­¥æ›´æ–°</Property>
                <Property name="style">
                  <Property name="color">blue</Property>
                  <Property name="padding-left">50px</Property>
                </Property>
              </Label>
            </AutoForm>
          </Children>
        </FieldSet>
      </Children>
      <Tools/>
    </Dialog>
    <Dialog id="statusConfirmlog" layout="regionPadding:10">
      <Property name="iconClass">fa fa-pencil-square-o</Property>
      <Property name="caption">封仓信息</Property>
      <Property name="width">1200</Property>
      <Property name="closeable">false</Property>
      <Buttons>
        <Button>
          <ClientEvent name="onClick">var data = view.get(&quot;#dataSetConfirm.data:#&quot;);&#xD;
view.get(&quot;#statusConfirmSave&quot;).execute(function(result){&#xD;
    if(result){&#xD;
        $notify(result);&#xD;
    }else{&#xD;
        self.get(&quot;parent&quot;).hide();&#xD;
    }&#xD;
});</ClientEvent>
          <Property name="caption">确定</Property>
          <Property name="iconClass">fa fa-check-circle</Property>
          <Property name="exClassName">btn1</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">var cur = view.get(&quot;#dataSetConfirm.data:#&quot;);&#xD;
if(cur) cur.cancel();&#xD;
self.get(&quot;parent&quot;).hide();</ClientEvent>
          <Property name="caption">取消</Property>
          <Property name="iconClass">fa fa-times-circle</Property>
          <Property name="exClassName">btn3</Property>
        </Button>
      </Buttons>
      <Children>
        <FieldSet layout="padding:15">
          <Property name="caption">封仓确认</Property>
          <Buttons/>
          <Children>
            <AutoForm>
              <Property name="dataSet">dataSetConfirm</Property>
              <Property name="readOnly">false</Property>
              <Property name="labelSeparator"> : </Property>
              <Property name="labelAlign">right</Property>
              <Property name="cols">*,*,*</Property>
              <Property name="labelWidth">100</Property>
              <AutoFormElement>
                <Property name="name">fcqrdh</Property>
                <Property name="property">fcqrdh</Property>
                <Editor>
                  <TextEditor>
                    <Property name="blankText">-- åŽå°è‡ªåŠ¨ç”Ÿæˆ --</Property>
                  </TextEditor>
                </Editor>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">deptId</Property>
                <Property name="property">deptId</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">depotId</Property>
                <Property name="property">depotId</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">fcrq</Property>
                <Property name="property">fcrq</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">foodVariety</Property>
                <Property name="property">foodVariety</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">foodType</Property>
                <Property name="property">foodType</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">foodLevel</Property>
                <Property name="property">foodLevel</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">foodLocation</Property>
                <Property name="property">foodLocation</Property>
                <Property name="trigger">ddFoodOrigin</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">foodYear</Property>
                <Property name="property">foodYear</Property>
                <Property name="trigger">yearDropDown1</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">country</Property>
                <Property name="property">country</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">storeKeeperName</Property>
                <Property name="property">storeKeeperName</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">fcsl</Property>
                <Property name="property">fcsl</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">applyUser</Property>
                <Property name="property">applyUser</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">deptAuditUser</Property>
                <Property name="property">deptAuditUser</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">leaderAuditUser</Property>
                <Property name="property">leaderAuditUser</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">updateTime</Property>
                <Property name="property">updateTime</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement layoutConstraint="colSpan:2">
                <Property name="name">remarks</Property>
                <Property name="property">remarks</Property>
                <Editor/>
              </AutoFormElement>
            </AutoForm>
          </Children>
        </FieldSet>
      </Children>
      <Tools/>
    </Dialog>
    <UpdateAction id="updateactionSave">
      <Property name="executingMessage">正在执行中..</Property>
      <Property name="dataResolver">depotPR#saveOrUpdate</Property>
      <UpdateItem>
        <Property name="dataSet">dataSetdepot</Property>
        <Property name="dataPath">[#current]</Property>
        <Property name="alias">data</Property>
      </UpdateItem>
    </UpdateAction>
    <UpdateAction id="statusConfirmSave">
      <Property name="executingMessage">正在执行中..</Property>
      <Property name="dataResolver">depotStatusConfirmPR#saveData</Property>
      <UpdateItem>
        <Property name="dataSet">dataSetConfirm</Property>
        <Property name="dataPath">[#current]</Property>
        <Property name="alias">data</Property>
      </UpdateItem>
    </UpdateAction>
    <AjaxAction id="deleteAjaxAction">
      <Property name="successMessage">删除成功</Property>
      <Property name="service">depotPR#deletedepot</Property>
      <Property name="executingMessage">正在删除</Property>
    </AjaxAction>
    <AjaxAction id="ajaxRefreshCache">
      <Property name="service">depotPR#flushCache</Property>
      <Property name="successMessage">刷新成功!</Property>
      <Property name="confirmMessage">确定要刷新缓存么?</Property>
    </AjaxAction>
    <AjaxAction id="ajaxExcel">
      <Property name="async">false</Property>
      <Property name="executingMessage">正在执行导出……</Property>
      <Property name="service">depotPR#excelDepot</Property>
      <Property name="confirmMessage">确定导出当前数据吗?</Property>
    </AjaxAction>
    <YearDropDown id="yearDropDown1"/>
    <DataSetDropDown id="triggerUserList">
      <Property name="dataSet">dataSetUser</Property>
      <Property name="property">userName</Property>
      <Property name="assignmentMap">storeKeeperName=userName,storeKeeper=loginName</Property>
    </DataSetDropDown>
    <CustomDropDown id="ddFoodOrigin">
      <Property name="minHeight">500</Property>
      <Property name="assignmentMap">foodLocation=name</Property>
      <Property name="minWidth">500</Property>
      <Container layout="regionPadding:5">
        <DataSet id="dsFoodOrigin">
          <Property name="dataProvider">dicAreaPR#pageList</Property>
          <Property name="parameter"></Property>
          <Property name="pageSize">30</Property>
          <Property name="dataType">[dtArea]</Property>
        </DataSet>
        <Container layout="hbox regionPadding:5">
          <TextEditor id="key2">
            <Property name="blankText"> -- åç§° --</Property>
            <Property name="width">200</Property>
          </TextEditor>
          <Button>
            <ClientEvent name="onClick">var key = view.get(&quot;#key2.value&quot;);&#xD;
                  view.get(&quot;#dsFoodOrigin&quot;).set(&quot;parameter&quot;,{key:key}).flushAsync();</ClientEvent>
            <Property name="caption">查询</Property>
            <Property name="iconClass">fa fa-search</Property>
          </Button>
          <Button>
            <ClientEvent name="onClick">var data = view.get(&quot;#dsFoodOrigin.data:#&quot;);&#xD;
                  if(data){&#xD;
                  view.get(&quot;#ddFoodOrigin&quot;).close(data.toJSON());&#xD;
                  }</ClientEvent>
            <Property name="iconClass">fa fa-check</Property>
            <Property name="caption">确定</Property>
          </Button>
        </Container>
        <DataGrid>
          <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsFoodOrigin.data:#&quot;);&#xD;
                if(data){&#xD;
                view.get(&quot;#ddFoodOrigin&quot;).close(data.toJSON());&#xD;
                }</ClientEvent>
          <Property name="dataSet">dsFoodOrigin</Property>
          <Property name="readOnly">true</Property>
          <DataColumn name="code">
            <Property name="property">code</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="name">
            <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = &quot;bold&quot;;&#xD;
arg.processDefault = true;</ClientEvent>
            <Property name="property">name</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="simple">
            <Property name="property">simple</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
        </DataGrid>
        <DataPilot layoutConstraint="bottom">
          <Property name="dataSet">dsFoodOrigin</Property>
        </DataPilot>
      </Container>
    </CustomDropDown>
    <ListDropDown id="listOri">
      <Property name="items">东,南,西,北,东北,东南,西南,西北</Property>
    </ListDropDown>
  </View>
</ViewConfig>
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/Dept.view.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,440 @@
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model>
    <DataType name="dtMain">
      <Property name="creationType">com.fzzy.igds.dzhwk.domain.Dept</Property>
      <PropertyDef name="id">
        <Property></Property>
        <Property name="label">ID</Property>
      </PropertyDef>
      <PropertyDef name="companyId">
        <Property></Property>
        <Property name="label">系统组织编码</Property>
      </PropertyDef>
      <PropertyDef name="kqdm">
        <Property></Property>
        <Property name="label">库区代码</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="tykqbm">
        <Property></Property>
        <Property name="label">统一库区编码</Property>
      </PropertyDef>
      <PropertyDef name="dwdm">
        <Property></Property>
        <Property name="label">单位代码</Property>
      </PropertyDef>
      <PropertyDef name="tydwbm">
        <Property></Property>
        <Property name="label">统一单位编码</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="kqmc">
        <Property></Property>
        <Property name="label">库区名称</Property>
      </PropertyDef>
      <PropertyDef name="kqdz">
        <Property></Property>
        <Property name="label">库区地址</Property>
      </PropertyDef>
      <PropertyDef name="xzqhdm">
        <Property></Property>
        <Property name="label">区划代码</Property>
      </PropertyDef>
      <PropertyDef name="xzqhmc">
        <Property></Property>
        <Property name="label">区划名称</Property>
      </PropertyDef>
      <PropertyDef name="kqcq">
        <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">9</Property>
                <Property name="value">9-其他</Property>
              </Entity>
            </Collection>
          </Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="yxcr">
        <Property name="dataType">Double</Property>
        <Property name="label">有效仓容</Property>
      </PropertyDef>
      <PropertyDef name="yxgr">
        <Property name="dataType">Double</Property>
        <Property name="label">有效罐容</Property>
      </PropertyDef>
      <PropertyDef name="zdmj">
        <Property name="dataType">Double</Property>
        <Property name="label">占地面积</Property>
      </PropertyDef>
      <PropertyDef name="cfs">
        <Property name="dataType">Integer</Property>
        <Property name="label">仓房数</Property>
        <Property name="displayFormat">#0 æ ‹</Property>
      </PropertyDef>
      <PropertyDef name="ygs">
        <Property name="dataType">Integer</Property>
        <Property name="label">油罐数</Property>
        <Property name="displayFormat">#0 ä¸ª</Property>
      </PropertyDef>
      <PropertyDef name="jd">
        <Property name="dataType">Double</Property>
        <Property name="label">经度</Property>
      </PropertyDef>
      <PropertyDef name="wd">
        <Property name="dataType">Double</Property>
        <Property name="label">纬度</Property>
      </PropertyDef>
      <PropertyDef name="kqzt">
        <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>
            </Collection>
          </Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="zhgxsj">
        <Property name="dataType">DateTime</Property>
        <Property name="label">更新时间</Property>
      </PropertyDef>
    </DataType>
  </Model>
  <View layout="regionPadding:10">
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="dataProvider">deptPR#getData</Property>
      <Property name="dataType">[dtMain]</Property>
    </DataSet>
    <Container layout="regionPadding:10" layoutConstraint="top">
      <Property name="exClassName">bg-color</Property>
      <Property name="height">55</Property>
      <Property name="contentOverflow">hidden</Property>
      <Label layoutConstraint="left">
        <Property name="text">菜单栏:</Property>
      </Label>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">&#xD;
var select = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;);&#xD;
if(select){&#xD;
    view.get(&quot;#dialogMain&quot;).show();;&#xD;
}else{&#xD;
    $notify(&quot;请选择需要修改的数据……&quot;);&#xD;
}          </ClientEvent>
        <Property name="caption">详情编辑</Property>
        <Property name="exClassName">btn2</Property>
        <Property name="iconClass">fa fa-pencil</Property>
      </Button>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">  &#xD;
var select = view.get(&quot;#dgMain&quot;).get(&quot;selection&quot;);&#xD;
if(select){&#xD;
    view.get(&quot;#ajaxDel&quot;).set(&quot;parameter&quot;,select).execute(function(){&#xD;
        select.remove();&#xD;
    });&#xD;
}else{&#xD;
    $notify(&quot;请选择需要删除的数据……&quot;);&#xD;
}</ClientEvent>
        <Property name="caption">删除</Property>
        <Property name="exClassName">btn3</Property>
        <Property name="iconClass">fa fa-trash-o</Property>
      </Button>
    </Container>
    <Container layout="regionPadding:10" layoutConstraint="center">
      <Property name="exClassName">bg-color</Property>
      <DataGrid id="dgMain">
        <ClientEvent name="onDataRowDoubleClick">var dialog= view.get(&quot;#dialogMain&quot;);&#xD;
          dialog.show();</ClientEvent>
        <Property name="dataSet">dsMain</Property>
        <Property name="readOnly">true</Property>
        <Property name="selectionMode">singleRow</Property>
        <RowSelectorColumn/>
        <RowNumColumn/>
        <DataColumn name="kqmc">
          <Property name="property">kqmc</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="kqdm">
          <Property name="property">kqdm</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="kqcq">
          <Property name="property">kqcq</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="yxcr">
          <Property name="property">yxcr</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="yxgr">
          <Property name="property">yxgr</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="cfs">
          <Property name="property">cfs</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="ygs">
          <Property name="property">ygs</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="kqzt">
          <Property name="property">kqzt</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="zhgxsj">
          <Property name="property">zhgxsj</Property>
          <Property name="align">center</Property>
        </DataColumn>
      </DataGrid>
    </Container>
    <Dialog id="dialogMain">
      <Property name="caption">库区信息</Property>
      <Property name="width">1200</Property>
      <Property name="closeable">false</Property>
      <Buttons>
        <Button id="btnOk">
          <ClientEvent name="onClick">view.get(&quot;#uaSave&quot;).execute(function(result){&#xD;
            if(result){&#xD;
            $alert(result);&#xD;
            }else{&#xD;
            $notify(&quot;保存成功!!&quot;);&#xD;
            view.get(&quot;#dialogMain&quot;).hide();&#xD;
            }&#xD;
            });</ClientEvent>
          <Property name="caption">确定</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="iconClass">fa fa-check</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">view.get(&quot;#dsMain.data:#&quot;).cancel();&#xD;
            self.get(&quot;parent&quot;).hide();</ClientEvent>
          <Property name="caption">取消</Property>
          <Property name="exClassName">btn3</Property>
          <Property name="iconClass">fa fa-times</Property>
        </Button>
      </Buttons>
      <Children>
        <FieldSet layout="padding:15">
          <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">120</Property>
              <AutoFormElement>
                <Property name="name">kqmc</Property>
                <Property name="property">kqmc</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">kqdm</Property>
                <Property name="property">kqdm</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">tykqbm</Property>
                <Property name="property">tykqbm</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">dwdm</Property>
                <Property name="property">dwdm</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">tydwbm</Property>
                <Property name="property">tydwbm</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">kqdz</Property>
                <Property name="property">kqdz</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">xzqhmc</Property>
                <Property name="property">xzqhmc</Property>
                <Property name="trigger">ddFoodOrigin</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">xzqhdm</Property>
                <Property name="property">xzqhdm</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">kqcq</Property>
                <Property name="property">kqcq</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">yxcr</Property>
                <Property name="property">yxcr</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">yxgr</Property>
                <Property name="property">yxgr</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">zdmj</Property>
                <Property name="property">zdmj</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">cfs</Property>
                <Property name="property">cfs</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">ygs</Property>
                <Property name="property">ygs</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">kqzt</Property>
                <Property name="property">kqzt</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">jd</Property>
                <Property name="property">jd</Property>
                <Editor/>
              </AutoFormElement>
              <AutoFormElement>
                <Property name="name">wd</Property>
                <Property name="property">wd</Property>
                <Editor/>
              </AutoFormElement>
              <Link>
                <Property name="href">http://api.map.baidu.com/lbsapi/getpoint/</Property>
                <Property name="target">_blank</Property>
                <Property name="style">
                  <Property name="padding-left">150px</Property>
                </Property>
                <Property name="text">帮助:点击坐标位置拾取</Property>
              </Link>
            </AutoForm>
          </Children>
        </FieldSet>
      </Children>
      <Tools/>
    </Dialog>
    <UpdateAction id="uaSave">
      <Property name="dataResolver">deptPR#saveData</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="ajaxDel">
      <Property name="service">deptPR#delData</Property>
      <Property name="confirmMessage">确定要执行删除么?</Property>
    </AjaxAction>
    <CustomDropDown id="ddFoodOrigin">
      <Property name="minHeight">500</Property>
      <Property name="assignmentMap">xzqhmc=name,xzqhdm=code</Property>
      <Property name="minWidth">500</Property>
      <Container layout="regionPadding:5">
        <DataSet id="dsFoodOrigin">
          <Property name="dataProvider">dicAreaPR#pageList</Property>
          <Property name="dataType">[dtArea]</Property>
          <Property name="parameter"></Property>
          <Property name="pageSize">10</Property>
        </DataSet>
        <Container layout="hbox regionPadding:5">
          <TextEditor id="key2">
            <Property name="blankText"> -- åç§° --</Property>
            <Property name="width">200</Property>
          </TextEditor>
          <Button>
            <ClientEvent name="onClick">var key = view.get(&quot;#key2.value&quot;);&#xD;
              view.get(&quot;#dsFoodOrigin&quot;).set(&quot;parameter&quot;,{key:key}).flushAsync();</ClientEvent>
            <Property name="caption">查询</Property>
            <Property name="exClassName">btn4</Property>
            <Property name="iconClass">fa fa-search</Property>
          </Button>
          <Button>
            <ClientEvent name="onClick">var data = view.get(&quot;#dsFoodOrigin.data:#&quot;);&#xD;
              if(data){&#xD;
              view.get(&quot;#ddFoodOrigin&quot;).close(data.toJSON());&#xD;
              }</ClientEvent>
            <Property name="iconClass">fa fa-check</Property>
            <Property name="exClassName">btn1</Property>
            <Property name="caption">确定</Property>
          </Button>
        </Container>
        <DataGrid>
          <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsFoodOrigin.data:#&quot;);&#xD;
            if(data){&#xD;
            view.get(&quot;#ddFoodOrigin&quot;).close(data.toJSON());&#xD;
            }</ClientEvent>
          <Property name="dataSet">dsFoodOrigin</Property>
          <Property name="readOnly">true</Property>
          <DataColumn name="code">
            <Property name="property">code</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="name">
            <ClientEvent name="onRenderCell">arg.dom.style.fontWeight = &quot;bold&quot;;&#xD;
              arg.processDefault = true;</ClientEvent>
            <Property name="property">name</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
          <DataColumn name="simple">
            <Property name="property">simple</Property>
            <Property name="readOnly">true</Property>
            <Property name="align">center</Property>
          </DataColumn>
        </DataGrid>
        <DataPilot layoutConstraint="bottom">
          <Property name="dataSet">dsFoodOrigin</Property>
        </DataPilot>
      </Container>
    </CustomDropDown>
  </View>
</ViewConfig>
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/DicArea.view.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,285 @@
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model>
    <DataType name="dtMain">
      <Property name="creationType">com.fzzy.igds.dzhwk.domain.DicArea</Property>
      <PropertyDef name="code">
        <Property></Property>
        <Property name="label">区域编码</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="name">
        <Property></Property>
        <Property name="label">名称</Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="parentCode">
        <Property></Property>
        <Property name="label">所属区域</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;dicAreaPR#getDicAreaByParentCode&quot;).getResult()}</Property>
          <Property name="keyProperty">code</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="parentName">
        <Property></Property>
        <Property name="label">上级区域</Property>
        <Property name="required">false</Property>
      </PropertyDef>
      <PropertyDef name="type">
        <Property></Property>
        <Property name="label">类型</Property>
        <Property name="required">true</Property>
        <Property name="mapping">
          <Property name="keyProperty">value</Property>
          <Property name="valueProperty">name</Property>
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="name">省</Property>
                <Property name="value">1</Property>
              </Entity>
              <Entity>
                <Property name="name">市</Property>
                <Property name="value">2</Property>
              </Entity>
              <Entity>
                <Property name="name">区县</Property>
                <Property name="value">3</Property>
              </Entity>
            </Collection>
          </Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="simple">
        <Property></Property>
        <Property name="label">简拼</Property>
        <Property name="required">false</Property>
      </PropertyDef>
      <PropertyDef name="disabledTag">
        <Property></Property>
        <Property name="label">是否禁用</Property>
        <Property name="required">false</Property>
        <Property name="mapping">
          <Property name="mapValues">
            <Collection>
              <Entity>
                <Property name="name">禁用</Property>
                <Property name="value">Y</Property>
              </Entity>
              <Entity>
                <Property name="name">启用</Property>
                <Property name="value">N</Property>
              </Entity>
            </Collection>
          </Property>
          <Property name="keyProperty">value</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="remark">
        <Property></Property>
        <Property name="label">备注</Property>
        <Property name="required">false</Property>
      </PropertyDef>
    </DataType>
  </Model>
  <View layout="padding:5;regionPadding:5">
    <ClientEvent name="onReady">//查询&#xD;
query = function(){&#xD;
    view.get(&quot;#dsMain&quot;).flushAsync();&#xD;
};&#xD;
      &#xD;
query();</ClientEvent>
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="dataType">[dtMain]</Property>
      <Property name="dataProvider">dicAreaPR#pageList</Property>
      <Property name="loadMode">manual</Property>
      <Property name="pageSize">20</Property>
    </DataSet>
    <Container layout="regionPadding:10" layoutConstraint="top">
      <Property name="exClassName">bg-color</Property>
      <Property name="contentOverflow">hidden</Property>
      <Property name="height">55</Property>
      <Label layoutConstraint="left">
        <Property name="text">菜单栏:</Property>
      </Label>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">view.get(&quot;#dsMain&quot;).insert();&#xD;
          view.get(&quot;#dialogMain&quot;).show();&#xD;
        </ClientEvent>
        <Property name="caption">新增</Property>
        <Property name="exClassName">btn1</Property>
        <Property name="iconClass">fa fa-plus</Property>
      </Button>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">&#xD;
          &#xD;
var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
if(select){&#xD;
    view.get(&quot;#dialogMain&quot;).show();;&#xD;
}else{&#xD;
    $notify(&quot;请选择需要修改的数据……&quot;);&#xD;
}    </ClientEvent>
        <Property name="caption">编辑</Property>
        <Property name="exClassName">btn2</Property>
        <Property name="iconClass">fa fa-pencil</Property>
      </Button>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">   &#xD;
var select = view.get(&quot;#dataGridMain&quot;).get(&quot;selection&quot;);&#xD;
if(select){&#xD;
    view.get(&quot;#ajaxDel&quot;).set(&quot;parameter&quot;,select).execute(function(){&#xD;
        select.remove();&#xD;
    });&#xD;
}else{&#xD;
    $notify(&quot;请选择需要删除的数据……&quot;);&#xD;
}</ClientEvent>
        <Property name="caption">删除</Property>
        <Property name="exClassName">btn3</Property>
        <Property name="iconClass">fa fa-minus</Property>
      </Button>
    </Container>
    <Container layoutConstraint="center">
      <Property name="exClassName">bg-color</Property>
      <DataGrid id="dataGridMain" layoutConstraint="center">
        <ClientEvent name="onDataRowDoubleClick">var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
          if(data){&#xD;
          view.get(&quot;#dialogMain&quot;).show();&#xD;
          }</ClientEvent>
        <Property name="dataSet">dsMain</Property>
        <Property name="readOnly">true</Property>
        <Property name="selectionMode">singleRow</Property>
        <RowSelectorColumn/>
        <RowNumColumn/>
        <DataColumn>
          <Property name="property">code</Property>
          <Property name="align">center</Property>
          <Property name="name">code</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">name</Property>
          <Property name="align">center</Property>
          <Property name="name">name</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">simple</Property>
          <Property name="align">center</Property>
          <Property name="name">simple</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">parentCode</Property>
          <Property name="align">center</Property>
          <Property name="name">parentCode</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">type</Property>
          <Property name="align">center</Property>
          <Property name="name">type</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">disabledTag</Property>
          <Property name="align">center</Property>
          <Property name="name">disabledTag</Property>
        </DataColumn>
        <DataColumn>
          <Property name="property">remark</Property>
          <Property name="align">center</Property>
          <Property name="name">remark</Property>
        </DataColumn>
      </DataGrid>
    </Container>
    <Container layoutConstraint="bottom">
      <Property name="exClassName">bg-color</Property>
      <DataPilot layoutConstraint="right">
        <Property name="dataSet">dsMain</Property>
        <Property name="itemCodes">pageSize,pages</Property>
      </DataPilot>
    </Container>
    <Dialog id="dialogMain">
      <Property name="closeable">false</Property>
      <Property name="caption">配置信息</Property>
      <Property name="width">60%</Property>
      <Property name="iconClass">fa fa-tasks</Property>
      <Buttons>
        <Button id="btnOk">
          <ClientEvent name="onClick">var data = view.get(&quot;#dsMain.data:#&quot;);&#xD;
            &#xD;
            if(data.validate() != 'ok'){&#xD;
            $notify(&quot;数据校验失败!!&quot;);&#xD;
            return;&#xD;
            }&#xD;
            &#xD;
            view.get(&quot;#uaAction&quot;).set(&quot;parameter&quot;,data).execute(function(){&#xD;
            &#xD;
            $notify(&quot;数据执行完成!!&quot;);&#xD;
            self.get(&quot;parent&quot;).hide();&#xD;
            });</ClientEvent>
          <Property name="caption">确定</Property>
          <Property name="iconClass">fa fa-check</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">view.get(&quot;#dsMain.data:#&quot;).cancel();&#xD;
            self.get(&quot;parent&quot;).hide();</ClientEvent>
          <Property name="caption">取消</Property>
          <Property name="iconClass">fa fa-times</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>
            <Property name="name">code</Property>
            <Property name="property">code</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">name</Property>
            <Property name="property">name</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">simple</Property>
            <Property name="property">simple</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">type</Property>
            <Property name="property">type</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">disabledTag</Property>
            <Property name="property">disabledTag</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement layoutConstraint="colSpan:2">
            <Property name="name">remark</Property>
            <Property name="property">remark</Property>
            <Editor/>
          </AutoFormElement>
        </AutoForm>
      </Children>
      <Tools/>
    </Dialog>
    <UpdateAction id="uaAction">
      <Property name="dataResolver">dicAreaPR#saveDicArea</Property>
      <UpdateItem>
        <Property name="dataSet">dsMain</Property>
        <Property name="dataPath">[#current]</Property>
      </UpdateItem>
    </UpdateAction>
    <AjaxAction id="ajaxDel">
      <Property name="service">dicAreaPR#delDicArea</Property>
      <Property name="confirmMessage">确定要执行删除么?</Property>
    </AjaxAction>
  </View>
</ViewConfig>
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/Granary.view.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,318 @@
<?xml version="1.0" encoding="UTF-8"?>
<ViewConfig>
  <Arguments/>
  <Context/>
  <Model>
    <DataType name="dtMain">
      <Property name="creationType">com.fzzy.igds.dzhwk.domain.Granary</Property>
      <PropertyDef name="ajdh">
        <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(&quot;deptPR#loadParents&quot;).getResult()}</Property>
          <Property name="keyProperty">deptId</Property>
          <Property name="valueProperty">deptName</Property>
        </Property>
        <Property name="required">true</Property>
      </PropertyDef>
      <PropertyDef name="ajmc">
        <Property></Property>
        <Property name="label">廒间名称</Property>
      </PropertyDef>
      <PropertyDef name="cfbh">
        <Property></Property>
        <Property name="label">仓房(或油罐)编码</Property>
        <Property name="mapping">
          <Property name="mapValues">${dorado.getDataProvider(&quot;buildingPR#getCacheBuilding&quot;).getResult()}</Property>
          <Property name="keyProperty">id</Property>
          <Property name="valueProperty">name</Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="ajcd">
        <Property name="dataType">double</Property>
        <Property name="label">廒间长度</Property>
        <Property name="displayFormat">#0.00ç±³</Property>
      </PropertyDef>
      <PropertyDef name="ajkd">
        <Property name="dataType">double</Property>
        <Property name="label">廒间宽度</Property>
        <Property name="displayFormat">#0.00ç±³</Property>
      </PropertyDef>
      <PropertyDef name="ajgd">
        <Property name="dataType">double</Property>
        <Property name="label">廒间高度</Property>
        <Property name="displayFormat">#0.00ç±³</Property>
      </PropertyDef>
      <PropertyDef name="ajsjcr">
        <Property name="dataType">double</Property>
        <Property name="label">廒间设计仓容</Property>
        <Property name="displayFormat">#0.000吨</Property>
      </PropertyDef>
      <PropertyDef name="ajlxdh">
        <Property></Property>
        <Property name="label">廒间联系电话</Property>
      </PropertyDef>
      <PropertyDef name="ajqyrq">
        <Property name="dataType">Date</Property>
        <Property name="label">廒间启用日期</Property>
      </PropertyDef>
      <PropertyDef name="ajzt">
        <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">9</Property>
                <Property name="value">9-其他</Property>
              </Entity>
            </Collection>
          </Property>
        </Property>
      </PropertyDef>
      <PropertyDef name="updateTime">
        <Property name="dataType">Date</Property>
        <Property name="label">更新时间</Property>
      </PropertyDef>
    </DataType>
  </Model>
  <View layout="regionPadding:10">
    <Property name="packages">font-awesome,css-common</Property>
    <DataSet id="dsMain">
      <Property name="dataProvider">granaryPR#getGranary</Property>
      <Property name="dataType">[dtMain]</Property>
    </DataSet>
    <Container layout="regionPadding:10" layoutConstraint="top">
      <Property name="exClassName">bg-color</Property>
      <Property name="height">55</Property>
      <Property name="contentOverflow">hidden</Property>
      <Label layoutConstraint="left">
        <Property name="text">菜单栏:</Property>
      </Label>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">view.get(&quot;#dsMain&quot;).insert();&#xD;
view.get(&quot;#dialogMain&quot;).show();</ClientEvent>
        <Property name="caption">新增</Property>
        <Property name="exClassName">btn1</Property>
        <Property name="iconClass">fa fa-plus</Property>
      </Button>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">var dialog= view.get(&quot;#dialogMain&quot;);&#xD;
dialog.show();</ClientEvent>
        <Property name="caption">编辑</Property>
        <Property name="exClassName">btn2</Property>
        <Property name="iconClass">fa fa-pencil</Property>
      </Button>
      <Button layoutConstraint="left">
        <ClientEvent name="onClick">var cur = view.get(&quot;#dsMain.data:#&quot;);&#xD;
if(!cur) return;&#xD;
view.get(&quot;#ajaxDel&quot;).set(&quot;parameter&quot;,cur).execute(function(result){&#xD;
    if(result){&#xD;
        $alert(result);&#xD;
        return;&#xD;
    }else{&#xD;
        cur.remove();&#xD;
    }&#xD;
});</ClientEvent>
        <Property name="caption">删除</Property>
        <Property name="exClassName">btn3</Property>
        <Property name="iconClass">fa fa-trash-o</Property>
      </Button>
    </Container>
    <Container layout="regionPadding:10" layoutConstraint="center">
      <Property name="exClassName">bg-color</Property>
      <DataGrid id="dgMain">
        <ClientEvent name="onDataRowDoubleClick">var dialog= view.get(&quot;#dialogMain&quot;);&#xD;
dialog.show();</ClientEvent>
        <Property name="dataSet">dsMain</Property>
        <Property name="readOnly">true</Property>
        <RowNumColumn/>
        <DataColumn name="ajdh">
          <Property name="property">ajdh</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="ajmc">
          <Property name="property">ajmc</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="cfbh">
          <Property name="property">cfbh</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="ajcd">
          <Property name="property">ajcd</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="ajkd">
          <Property name="property">ajkd</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="ajgd">
          <Property name="property">ajgd</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="ajsjcr">
          <Property name="property">ajsjcr</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="ajqyrq">
          <Property name="property">ajqyrq</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="ajzt">
          <Property name="property">ajzt</Property>
          <Property name="align">center</Property>
        </DataColumn>
        <DataColumn name="updateTime">
          <Property name="property">updateTime</Property>
          <Property name="align">center</Property>
        </DataColumn>
      </DataGrid>
    </Container>
    <Dialog id="dialogMain">
      <Property name="closeable">false</Property>
      <Property name="caption">廒间信息</Property>
      <Property name="width">60%</Property>
      <Property name="iconClass">fa fa-tasks</Property>
      <Buttons>
        <Button id="btnOk">
          <ClientEvent name="onClick">view.get(&quot;#uaSave&quot;).execute(function(result){&#xD;
    if(result){&#xD;
        $alert(result);&#xD;
    }else{&#xD;
        $notify(&quot;保存成功!!&quot;);&#xD;
        view.get(&quot;#dialogMain&quot;).hide();&#xD;
    }&#xD;
});</ClientEvent>
          <Property name="caption">确定</Property>
          <Property name="exClassName">btn1</Property>
          <Property name="iconClass">fa fa-check</Property>
        </Button>
        <Button>
          <ClientEvent name="onClick">view.get(&quot;#dsMain.data:#&quot;).cancel();&#xD;
self.get(&quot;parent&quot;).hide();</ClientEvent>
          <Property name="caption">取消</Property>
          <Property name="exClassName">btn3</Property>
          <Property name="iconClass">fa fa-times</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">150</Property>
          <AutoFormElement>
            <Property name="name">ajdh</Property>
            <Property name="property">ajdh</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">deptId</Property>
            <Property name="property">deptId</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">ajmc</Property>
            <Property name="property">ajmc</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">cfbh</Property>
            <Property name="property">cfbh</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">ajcd</Property>
            <Property name="property">ajcd</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">ajkd</Property>
            <Property name="property">ajkd</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">ajgd</Property>
            <Property name="property">ajgd</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">ajsjcr</Property>
            <Property name="property">ajsjcr</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">ajlxdh</Property>
            <Property name="property">ajlxdh</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">ajqyrq</Property>
            <Property name="property">ajqyrq</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">ajzt</Property>
            <Property name="property">ajzt</Property>
            <Editor/>
          </AutoFormElement>
          <AutoFormElement>
            <Property name="name">updateTime</Property>
            <Property name="property">updateTime</Property>
            <Editor/>
          </AutoFormElement>
        </AutoForm>
      </Children>
      <Tools/>
    </Dialog>
    <UpdateAction id="uaSave">
      <Property name="dataResolver">granaryPR#saveGranary</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="ajaxDel">
      <Property name="service">granaryPR#delGranary</Property>
      <Property name="confirmMessage">确定要执行删除么?</Property>
    </AjaxAction>
  </View>
</ViewConfig>
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/BuildingPR.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,76 @@
package com.fzzy.igds.sys.pr;
import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.annotation.DataResolver;
import com.bstek.dorado.annotation.Expose;
import com.fzzy.igds.dzhwk.domain.Building;
import com.fzzy.igds.sys.BuildingService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;
/**
 * @Description ä»“房PR层
 * @Author CZT
 * @Date 2024/11/20 19:01
 */
@Component
public class BuildingPR {
    @Resource
    private BuildingService buildingService;
    /**
     * æŸ¥è¯¢è®¾å¤‡,将操作信息调整为空,默认包括分库参数
     *
     * buildingPR#loadData
     *
     * @return
     */
    @DataProvider
    public List<Building> loadData() {
        return buildingService.getBuilding(null, null);
    }
    /**
     * ä¸‹æ‹‰æ¡†ä½¿ç”¨
     * ${dorado.getDataProvider("buildingPR#getCacheBuilding").getResult()}
     * @return
     */
    @DataProvider
    public List<Building> getCacheBuilding(){
        return buildingService.getCacheBuilding(null,null);
    }
    /**
     * buildingPR#saveData
     */
    @DataResolver
    public void saveData(Building data) {
        Building building = new Building();
        BeanUtils.copyProperties(data, building);
        buildingService.saveOrUpdate(building);
    }
    /**
     * buildingPR#delData
     */
    @Expose
    public String delData(Building data) {
        Building building = new Building();
        BeanUtils.copyProperties(data, building);
        return buildingService.delData(building);
    }
    /**
     * buildingPR#refreshCache
     * åˆ·æ–°ç¼“å­˜
     */
    @Expose
    public void refreshCache(){
        buildingService.refreshCacheBuilding(null);
    }
}
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/CompanyPR.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,82 @@
package com.fzzy.igds.sys.pr;
import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.annotation.DataResolver;
import com.bstek.dorado.annotation.Expose;
import com.fzzy.igds.dzhwk.constant.Constant;
import com.fzzy.igds.dzhwk.domain.Company;
import com.fzzy.igds.sys.CoreCompanyService;
import com.fzzy.igds.sys.SysDeptService;
import com.ruoyi.common.core.domain.entity.SysDept;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;
/**
 * @Description ä»“储公司PR层
 * @Author CZT
 * @Date 2024/11/28 15:01
 */
@Component
public class CompanyPR {
    @Resource
    private CoreCompanyService coreCompanyService;
    @Resource
    private SysDeptService sysDeptService;
    /**
     * æŸ¥è¯¢è®¾å¤‡,将操作信息调整为空,默认包括分库参数
     *
     * companyPR#getData
     *
     * @return
     */
    @DataProvider
    public List<Company> getData() {
        List<Company> companyList = coreCompanyService.getAllData(null);
        if(null == companyList){
            List<SysDept> list = sysDeptService.getDeptByType(Constant.DEPT_TYPE_10);
            if(null == list){
                return null;
            }
            Company company;
            for (SysDept sysDept : list) {
                company = coreCompanyService.getDataById(sysDept.getDeptId() +"");
                if(null == company){
                    company = coreCompanyService.initCompanyData(sysDept);
                }
                companyList.add(company);
            }
        }
        return companyList;
    }
    /**
     * companyPR#saveData
     */
    @DataResolver
    public void saveData(Company data) {
        Company company = new Company();
        BeanUtils.copyProperties(data, company);
        coreCompanyService.saveOrUpdate(company);
    }
    /**
     * companyPR#delData
     */
    @Expose
    public String delData(Company data) {
        Company company = new Company();
        BeanUtils.copyProperties(data, company);
        coreCompanyService.delData(company);
        return null;
    }
}
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/DepotPR.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,115 @@
package com.fzzy.igds.sys.pr;
import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.annotation.DataResolver;
import com.bstek.dorado.annotation.Expose;
import com.fzzy.igds.dzhwk.domain.Depot;
import com.fzzy.igds.sys.DepotService;
import com.fzzy.igds.util.ContextUtil;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
 * @author jiazx
 */
@Slf4j
@Component
public class DepotPR {
    @Resource
    private DepotService depotService;
    /**
     * depotPR#getData
     * @return
     */
    @DataProvider
    public List<Depot> getData(){
        return depotService.getData(null, null);
    }
    /**
     * depotPR#saveOrUpdate
     * @param data
     * @return
     */
    @DataResolver
    @Transactional
    public String saveOrUpdate(Depot data) {
        Depot depot = new Depot();
        BeanUtils.copyProperties(data, depot);
        depotService.saveDepot(depot);
        depotService.flushCache(null);
        return null;
    }
    /**
     * depotPR#deleteDepot
     * @param data
     */
    @Expose
    @Transactional
    public void deleteDepot(Depot data)  {
        Depot depot = new Depot();
        BeanUtils.copyProperties(data, depot);
        depotService.deleteDepot(depot);
    }
    /**
     * depotPR#flushCache
     */
    @Expose
    public void flushCache() {
        depotService.flushCache(null);
    }
    /**
     * ${dorado.getDataProvider("depotPR#getAllCache").getResult()}
     * @return
     */
    @DataProvider
    public List<Depot> getAllCache() {
        return depotService.getCacheDepotList(null, ContextUtil.subDeptId(null));
    }
    /**
     * depotPR#ajaxGetAllCache
     * @return
     */
    @Expose
    public List<Depot> ajaxGetAllCache() {
        return depotService.getCacheDepotList(null, ContextUtil.subDeptId(null));
    }
    /**
     * depotPR#getDepot èŽ·å–ä»“åº“ä¿¡æ¯
     *
     * @param depotId
     * @return
     */
    @Expose
    public Depot getDepot(String depotId) {
        return depotService.getCacheDepot(null, depotId);
    }
    /**
     * depotPR#excelDepot
     */
    @Expose
    @Transactional
    public AjaxResult excelDepot(Map<String, Object> param)  {
        List<Depot> list = depotService.getData(null, null);
        ExcelUtil<Depot> util = new ExcelUtil<Depot>(Depot.class);
        return util.exportExcel(list, "货位数据", "储备中心库货位数据");
    }
}
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/DepotStatusConfirmPR.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,123 @@
package com.fzzy.igds.sys.pr;
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.dzhwk.domain.DepotStatusConfirm;
import com.fzzy.igds.sys.DepotStatusConfirmService;
import com.fzzy.igds.sys.DepotStoreService;
import com.fzzy.igds.util.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 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.*;
/**
 * å°ä»“确认单
 */
@Component
public class DepotStatusConfirmPR {
    @Resource
    private DepotStatusConfirmService statusConfirmService;
    @Resource
    private DepotStoreService depotStoreService;
    /**
     * depotStatusConfirmPR#pageDepotStatusConfirm
     *
     * @param page
     * @param param
     * @throws Exception
     */
    @DataProvider
    public void pageDepotStatusConfirm(Page<DepotStatusConfirm> 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, DepotStatusConfirm.SORT_PROP);
        Specification<DepotStatusConfirm> specification = new Specification<DepotStatusConfirm>() {
            private static final long serialVersionUID = 1L;
            public Predicate toPredicate(Root<DepotStatusConfirm> 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("depotId");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate3 = cb.equal(root.get("depotId"), key);
                    predicates.add(predicate3);
                }
                key = (String) finalParam.get("depotStatus");
                if (StringUtils.isNotEmpty(key)) {
                    Predicate predicate4 = cb.equal(root.get("depotStatus"), key);
                    predicates.add(predicate4);
                }
                Date start = (Date) finalParam.get("start");
                if (null != start) {
                    Predicate predicate5 = cb.greaterThan(root.get("updateDate"), start);
                    predicates.add(predicate5);
                }
                Date end = (Date) finalParam.get("end");
                if (null != end) {
                    Predicate predicate6 = cb.lessThan(root.get("updateDate"), end);
                    predicates.add(predicate6);
                }
                return cb.and(predicates.toArray(new Predicate[0]));
            }
        };
        org.springframework.data.domain.Page<DepotStatusConfirm> japPage = statusConfirmService.findAll(specification, pageable);
        page.setEntityCount((int) japPage.getTotalElements());
        page.setEntities(japPage.getContent());
    }
    /**
     * depotStatusConfirmPR#saveData æ–°å¢žæˆ–者修改
     *
     * @param data
     */
    @DataResolver
    public void saveData(DepotStatusConfirm data) {
        DepotStatusConfirm depotStatusConfirm = new DepotStatusConfirm();
        BeanUtils.copyProperties(data, depotStatusConfirm);
        statusConfirmService.saveOrUpdate(depotStatusConfirm);
        //增加最新库存
        depotStoreService.depotStoreStatus(depotStatusConfirm);
    }
    /**
     * depotStatusConfirmPR#delData
     *
     * @param data
     * @return
     */
    @Expose
    public void delData(DepotStatusConfirm data) {
        DepotStatusConfirm depotStatusConfirm = new DepotStatusConfirm();
        BeanUtils.copyProperties(data, depotStatusConfirm);
        statusConfirmService.delData(depotStatusConfirm);
    }
}
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/DepotStorePR.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,163 @@
package com.fzzy.igds.sys.pr;
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.dzhwk.constant.DepotStatus;
import com.fzzy.igds.dzhwk.domain.DepotStore;
import com.fzzy.igds.sys.DepotService;
import com.fzzy.igds.sys.DepotStoreService;
import com.fzzy.igds.util.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 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.*;
/**
 * @Description
 * @Author CZT
 * @Date 2024/11/23 15:29
 */
@Component
public class DepotStorePR {
    @Resource
    private DepotStoreService depotStoreService;
    @Resource
    private DepotService depotService;
    /**
     * JPA分页查询数据
     * depotStorePR#pageList
     * @param page
     * @param param
     */
    @DataProvider
    public void pageList(Page<DepotStore> 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, DepotStore.SORT_PROP);
        Specification<DepotStore> specification = new Specification<DepotStore>() {
            private static final long serialVersionUID = 1L;
            public Predicate toPredicate(Root<DepotStore> 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 depotId = (String) finalParam.get("depotId");
                if (StringUtils.isNotEmpty(depotId)) {
                    Predicate predicate3 = cb.equal(root.get("depotId"), depotId);
                    predicates.add(predicate3);
                }
                Date start = (Date) finalParam.get("start");
                if (null != start) {
                    Predicate predicate4 = cb.greaterThan(root.get("fcrq"), start);
                    predicates.add(predicate4);
                }
                Date end = (Date) finalParam.get("end");
                if (null != end) {
                    Predicate predicate5 = cb.lessThan(root.get("fcrq"), end);
                    predicates.add(predicate5);
                }
                return cb.and(predicates.toArray(new Predicate[0]));
            }
        };
        org.springframework.data.domain.Page<DepotStore> japPage = depotStoreService.findAll(specification, pageable);
        page.setEntityCount((int) japPage.getTotalElements());
        page.setEntities(japPage.getContent());
    }
    /**
     * depotStorePR#saveDepotStore
     *
     * @param data
     */
    @DataResolver
    public String saveDepotStore(DepotStore data) throws Exception {
        //如果仓库状态=封仓/入库中/出库中
        if (DepotStatus.STATUS_2.getCode().equals(data.getDepotStatus()) ||
                DepotStatus.STATUS_3.getCode().equals(data.getDepotStatus()) ||
                DepotStatus.STATUS_4.getCode().equals(data.getDepotStatus()) ||
                DepotStatus.STATUS_31.getCode().equals(data.getDepotStatus()) ||
                DepotStatus.STATUS_32.getCode().equals(data.getDepotStatus()) ||
                DepotStatus.STATUS_33.getCode().equals(data.getDepotStatus()) ||
                DepotStatus.STATUS_34.getCode().equals(data.getDepotStatus())) {
            if (null == data.getFoodYear()) return "货位状态=封仓/入库中/出库中,收货年度不能为空";
            if (null == data.getCountry()) return "货位状态=封仓/入库中/出库中,国别不能为空";
            if (null == data.getFoodLocation()) return "货位状态=封仓/入库中/出库中,粮食产地不能为空";
            if (null == data.getFoodLocation()) return "货位状态=封仓/入库中/出库中,粮食产地不能为空";
            if (null == data.getStoreDate()) return "货位状态=封仓/入库中/出库中,入库时间不可为空";
        }
        //货位状态=封仓/出库中,必填
        if (DepotStatus.STATUS_3.getCode().equals(data.getDepotStatus()) ||
                DepotStatus.STATUS_4.getCode().equals(data.getDepotStatus()) ||
                DepotStatus.STATUS_31.getCode().equals(data.getDepotStatus()) ||
                DepotStatus.STATUS_32.getCode().equals(data.getDepotStatus()) ||
                DepotStatus.STATUS_33.getCode().equals(data.getDepotStatus()) ||
                DepotStatus.STATUS_34.getCode().equals(data.getDepotStatus())) {
            if (null == data.getFullDate()) {
                return "货位状态=封仓/出库中,封仓时间不可为空";
            }
        }
        //货位状态=空仓,必填。最后一车粮食出仓时间
        if (DepotStatus.STATUS_1.getCode().equals(data.getDepotStatus())) {
            if (null == data.getOutDate()) {
                return "货位状态=空仓,出仓完成时间不可为空";
            }
        }
        DepotStore depotStore = new DepotStore();
        BeanUtils.copyProperties(data, depotStore);
        depotStoreService.saveDepotStore(depotStore);
        //根据库存信息更新到仓库信息,仓库储粮信息以当前为准
        depotService.updateByStore(depotStore);
        //远程同步状态
        return null;
    }
    /**
     * depotStorePR#delDepotStore
     *
     * @param data
     * @return
     */
    @Expose
    public String delDepotStore(DepotStore data) {
        DepotStore depotStore = new DepotStore();
        BeanUtils.copyProperties(data, depotStore);
        return depotStoreService.delDepotStore(depotStore);
    }
}
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/DeptPR.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,89 @@
package com.fzzy.igds.sys.pr;
import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.annotation.DataResolver;
import com.bstek.dorado.annotation.Expose;
import com.fzzy.igds.dzhwk.constant.Constant;
import com.fzzy.igds.dzhwk.domain.Dept;
import com.fzzy.igds.sys.CoreDeptService;
import com.fzzy.igds.sys.SysDeptService;
import com.ruoyi.common.core.domain.entity.SysDept;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;
/**
 * @Description åº“区信息
 * @Author CZT
 * @Date 2024/11/21 18:01
 */
@Component("deptPR")
public class DeptPR {
    @Resource
    private CoreDeptService coreDeptService;
    @Resource
    private SysDeptService sysDeptService;
    /**
     * èŽ·å–ç»„ç»‡ä¸‹æ‰€æœ‰åº“åŒº
     * ${dorado.getDataProvider("deptPR#loadParents").getResult()}
     *
     * @return
     */
    @DataProvider
    public List<SysDept> loadParents() {
        return sysDeptService.getAllDeptByCompanyId(null);
    }
    /**
     * æŸ¥è¯¢è®¾å¤‡,将操作信息调整为空,默认包括分库参数
     *
     * deptPR#getData
     *
     * @return
     */
    @DataProvider
    public List<Dept> getData() {
        List<Dept> deptList = coreDeptService.getAllData(null);
        if(null == deptList){
            List<SysDept> list = sysDeptService.getDeptByType(Constant.DEPT_TYPE_20);
            if(null == list){
                return null;
            }
            Dept dept;
            for (SysDept sysDept : list) {
                dept = coreDeptService.getDataById(sysDept.getDeptId() +"");
                if(null == dept){
                    dept = coreDeptService.initDeptData(sysDept);
                }
                deptList.add(dept);
            }
        }
        return deptList;
    }
    /**
     * deptPR#saveData
     */
    @DataResolver
    public void saveData(Dept data) {
        Dept dept = new Dept();
        BeanUtils.copyProperties(data, dept);
        coreDeptService.saveOrUpdate(dept);
    }
    /**
     * deptPR#delData
     */
    @Expose
    public String delData(Dept data) {
        Dept dept = new Dept();
        BeanUtils.copyProperties(data, dept);
        coreDeptService.delData(dept);
        return null;
    }
}
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/DicAreaPR.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,106 @@
package com.fzzy.igds.sys.pr;
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.dzhwk.domain.DicArea;
import com.fzzy.igds.sys.DicAreaService;
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 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.List;
/**
 * @Description
 * @Author CZT
 * @Date 2024/11/23 09:36
 */
@Component
public class DicAreaPR {
    @Resource
    private DicAreaService dicAreaService;
    /**
     * dicAreaPR#pageList
     *
     * @param page
     */
    @DataProvider
    public void pageList(Page<DicArea> page, String key) {
        //多参数分页查询
        Pageable pageable = PageRequest.of(page.getPageNo() - 1, page.getPageSize(), Sort.Direction.ASC, DicArea.SORT_PROP);
        if (StringUtils.isEmpty(key)) {
            org.springframework.data.domain.Page<DicArea> japPage = dicAreaService.findAll(pageable);
            page.setEntityCount((int) japPage.getTotalElements());
            page.setEntities(japPage.getContent());
            return;
        }
        Specification<DicArea> specification = new Specification<DicArea>() {
            private static final long serialVersionUID = 1L;
            public Predicate toPredicate(Root<DicArea> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
                List<Predicate> predicates = new ArrayList<Predicate>(); //所有的断言
                Predicate predicate1 = cb.like(root.get("name"), "%" + key + "%");
                predicates.add(predicate1);
                return cb.and(predicates.toArray(new Predicate[0]));
            }
        };
        org.springframework.data.domain.Page<DicArea> japPage = dicAreaService.findAll(specification, pageable);
        page.setEntityCount((int) japPage.getTotalElements());
        page.setEntities(japPage.getContent());
    }
    /**
     * dicAreaPR#getDicAreaByParentCode
     */
    @DataProvider
    public List<DicArea> getDicAreaByParentCode(String parentCode) {
        return dicAreaService.getDicAreaByParentCode(parentCode);
    }
    /**
     * dicAreaPR#saveDicArea
     *
     * @param data
     * @return
     */
    @DataResolver
    public String saveDicArea(DicArea data) {
        DicArea dicArea = new DicArea();
        BeanUtils.copyProperties(data, dicArea);
        return dicAreaService.saveDicArea(dicArea);
    }
    /**
     * dicAreaPR#delDicArea
     *
     * @param data
     * @return
     */
    @Expose
    public String delDicArea(DicArea data) {
        DicArea dicArea = new DicArea();
        BeanUtils.copyProperties(data, dicArea);
        return dicAreaService.delDicArea(dicArea);
    }
}
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/DicPR.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,338 @@
package com.fzzy.igds.sys.pr;
import com.bstek.dorado.annotation.DataProvider;
import com.fzzy.igds.sys.DicService;
import com.ruoyi.common.core.domain.entity.SysDictData;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;
/**
 * @Description å­—典数据PR层
 * @Author CZT
 * @Date 2024/11/22 16:37
 */
@Component
public class DicPR {
    @Resource
    private DicService dicService;
    /**
     * ä¸‹æ‹‰æ¡†ä½¿ç”¨
     * ${dorado.getDataProvider("dicPR#sysDictData").getResult("CATEGORY_ARCHIVES")}
     *
     * @param dictType
     * @return
     */
    @DataProvider
    public List<SysDictData> sysDictData(String dictType) {
        return dicService.getDictDataByType(dictType, null);
    }
    /**
     * ä»“房类型-非国标定义
     * ${dorado.getDataProvider("dicPR#triggerDepotType").getResult()}
     *
     * @return
     */
    @DataProvider
    public List<SysDictData> triggerDepotType() {
        return dicService.triggerDepotType();
    }
    /**
     * ä»“房状态
     * ${dorado.getDataProvider("dicPR#triggerDepotStatus").getResult()}
     *
     * @return
     */
    @DataProvider
    public List<SysDictData> triggerDepotStatus() {
        return dicService.triggerDepotStatus();
    }
    /**
     * ç²®é£Ÿç­‰çº§
     * ${dorado.getDataProvider("dicPR#triggerFoodLevel").getResult()}
     *
     * @return
     */
    @DataProvider
    public List<SysDictData> triggerFoodLevel() {
        return dicService.triggerFoodLevel();
    }
    /**
     * å‚¨ç²®æ–¹å¼
     * ${dorado.getDataProvider("dicPR#triggerStoreType").getResult()}
     *
     * @return
     */
    @DataProvider
    public List<SysDictData> triggerStoreType() {
        return dicService.triggerStoreType();
    }
    /**
     * ç®¡ç†æ–¹å¼
     * ${dorado.getDataProvider("dicPR#triggerManagerType").getResult()}
     *
     * @return
     */
    @DataProvider
    public List<SysDictData> triggerManagerType() {
        return dicService.triggerManagerType();
    }
    /**
     * ç”µç¼†èµ·å§‹æ–¹ä½
     * ${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();
    }
    /**
     * ${dorado.getDataProvider("dicTriggerPR#triggerYN").getResult()}
     *
     * @return
     */
    @DataProvider
    public List<SysDictData> triggerYN() {
        return dicService.triggerYN();
    }
    /**
     * é€šè®¯çŠ¶æ€
     * ${dorado.getDataProvider("dicPR#conStatus").getResult()}
     *
     * @return
     * @throws Exception
     */
    @DataProvider
    public List<SysDictData> conStatus() {
        return dicService.conStatus();
    }
    /**
     * ${dorado.getDataProvider("dicPR#controlModel").getResult()}
     *
     * @return
     */
    @DataProvider
    public List<SysDictData> controlModel() {
        return dicService.controlModel();
    }
    /**
     * ${dorado.getDataProvider("dicPR#triggerBizType").getResult()}
     *
     * @return
     */
    @DataProvider
    public List<SysDictData> triggerBizType() {
        return dicService.triggerBizType();
    }
    /**
     * æ°”象来源
     * ${dorado.getDataProvider("dicPR#triggerSource").getResult()}
     *
     * @return
     */
    @DataProvider
    public List<SysDictData> triggerSource() {
        return dicService.triggerSource();
    }
    /**
     * æ£€éªŒç±»åˆ«
     * <p>
     * ${dorado.getDataProvider("dicPR#triggerType").getResult()}
     *
     * @return
     */
    @DataProvider
    public List<SysDictData> triggerType() {
        return dicService.triggerType();
    }
    /**
     * æŒ‡æ ‡ç±»åˆ«
     * <p>
     * ${dorado.getDataProvider("dicPR#triggerStandard").getResult()}
     *
     * @return
     */
    @DataProvider
    public List<SysDictData> triggerStandard() {
        return dicService.triggerStandard();
    }
    /**
     * æ£€éªŒä¾æ®
     * <p>
     * ${dorado.getDataProvider("dicPR#triggerMetrics").getResult()}
     *
     * @return
     */
    @DataProvider
    public List<SysDictData> triggerMetrics() {
        return dicService.triggerMetrics();
    }
    /**
     * å®¡æ ¸çŠ¶æ€
     * ${dorado.getDataProvider("dicPR#triggerStatusType").getResult()}
     *
     * @return
     */
    @DataProvider
    public List<SysDictData> triggerStatusType() {
        return dicService.triggerStatusType();
    }
    /**
     * è­¦å‘Šç±»åž‹
     * ${dorado.getDataProvider("dicPR#triggerWarnType").getResult()}
     *
     * @return
     */
    @DataProvider
    public List<SysDictData> triggerWarnType() {
        return dicService.triggerWarnType();
    }
    /**
     * è­¦å‘Šç­‰çº§
     * ${dorado.getDataProvider("dicPR#triggerWarnLevel").getResult()}
     *
     * @return
     */
    @DataProvider
    public List<SysDictData> triggerWarnLevel() {
        return dicService.triggerWarnLevel();
    }
    /**
     * è­¦å‘ŠçŠ¶æ€
     * ${dorado.getDataProvider("dicPR#triggerWarnStatus").getResult()}
     *
     * @return
     */
    @DataProvider
    public List<SysDictData> triggerWarnStatus() {
        return dicService.triggerWarnStatus();
    }
    /**
     * è­¦å‘Šé€šçŸ¥æ–¹å¼
     * ${dorado.getDataProvider("dicPR#triggerNoticeType").getResult()}
     *
     * @return
     */
    @DataProvider
    public List<SysDictData> triggerNoticeType() {
        return dicService.triggerNoticeType();
    }
    /**
     * AI设备类型
     *
     * ${dorado.getDataProvider("dicPR#triggerAiSerType").getResult()}
     *
     * @return
     */
    @DataProvider
    public List<SysDictData> triggerAiSerType() {
        return dicService.triggerAiSerType();
    }
    /**
     * é€šé£Žä»»åŠ¡çŠ¶æ€
     *
     * ${dorado.getDataProvider("dicPR#triggerVerbStatus").getResult()}
     *
     * @return
     */
    @DataProvider
    public List<SysDictData> triggerVerbStatus() {
        return dicService.triggerVerbStatus();
    }
    /**
     * é€šé£Žæ¨¡å¼
     *
     * ${dorado.getDataProvider("dicPR#triggerAreationModel").getResult()}
     *
     * @return
     */
    @DataProvider
    public List<SysDictData> triggerAreationModel() {
        return dicService.triggerAreationModel();
    }
    /**
     * æ°”调模式
     *
     * ${dorado.getDataProvider("dicPR#triggerN2ModelTag").getResult()}
     *
     * @return
     */
    @DataProvider
    public List<SysDictData> triggerN2ModelTag() {
        return dicService.triggerN2ModelTag();
    }
}
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/GranaryPR.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,59 @@
package com.fzzy.igds.sys.pr;
import com.bstek.dorado.annotation.DataProvider;
import com.bstek.dorado.annotation.DataResolver;
import com.bstek.dorado.annotation.Expose;
import com.fzzy.igds.dzhwk.domain.Granary;
import com.fzzy.igds.sys.GranaryService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;
/**
 * @Description
 * @Author CZT
 * @Date 2024/11/22 14:48
 */
@Component
public class GranaryPR {
    @Resource
    private GranaryService granaryService;
    /**
     * ${dorado.getDataProvider("granaryPR#getGranary").getResult()}
     * granaryPR#getGranary
     * @return
     */
    @DataProvider
    public List<Granary> getGranary() {
        return granaryService.getGranary(null, null);
    }
    /**
     * granaryPR#saveGranary æ–°å¢žæˆ–者修改
     *
     * @param data
     */
    @DataResolver
    public void saveGranary(Granary data) {
        Granary granary = new Granary();
        BeanUtils.copyProperties(data, granary);
        granaryService.saveOrUpdate(granary);
    }
    /**
     * granaryPR#delGranary
     *
     * @param data
     */
    @Expose
    public String delGranary(Granary data){
        Granary granary = new Granary();
        BeanUtils.copyProperties(data, granary);
        return granaryService.delData(granary);
    }
}
igds-dzhwk-view/src/main/java/com/fzzy/igds/sys/pr/SysUserPR.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,31 @@
package com.fzzy.igds.sys.pr;
import com.bstek.dorado.annotation.DataProvider;
import com.fzzy.igds.sys.SysUserService;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;
/**
 * @Description åº“区信息
 * @Author CZT
 * @Date 2024/11/21 18:01
 */
@Component
public class SysUserPR {
    @Resource
    private SysUserService sysUserService;
    /**
     * sysUserPR#loadUser
     * @return
     */
    @DataProvider
    public List<SysUser> loadUser() {
        return sysUserService.getUser(null);
    }
}
igds-dzhwk-view/src/main/java/models/igds.model.xml
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,416 @@
<?xml version="1.0" encoding="UTF-8"?>
<Model>
  <DataType name="dtDepot">
    <Property name="creationType">com.fzzy.igds.dzhwk.domain.Depot</Property>
    <PropertyDef name="id">
      <Property></Property>
      <Property name="label">仓库编号</Property>
      <Property name="required">false</Property>
      <Property name="readOnly">false</Property>
      <Validator name="validator1" type="regExp">
        <Property name="resultMessage">仓库编码格式有误</Property>
        <Property name="whiteRegExp">^[0-9A-Za-z]*[1-9A-Za-z_-][0-9A-Za-z_-]*$</Property>
      </Validator>
    </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(&quot;deptPR#loadParents&quot;).getResult()}</Property>
        <Property name="keyProperty">deptId</Property>
        <Property name="valueProperty">deptName</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="buildingId">
      <Property></Property>
      <Property name="label">所属仓房</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;buildingPR#getCacheBuilding&quot;).getResult()}</Property>
        <Property name="keyProperty">id</Property>
        <Property name="valueProperty">name</Property>
      </Property>
      <Property name="required">false</Property>
    </PropertyDef>
    <PropertyDef name="granaryId">
      <Property></Property>
      <Property name="label">所属廒间</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;granaryPR#getGranary&quot;).getResult()}</Property>
        <Property name="keyProperty">ajdh</Property>
        <Property name="valueProperty">ajmc</Property>
      </Property>
      <Property name="required">false</Property>
    </PropertyDef>
    <PropertyDef name="depotType">
      <Property></Property>
      <Property name="label">仓房类型</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerDepotType&quot;).getResult()}</Property>
        <Property name="keyProperty">dictValue</Property>
        <Property name="valueProperty">dictLabel</Property>
      </Property>
      <Property name="required">true</Property>
    </PropertyDef>
    <PropertyDef name="depotStatus">
      <Property></Property>
      <Property name="label">仓库状态</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerDepotStatus&quot;).getResult()}</Property>
        <Property name="keyProperty">dictValue</Property>
        <Property name="valueProperty">dictLabel</Property>
      </Property>
      <Property name="required">true</Property>
    </PropertyDef>
    <PropertyDef name="storageMax">
      <Property name="dataType">Double</Property>
      <Property name="label">设计储量</Property>
      <Property name="displayFormat">#,##0 KG</Property>
      <Property name="required">true</Property>
    </PropertyDef>
    <PropertyDef name="storageReal">
      <Property name="dataType">Double</Property>
      <Property name="label">实际储量</Property>
      <Property name="displayFormat">#,##0 KG</Property>
      <Property name="required">false</Property>
    </PropertyDef>
    <PropertyDef name="storeType">
      <Property></Property>
      <Property name="label">储粮方式</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerStoreType&quot;).getResult()}</Property>
        <Property name="keyProperty">dictValue</Property>
        <Property name="valueProperty">dictLabel</Property>
      </Property>
      <Property name="required">true</Property>
    </PropertyDef>
    <PropertyDef name="foodType">
      <Property></Property>
      <Property name="label">粮食性质</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;FOOD_TYPE_&quot;)}</Property>
        <Property name="keyProperty">dictValue</Property>
        <Property name="valueProperty">dictLabel</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="foodVariety">
      <Property></Property>
      <Property name="label">粮食品种</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;FOOD_VARIETY_&quot;)}</Property>
        <Property name="keyProperty">dictValue</Property>
        <Property name="valueProperty">dictLabel</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="foodLevel">
      <Property></Property>
      <Property name="label">粮食等级</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerFoodLevel&quot;).getResult()}</Property>
        <Property name="keyProperty">dictValue</Property>
        <Property name="valueProperty">dictLabel</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="foodLocation">
      <Property></Property>
      <Property name="label">粮食产地</Property>
    </PropertyDef>
    <PropertyDef name="foodLocationId">
      <Property></Property>
      <Property name="label">粮食产地</Property>
    </PropertyDef>
    <PropertyDef name="perWet">
      <Property name="dataType">Double</Property>
      <Property name="label">水分</Property>
      <Property name="displayFormat">0.0 %</Property>
    </PropertyDef>
    <PropertyDef name="perImpurity">
      <Property name="dataType">Double</Property>
      <Property name="label">杂质</Property>
      <Property name="displayFormat">0.0 %</Property>
    </PropertyDef>
    <PropertyDef name="bulkWeight">
      <Property name="dataType">Double</Property>
      <Property name="label">容重 g/L</Property>
      <Property name="displayFormat">0.0 g/L</Property>
    </PropertyDef>
    <PropertyDef name="storeKeeper">
      <Property></Property>
      <Property name="label">保管员</Property>
    </PropertyDef>
    <PropertyDef name="storeKeeperName">
      <Property></Property>
      <Property name="label">保管员</Property>
    </PropertyDef>
    <PropertyDef name="checkDate">
      <Property name="dataType">Date</Property>
      <Property name="label">质检日期</Property>
    </PropertyDef>
    <PropertyDef name="storeDate">
      <Property name="dataType">Date</Property>
      <Property name="label">入库日期</Property>
    </PropertyDef>
    <PropertyDef name="foodYear">
      <Property></Property>
      <Property name="label">粮食年份</Property>
    </PropertyDef>
    <PropertyDef name="remark">
      <Property></Property>
      <Property name="label">备注信息</Property>
    </PropertyDef>
    <PropertyDef name="bhId">
      <Property></Property>
      <Property name="label">分机编码</Property>
    </PropertyDef>
    <PropertyDef name="orderNum">
      <Property name="dataType">Integer</Property>
      <Property name="label">顺序号</Property>
    </PropertyDef>
  </DataType>
  <DataType name="dtDepotStore">
    <Property name="creationType">com.fzzy.igds.dzhwk.domain.DepotStore</Property>
    <PropertyDef name="id">
      <Property></Property>
    </PropertyDef>
    <PropertyDef name="companyId">
      <Property></Property>
      <Property name="label">组织编码</Property>
    </PropertyDef>
    <PropertyDef name="deptId">
      <Property></Property>
      <Property name="label">所属分库</Property>
    </PropertyDef>
    <PropertyDef name="depotId">
      <Property></Property>
      <Property name="label">所属仓库</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;depotPR#getAllCache&quot;).getResult()}</Property>
        <Property name="keyProperty">id</Property>
        <Property name="valueProperty">name</Property>
      </Property>
      <Property name="required">true</Property>
    </PropertyDef>
    <PropertyDef name="country">
      <Property></Property>
      <Property name="label">国别</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;GB_&quot;)}</Property>
        <Property name="keyProperty">dictValue</Property>
        <Property name="valueProperty">dictLabel</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="manageType">
      <Property></Property>
      <Property name="label">管理方式</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerManagerType&quot;).getResult()}</Property>
        <Property name="keyProperty">dictValue</Property>
        <Property name="valueProperty">dictLabel</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="storeType">
      <Property></Property>
      <Property name="label">储粮方式</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerStoreType&quot;).getResult()}</Property>
        <Property name="keyProperty">dictValue</Property>
        <Property name="valueProperty">dictLabel</Property>
      </Property>
      <Property name="required">true</Property>
    </PropertyDef>
    <PropertyDef name="depotStatus">
      <Property></Property>
      <Property name="label">仓库状态</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerDepotStatus&quot;).getResult()}</Property>
        <Property name="keyProperty">dictValue</Property>
        <Property name="valueProperty">dictLabel</Property>
      </Property>
      <Property name="required">true</Property>
    </PropertyDef>
    <PropertyDef name="foodType">
      <Property></Property>
      <Property name="label">粮食性质</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;FOOD_TYPE_&quot;)}</Property>
        <Property name="keyProperty">dictValue</Property>
        <Property name="valueProperty">dictLabel</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="foodVariety">
      <Property></Property>
      <Property name="label">粮食品种</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#sysDictData&quot;).getResult(&quot;FOOD_VARIETY_&quot;)}</Property>
        <Property name="keyProperty">dictValue</Property>
        <Property name="valueProperty">dictLabel</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="foodLevel">
      <Property></Property>
      <Property name="label">粮食等级</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;dicPR#triggerFoodLevel&quot;).getResult()}</Property>
        <Property name="keyProperty">dictValue</Property>
        <Property name="valueProperty">dictLabel</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="foodLocationId">
      <Property></Property>
      <Property name="label">粮食产地</Property>
    </PropertyDef>
    <PropertyDef name="foodLocation">
      <Property></Property>
      <Property name="label">粮食产地</Property>
    </PropertyDef>
    <PropertyDef name="foodYear">
      <Property></Property>
      <Property name="label">收货年度</Property>
    </PropertyDef>
    <PropertyDef name="storeDate">
      <Property name="dataType">DateTime</Property>
      <Property name="label">入仓时间</Property>
    </PropertyDef>
    <PropertyDef name="storageReal">
      <Property name="dataType">Double</Property>
      <Property name="label">实际储量</Property>
      <Property name="displayFormat">#,##0 KG</Property>
      <Property name="required">true</Property>
    </PropertyDef>
    <PropertyDef name="storageSettle">
      <Property name="dataType">Double</Property>
      <Property name="label">计价数量</Property>
      <Property name="displayFormat">#,##0 KG</Property>
      <Property name="required">true</Property>
    </PropertyDef>
    <PropertyDef name="fullDate">
      <Property name="dataType">Date</Property>
      <Property name="label">封仓日期</Property>
    </PropertyDef>
    <PropertyDef name="outDate">
      <Property name="label">出仓完成时间</Property>
      <Property name="dataType">DateTime</Property>
    </PropertyDef>
    <PropertyDef name="grainHeight">
      <Property name="dataType">Double</Property>
      <Property name="label">装粮线高</Property>
      <Property name="displayFormat">0.00 ç±³</Property>
    </PropertyDef>
    <PropertyDef name="grainVolume">
      <Property name="dataType">Double</Property>
      <Property name="label">装粮体积</Property>
      <Property name="displayFormat">0.00 ç«‹æ–¹ç±³</Property>
    </PropertyDef>
    <PropertyDef name="remark">
      <Property></Property>
      <Property name="label">备注</Property>
    </PropertyDef>
    <PropertyDef name="updateUser">
      <Property></Property>
      <Property name="label">修改人</Property>
    </PropertyDef>
    <PropertyDef name="updateDate">
      <Property name="dataType">Date</Property>
      <Property name="label">修改时间</Property>
    </PropertyDef>
    <PropertyDef name="createDate">
      <Property name="dataType">Date</Property>
    </PropertyDef>
    <PropertyDef name="lqgsdwdm">
      <Property/>
      <Property name="label">粮权单位代码</Property>
    </PropertyDef>
  </DataType>
  <DataType name="dtArea">
    <Property name="creationType">com.fzzy.igds.dzhwk.domain.DicArea</Property>
    <PropertyDef name="code">
      <Property></Property>
      <Property name="label">区域编码</Property>
      <Property name="required">true</Property>
    </PropertyDef>
    <PropertyDef name="name">
      <Property></Property>
      <Property name="label">名称</Property>
      <Property name="required">true</Property>
    </PropertyDef>
    <PropertyDef name="parentCode">
      <Property></Property>
      <Property name="label">所属区域</Property>
      <Property name="mapping">
        <Property name="mapValues">${dorado.getDataProvider(&quot;dicAreaPR#getDicAreaByParentCode&quot;).getResult()}</Property>
        <Property name="keyProperty">code</Property>
        <Property name="valueProperty">name</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="parentName">
      <Property></Property>
      <Property name="label">上级区域</Property>
      <Property name="required">false</Property>
    </PropertyDef>
    <PropertyDef name="type">
      <Property></Property>
      <Property name="label">类型</Property>
      <Property name="required">true</Property>
      <Property name="mapping">
        <Property name="keyProperty">value</Property>
        <Property name="valueProperty">name</Property>
        <Property name="mapValues">
          <Collection>
            <Entity>
              <Property name="name">省</Property>
              <Property name="value">1</Property>
            </Entity>
            <Entity>
              <Property name="name">市</Property>
              <Property name="value">2</Property>
            </Entity>
            <Entity>
              <Property name="name">区县</Property>
              <Property name="value">3</Property>
            </Entity>
          </Collection>
        </Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="simple">
      <Property></Property>
      <Property name="label">简拼</Property>
      <Property name="required">false</Property>
    </PropertyDef>
    <PropertyDef name="disabledTag">
      <Property></Property>
      <Property name="label">是否禁用</Property>
      <Property name="required">false</Property>
      <Property name="mapping">
        <Property name="mapValues">
          <Collection>
            <Entity>
              <Property name="name">禁用</Property>
              <Property name="value">Y</Property>
            </Entity>
            <Entity>
              <Property name="name">启用</Property>
              <Property name="value">N</Property>
            </Entity>
          </Collection>
        </Property>
        <Property name="keyProperty">value</Property>
        <Property name="valueProperty">name</Property>
      </Property>
    </PropertyDef>
    <PropertyDef name="remark">
      <Property></Property>
      <Property name="label">备注</Property>
      <Property name="required">false</Property>
    </PropertyDef>
  </DataType>
</Model>
igds-dzhwk-web/src/main/java/com/fzzy/sys/controller/SysIndexController.java
@@ -42,21 +42,24 @@
    @Autowired
    private SysPasswordService passwordService;
    // ç³»ç»Ÿé¦–页
    @GetMapping("/index")
    public String index(@RequestParam(value = "bizType", required = false) String bizType,
                        ModelMap mmap) {
    /**
     * åŽå°ç®¡ç†ä¸»é¡µ
     * @param mmap
     * @return
     */
    @GetMapping("/home")
    public String home(@RequestParam(value = "bizType", required = false) String bizType,
                       ModelMap mmap) {
        // å–身份信息
        SysUser user = getSysUser();
        mmap.put("user", user);
        //根据bizType获取菜单
        if(StringUtils.isEmpty(bizType)){
            bizType = Constant.MODEL_DZHWK;
        }
        List<SysMenu> menus = this.getMenusByBizType(user, bizType);
        mmap.put("menus", menus);
        mmap.put("user", user);
        String welcomeUrl = "/welcome?t=" + bizType;
        mmap.put("welcomeUrl", welcomeUrl);
        mmap.put("sideTheme", configService.selectConfigByKey("sys.index.sideTheme", user.getCompanyId()));
        mmap.put("skinName", configService.selectConfigByKey("sys.index.skinName", user.getCompanyId()));
        Boolean footer = Convert.toBool(configService.selectConfigByKey("sys.index.footer", user.getCompanyId()), true);
@@ -75,7 +78,7 @@
        // èœå•导航显示风格
        String menuStyle = configService.selectConfigByKey("sys.index.menuStyle", user.getCompanyId());
        // ç§»åŠ¨ç«¯ï¼Œé»˜è®¤ä½¿å·¦ä¾§å¯¼èˆªèœå•ï¼Œå¦åˆ™å–é»˜è®¤é…ç½®
        String indexStyle = ServletUtils.checkAgentIsMobile(ServletUtils.getRequest().getHeader("User-Agent")) ? "index" : menuStyle;
        String indexStyle = ServletUtils.checkAgentIsMobile(ServletUtils.getRequest().getHeader("User-Agent")) ? "home" : menuStyle;
        // ä¼˜å…ˆCookie配置导航菜单
        Cookie[] cookies = ServletUtils.getRequest().getCookies();
@@ -85,10 +88,26 @@
                break;
            }
        }
        String webIndex = "topnav".equalsIgnoreCase(indexStyle) ? "index-topnav" : "index";
        String webIndex = "topnav".equalsIgnoreCase(indexStyle) ? "home-topnav" : "home";
        return webIndex;
    }
    @GetMapping("/welcome")
    public String welcome(@RequestParam(value = "t", required = true) String model,
                          ModelMap mmap) {
        mmap.put("version", FrameworkConfig.getVersion());
        // ç”¨æˆ·ä¿¡æ¯
        SysUser user = getSysUser();
        mmap.put(Constant.MODEL_KEY_LOGIN_USER, user);
        //默认粮情欢迎页面
        String view = "dzhwk/welcome";
        if (Constant.MODEL_SYS.equals(model)) {
            //系统管理模块欢迎页面
            view = "dzhwk/welcome";
        }
        return view;
    }
    /**
     * æ ¹æ®bizType获取菜单
     *
igds-dzhwk-web/src/main/resources/static/dzhwk/sys.css
@@ -29,7 +29,11 @@
.row-opt {
    padding: 62px 65px 0
}
.m-tabopt{margin-bottom:20px;margin-left: 115px;}
.ul-listopt{display:block;overflow:hidden}
.ul-listopt li{margin-right:30px;float:left}
.ul-listopt .con{display:flex;align-items:center;justify-content:center;width:136px;height:50px;background-image:url(../img/dzhwk/sys/a1.png);background-position:center;background-size:cover;background-repeat:no-repeat;font-size:16px;font-weight:700;color:#0cf;transition:.4s;-webkit-transition:.4s;-moz-transition:.4s;-ms-transition:.4s;-o-transition:.4s}
.ul-listopt .con:hover,.ul-listopt .on .con{background-image:url(../img/dzhwk/sys/a1-1.png);color:#fff}
.m-contopt {
    width: 1304px;
    height: 736px;
igds-dzhwk-web/src/main/resources/static/dzhwk/welcome/welcome.css
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,134 @@
@charset "utf-8";
/*-----------------
  Author:xq
  update:2019
 -------------------*/
body {
    font-family: "微软雅黑", Arial, sans-serif;
    font-size: 14px;
    background: #f3f5f8;
    position: relative;
    overflow: hidden;
}
i,em{
    font-style: normal;
}
.i-bodyBg{
    width: 100%;
    height: 100%;
    position: relative;
    z-index: -1;
}
.i-bodyBg img{
    width: 100%;
    height: 100%;
}
.i-container{
    width: 100%;
    max-width: 1720px;
    min-width: 1340px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
    position: relative;
}
.wel-main{
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
}
.wel-tit{
    height: 100px;
    text-align: center;
    margin: 6% 0 4%;
}
.wel-tit img{
    height: 100%;
    max-width: 90%;
}
.wel-item{
    width: 13.2%;
    position: absolute;
}
.wel-item-img,
.wel-item>a,
.wel-item-img img{
    display: block;
    width: 100%;
}
.wel-item-img img{
    height: 100%;
    opacity: 0.7;
    filter: alpha(opacity=70);
}
.wel-item:hover .wel-item-img img{
    opacity: 1;
    filter: alpha(opacity=100);
}
.wel-item1{
    left: 18%;
    top: 37.5%;
}
.wel-item2{
    left: 30.6%;
    top: 51%;
}
.wel-item3{
    left: 43.4%;
    top: 37.5%;
}
.wel-item4{
    left: 56%;
    top: 51%;
}
.wel-item5{
    left: 69%;
    top: 37.5%;
}
.wel-item>a{
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    overflow: hidden;
    height: 100%;
    text-align: center;
}
.wel-item>a p{
    color: #fff;
    margin-top: 65%;
    line-height: 1;
    font-size: 20px;
}
igds-dzhwk-web/src/main/resources/static/img/dzhwk/sys/a1-1.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/sys/a1.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/n2-zn.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/se-conf.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/se-fk.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/se-jk.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/se-mj.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/se-rq.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/sys-depot.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/sys-device.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/sys-grain.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/sys-url.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/sys-user.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/sys-warn.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/temp-control.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/temp-log.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/temp-mode.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/title-n2.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/title-online.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/title-security.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/title-sys.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/title-zhgl.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/wel-bg1.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/wel-bg2.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/wel-bg3.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/wel-bg4.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/wel-bg5.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/wel-body_03.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/wel-tit.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/zhgl-ht.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/zhgl-jh.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/zhgl-kh.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/zhgl-xz.png
igds-dzhwk-web/src/main/resources/static/img/dzhwk/welcome/zhgl-zc.png
igds-dzhwk-web/src/main/resources/static/ruoyi/home.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,671 @@
/**
 * é¦–页方法封装处理
 * Copyright (c) 2019 ruoyi
 */
layer.config({
    extend: 'moon/style.css',
    skin: 'layer-ext-moon'
});
var isMobile = false;
var sidebarHeight = isMobile ? '100%' : '96%';
$(function() {
    // MetsiMenu
    $('#side-menu').metisMenu();
    // å›ºå®šèœå•栏
    $('.sidebar-collapse').slimScroll({
        height: sidebarHeight,
        railOpacity: 0.9,
        alwaysVisible: false
    });
    // èœå•切换
    $('.navbar-minimalize').click(function() {
        if (isMobile) {
            $("body").toggleClass("canvas-menu");
        } else {
            $("body").toggleClass("mini-navbar");
        }
        SmoothlyMenu();
    });
    $('#side-menu>li').click(function() {
        if ($('body').hasClass('canvas-menu mini-navbar')) {
            NavToggle();
        }
    });
    $('#side-menu>li li a:not(:has(span))').click(function() {
        if ($(window).width() < 769) {
            NavToggle();
        }
    });
    $('.nav-close').click(NavToggle);
    //ios浏览器兼容性处理
    if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
        $('#content-main').css('overflow-y', 'auto');
    }
});
$(window).bind("load resize", function() {
    isMobile = $.common.isMobile() || $(window).width() < 769;
    if (isMobile) {
        $('body').addClass('canvas-menu');
        $("body").removeClass("mini-navbar");
        $("nav .logo").addClass("hide");
        $(".slimScrollDiv").css({ "overflow": "hidden" });
        $('.navbar-static-side').fadeOut();
    } else {
        if ($('body').hasClass('canvas-menu')) {
            $('body').addClass('fixed-sidebar');
            $('body').removeClass('canvas-menu');
            $("body").removeClass("mini-navbar");
            $("nav .logo").removeClass("hide");
            $(".slimScrollDiv").css({ "overflow": "visible" });
            $('.navbar-static-side').fadeIn();
        }
    }
});
function openToCurrentTab(obj) {
    if (isScrollToTop) {
        $(obj).show().siblings('.RuoYi_iframe').hide();
    } else {
        $(obj).css({"visibility": "visible", "position": "static"}).siblings('.RuoYi_iframe').css({"visibility": "hidden", "position": "absolute"});
    }
}
function syncMenuTab(dataId) {
    if (isLinkage) {
        var $dataObj = $('a[href$="' + decodeURI(dataId) + '"]');
        if ($dataObj.attr("class") != null && !$dataObj.hasClass("noactive")) {
            $('.tab-pane li').removeClass("active");
            $('.nav ul').removeClass("in");
            $dataObj.parents("ul").addClass("in")
            $dataObj.parents("li").addClass("active").siblings().removeClass("active").find('li').removeClass("active");
            $dataObj.parents("ul").css('height', 'auto').height();
            $(".nav ul li, .nav li").removeClass("selected");
            $dataObj.parent("li").addClass("selected");
            setIframeUrl(dataId);
            // é¡¶éƒ¨èœå•同步处理
            var tabStr = $dataObj.parents(".tab-pane").attr("id");
            if ($.common.isNotEmpty(tabStr)) {
                var sepIndex = tabStr.lastIndexOf('_');
                var menuId = tabStr.substring(sepIndex + 1, tabStr.length);
                $("#tab_" + menuId + " a").click();
            }
        }
    }
}
function NavToggle() {
    $('.navbar-minimalize').trigger('click');
}
function fixedSidebar() {
    $('#side-menu').hide();
    $("nav .logo").addClass("hide");
    setTimeout(function() {
        $('#side-menu').fadeIn(500);
    }, 100);
}
// è®¾ç½®é”šç‚¹
function setIframeUrl(href) {
    if ($.common.equals("history", mode)) {
        storage.set('publicPath', href);
    } else {
        var nowUrl = window.location.href;
        var newUrl = nowUrl.substring(0, nowUrl.indexOf("#"));
        window.location.href = newUrl + "#" + href;
    }
}
function SmoothlyMenu() {
    if (isMobile && !$('body').hasClass('canvas-menu')) {
        $('.navbar-static-side').fadeIn();
        fixedSidebar();
    } else if (!isMobile &&!$('body').hasClass('mini-navbar')) {
        fixedSidebar();
        $("nav .logo").removeClass("hide");
    } else if (isMobile && $('body').hasClass('fixed-sidebar')) {
        $('.navbar-static-side').fadeOut();
        fixedSidebar();
    } else if (!isMobile && $('body').hasClass('fixed-sidebar')) {
        fixedSidebar();
    } else {
        $('#side-menu').removeAttr('style');
    }
}
/**
 * iframe处理
 */
$(function() {
    //计算元素集合的总宽度
    function calSumWidth(elements) {
        var width = 0;
        $(elements).each(function() {
            width += $(this).outerWidth(true);
        });
        return width;
    }
    // æ¿€æ´»æŒ‡å®šé€‰é¡¹å¡
    function setActiveTab(element) {
        if (!$(element).hasClass('active')) {
            var currentId = $(element).data('id');
            syncMenuTab(currentId);
            // æ˜¾ç¤ºtab对应的内容区
            $('.RuoYi_iframe').each(function() {
                if ($(this).data('id') == currentId) {
                    openToCurrentTab(this);
                }
            });
            $(element).addClass('active').siblings('.menuTab').removeClass('active');
            scrollToTab(element);
        }
    }
    //滚动到指定选项卡
    function scrollToTab(element) {
        var marginLeftVal = calSumWidth($(element).prevAll()),
        marginRightVal = calSumWidth($(element).nextAll());
        // å¯è§†åŒºåŸŸéžtab宽度
        var tabOuterWidth = calSumWidth($(".content-tabs").children().not(".menuTabs"));
        //可视区域tab宽度
        var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth;
        //实际滚动宽度
        var scrollVal = 0;
        if ($(".page-tabs-content").outerWidth() < visibleWidth) {
            scrollVal = 0;
        } else if (marginRightVal <= (visibleWidth - $(element).outerWidth(true) - $(element).next().outerWidth(true))) {
            if ((visibleWidth - $(element).next().outerWidth(true)) > marginRightVal) {
                scrollVal = marginLeftVal;
                var tabElement = element;
                while ((scrollVal - $(tabElement).outerWidth()) > ($(".page-tabs-content").outerWidth() - visibleWidth)) {
                    scrollVal -= $(tabElement).prev().outerWidth();
                    tabElement = $(tabElement).prev();
                }
            }
        } else if (marginLeftVal > (visibleWidth - $(element).outerWidth(true) - $(element).prev().outerWidth(true))) {
            scrollVal = marginLeftVal - $(element).prev().outerWidth(true);
        }
        $('.page-tabs-content').animate({ marginLeft: 0 - scrollVal + 'px' }, "fast");
    }
    //查看左侧隐藏的选项卡
    function scrollTabLeft() {
        var marginLeftVal = Math.abs(parseInt($('.page-tabs-content').css('margin-left')));
        // å¯è§†åŒºåŸŸéžtab宽度
        var tabOuterWidth = calSumWidth($(".content-tabs").children().not(".menuTabs"));
        //可视区域tab宽度
        var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth;
        //实际滚动宽度
        var scrollVal = 0;
        if (($(".page-tabs-content").width()) < visibleWidth) {
            return false;
        } else {
            var tabElement = $(".menuTab:first");
            var offsetVal = 0;
            while ((offsetVal + $(tabElement).outerWidth(true)) <= marginLeftVal) { //找到离当前tab最近的元素
                offsetVal += $(tabElement).outerWidth(true);
                tabElement = $(tabElement).next();
            }
            offsetVal = 0;
            if (calSumWidth($(tabElement).prevAll()) > visibleWidth) {
                while ((offsetVal + $(tabElement).outerWidth(true)) < (visibleWidth) && tabElement.length > 0) {
                    offsetVal += $(tabElement).outerWidth(true);
                    tabElement = $(tabElement).prev();
                }
                scrollVal = calSumWidth($(tabElement).prevAll());
            }
        }
        $('.page-tabs-content').animate({ marginLeft: 0 - scrollVal + 'px' }, "fast");
    }
    //查看右侧隐藏的选项卡
    function scrollTabRight() {
        var marginLeftVal = Math.abs(parseInt($('.page-tabs-content').css('margin-left')));
        // å¯è§†åŒºåŸŸéžtab宽度
        var tabOuterWidth = calSumWidth($(".content-tabs").children().not(".menuTabs"));
        //可视区域tab宽度
        var visibleWidth = $(".content-tabs").outerWidth(true) - tabOuterWidth;
        //实际滚动宽度
        var scrollVal = 0;
        if ($(".page-tabs-content").width() < visibleWidth) {
            return false;
        } else {
            var tabElement = $(".menuTab:first");
            var offsetVal = 0;
            while ((offsetVal + $(tabElement).outerWidth(true)) <= marginLeftVal) { //找到离当前tab最近的元素
                offsetVal += $(tabElement).outerWidth(true);
                tabElement = $(tabElement).next();
            }
            offsetVal = 0;
            while ((offsetVal + $(tabElement).outerWidth(true)) < (visibleWidth) && tabElement.length > 0) {
                offsetVal += $(tabElement).outerWidth(true);
                tabElement = $(tabElement).next();
            }
            scrollVal = calSumWidth($(tabElement).prevAll());
            if (scrollVal > 0) {
                $('.page-tabs-content').animate({ marginLeft: 0 - scrollVal + 'px' }, "fast");
            }
        }
    }
    //通过遍历给菜单项加上data-index属性
    $(".menuItem").each(function(index) {
        if (!$(this).attr('data-index')) {
            $(this).attr('data-index', index);
        }
    });
    function menuItem() {
        // èŽ·å–æ ‡è¯†æ•°æ®
        var dataUrl = $(this).attr('href'),
        dataIndex = $(this).data('index'),
        menuName = $(this).data('title') || $.trim($(this).text()),
        isRefresh = $(this).data("refresh"),
        flag = true;
        var $dataObj = $('a[href$="' + decodeURI(dataUrl) + '"]');
        if (!$dataObj.hasClass("noactive")) {
            $('.tab-pane li').removeClass("active");
            $('.nav ul').removeClass("in");
            $dataObj.parents("ul").addClass("in")
            $dataObj.parents("li").addClass("active").siblings().removeClass("active").find('li').removeClass("active");
            $dataObj.parents("ul").css('height', 'auto').height();
            $(".nav ul li, .nav li").removeClass("selected");
            $(this).parent("li").addClass("selected");
        }
        setIframeUrl(dataUrl);
        if (dataUrl == undefined || $.trim(dataUrl).length == 0) return false;
        // é€‰é¡¹å¡èœå•已存在
        $('.menuTab').each(function() {
            if ($(this).data('id') == dataUrl) {
                if (!$(this).hasClass('active')) {
                    $(this).addClass('active').siblings('.menuTab').removeClass('active');
                    scrollToTab(this);
                    // æ˜¾ç¤ºtab对应的内容区
                    $('.mainContent .RuoYi_iframe').each(function() {
                        if ($(this).data('id') == dataUrl) {
                            openToCurrentTab(this);
                            return false;
                        }
                    });
                }
                if (isRefresh) {
                    refreshTab();
                }
                flag = false;
                return false;
            }
        });
        // é€‰é¡¹å¡èœå•不存在
        if (flag) {
            var str = '<a href="javascript:;" class="active menuTab" data-id="' + dataUrl + '">' + menuName + ' <i class="fa fa-times-circle"></i></a>';
            $('.menuTab').removeClass('active');
            // æ·»åŠ é€‰é¡¹å¡å¯¹åº”çš„iframe
            var str1 = '<iframe class="RuoYi_iframe" name="iframe' + dataIndex + '" width="100%" height="100%" src="' + dataUrl + '" frameborder="0" data-id="' + dataUrl + '" data-refresh="' + isRefresh + '" seamless></iframe>';
            if (isScrollToTop) {
                $('.mainContent').find('iframe.RuoYi_iframe').hide().parents('.mainContent').append(str1);
            } else {
                $('.mainContent').find('iframe.RuoYi_iframe').css({"visibility": "hidden", "position": "absolute"}).parents('.mainContent').append(str1);
            }
            $.modal.loading("数据加载中,请稍候...");
            $('.mainContent iframe:visible').on('load', function() {
                $.modal.closeLoading();
            });
            // æ·»åŠ é€‰é¡¹å¡
            $('.menuTabs .page-tabs-content').append(str);
            scrollToTab($('.menuTab.active'));
        }
        return false;
    }
    function menuBlank() {
        // æ–°çª—口打开外网以http://开头,如http://ruoyi.vip
        var dataUrl = $(this).attr('href');
        window.open(dataUrl);
        return false;
    }
    $('.menuItem').on('click', menuItem);
    $('.menuBlank').on('click', menuBlank);
    // å…³é—­é€‰é¡¹å¡èœå•
    function closeTab() {
        var closeTabId = $(this).parents('.menuTab').data('id');
        var currentWidth = $(this).parents('.menuTab').width();
        var panelUrl = $(this).parents('.menuTab').data('panel');
        // å½“前元素处于活动状态
        if ($(this).parents('.menuTab').hasClass('active')) {
            // å½“前元素后面有同辈元素,使后面的一个元素处于活动状态
            if ($(this).parents('.menuTab').next('.menuTab').length) {
                var activeId = $(this).parents('.menuTab').next('.menuTab:eq(0)').data('id');
                $(this).parents('.menuTab').next('.menuTab:eq(0)').addClass('active');
                $('.mainContent .RuoYi_iframe').each(function() {
                    if ($(this).data('id') == activeId) {
                        openToCurrentTab(this);
                        return false;
                    }
                });
                var marginLeftVal = parseInt($('.page-tabs-content').css('margin-left'));
                if (marginLeftVal < 0) {
                    $('.page-tabs-content').animate({ marginLeft: (marginLeftVal + currentWidth) + 'px' }, "fast");
                }
                //  ç§»é™¤å½“前选项卡
                $(this).parents('.menuTab').remove();
                // ç§»é™¤tab对应的内容区
                $('.mainContent .RuoYi_iframe').each(function() {
                    if ($(this).data('id') == closeTabId) {
                        $(this).remove();
                        return false;
                    }
                });
            }
            // å½“前元素后面没有同辈元素,使当前元素的上一个元素处于活动状态
            if ($(this).parents('.menuTab').prev('.menuTab').length) {
                var activeId = $(this).parents('.menuTab').prev('.menuTab:last').data('id');
                $(this).parents('.menuTab').prev('.menuTab:last').addClass('active');
                $('.mainContent .RuoYi_iframe').each(function() {
                    if ($(this).data('id') == activeId) {
                        openToCurrentTab(this);
                        return false;
                    }
                });
                //  ç§»é™¤å½“前选项卡
                $(this).parents('.menuTab').remove();
                // ç§»é™¤tab对应的内容区
                $('.mainContent .RuoYi_iframe').each(function() {
                    if ($(this).data('id') == closeTabId) {
                        $(this).remove();
                        return false;
                    }
                });
                if ($.common.isNotEmpty(panelUrl)) {
                    $('.menuTab[data-id="' + panelUrl + '"]').addClass('active').siblings('.menuTab').removeClass('active');
                    $('.mainContent .RuoYi_iframe').each(function() {
                        if ($(this).data('id') == panelUrl) {
                            openToCurrentTab(this);
                            return false;
                        }
                    });
                }
            }
        }
        // å½“前元素不处于活动状态
        else {
            //  ç§»é™¤å½“前选项卡
            $(this).parents('.menuTab').remove();
            // ç§»é™¤ç›¸åº”tab对应的内容区
            $('.mainContent .RuoYi_iframe').each(function() {
                if ($(this).data('id') == closeTabId) {
                    $(this).remove();
                    return false;
                }
            });
        }
        scrollToTab($('.menuTab.active'));
        syncMenuTab($.common.isNotEmpty(panelUrl) ? panelUrl : $('.page-tabs-content').find('.active').attr('data-id'));
        return false;
    }
    $('.menuTabs').on('click', '.menuTab i', closeTab);
    //滚动到已激活的选项卡
    function showActiveTab() {
        scrollToTab($('.menuTab.active'));
    }
    $('.tabShowActive').on('click', showActiveTab);
    // ç‚¹å‡»é€‰é¡¹å¡èœå•
    function activeTab() {
        if (!$(this).hasClass('active')) {
            var currentId = $(this).data('id');
            var isRefresh = false;
            syncMenuTab(currentId);
            // æ˜¾ç¤ºtab对应的内容区
            $('.mainContent .RuoYi_iframe').each(function() {
                if ($(this).data('id') == currentId) {
                    openToCurrentTab(this);
                    isRefresh = $.common.nullToDefault($(this).data('refresh'), false);
                    return false;
                }
            });
            $(this).addClass('active').siblings('.menuTab').removeClass('active');
            if (isRefresh) {
                refreshTab();
            }
            scrollToTab(this);
        }
    }
    // ç‚¹å‡»é€‰é¡¹å¡èœå•
    $('.menuTabs').on('click', '.menuTab', activeTab);
    // åˆ·æ–°iframe
    function refreshTab() {
        var currentId = $('.page-tabs-content').find('.active').attr('data-id');
        var target = $('.RuoYi_iframe[data-id="' + currentId + '"]');
        var url = target.attr('src');
        target.attr('src', url).ready();
    }
    // é¡µç­¾å…¨å±
    function fullScreenTab() {
        var currentId = $('.page-tabs-content').find('.active').attr('data-id');
        var target = $('.RuoYi_iframe[data-id="' + currentId + '"]');
        target.fullScreen(true);
    }
    // å…³é—­å½“前选项卡
    function tabCloseCurrent() {
        $('.page-tabs-content').find('.active i').trigger("click");
    }
    //关闭其他选项卡
    function tabCloseOther() {
        $('.page-tabs-content').children("[data-id]").not(":first").not(".active").each(function() {
            $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove();
            $(this).remove();
        });
        $('.page-tabs-content').animate({ marginLeft: '0px' }, "fast");
    }
    // å…³é—­å…¨éƒ¨é€‰é¡¹å¡
    function tabCloseAll() {
        $('.page-tabs-content').children("[data-id]").not(":first").each(function() {
            $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove();
            $(this).remove();
        });
        $('.page-tabs-content').children("[data-id]:first").each(function() {
            if (isScrollToTop) {
                $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').show();
            } else {
                $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').css({"visibility": "visible", "position": "static"});
            }
            $(this).addClass("active");
        });
        $('.page-tabs-content').css("margin-left", "0");
        syncMenuTab($('.page-tabs-content').find('.active').attr('data-id'));
    }
    // å…¨å±æ˜¾ç¤º
    $('#fullScreen').on('click', function () {
        $(document).toggleFullScreen();
    });
    // é”å®šå±å¹•
    $('#lockScreen').on('click', function () {
        storage.set('lockPath', $('.page-tabs-content').find('.active').attr('data-id'));
        location.href  = ctx + "lockscreen";
    });
    // é¡µç­¾åˆ·æ–°æŒ‰é’®
    $('.tabReload').on('click', refreshTab);
    // é¡µç­¾å…¨å±æŒ‰é’®
    $('.tabFullScreen').on('click', fullScreenTab);
    // åŒå‡»é€‰é¡¹å¡å…¨å±æ˜¾ç¤º
    $('.menuTabs').on('dblclick', '.menuTab', activeTabMax);
    // å·¦ç§»æŒ‰æ‰­
    $('.tabLeft').on('click', scrollTabLeft);
    // å³ç§»æŒ‰æ‰­
    $('.tabRight').on('click', scrollTabRight);
    // å…³é—­å½“前
    $('.tabCloseCurrent').on('click', tabCloseCurrent);
    // å…³é—­å…¶ä»–
    $('.tabCloseOther').on('click', tabCloseOther);
    // å…³é—­å…¨éƒ¨
    $('.tabCloseAll').on('click', tabCloseAll);
    // tab全屏显示
    $('.tabMaxCurrent').on('click', function () {
        $('.page-tabs-content').find('.active').trigger("dblclick");
    });
    // å…³é—­å…¨å±
    $('#ax_close_max').click(function(){
        $('#content-main').toggleClass('max');
        $('#ax_close_max').hide();
    })
    // åŒå‡»é€‰é¡¹å¡å…¨å±æ˜¾ç¤º
    function activeTabMax() {
        $('#content-main').toggleClass('max');
        $('#ax_close_max').show();
    }
    $(window).keydown(function(event) {
        if (event.keyCode == 27) {
            $('#content-main').removeClass('max');
            $('#ax_close_max').hide();
        }
    });
    window.onhashchange = function() {
        var hash = location.hash;
        var url = hash.substring(1, hash.length);
        $('a[href$="' + url + '"]').click();
    };
    // å³é”®èœå•实现
    $.contextMenu({
        selector: ".menuTab",
        trigger: 'right',
        autoHide: true,
        items: {
            "close_current": {
                name: "关闭当前",
                icon: "fa-close",
                callback: function(key, opt) {
                    opt.$trigger.find('i').trigger("click");
                }
            },
            "close_other": {
                name: "关闭其他",
                icon: "fa-window-close-o",
                callback: function(key, opt) {
                    setActiveTab(this);
                    tabCloseOther();
                }
            },
            "close_left": {
                name: "关闭左侧",
                icon: "fa-reply",
                callback: function(key, opt) {
                    setActiveTab(this);
                    this.prevAll('.menuTab').not(":last").each(function() {
                        if ($(this).hasClass('active')) {
                            setActiveTab(this);
                        }
                        $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove();
                        $(this).remove();
                    });
                    $('.page-tabs-content').animate({ marginLeft: '0px' }, "fast");
                }
            },
            "close_right": {
                name: "关闭右侧",
                icon: "fa-share",
                callback: function(key, opt) {
                    setActiveTab(this);
                    this.nextAll('.menuTab').each(function() {
                        $('.RuoYi_iframe[data-id="' + $(this).data('id') + '"]').remove();
                        $(this).remove();
                    });
                }
            },
            "close_all": {
                name: "全部关闭",
                icon: "fa-window-close",
                callback: function(key, opt) {
                    tabCloseAll();
                }
            },
            "step": "---------",
            "full": {
                name: "全屏显示",
                icon: "fa-arrows-alt",
                callback: function(key, opt) {
                    setActiveTab(this);
                    var target = $('.RuoYi_iframe[data-id="' + this.data('id') + '"]');
                    target.fullScreen(true);
                }
            },
            "refresh": {
                name: "刷新页面",
                icon: "fa-refresh",
                callback: function(key, opt) {
                    setActiveTab(this);
                    var target = $('.RuoYi_iframe[data-id="' + this.data('id') + '"]');
                    var url = target.attr('src');
                    $.modal.loading("数据加载中,请稍候...");
                    target.attr('src', url).on('load', function() {
                        $.modal.closeLoading();
                    });
                }
            },
            "open": {
                name: "新窗口打开",
                icon: "fa-link",
                callback: function(key, opt) {
                    var target = $('.RuoYi_iframe[data-id="' + this.data('id') + '"]');
                    window.open(target.attr('src'));
                }
            },
        }
    });
});
igds-dzhwk-web/src/main/resources/templates/dzhwk/sys.html
@@ -31,7 +31,16 @@
            <div class="left-slide">
                <div class="g-boxl1">
                        <div class="row-opt" style="margin: 25px 0 72px 0;">
                        <div class="row-opt" style="padding: 30px;margin: 0 0 30px 0;">
                            <div class="m-tabopt">
                                <ul class="ul-listopt TAB_CLICK" id=".tab1">
                                    <li>
                                        <a href="javascript:void(0)" onclick="toHome()" class="con">
                                            <div class="txt">后台管理</div>
                                        </a>
                                    </li>
                                </ul>
                            </div>
                            <div class="m-contopt">
                                <div class="tab1">
                                    <div class="m-opt1">
@@ -212,6 +221,10 @@
        timeFormate()
    }, 1000);
    function toHome() {
        window.location.href = "../home?bizType=sys";
    }
    //监听操作
    document.addEventListener('mousemove', resetTimeout);  //鼠标移动
    document.addEventListener('click', resetTimeout);      //鼠标点击
igds-dzhwk-web/src/main/resources/templates/dzhwk/welcome.html
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,92 @@
<!DOCTYPE html>
<html lang="zh-cn" xmlns:th=http://www.thymeleaf.org>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <title>系统管理-欢迎页</title>
    <meta name="description" content="智慧粮库综合管理平台">
    <link rel="stylesheet" th:href="@{/ajax/libs/layui/css/layui.css}"/>
    <link th:href="@{/dzhwk/welcome/welcome.css}" rel="stylesheet" type="text/css">
</head>
<body>
<div class="i-container ">
    <div class="i-bodyBg">
        <img th:src="@{/img/dzhwk/welcome/wel-body_03.png}"/>
    </div>
    <div class="wel-main">
        <h2 class="wel-tit">
            <img th:src="@{/img/dzhwk/welcome/title-sys.png}"/>
        </h2>
        <div class="wel-nav">
            <div class="wel-item wel-item1">
                <span class="wel-item-img">
                    <img th:src="@{/img/dzhwk/welcome/sys-depot.png}"/>
                </span>
                <a href="javascript:;" onclick="open1()">
                    <p>仓库管理</p>
                </a>
            </div>
            <div class="wel-item wel-item2">
                <span class="wel-item-img">
                    <img th:src="@{/img/dzhwk/welcome/sys-grain.png}"/>
                </span>
                <a href="javascript:;" onclick="open2()">
                    <p>系统参数</p>
                </a>
            </div>
            <div class="wel-item wel-item3">
                <span class="wel-item-img">
                    <img th:src="@{/img/dzhwk/welcome/sys-device.png}"/>
                </span>
                <a href="javascript:;" onclick="open3()">
                    <p>企业组织</p>
                </a>
            </div>
            <div class="wel-item wel-item4">
                <span class="wel-item-img">
                    <img th:src="@{/img/dzhwk/welcome/sys-url.png}"/>
                </span>
                <a href="javascript:;" onclick="open4()">
                    <p>菜单管理</p>
                </a>
            </div>
            <div class="wel-item wel-item5">
                <span class="wel-item-img">
                    <img th:src="@{/img/dzhwk/welcome/sys-user.png}"/>
                </span>
                <a href="javascript:;" onclick="open5()">
                    <p>用户管理</p>
                </a>
            </div>
        </div>
    </div>
    <!--wel-main end-->
</div>
<script type="text/javascript">
    function open1() {
        // window.parent.openTab("com.ld.igds.view.Depot.d", "仓库管理", "Depot");
    };
    function open2() {
        // window.parent.openTab("com.ld.igds.view.SysConf.d", "系统参数", "SysConf");
    };
    function open3() {
        // window.parent.openTab("com.ld.igds.sys.Dept.d", "企业组织管理", "Dept");
    };
    function open4() {
        // window.parent.openTab("com.ld.igds.sys.UrlMaintain.d", "菜单管理", "UrlMaintain");
    };
    function open5() {
        // window.parent.openTab("com.ld.igds.sys.User.d", "用户管理", "User");
    };
</script>
</body>
</html>
igds-dzhwk-web/src/main/resources/templates/home-static.html
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,416 @@
<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <title>若依系统首页</title>
    <!-- é¿å…IE使用兼容模式 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link href="../static/favicon.ico" rel="shortcut icon"/>
    <link href="../static/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="../static/css/jquery.contextMenu.min.css" rel="stylesheet"/>
    <link href="../static/css/font-awesome.min.css" rel="stylesheet"/>
    <link href="../static/css/animate.min.css" rel="stylesheet"/>
    <link href="../static/css/style.min.css" rel="stylesheet"/>
    <link href="../static/css/skins.css" rel="stylesheet"/>
    <link href="../static/ruoyi/css/ry-ui.css?v=4.7.8" rel="stylesheet"/>
</head>
<body class="fixed-sidebar full-height-layout gray-bg" style="overflow: hidden">
<div id="wrapper">
    <!--左侧导航开始-->
    <nav class="navbar-default navbar-static-side" role="navigation">
        <div class="nav-close">
            <i class="fa fa-times-circle"></i>
        </div>
        <a th:href="./home-static.html">
            <li class="logo hidden-xs">
                <span class="logo-lg">风正致远运维系统</span>
            </li>
        </a>
        <div class="sidebar-collapse">
            <ul class="nav" id="side-menu">
                <li>
                    <div class="user-panel">
                        <a class="menuItem noactive" title="个人中心" href="./home-static.html">
                            <div class="hide" th:text="个人中心"></div>
                            <div class="pull-left image">
                                <img src="../static/img/profile.jpg" class="img-circle" alt="User Image">
                            </div>
                        </a>
                        <div class="pull-left info">
                            <p>管理员</p>
                            <a href="javascript:;"><i class="fa fa-circle text-success"></i> åœ¨çº¿</a>
                            <a href="./home-static.html" style="padding-left:5px;"><i
                                    class="fa fa-sign-out text-danger"></i> æ³¨é”€</a>
                        </div>
                    </div>
                </li>
                <!--首页菜单--->
                <li>
                    <a class="menuItem" href="./demo/form/button.html"><i class="fa fa-home"></i> <span
                            class="nav-label">首页</span> </a>
                </li>
                <!--1和2级菜单--->
                <li>
                    <a href="#" data-refresh="false">
                        <i class="fa fa-bar-chart-o" class="fa fa-home"></i>
                        <span class="nav-label">一级菜单</span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level collapse">
                        <li>
                            <a class="menuItem" href="./demo/form/button.html" data-refresh="false">二级菜单</a>
                            <a class="menuItem" href="./demo/form/button.html" data-refresh="false">二级菜单</a>
                            <a class="menuItem" href="./demo/form/button.html" data-refresh="false">二级菜单</a>
                            <a class="menuItem" href="./demo/form/button.html" data-refresh="false">二级菜单</a>
                            <a class="menuItem" href="./demo/form/button.html" data-refresh="false">二级菜单</a>
                            <a class="menuItem" href="./demo/form/button.html" data-refresh="false">二级菜单</a>
                            <a class="menuItem" href="./demo/form/button.html" data-refresh="false">二级菜单</a>
                            <a class="menuItem" href="./demo/form/button.html" data-refresh="false">二级菜单</a>
                        </li>
                    </ul>
                </li>
                <li>
                    <a href="#" data-refresh="false">
                        <i class="fa fa-bar-chart-o" class="fa fa-home"></i>
                        <span class="nav-label">一级菜单</span>
                        <span class="fa arrow"></span>
                    </a>
                    <ul class="nav nav-second-level collapse">
                        <li>
                            <a class="menuItem" href="./demo/form/button.html" data-refresh="false">二级菜单</a>
                            <a class="menuItem" href="./demo/form/button.html" data-refresh="false">二级菜单</a>
                            <a class="menuItem" href="./demo/form/button.html" data-refresh="false">二级菜单</a>
                            <a class="menuItem" href="./demo/form/button.html" data-refresh="false">二级菜单</a>
                            <a class="menuItem" href="./demo/form/button.html" data-refresh="false">二级菜单</a>
                            <a class="menuItem" href="./demo/form/button.html" data-refresh="false">二级菜单</a>
                            <a class="menuItem" href="./demo/form/button.html" data-refresh="false">二级菜单</a>
                            <a class="menuItem" href="./demo/form/button.html" data-refresh="false">二级菜单</a>
                        </li>
                    </ul>
                </li>
                <!--1和2级3级菜单--->
                <li>
                    <a href="javascript:;"><i class="fa fa-desktop"></i><span class="nav-label">含三级菜单</span><span
                            class="fa arrow"></span></a>
                    <ul class="nav nav-second-level collapse">
                        <li><a>表单<span class="fa arrow"></span></a>
                            <ul class="nav nav-third-level">
                                <li><a class="menuItem" href="./demo/form/button.html">按钮</a></li>
                                <li><a class="menuItem" href="./demo/form/grid.html">栅格</a></li>
                                <li><a class="menuItem" href="./demo/form/select.html">下拉框</a></li>
                                <li><a class="menuItem" href="./demo/form/timeline.html">时间轴</a></li>
                                <li><a class="menuItem" href="./demo/form/progress_bars.html">进度条</a></li>
                                <li><a class="menuItem" href="./demo/form/basic.html">基本表单</a></li>
                                <li><a class="menuItem" href="./demo/form/cards.html">卡片列表</a></li>
                                <li><a class="menuItem" href="./demo/form/jasny.html">功能扩展</a></li>
                                <li><a class="menuItem" href="./demo/form/sortable.html">拖动排序</a></li>
                                <li><a class="menuItem" href="./demo/form/invoice.html">单据打印</a></li>
                                <li><a class="menuItem" href="./demo/form/labels_tips.html">标签 & æç¤º</a></li>
                                <li><a class="menuItem" href="./demo/form/tabs_panels.html">选项卡 & é¢æ¿</a></li>
                                <li><a class="menuItem" href="./demo/form/validate.html">表单校验</a></li>
                                <li><a class="menuItem" href="./demo/form/wizard.html">表单向导</a></li>
                                <li><a class="menuItem" href="./demo/form/upload.html">文件上传</a></li>
                                <li><a class="menuItem" href="./demo/form/datetime.html">日期和时间</a></li>
                                <li><a class="menuItem" href="./demo/form/summernote.html">富文本编辑器</a></li>
                                <li><a class="menuItem" href="./demo/form/duallistbox.html">左右互选组件</a></li>
                                <li><a class="menuItem" href="./demo/form/autocomplete.html">搜索自动补全</a></li>
                                <li><a class="menuItem" href="./demo/form/cxselect.html">多级联动下拉</a></li>
                                <li><a class="menuItem" href="./demo/form/localrefresh.html">Ajax局部刷新</a></li>
                            </ul>
                        </li>
                        <li><a>表格<span class="fa arrow"></span></a>
                            <ul class="nav nav-third-level">
                                <li><a class="menuItem" th:href="@{/demo/table/search}">查询条件</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/footer}">数据汇总</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/groupHeader}">组合表头</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/export}">表格导出</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/exportSelected}">导出选择列</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/remember}">翻页记住选择</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/pageGo}">跳转至指定页</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/params}">自定义查询参数</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/multi}">初始多表格</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/button}">点击按钮加载表格</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/data}">直接加载表格数据</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/fixedColumns}">表格冻结列</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/event}">自定义触发事件</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/headerStyle}">表格标题格式化</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/detail}">表格细节视图</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/child}">表格父子视图</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/image}">表格图片预览</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/curd}">动态增删改查</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/reorderRows}">表格行拖拽操作</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/reorderColumns}">表格列拖拽操作</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/resizable}">表格列宽拖动</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/editable}">表格行内编辑</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/subdata}">主子表提交</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/refresh}">表格自动刷新</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/print}">表格打印配置</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/dynamicColumns}">表格动态列</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/customView}">自定义视图分页</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/asynTree}">异步加载表格树</a></li>
                                <li><a class="menuItem" th:href="@{/demo/table/other}">表格其他操作</a></li>
                            </ul>
                        </li>
                        <li><a>弹框<span class="fa arrow"></span></a>
                            <ul class="nav nav-third-level">
                                <li><a class="menuItem" th:href="@{/demo/modal/dialog}">模态窗口</a></li>
                                <li><a class="menuItem" th:href="@{/demo/modal/layer}">弹层组件</a></li>
                                <li><a class="menuItem" th:href="@{/demo/modal/table}">弹层表格</a></li>
                            </ul>
                        </li>
                        <li><a>操作<span class="fa arrow"></span></a>
                            <ul class="nav nav-third-level">
                                <li><a class="menuItem" th:href="@{/demo/operate/table}">表格</a></li>
                                <li><a class="menuItem" th:href="@{/demo/operate/other}">其他</a></li>
                            </ul>
                        </li>
                        <li><a>报表<span class="fa arrow"></span></a>
                            <ul class="nav nav-third-level">
                                <li><a class="menuItem" th:href="@{/demo/report/echarts}">百度ECharts</a></li>
                                <li><a class="menuItem" th:href="@{/demo/report/peity}">peity</a></li>
                                <li><a class="menuItem" th:href="@{/demo/report/sparkline}">sparkline</a></li>
                                <li><a class="menuItem" th:href="@{/demo/report/metrics}">图表组合</a></li>
                            </ul>
                        </li>
                        <li><a>图标<span class="fa arrow"></span></a>
                            <ul class="nav nav-third-level">
                                <li><a class="menuItem" th:href="@{/demo/icon/fontawesome}">Font Awesome</a></li>
                                <li><a class="menuItem" th:href="@{/demo/icon/glyphicons}">Glyphicons</a></li>
                            </ul>
                        </li>
                        <li>
                            <a href="javascript:;"><i class="fa fa-sitemap"></i>四层菜单<span class="fa arrow"></span></a>
                            <ul class="nav nav-third-level collapse">
                                <li>
                                    <a href="javascript:;" id="damian">三级菜单1<span class="fa arrow"></span></a>
                                    <ul class="nav nav-third-level">
                                        <li>
                                            <a href="javascript:;">四级菜单1</a>
                                        </li>
                                        <li>
                                            <a href="javascript:;">四级菜单2</a>
                                        </li>
                                    </ul>
                                </li>
                                <li><a href="javascript:;">三级菜单2</a></li>
                            </ul>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </nav>
    <!--左侧导航结束-->
    <!--右侧部分开始-->
    <div id="page-wrapper" class="gray-bg dashbard-1">
        <div class="row border-bottom">
            <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                <div class="navbar-header">
                    <a class="navbar-minimalize minimalize-styl-2" style="color:#FFF;" href="javascript:;" title="收起菜单">
                        <i class="fa fa-bars"></i>
                    </a>
                </div>
                <ul class="nav navbar-top-links navbar-right welcome-message">
                    <li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="开发文档"
                           href="http://doc.ruoyi.vip/ruoyi" target="_blank"><i class="fa fa-question-circle"></i>
                        æ–‡æ¡£</a></li>
                    <li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="锁定屏幕"
                           href="javascript:;" id="lockScreen"><i class="fa fa-lock"></i> é”å±</a></li>
                    <li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="全屏显示"
                           href="javascript:;" id="fullScreen"><i class="fa fa-arrows-alt"></i> å…¨å±</a></li>
                    <li class="dropdown user-menu">
                        <a href="javascript:void(0)" class="dropdown-toggle" data-hover="dropdown">
                            <img src="../static/img/profile.jpg" class="user-image">
                            <span class="hidden-xs">管理员</span>
                        </a>
                        <ul class="dropdown-menu">
                            <li class="mt5">
                                <a th:href="./home-static.html" class="menuItem noactive">
                                    <i class="fa fa-user"></i> ä¸ªäººä¸­å¿ƒ</a>
                            </li>
                            <li>
                                <a onclick="resetPwd()">
                                    <i class="fa fa-key"></i> ä¿®æ”¹å¯†ç </a>
                            </li>
                            <li>
                                <a onclick="switchSkin()">
                                    <i class="fa fa-dashboard"></i> åˆ‡æ¢ä¸»é¢˜</a>
                            </li>
                            <li>
                                <a onclick="toggleMenu()">
                                    <i class="fa fa-toggle-off"></i> æ¨ªå‘菜单</a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <a th:href="@{logout}">
                                    <i class="fa fa-sign-out"></i> é€€å‡ºç™»å½•</a>
                            </li>
                        </ul>
                    </li>
                </ul>
            </nav>
        </div>
        <div class="row content-tabs" classappend="|hide|">
            <button class="roll-nav roll-left tabLeft">
                <i class="fa fa-backward"></i>
            </button>
            <nav class="page-tabs menuTabs">
                <div class="page-tabs-content">
                    <a href="javascript:;" class="active menuTab" data-id="http://www.fzzygf.com">首页</a>
                </div>
            </nav>
            <button class="roll-nav roll-right tabRight">
                <i class="fa fa-forward"></i>
            </button>
            <a href="javascript:void(0);" class="roll-nav roll-right tabReload"><i class="fa fa-refresh"></i> åˆ·æ–°</a>
        </div>
        <a id="ax_close_max" class="ax_close_max" href="javascript:;" title="关闭全屏"> <i class="fa fa-times-circle-o"></i>
        </a>
        <div class="row mainContent" id="content-main" classappend="mainClass">
            <iframe class="RuoYi_iframe" name="iframe0" width="100%" height="100%" data-id="http://www.fzzygf.com"
                    src="http://www.fzzygf.com" frameborder="0" seamless></iframe>
        </div>
        <div class="footer">
            <div class="pull-right">© [2023 é£Žæ­£è‡´è¿œè‚¡ä»½] FZZY Copyright</div>
        </div>
    </div>
    <!--右侧部分结束-->
</div>
<!-- å…¨å±€js -->
<script src="../static/js/jquery.min.js"></script>
<script src="../static/js/bootstrap.min.js"></script>
<script src="../static/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="../static/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="../static/js/jquery.contextMenu.min.js"></script>
<script src="../static/ajax/libs/blockUI/jquery.blockUI.js"></script>
<script src="../static/ajax/libs/layer-ruoyi/layer.min.js"></script>
<script src="../static/ruoyi/js/ry-ui.js?v=4.7.8"></script>
<script src="../static/ruoyi/js/common.js?v=4.7.8"></script>
<script src="../static/ruoyi/home.js?v=20201208"></script>
<script src="../static/ajax/libs/fullscreen/jquery.fullscreen.js"></script>
<script inline="javascript">
    window.history.forward(1);
    var ctx ="./";
    var lockscreen = "lockscreen";
    if (lockscreen) {
        window.top.location = ctx + "lockscreen";
    }
    // çš®è‚¤ç¼“å­˜
    var skin = storage.get("skin");
    // history(表示去掉地址的#)否则地址以"#"形式展示
    var mode = "history";
    // åŽ†å²è®¿é—®è·¯å¾„ç¼“å­˜
    var historyPath = storage.get("historyPath");
    // æ˜¯å¦é¡µç­¾ä¸Žèœå•联动
    var isLinkage = true;
    // æ˜¯å¦é¡µç­¾åˆ‡æ¢æ»šåŠ¨åˆ°é¡¶éƒ¨
    var isScrollToTop = true;
    // æœ¬åœ°ä¸»é¢˜ä¼˜å…ˆï¼Œæœªè®¾ç½®å–系统配置
    if ($.common.isNotEmpty(skin)) {
        $("body").addClass(skin.split('|')[0]);
        $("body").addClass(skin.split('|')[1]);
    } else {
        $("body").addClass([[${sideTheme}]]);
        $("body").addClass([[${skinName}]]);
    }
    /* ç”¨æˆ·ç®¡ç†-重置密码 */
    function resetPwd() {
        var url = ctx + 'system/user/profile/resetPwd';
        $.modal.open("重置密码", url, '770', '380');
    }
    /* åˆ‡æ¢ä¸»é¢˜ */
    function switchSkin() {
        layer.open({
            type: 2,
            shadeClose: true,
            title: "切换主题",
            area: ["530px", "386px"],
            content: [ctx + "system/switchSkin", 'no']
        })
    }
    /* åˆ‡æ¢èœå• */
    function toggleMenu() {
        $.modal.confirm("确认要切换成横向菜单吗?", function () {
            $.get(ctx + 'system/menuStyle/topnav', function (result) {
                window.location.reload();
            });
        })
    }
    /** åˆ·æ–°æ—¶è®¿é—®è·¯å¾„页签 */
    function applyPath(url) {
        $('a[href$="' + decodeURI(url) + '"]').click();
        if (!$('a[href$="' + url + '"]').hasClass("noactive")) {
            $('a[href$="' + url + '"]').parent("li").addClass("selected").parents("li").addClass("active").end().parents("ul").addClass("in");
        }
    }
    $(function () {
        var lockPath = storage.get('lockPath');
        if ($.common.equals("history", mode) && window.performance.navigation.type == 1) {
            var url = storage.get('publicPath');
            if ($.common.isNotEmpty(url)) {
                applyPath(url);
            }
        } else if ($.common.isNotEmpty(lockPath)) {
            applyPath(lockPath);
            storage.remove('lockPath');
        } else {
            var hash = location.hash;
            if ($.common.isNotEmpty(hash)) {
                var url = hash.substring(1, hash.length);
                applyPath(url);
            } else {
                if ($.common.equals("history", mode)) {
                    storage.set('publicPath', "");
                }
            }
        }
        /* åˆå§‹å¯†ç æç¤º */
        if ([[${isDefaultModifyPwd}]]) {
            layer.confirm("您的密码还是初始密码,请修改密码!", {
                icon: 0,
                title: "安全提示",
                btn: ['确认', '取消'],
                offset: ['30%']
            }, function (index) {
                resetPwd();
                layer.close(index);
            });
        }
        /* è¿‡æœŸå¯†ç æç¤º */
        if ([[${isPasswordExpired}]]) {
            layer.confirm("您的密码已过期,请尽快修改密码!", {
                icon: 0,
                title: "安全提示",
                btn: ['确认', '取消'],
                offset: ['30%']
            }, function (index) {
                resetPwd();
                layer.close(index);
            });
        }
        $("[data-toggle='tooltip']").tooltip();
    });
</script>
</body>
</html>
igds-dzhwk-web/src/main/resources/templates/home-topnav.html
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,447 @@
<!DOCTYPE html>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <title>若依系统首页</title>
    <!-- é¿å…IE使用兼容模式 -->
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link th:href="@{favicon.ico}" rel="shortcut icon"/>
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
    <link th:href="@{/css/jquery.contextMenu.min.css}" rel="stylesheet"/>
    <link th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
    <link th:href="@{/css/animate.min.css}" rel="stylesheet"/>
    <link th:href="@{/css/style.min.css}" rel="stylesheet"/>
    <link th:href="@{/css/skins.css?v=20200902}" rel="stylesheet"/>
    <link th:href="@{/ruoyi/css/ry-ui.css?v=4.7.8}" rel="stylesheet"/>
    <style type="text/css">.fixed-sidebar .nav:not(.navbar-toolbar)>li.active{border-left:0px!important;}</style>
</head>
<body class="fixed-sidebar full-height-layout gray-bg" th:classappend="${isMobile} ? 'canvas-menu'" style="overflow: hidden">
<div id="wrapper">
    <!--左侧导航开始-->
    <nav class="navbar-default navbar-static-side" role="navigation">
        <div class="nav-close">
            <i class="fa fa-times-circle"></i>
        </div>
        <a th:href="@{/index}">
            <li class="logo hidden-xs">
                <span class="logo-lg">RuoYi</span>
            </li>
         </a>
        <div class="sidebar-collapse tab-content" id="side-menu">
            <div class="user-panel">
                <a class="menuItem noactive" title="个人中心" th:href="@{/system/user/profile}">
                    <div class="hide" th:text="个人中心"></div>
                    <div class="pull-left image">
                        <img th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}" th:onerror="this.src='img/profile.jpg'" class="img-circle" alt="User Image">
                    </div>
                </a>
                <div class="pull-left info">
                  <p>[[${user.loginName}]]</p>
                  <a href="javascript:;"><i class="fa fa-circle text-success"></i> åœ¨çº¿</a>
                  <a th:href="@{logout}" style="padding-left:5px;"><i class="fa fa-sign-out text-danger"></i> æ³¨é”€</a>
                </div>
            </div>
            <!-- å·¦ä¾§èœå• -->
            <th:block th:each="menu : ${menus}">
            <div class="tab-pane fade height-full" th:id="|menu_${menu.menuId}|">
              <ul class="nav">
                <li th:each="cmenu : ${menu.children}">
                  <a class="menu-content" th:if="${#lists.isEmpty(cmenu.children)}" th:href="@{${cmenu.url}}" th:classappend="${#strings.isEmpty(cmenu.target)} ? |menuItem| : ${cmenu.target}" th:data-refresh="${cmenu.isRefresh == '0'}">
                    <i th:class="${cmenu.icon} + ' fa-fw'"></i> <span class="nav-label">[[${cmenu.menuName}]]</span>
                  </a>
                  <a class="menu-content" th:if="${not #lists.isEmpty(cmenu.children)}" href="javascript:;">
                    <i th:class="${cmenu.icon} + ' fa-fw'"></i>
                    <span class="nav-label">[[${cmenu.menuName}]]</span>
                    <span class="fa arrow"></span>
                  </a>
                  <ul th:if="${not #lists.isEmpty(cmenu.children)}" class="nav nav-second-level collapse">
                    <li th:each="emenu : ${cmenu.children}">
                      <a th:if="${#lists.isEmpty(emenu.children)}" th:href="@{${emenu.url}}" th:class="${#strings.isEmpty(emenu.target)} ? |menuItem| : ${emenu.target}" th:data-refresh="${emenu.isRefresh == '0'}">
                        <i th:class="${emenu.icon} + ' fa-fw'"></i>
                        [[${emenu.menuName}]]
                      </a>
                      <a th:if="${not #lists.isEmpty(emenu.children)}" href="javascript:;">
                        <i th:class="${emenu.icon} + ' fa-fw'"></i>
                        [[${emenu.menuName}]]
                        <span class="fa arrow"></span>
                      </a>
                      <ul th:if="${not #lists.isEmpty(emenu.children)}" class="nav nav-third-level collapse">
                        <li th:each="fmenu : ${emenu.children}"><a th:if="${#lists.isEmpty(fmenu.children)}" th:class="${#strings.isEmpty(fmenu.target)} ? |menuItem| : ${fmenu.target}" th:href="@{${fmenu.url}}" th:data-refresh="${fmenu.isRefresh == '0'}">[[${fmenu.menuName}]]</a></li>
                      </ul>
                    </li>
                  </ul>
                </li>
              </ul>
            </div>
            </th:block>
            <!-- é¦–页菜单 -->
            <div class="tab-pane fade height-full" id="index">
              <ul class="nav">
                <li>
                  <a class="menuItem" th:href="@{/system/main}">
                  <i class="fa fa-home"></i> <span class="nav-label">首页</span></a>
                </li>
              </ul>
            </div>
            <!-- å®žä¾‹æ¼”示菜单 -->
            <div class="tab-pane fade height-full" id="demo" th:if="${demoEnabled}">
              <ul class="nav">
                <li>
                  <a href="javascript:;"><i class="fa fa-edit"></i> <span class="nav-label">表单</span><span class="fa arrow"></span></a>
                  <ul class="nav nav-second-level collapse">
                    <li><a class="menuItem" th:href="@{/demo/form/button}">按钮</a></li>
                    <li><a class="menuItem" th:href="@{/demo/form/grid}">栅格</a></li>
                    <li><a class="menuItem" th:href="@{/demo/form/select}">下拉框</a></li>
                    <li><a class="menuItem" th:href="@{/demo/form/timeline}">时间轴</a></li>
                    <li><a class="menuItem" th:href="@{/demo/form/progress_bars}">进度条</a></li>
                    <li><a class="menuItem" th:href="@{/demo/form/basic}">基本表单</a></li>
                    <li><a class="menuItem" th:href="@{/demo/form/cards}">卡片列表</a></li>
                    <li><a class="menuItem" th:href="@{/demo/form/jasny}">功能扩展</a></li>
                    <li><a class="menuItem" th:href="@{/demo/form/sortable}">拖动排序</a></li>
                    <li><a class="menuItem" th:href="@{/demo/form/invoice}">单据打印</a></li>
                    <li><a class="menuItem" th:href="@{/demo/form/labels_tips}">标签 & æç¤º</a></li>
                    <li><a class="menuItem" th:href="@{/demo/form/tabs_panels}">选项卡 & é¢æ¿</a></li>
                    <li><a class="menuItem" th:href="@{/demo/form/validate}">表单校验</a></li>
                    <li><a class="menuItem" th:href="@{/demo/form/wizard}">表单向导</a></li>
                    <li><a class="menuItem" th:href="@{/demo/form/upload}">文件上传</a></li>
                    <li><a class="menuItem" th:href="@{/demo/form/datetime}">日期和时间</a></li>
                    <li><a class="menuItem" th:href="@{/demo/form/summernote}">富文本编辑器</a></li>
                    <li><a class="menuItem" th:href="@{/demo/form/duallistbox}">左右互选组件</a></li>
                    <li><a class="menuItem" th:href="@{/demo/form/autocomplete}">搜索自动补全</a></li>
                    <li><a class="menuItem" th:href="@{/demo/form/cxselect}">多级联动下拉</a></li>
                    <li><a class="menuItem" th:href="@{/demo/form/localrefresh}">Ajax局部刷新</a></li>
                  </ul>
                </li>
                <li>
                  <a href="javascript:;"><i class="fa fa-table"></i> <span class="nav-label">表格</span><span class="fa arrow"></span></a>
                  <ul class="nav nav-second-level collapse">
                    <li><a class="menuItem" th:href="@{/demo/table/search}">查询条件</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/footer}">数据汇总</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/groupHeader}">组合表头</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/export}">表格导出</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/exportSelected}">导出选择列</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/remember}">翻页记住选择</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/pageGo}">跳转至指定页</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/params}">自定义查询参数</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/multi}">初始多表格</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/button}">点击按钮加载表格</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/data}">直接加载表格数据</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/fixedColumns}">表格冻结列</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/event}">自定义触发事件</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/headerStyle}">表格标题格式化</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/detail}">表格细节视图</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/child}">表格父子视图</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/image}">表格图片预览</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/curd}">动态增删改查</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/reorderRows}">表格行拖拽操作</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/reorderColumns}">表格列拖拽操作</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/resizable}">表格列宽拖动</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/editable}">表格行内编辑</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/subdata}">主子表提交</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/refresh}">表格自动刷新</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/print}">表格打印配置</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/dynamicColumns}">表格动态列</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/customView}">自定义视图分页</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/asynTree}">异步加载表格树</a></li>
                    <li><a class="menuItem" th:href="@{/demo/table/other}">表格其他操作</a></li>
                  </ul>
                </li>
                <li>
                  <a href="javascript:;"><i class="fa fa-flask"></i> <span class="nav-label">弹框</span><span class="fa arrow"></span></a>
                  <ul class="nav nav-second-level collapse">
                    <li><a class="menuItem" th:href="@{/demo/modal/dialog}">模态窗口</a></li>
                    <li><a class="menuItem" th:href="@{/demo/modal/layer}">弹层组件</a></li>
                    <li><a class="menuItem" th:href="@{/demo/modal/table}">弹层表格</a></li>
                  </ul>
                </li>
                <li>
                  <a href="javascript:;"><i class="fa fa-wpforms"></i> <span class="nav-label">操作</span><span class="fa arrow"></span></a>
                  <ul class="nav nav-second-level collapse">
                    <li><a class="menuItem" th:href="@{/demo/operate/table}">表格</a></li>
                    <li><a class="menuItem" th:href="@{/demo/operate/other}">其他</a></li>
                  </ul>
                </li>
                <li>
                  <a href="javascript:;"><i class="fa fa-bar-chart-o"></i> <span class="nav-label">报表</span><span class="fa arrow"></span></a>
                  <ul class="nav nav-second-level collapse">
                    <li><a class="menuItem" th:href="@{/demo/report/echarts}">百度ECharts</a></li>
                    <li><a class="menuItem" th:href="@{/demo/report/peity}">peity</a></li>
                    <li><a class="menuItem" th:href="@{/demo/report/sparkline}">sparkline</a></li>
                    <li><a class="menuItem" th:href="@{/demo/report/metrics}">图表组合</a></li>
                  </ul>
                </li>
                <li>
                  <a href="javascript:;"><i class="fa fa-book"></i> <span class="nav-label">图标</span><span class="fa arrow"></span></a>
                  <ul class="nav nav-second-level collapse">
                    <li><a class="menuItem" th:href="@{/demo/icon/fontawesome}">Font Awesome</a></li>
                    <li><a class="menuItem" th:href="@{/demo/icon/glyphicons}">Glyphicons</a></li>
                  </ul>
                </li>
                <li>
                  <a href="javascript:;"><i class="fa fa-navicon"></i> <span class="nav-label">四层菜单</span><span class="fa arrow"></span></a>
                  <ul class="nav nav-second-level collapse">
                    <li>
                        <a href="javascript:;" id="damian">三级菜单1<span class="fa arrow"></span></a>
                        <ul class="nav nav-third-level collapse">
                            <li>
                                <a href="javascript:;">四级菜单1</a>
                            </li>
                            <li>
                                <a href="javascript:;">四级菜单2</a>
                            </li>
                        </ul>
                    </li>
                    <li><a href="javascript:;">三级菜单2</a></li>
                  </ul>
                </li>
              </ul>
            </div>
        </div>
    </nav>
    <!--左侧导航结束-->
    <!--右侧部分开始-->
    <div id="page-wrapper" class="gray-bg dashbard-1">
        <div class="row border-bottom">
            <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                <div class="navbar-header">
                    <a class="navbar-minimalize minimalize-styl-2" style="color:#FFF;" href="javascript:;" title="收起菜单">
                        <i class="fa fa-bars"></i>
                    </a>
                </div>
                <!-- é¡¶éƒ¨æ  -->
                <div id="navMenu">
                  <ul class="nav navbar-toolbar nav-tabs navbar-left hidden-xs">
                    <!-- é¡¶éƒ¨èœå•列表 -->
                    <th:block th:each="menu : ${menus}">
                       <li role="presentation" th:id="|tab_${menu.menuId}|">
                           <a th:if="${#lists.isEmpty(menu.children)}" data-toggle="tab" th:class="@{${!#strings.isEmpty(menu.target) && menu.target == 'menuBlank'} ? 'menuBlank' : 'menuItem noactive'}" th:href="@{${menu.url}}">
                            <i th:class="${menu.icon}"></i> <span>[[${menu.menuName}]]</span>
                        </a>
                        <a th:if="${not #lists.isEmpty(menu.children)}" data-toggle="tab" th:class="@{${!#strings.isEmpty(menu.target) && menu.target == 'menuBlank'} ? 'menuBlank'}" th:href="@{${!#strings.isEmpty(menu.target) && menu.target == 'menuBlank'} ? @{${menu.url}} : |#menu_${menu.menuId}|}">
                            <i th:class="${menu.icon}"></i> <span>[[${menu.menuName}]]</span>
                        </a>
                    </li>
                    </th:block>
                    <li role="presentation" id="tab_index">
                      <a data-toggle="tab" href="#index">
                        <i class="fa fa-area-chart"></i> <span>统计报表</span>
                      </a>
                    </li>
                    <li role="presentation" id="tab_demo" th:if="${demoEnabled}">
                      <a data-toggle="tab" href="#demo">
                        <i class="fa fa-desktop"></i> <span>实例演示</span>
                      </a>
                    </li>
                  </ul>
                </div>
                <!-- å³ä¾§æ  -->
                <ul class="nav navbar-top-links navbar-right welcome-message">
                    <li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="开发文档" href="http://doc.ruoyi.vip/ruoyi" target="_blank"><i class="fa fa-question-circle"></i> æ–‡æ¡£</a></li>
                    <li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="锁定屏幕" href="javascript:;" id="lockScreen"><i class="fa fa-lock"></i> é”å±</a></li>
                    <li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="全屏显示" href="javascript:;" id="fullScreen"><i class="fa fa-arrows-alt"></i> å…¨å±</a></li>
                    <li class="dropdown user-menu">
                        <a href="javascript:void(0)" class="dropdown-toggle" data-hover="dropdown">
                            <img th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}" th:onerror="this.src='img/profile.jpg'" class="user-image">
                            <span class="hidden-xs">[[${#strings.defaultString(user.userName, '-')}]]</span>
                        </a>
                        <ul class="dropdown-menu">
                            <li class="mt5">
                                <a th:href="@{/system/user/profile}" class="menuItem noactive">
                                <i class="fa fa-user"></i> ä¸ªäººä¸­å¿ƒ</a>
                            </li>
                            <li>
                                <a onclick="resetPwd()">
                                <i class="fa fa-key"></i> ä¿®æ”¹å¯†ç </a>
                            </li>
                            <li>
                                <a onclick="switchSkin()">
                                <i class="fa fa-dashboard"></i> åˆ‡æ¢ä¸»é¢˜</a>
                            </li>
                            <li>
                                <a onclick="toggleMenu()">
                                <i class="fa fa-toggle-off"></i> å·¦ä¾§èœå•</a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <a th:href="@{logout}">
                                <i class="fa fa-sign-out"></i> é€€å‡ºç™»å½•</a>
                            </li>
                        </ul>
                    </li>
                </ul>
            </nav>
        </div>
        <div class="row content-tabs" th:classappend="${#bools.isFalse(tagsView)} ? |hide|">
            <button class="roll-nav roll-left tabLeft">
                <i class="fa fa-backward"></i>
            </button>
            <nav class="page-tabs menuTabs">
                <div class="page-tabs-content">
                    <a href="javascript:;" class="active menuTab" th:data-id="@{/system/main}">首页</a>
                </div>
            </nav>
            <button class="roll-nav roll-right tabRight">
                <i class="fa fa-forward"></i>
            </button>
            <a href="javascript:void(0);" class="roll-nav roll-right tabReload"><i class="fa fa-refresh"></i> åˆ·æ–°</a>
        </div>
        <a id="ax_close_max" class="ax_close_max" href="javascript:;" title="关闭全屏"> <i class="fa fa-times-circle-o"></i> </a>
        <div class="row mainContent" id="content-main" th:classappend="${mainClass}">
            <iframe class="RuoYi_iframe" name="iframe0" width="100%" height="100%" th:data-id="@{/system/main}"
                th:src="@{/system/main}" frameborder="0" seamless></iframe>
        </div>
        <div th:if="${footer}" class="footer">
            <div class="pull-right">© [[${copyrightYear}]] RuoYi Copyright </div>
        </div>
    </div>
    <!--右侧部分结束-->
</div>
<!-- å…¨å±€js -->
<script th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/js/bootstrap.min.js}"></script>
<script th:src="@{/js/plugins/metisMenu/jquery.metisMenu.js}"></script>
<script th:src="@{/js/plugins/slimscroll/jquery.slimscroll.min.js}"></script>
<script th:src="@{/js/jquery.contextMenu.min.js}"></script>
<script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
<script th:src="@{/ajax/libs/layer-ruoyi/layer.min.js}"></script>
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.7.8}"></script>
<script th:src="@{/ruoyi/js/common.js?v=4.7.8}"></script>
<script th:src="@{/ruoyi/home.js?v=20201208}"></script>
<script th:src="@{/ajax/libs/fullscreen/jquery.fullscreen.js}"></script>
<script th:src="@{/js/resize-tabs.js}"></script>
<script th:inline="javascript">
window.history.forward(1);
var ctx = [[@{/}]];
var lockscreen = [[${session.lockscreen}]];
if(lockscreen){window.top.location=ctx+"lockscreen";}
// çš®è‚¤ç¼“å­˜
var skin = storage.get("skin");
// history(表示去掉地址的#)否则地址以"#"形式展示
var mode = "history";
// åŽ†å²è®¿é—®è·¯å¾„ç¼“å­˜
var historyPath = storage.get("historyPath");
// æ˜¯å¦é¡µç­¾ä¸Žèœå•联动
var isLinkage = true;
// æ˜¯å¦é¡µç­¾åˆ‡æ¢æ»šåŠ¨åˆ°é¡¶éƒ¨
var isScrollToTop = true;
// æœ¬åœ°ä¸»é¢˜ä¼˜å…ˆï¼Œæœªè®¾ç½®å–系统配置
if($.common.isNotEmpty(skin)){
    $("body").addClass(skin.split('|')[0]);
    $("body").addClass(skin.split('|')[1]);
} else {
    $("body").addClass([[${sideTheme}]]);
    $("body").addClass([[${skinName}]]);
}
/* ç”¨æˆ·ç®¡ç†-重置密码 */
function resetPwd() {
    var url = ctx + 'system/user/profile/resetPwd';
    $.modal.open("重置密码", url, '770', '380');
}
/* åˆ‡æ¢ä¸»é¢˜ */
function switchSkin() {
    layer.open({
        type : 2,
        shadeClose : true,
        title : "切换主题",
        area : ["530px", "386px"],
        content : [ctx + "system/switchSkin", 'no']
    })
}
/* åˆ‡æ¢èœå• */
function toggleMenu() {
    $.modal.confirm("确认要切换成左侧菜单吗?", function() {
        $.get(ctx + 'system/menuStyle/default', function(result) {
            window.location.reload();
        });
    })
}
/** åˆ·æ–°æ—¶è®¿é—®è·¯å¾„页签 */
function applyPath(url) {
    var $dataObj = $('a[href$="' + decodeURI(url) + '"]');
    $dataObj.click();
    if (!$dataObj.hasClass("noactive")) {
        $dataObj.parent("li").addClass("selected").parents("li").addClass("active").end().parents("ul").addClass("in");
    }
    // é¡¶éƒ¨èœå•同步处理
    var tabStr = $dataObj.parents(".tab-pane").attr("id");
    if ($.common.isNotEmpty(tabStr)) {
        var sepIndex = tabStr.lastIndexOf('_');
        var menuId = tabStr.substring(sepIndex + 1, tabStr.length);
        $("#tab_" + menuId + " a").click();
    }
}
$(function() {
    var lockPath = storage.get('lockPath');
    if($.common.equals("history", mode) && window.performance.navigation.type == 1) {
        var url = storage.get('publicPath');
        if ($.common.isNotEmpty(url)) {
            applyPath(url);
        } else {
            $(".navbar-toolbar li a").eq(0).click();
        }
    } else if($.common.isNotEmpty(lockPath)) {
        applyPath(lockPath);
        storage.remove('lockPath');
    } else {
        var hash = location.hash;
        if ($.common.isNotEmpty(hash)) {
            var url = hash.substring(1, hash.length);
            applyPath(url);
        } else {
            if($.common.equals("history", mode)) {
                storage.set('publicPath', "");
            }
            $(".navbar-toolbar li a").eq(0).click();
        }
    }
    /* åˆå§‹å¯†ç æç¤º */
    if([[${isDefaultModifyPwd}]]) {
        layer.confirm("您的密码还是初始密码,请修改密码!", {
            icon: 0,
            title: "安全提示",
            btn: ['确认'    , '取消'],
            offset: ['30%']
        }, function (index) {
            resetPwd();
            layer.close(index);
        });
    }
    /* è¿‡æœŸå¯†ç æç¤º */
    if([[${isPasswordExpired}]]) {
        layer.confirm("您的密码已过期,请尽快修改密码!", {
            icon: 0,
            title: "安全提示",
            btn: ['确认'    , '取消'],
            offset: ['30%']
        }, function (index) {
            resetPwd();
            layer.close(index);
        });
    }
    $("[data-toggle='tooltip']").tooltip();
});
</script>
</body>
</html>
igds-dzhwk-web/src/main/resources/templates/home.html
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,304 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <title>智慧粮库综合管理平台</title>
    <!-- é¿å…IE使用兼容模式 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link th:href="@{favicon.ico}" rel="shortcut icon"/>
    <link th:href="@{/css/bootstrap.min.css}" rel="stylesheet"/>
    <link th:href="@{/css/jquery.contextMenu.min.css}" rel="stylesheet"/>
    <link th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
    <link th:href="@{/css/animate.min.css}" rel="stylesheet"/>
    <link th:href="@{/css/style.min.css}" rel="stylesheet"/>
    <link th:href="@{/css/skins.css}" rel="stylesheet"/>
    <link th:href="@{/ruoyi/css/ry-ui.css?v=4.7.8}" rel="stylesheet"/>
</head>
<body class="fixed-sidebar full-height-layout gray-bg" th:classappend="${isMobile} ? 'canvas-menu'"
      style="overflow: hidden">
<div id="wrapper">
    <!--左侧导航开始-->
    <nav class="navbar-default navbar-static-side" role="navigation">
        <div class="nav-close">
            <i class="fa fa-times-circle"></i>
        </div>
        <a th:href="@{/dzhwk/index}">
            <li class="logo hidden-xs">
                <span class="logo-lg">电子货位卡系统</span>
            </li>
        </a>
        <div class="sidebar-collapse">
            <ul class="nav" id="side-menu">
                <li>
                    <div class="user-panel">
                        <a class="menuItem noactive" title="个人中心" th:href="@{/system/user/profile}">
                            <div class="hide" th:text="个人中心"></div>
                            <div class="pull-left image">
                                <img th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}"
                                     th:onerror="this.src='img/profile.jpg'" class="img-circle" alt="User Image">
                            </div>
                        </a>
                        <div class="pull-left info">
                            <p>[[${user.loginName}]]</p>
                            <a href="javascript:;"><i class="fa fa-circle text-success"></i> åœ¨çº¿</a>
                            <a th:href="@{logout}" style="padding-left:5px;"><i class="fa fa-sign-out text-danger"></i>
                                æ³¨é”€</a>
                        </div>
                    </div>
                </li>
                <li th:each="menu : ${menus}">
                    <a th:class="@{${!#strings.isEmpty(menu.url) && menu.url != '#'} ? ${menu.target}}"
                       th:href="@{${#strings.isEmpty(menu.url)} ? |#| : ${menu.url}}"
                       th:data-refresh="${menu.isRefresh == '0'}">
                        <i class="fa fa-bar-chart-o" th:class="${menu.icon}"></i>
                        <span class="nav-label" th:text="${menu.menuName}">一级菜单</span>
                        <span th:class="${#strings.isEmpty(menu.url) || menu.url == '#'} ? |fa arrow|"></span>
                    </a>
                    <ul class="nav nav-second-level collapse">
                        <li th:each="cmenu : ${menu.children}">
                            <a th:if="${#lists.isEmpty(cmenu.children)}"
                               th:class="${#strings.isEmpty(cmenu.target)} ? |menuItem| : ${cmenu.target}"
                               th:utext="${cmenu.menuName}" th:href="@{${cmenu.url}}"
                               th:data-refresh="${cmenu.isRefresh == '0'}">二级菜单
                            </a>
                            <a th:if="${not #lists.isEmpty(cmenu.children)}" href="javascript:;">[[${cmenu.menuName}]]
                                <span class="fa arrow"></span>
                            </a>
                            <ul th:if="${not #lists.isEmpty(cmenu.children)}" class="nav nav-third-level">
                                <li th:each="emenu : ${cmenu.children}">
                                    <a th:if="${#lists.isEmpty(emenu.children)}"
                                       th:class="${#strings.isEmpty(emenu.target)} ? |menuItem| : ${emenu.target}"
                                       th:text="${emenu.menuName}" th:href="@{${emenu.url}}"
                                       th:data-refresh="${emenu.isRefresh == '0'}">三级菜单
                                    </a>
                                    <a th:if="${not #lists.isEmpty(emenu.children)}" href="javascript:;">[[${emenu.menuName}]]
                                        <span class="fa arrow"></span>
                                    </a>
                                    <ul th:if="${not #lists.isEmpty(emenu.children)}" class="nav nav-four-level">
                                        <li th:each="fmenu : ${emenu.children}">
                                            <a th:if="${#lists.isEmpty(fmenu.children)}"
                                               th:class="${#strings.isEmpty(fmenu.target)} ? |menuItem| : ${fmenu.target}"
                                               th:text="${fmenu.menuName}" th:href="@{${fmenu.url}}"
                                               th:data-refresh="${fmenu.isRefresh == '0'}">四级菜单
                                            </a>
                                        </li>
                                    </ul>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </li>
            </ul>
        </div>
    </nav>
    <!--左侧导航结束-->
    <!--右侧部分开始-->
    <div id="page-wrapper" class="gray-bg dashbard-1">
        <div class="row border-bottom">
            <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                <div class="navbar-header">
                    <a class="navbar-minimalize minimalize-styl-2" style="color:#FFF;" href="javascript:;"
                       title="收起菜单">
                        <i class="fa fa-bars"></i>
                    </a>
                </div>
                <ul class="nav navbar-top-links navbar-right welcome-message">
                    <li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="开发文档"
                           href="http://doc.ruoyi.vip/ruoyi" target="_blank"><i class="fa fa-question-circle"></i>
                        æ–‡æ¡£</a></li>
                    <li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="锁定屏幕"
                           href="javascript:;" id="lockScreen"><i class="fa fa-lock"></i> é”å±</a></li>
                    <li><a data-toggle="tooltip" data-trigger="hover" data-placement="bottom" title="全屏显示"
                           href="javascript:;" id="fullScreen"><i class="fa fa-arrows-alt"></i> å…¨å±</a></li>
                    <li class="dropdown user-menu">
                        <a href="javascript:void(0)" class="dropdown-toggle" data-hover="dropdown">
                            <img th:src="(${#strings.isEmpty(user.avatar)}) ? @{/img/profile.jpg} : @{${user.avatar}}"
                                 th:onerror="this.src='img/profile.jpg'" class="user-image">
                            <span class="hidden-xs">[[${#strings.defaultString(user.userName, '-')}]]</span>
                        </a>
                        <ul class="dropdown-menu">
                            <li class="mt5">
                                <a th:href="@{/system/user/profile}" class="menuItem noactive">
                                    <i class="fa fa-user"></i> ä¸ªäººä¸­å¿ƒ</a>
                            </li>
                            <li>
                                <a onclick="resetPwd()">
                                    <i class="fa fa-key"></i> ä¿®æ”¹å¯†ç </a>
                            </li>
                            <li>
                                <a onclick="switchSkin()">
                                    <i class="fa fa-dashboard"></i> åˆ‡æ¢ä¸»é¢˜</a>
                            </li>
                            <li>
                                <a onclick="toggleMenu()">
                                    <i class="fa fa-toggle-off"></i> æ¨ªå‘菜单</a>
                            </li>
                            <li class="divider"></li>
                            <li>
                                <a th:href="@{logout}">
                                    <i class="fa fa-sign-out"></i> é€€å‡ºç™»å½•</a>
                            </li>
                        </ul>
                    </li>
                </ul>
            </nav>
        </div>
        <div class="row content-tabs" th:classappend="${#bools.isFalse(tagsView)} ? |hide|">
            <button class="roll-nav roll-left tabLeft">
                <i class="fa fa-backward"></i>
            </button>
            <nav class="page-tabs menuTabs">
                <div class="page-tabs-content">
                    <a href="javascript:;" class="active menuTab" th:data-id="${welcomeUrl}">欢迎</a>
                </div>
            </nav>
            <button class="roll-nav roll-right tabRight">
                <i class="fa fa-forward"></i>
            </button>
            <a href="javascript:void(0);" class="roll-nav roll-right tabReload"><i class="fa fa-refresh"></i> åˆ·æ–°</a>
        </div>
        <a id="ax_close_max" class="ax_close_max" href="javascript:;" title="关闭全屏"> <i
                class="fa fa-times-circle-o"></i>
        </a>
        <div class="row mainContent" id="content-main" th:classappend="${mainClass}">
            <iframe class="RuoYi_iframe" name="iframe0" width="100%" height="100%" th:data-id="${welcomeUrl}"
                    th:src="${welcomeUrl}" frameborder="0" seamless></iframe>
        </div>
        <div th:if="${footer}" class="footer">
            <div class="pull-right">© [[${copyrightYear}]]-[[${support}]]</div>
        </div>
    </div>
    <!--右侧部分结束-->
</div>
<!-- å…¨å±€js -->
<script th:src="@{/js/jquery.min.js}"></script>
<script th:src="@{/js/bootstrap.min.js}"></script>
<script th:src="@{/js/plugins/metisMenu/jquery.metisMenu.js}"></script>
<script th:src="@{/js/plugins/slimscroll/jquery.slimscroll.min.js}"></script>
<script th:src="@{/js/jquery.contextMenu.min.js}"></script>
<script th:src="@{/ajax/libs/blockUI/jquery.blockUI.js}"></script>
<script th:src="@{/ajax/libs/layer-ruoyi/layer.min.js}"></script>
<script th:src="@{/ruoyi/js/ry-ui.js?v=4.7.8}"></script>
<script th:src="@{/ruoyi/js/common.js?v=4.7.8}"></script>
<script th:src="@{/ruoyi/home.js?v=20201208}"></script>
<script th:src="@{/ajax/libs/fullscreen/jquery.fullscreen.js}"></script>
<script th:inline="javascript">
    window.history.forward(1);
    var ctx = [[@{/}]];
    var lockscreen = [[${session.lockscreen}]];
    if (lockscreen) {
        window.top.location = ctx + "lockscreen";
    }
    // çš®è‚¤ç¼“å­˜
    var skin = storage.get("skin");
    // history(表示去掉地址的#)否则地址以"#"形式展示
    var mode = "history";
    // åŽ†å²è®¿é—®è·¯å¾„ç¼“å­˜
    var historyPath = storage.get("historyPath");
    // æ˜¯å¦é¡µç­¾ä¸Žèœå•联动
    var isLinkage = true;
    // æ˜¯å¦é¡µç­¾åˆ‡æ¢æ»šåŠ¨åˆ°é¡¶éƒ¨
    var isScrollToTop = true;
    // æœ¬åœ°ä¸»é¢˜ä¼˜å…ˆï¼Œæœªè®¾ç½®å–系统配置
    if ($.common.isNotEmpty(skin)) {
        $("body").addClass(skin.split('|')[0]);
        $("body").addClass(skin.split('|')[1]);
    } else {
        $("body").addClass([[${sideTheme}]]);
        $("body").addClass([[${skinName}]]);
    }
    /* ç”¨æˆ·ç®¡ç†-重置密码 */
    function resetPwd() {
        var url = ctx + 'system/user/profile/resetPwd';
        $.modal.open("重置密码", url, '770', '380');
    }
    /* åˆ‡æ¢ä¸»é¢˜ */
    function switchSkin() {
        layer.open({
            type: 2,
            shadeClose: true,
            title: "切换主题",
            area: ["530px", "386px"],
            content: [ctx + "system/switchSkin", 'no']
        })
    }
    /* åˆ‡æ¢èœå• */
    function toggleMenu() {
        $.modal.confirm("确认要切换成横向菜单吗?", function () {
            $.get(ctx + 'system/menuStyle/topnav', function (result) {
                window.location.reload();
            });
        })
    }
    /** åˆ·æ–°æ—¶è®¿é—®è·¯å¾„页签 */
    function applyPath(url) {
        $('a[href$="' + decodeURI(url) + '"]').click();
        if (!$('a[href$="' + url + '"]').hasClass("noactive")) {
            $('a[href$="' + url + '"]').parent("li").addClass("selected").parents("li").addClass("active").end().parents("ul").addClass("in");
        }
    }
    $(function () {
        var lockPath = storage.get('lockPath');
        if ($.common.equals("history", mode) && window.performance.navigation.type == 1) {
            var url = storage.get('publicPath');
            if ($.common.isNotEmpty(url)) {
                applyPath(url);
            }
        } else if ($.common.isNotEmpty(lockPath)) {
            applyPath(lockPath);
            storage.remove('lockPath');
        } else {
            var hash = location.hash;
            if ($.common.isNotEmpty(hash)) {
                var url = hash.substring(1, hash.length);
                applyPath(url);
            } else {
                if ($.common.equals("history", mode)) {
                    storage.set('publicPath', "");
                }
            }
        }
        /* åˆå§‹å¯†ç æç¤º */
        if ([[${isDefaultModifyPwd}]]) {
            layer.confirm("您的密码还是初始密码,请修改密码!", {
                icon: 0,
                title: "安全提示",
                btn: ['确认', '取消'],
                offset: ['30%']
            }, function (index) {
                resetPwd();
                layer.close(index);
            });
        }
        /* è¿‡æœŸå¯†ç æç¤º */
        if ([[${isPasswordExpired}]]) {
            layer.confirm("您的密码已过期,请尽快修改密码!", {
                icon: 0,
                title: "安全提示",
                btn: ['确认', '取消'],
                offset: ['30%']
            }, function (index) {
                resetPwd();
                layer.close(index);
            });
        }
        $("[data-toggle='tooltip']").tooltip();
    });
</script>
</body>
</html>