2022-08-10 | songhuangfeng123 | ![]() |
2022-08-09 | songhuangfeng123 | ![]() |
2022-08-09 | SZH | ![]() |
emergency/emergency-service/src/main/java/com/gkhy/safePlatform/emergency/model/dto/req/EmergencyDrillEvaluationReqDTO.java
@@ -11,6 +11,7 @@ private Long id; // 应急演练实施的id 帮助数据进行筛选 private Long drillExecuteId; private String suitable; emergency/emergency-service/src/main/java/com/gkhy/safePlatform/emergency/service/impl/EmergencyDrillEvaluationServiceImpl.java
@@ -82,7 +82,7 @@ throw new EmergencyException(EmergencyResultCodes.DRILL_EXECUTE_NULL); } else { EmergencyDrillExecuteInfoDetailDO emergencyDrillExecuteInfoDetailDO = emergencyDrillExecuteInfoService.selectEmergencyDrillExecuteById(emergencyDrillEvaluationReqDTO.getDrillExecuteId()); // 判断是否存在该演练计划 // 判断是否存在该演练实施 if (emergencyDrillExecuteInfoDetailDO == null) { throw new EmergencyException(EmergencyResultCodes.DRILL_EXECUTE_NOT_EXIST); } else { @@ -98,7 +98,7 @@ if (!CollectionUtils.isEmpty(emergencyDrillEvaluationReqDTO.getFileList())) { addEmergencyDrillEvaluationFile(uid, emergencyDrillEvaluationInfo.getId(), nowDate, emergencyDrillEvaluationReqDTO.getFileList()); } // 新增急演练计划应急人员表 // 新增急演练实施评价应急人员表 if (!CollectionUtils.isEmpty(emergencyDrillEvaluationReqDTO.getUserList())) { addEmergencyDrillEvaluationUser(uid, emergencyDrillEvaluationInfo.getId(), nowDate, emergencyDrillEvaluationReqDTO.getUserList()); } @@ -194,15 +194,16 @@ } else { EmergencyDrillEvaluationInfo emergencyDrillEvaluationInfo = new EmergencyDrillEvaluationInfo(); BeanUtils.copyProperties(emergencyDrillEvaluationReqDTO, emergencyDrillEvaluationInfo); emergencyDrillEvaluationInfo.setId(emergencyDrillEvaluationInfoDetailDO.getId()); emergencyDrillEvaluationInfo.setUpdateUid(uid); emergencyDrillEvaluationInfo.setGmtModitify(nowDate); emergencyDrillEvaluationInfoService.updateEmergencyDrillEvaluation(emergencyDrillEvaluationInfo); // 更新急演练计划附件表 // 更新急演练实施评价附件表 if (!CollectionUtils.isEmpty(emergencyDrillEvaluationReqDTO.getFileList())) { updateEmergencyDrillEvaluationFile(uid, emergencyDrillEvaluationInfo.getId(), nowDate, emergencyDrillEvaluationReqDTO.getFileList()); } // 更新急演练计划应急队伍表 // 更新急演练实施评价应急队伍表 if (!CollectionUtils.isEmpty(emergencyDrillEvaluationReqDTO.getUserList())) { updateEmergencyDrillEvaluationUser(uid, emergencyDrillEvaluationInfo.getId(), nowDate, emergencyDrillEvaluationReqDTO.getUserList()); } equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/entity/EquipmentInfo.java
@@ -533,5 +533,26 @@ public void setActualDestoryDate(Timestamp actualDestoryDate) { this.actualDestoryDate = actualDestoryDate; } //区域ID/外键 private Long areaId; //区域名称 private String areaName; public Long getAreaId() { return areaId; } public void setAreaId(Long areaId) { this.areaId = areaId; } public String getAreaName() { return areaName; } public void setAreaName(String areaName) { this.areaName = areaName; } } equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/entity/KeypointEquipmentInfo.java
@@ -206,4 +206,14 @@ this.scenePic = scenePic; } //备注 private String memo; public String getMemo() { return memo; } public void setMemo(String memo) { this.memo = memo; } } equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/model/dto/req/EquipmentCheckStandardDetailQueryCriteria.java
@@ -1,6 +1,8 @@ package com.gkhy.safePlatform.equipment.model.dto.req; import java.sql.Timestamp; import com.fasterxml.jackson.annotation.JsonFormat; import com.gkhy.safePlatform.equipment.annotation.Query; public class EquipmentCheckStandardDetailQueryCriteria { @@ -33,9 +35,11 @@ private String rate; //创建日期 @Query() @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp createTime; //更新日期 @Query() @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp updateTime; equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/model/dto/req/EquipmentInfoQueryCriteria.java
@@ -13,6 +13,17 @@ //具体类型(页面左侧的导航栏使用) 0:仪器仪表信息 1:生产设备设施 2:安全设备设施 private Integer infoType; //类型/类别外键 private Integer equipmentTypeId; public Integer getEquipmentTypeId() { return equipmentTypeId; } public void setEquipmentTypeId(Integer equipmentTypeId) { this.equipmentTypeId = equipmentTypeId; } public Integer getInfoType() { return infoType; } equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/model/dto/req/EquipmentInfoSaveOrUpdate.java
@@ -1,5 +1,6 @@ package com.gkhy.safePlatform.equipment.model.dto.req; import com.fasterxml.jackson.annotation.JsonFormat; import com.gkhy.safePlatform.equipment.entity.*; import java.io.Serializable; @@ -26,29 +27,37 @@ private Long departmentId; //设置部位 private String setPart; //生产日期 //生产日期 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp produceTime; //使用期限(天) private String useEndDay; //生命周期 1:已使用 2:库存中 3:报废 private Integer lifeCycle; //投用日期 //投用日期 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp useDate; //维修状态 1:维修中 2:已修好 private Integer repairStatus; //停用状态 1:停用 2.在用 3.维修 4.报废 private Integer stopStatus; //上次检查日期 //上次检查日期 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp previousCheckDate; //上次检测日期 //上次检测日期 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp previousTestDate; //上次保养日期 //上次保养日期 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp previousTakecareDate; //下次检查日期 //下次检查日期 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp nextCheckDate; //下次检测日期 //下次检测日期 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp nextTestDate; //下次保养日期 //下次保养日期 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp nextTakecareDate; //负责人ID外键 private Long leadingPersonId; @@ -88,29 +97,35 @@ private String stopReason; //停用后措施 private String afterStopStep; //实际停用日期 //实际停用日期 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp actualStopDate; //停用提交人/外键 private Long stopSubmitPersonId; //停用提交人名称 private String stopSubmitPersonName; //停用提交日期 //停用提交日期 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp stopSubmitDate; //恢复理由 private String recoveryReason; //恢复填报日期 //恢复填报日期 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp recoverySubmitDate; //实际恢复日期 //实际恢复日期 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp actualRecoveryDate; //报废理由 private String destoryReason; //报废填报日期 //报废填报日期 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp destorySubmitDate; //实际报废日期 //实际报废日期 @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp actualDestoryDate; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp createTime; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp updateTime; //设备保养 @@ -654,4 +669,27 @@ public List<EquipmentCheckStandardDetail> getCheckStandardeDetailList() { return checkStandardeDetailList; } //区域ID/外键 private Long areaId; //区域名称 private String areaName; public Long getAreaId() { return areaId; } public void setAreaId(Long areaId) { this.areaId = areaId; } public String getAreaName() { return areaName; } public void setAreaName(String areaName) { this.areaName = areaName; } } equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/model/dto/req/EquipmentRepairDetailQueryCriteria.java
@@ -1,6 +1,8 @@ package com.gkhy.safePlatform.equipment.model.dto.req; import java.sql.Timestamp; import com.fasterxml.jackson.annotation.JsonFormat; import com.gkhy.safePlatform.equipment.annotation.Query; public class EquipmentRepairDetailQueryCriteria { @@ -18,9 +20,11 @@ private Long repairPersonId; //维修开始日期 @Query() @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp repairStartDate; //维修结束日期 @Query() @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp repairEndDate; //维修负责人单位/外键 @Query() @@ -36,9 +40,11 @@ private String exceptionInfo; //创建日期 @Query() @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp createTime; //更新日期 @Query() @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp updateTime; equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/model/dto/req/EquipmentTakecareDetailQueryCriteria.java
@@ -1,6 +1,8 @@ package com.gkhy.safePlatform.equipment.model.dto.req; import java.sql.Timestamp; import com.fasterxml.jackson.annotation.JsonFormat; import com.gkhy.safePlatform.equipment.annotation.Query; public class EquipmentTakecareDetailQueryCriteria { @@ -21,15 +23,18 @@ private Long leadingPersonId; //保养日期 @Query() @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp takecareDate; //保养负责人单位 @Query() private Long leadingPersonDepartmentId; //创建日期 @Query() @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp createTime; //更新日期 @Query() @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp updateTime; equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/model/dto/req/EquipmentTakecareStardardDetailQueryCriteria.java
@@ -1,6 +1,8 @@ package com.gkhy.safePlatform.equipment.model.dto.req; import java.sql.Timestamp; import com.fasterxml.jackson.annotation.JsonFormat; import com.gkhy.safePlatform.equipment.annotation.Query; public class EquipmentTakecareStardardDetailQueryCriteria { @@ -18,9 +20,11 @@ private String filePath; //创建日期 @Query() @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp createTime; //更新日期 @Query() @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp updateTime; equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/model/dto/req/EquipmentTestDetailQueryCriteria.java
@@ -1,6 +1,8 @@ package com.gkhy.safePlatform.equipment.model.dto.req; import java.sql.Timestamp; import com.fasterxml.jackson.annotation.JsonFormat; import com.gkhy.safePlatform.equipment.annotation.Query; public class EquipmentTestDetailQueryCriteria { @@ -18,6 +20,7 @@ private Long testPersonId; //检测日期 @Query() @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp testDate; //检测人单位/外键 @Query() @@ -33,9 +36,11 @@ private String testStatus; //创建日期 @Query() @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp createTime; //更新日期 @Query() @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp updateTime; equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/model/dto/req/KeypointEquipmentInfoQueryCriteria.java
@@ -14,4 +14,16 @@ public void setName(String name) { this.name = name; } //类型/类别外键 private Integer equipmentTypeId; public Integer getEquipmentTypeId() { return equipmentTypeId; } public void setEquipmentTypeId(Integer equipmentTypeId) { this.equipmentTypeId = equipmentTypeId; } } equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/model/dto/resp/EquipmentInfoDto.java
@@ -12,6 +12,8 @@ private Long id; //类型/类别外键 private Long equipmentTypeId; //类型/类别名称 private String equipmentTypeName; //具体类型(页面左侧的导航栏使用) 0:仪器仪表信息 1:生产设备设施 2:安全设备设施 private Integer infoType; //名称 @@ -138,7 +140,27 @@ private List<EquipmentCheckStandardDetail> checkStandardeDetailList = new ArrayList<>(); //区域ID/外键 private Long areaId; //区域名称 private String areaName; public Long getAreaId() { return areaId; } public void setAreaId(Long areaId) { this.areaId = areaId; } public String getAreaName() { return areaName; } public void setAreaName(String areaName) { this.areaName = areaName; } public List<EquipmentRepairDetail> getRepaireDetailList() { return repaireDetailList; @@ -629,4 +651,12 @@ public void setLeadingDepartmentName(String leadingDepartmentName) { this.leadingDepartmentName = leadingDepartmentName; } public String getEquipmentTypeName() { return equipmentTypeName; } public void setEquipmentTypeName(String equipmentTypeName) { this.equipmentTypeName = equipmentTypeName; } } equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/model/dto/resp/KeypointEquipmentInfoDto.java
@@ -67,6 +67,8 @@ private String checkCycle; //应急预案/外键 private Long emergencePlanId; //应急预案名称 private String emergencePlanName; //主要危险有害因素 private String dangerousElement; //易导致风险 @@ -366,4 +368,23 @@ public void setEquipmentTypeName(String equipmentTypeName) { this.equipmentTypeName = equipmentTypeName; } public String getEmergencePlanName() { return emergencePlanName; } public void setEmergencePlanName(String emergencePlanName) { this.emergencePlanName = emergencePlanName; } //备注 private String memo; public String getMemo() { return memo; } public void setMemo(String memo) { this.memo = memo; } } equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/service/impl/EquipmentInfoServiceImpl.java
@@ -16,6 +16,7 @@ import com.gkhy.safePlatform.equipment.model.dto.req.*; import com.gkhy.safePlatform.equipment.model.dto.resp.EquipmentInfoDto; import com.gkhy.safePlatform.equipment.repository.EquipmentInfoRepository; import com.gkhy.safePlatform.equipment.repository.EquipmentTypeMngRepository; import com.gkhy.safePlatform.equipment.service.*; import com.gkhy.safePlatform.equipment.utils.QueryHelpPlus; import org.apache.dubbo.config.annotation.DubboReference; @@ -56,6 +57,9 @@ @DubboReference(check = false) private AccountDepartmentService accountDepartmentService; @Autowired private EquipmentTypeMngRepository equipmentTypeMngRepository; @Override public ResultVO queryAll(PageQuery<EquipmentInfoQueryCriteria> pageQuery) { @@ -200,6 +204,11 @@ takecareDetailList.forEach(info->{info.setLeadingPersonDepartmentName(depNameMap.get(info.getLeadingPersonDepartmentId()));}); testDetailList.forEach(info->{info.setTestPersonDepartmentName(depNameMap.get(info.getTestPersonDepartmentId()));}); repairDetailList.forEach(info->{info.setRepairPersonDepartmentName(depNameMap.get(info.getRepairPersonDepartmentId()));}); EquipmentTypeMng typeMng = equipmentTypeMngRepository.selectOne(new QueryWrapper<EquipmentTypeMng>().eq("id",infoDto.getEquipmentTypeId())); if(typeMng != null){ infoDto.setEquipmentTypeName(typeMng.getTypeName()); } return infoDto; } equipment/equipment-service/src/main/java/com/gkhy/safePlatform/equipment/service/impl/KeypointEquipmentInfoServiceImpl.java
@@ -219,6 +219,9 @@ if(typeMng != null){ infoDto.setEquipmentTypeName(typeMng.getTypeName()); } // TODO 调用应急预案RPC infoDto.setEmergencePlanName(""); return infoDto; } goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/model/dto/req/ExamineItemQueryCriteria.java
@@ -1,6 +1,8 @@ package com.gkhy.safePlatform.targetDuty.model.dto.req; import java.sql.Timestamp; import com.fasterxml.jackson.annotation.JsonFormat; import com.gkhy.safePlatform.targetDuty.annotation.Query; public class ExamineItemQueryCriteria { @@ -27,9 +29,11 @@ private String memo; @Query() @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp createTime; @Query() @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp updateTime; goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/model/dto/req/TargetDivideDetailQueryCriteria.java
@@ -1,6 +1,8 @@ package com.gkhy.safePlatform.targetDuty.model.dto.req; import java.sql.Timestamp; import com.fasterxml.jackson.annotation.JsonFormat; import com.gkhy.safePlatform.targetDuty.annotation.Query; public class TargetDivideDetailQueryCriteria { @@ -15,6 +17,7 @@ private String value; //制定日期 @Query() @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp makeDate; //责任部门/外键 @Query() @@ -27,9 +30,11 @@ private Long commitPersonId; @Query() @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp createTime; @Query() @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp updateTime; goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/model/dto/req/WorkApproveQueryCriteria.java
@@ -1,6 +1,8 @@ package com.gkhy.safePlatform.targetDuty.model.dto.req; import java.sql.Timestamp; import com.fasterxml.jackson.annotation.JsonFormat; import com.gkhy.safePlatform.targetDuty.annotation.Query; public class WorkApproveQueryCriteria { @@ -28,11 +30,13 @@ //关联业务说明 @Query() private String relateDesc; @Query() @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp createTime; @Query() @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Timestamp updateTime; incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/repository/AccidentExpressCasualtyInfoRepository.java
@@ -18,4 +18,5 @@ void deleteAccidentExpressCasualtyById(@Param("id") Long id); void deleteAccidentExpressCasualtyByAccidentExpressId(@Param("id")Long id); } incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/baseService/AccidentExpressCasualtyInfoService.java
@@ -14,4 +14,6 @@ void addAccidentExpressCasualty(AccidentExpressCasualtyInfo AccidentExpressCasualtyInfo); void deleteAccidentExpressCasualtyById(Long id); void deleteAccidentExpressCasualtyByAccidentExpressId(Long id); } incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/baseService/impl/AccidentExpressCasualtyInfoServiceImpl.java
@@ -32,5 +32,10 @@ accidentExpressCasualtyInfoRepository.deleteAccidentExpressCasualtyById(id); } @Override public void deleteAccidentExpressCasualtyByAccidentExpressId(Long id) { accidentExpressCasualtyInfoRepository.deleteAccidentExpressCasualtyByAccidentExpressId(id); } } incident-manage/incident-manage-service/src/main/java/com/gkhy/safePlatform/incidentManage/service/impl/AccidentExpressServiceImpl.java
@@ -102,7 +102,7 @@ checkRequired(accidentExpressReqDTO); Date nowDate = new Date(); //1.新增应急队伍 //1.新增事故快报 AccidentExpressInfo accidentExpressInfo = new AccidentExpressInfo(); BeanUtils.copyProperties(accidentExpressReqDTO, accidentExpressInfo); accidentExpressInfo.setDelFlag(false); @@ -110,7 +110,7 @@ accidentExpressInfo.setCreateName(uName); accidentExpressInfo.setGmtCreate(nowDate); accidentExpressInfoService.addAccidentExpress(accidentExpressInfo); //2.新增应急队伍附件 //2.新增事故快报附件 if (!CollectionUtils.isEmpty(accidentExpressReqDTO.getFileList())){ addAccidentExpressFile(accidentExpressInfo.getId(),uid,nowDate,accidentExpressReqDTO.getFileList()); } @@ -162,7 +162,7 @@ accidentExpressInfo.setUpdateUid(uid); accidentExpressInfo.setGmtModitify(nowDate); accidentExpressInfoService.updateAccidentExpress(accidentExpressInfo); //修改应急队伍附件 //修改事故快报附件 updateAccidentExpressFile(uid,accidentExpressReqDTO.getId(),nowDate,accidentExpressReqDTO.getFileList()); return new ResultVO(ResultCodes.OK); } @@ -231,6 +231,8 @@ accidentExpressInfoService.deleteAccidentExpressById(id); //删除附件 accidentExpressFileInfoService.deleteAccidentExpressFileByAccidentExpressId(id); //删除伤亡 accidentExpressCasualtyInfoService.deleteAccidentExpressCasualtyByAccidentExpressId(id); } } incident-manage/incident-manage-service/src/main/resources/config/mapper/incidentManage/AccidentExpressCasualtyInfoMapper.xml
@@ -55,4 +55,7 @@ update accident_express_casualty set del_flag = 1 where id = #{id} </update> <update id="deleteAccidentExpressCasualtyByAccidentExpressId"> update accident_express_casualty set del_flag = 1 where accident_express_id = #{id} </update> </mapper> pom.xml
@@ -14,6 +14,10 @@ <module>goal-manage/goal-manage-rpc-provider</module> <module>emergency/emergency-service</module> <module>emergency/emergency-rpc-provider</module> <module>equipment/equipment-service</module> <module>equipment/equipment-rpc-provider</module> <module>incident-manage/incident-manage-service</module> <module>incident-manage/incident-manage-rpc-provider</module> <module>safePlatfrom-out-web</module> </modules> safePlatfrom-out-web/pom.xml
@@ -38,9 +38,14 @@ <artifactId>goal-manage-rpc-provider</artifactId> <version>1.0-SNAPSHOT</version> </dependency> <!-- <dependency>--> <!-- <groupId>com.gkhy.safePlatfrom</groupId>--> <!-- <artifactId>equipment</artifactId>--> <!-- <version>1.0-SNAPSHOT</version>--> <!-- </dependency>--> <dependency> <groupId>com.gkhy.safePlatfrom</groupId> <artifactId>equipment</artifactId> <artifactId>equipment-service</artifactId> <version>1.0-SNAPSHOT</version> </dependency> <dependency> safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/config/security/CorsConfig.java
@@ -1,5 +1,6 @@ package com.gkhy.safePlatform.config.security; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.cors.CorsConfiguration; @@ -8,6 +9,10 @@ @Configuration public class CorsConfig { @Value("${spring.enableCors}") private Boolean enableCors; private CorsConfiguration buildConfig() { CorsConfiguration corsConfiguration = new CorsConfiguration(); // 你需要跨域的地址 注意这里的 127.0.0.1 != localhost @@ -26,7 +31,8 @@ public CorsFilter corsFilter() { UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); //配置 可以访问的地址 source.registerCorsConfiguration("/**", buildConfig()); if(enableCors == true) source.registerCorsConfiguration("/**", buildConfig()); return new CorsFilter(source); } safePlatfrom-out-web/src/main/resources/config/application-dev.yaml
@@ -64,6 +64,9 @@ username: gkhy_safeplatform_out password: 9485uyJHISes09t #是否允许跨域 true:允许;false:不允许 enableCors: true mybatis-plus: configuration: log-impl: org.apache.ibatis.logging.stdout.StdOutImpl safePlatfrom-out-web/src/main/resources/config/application-guotai-demo.yaml
对比新文件 @@ -0,0 +1,129 @@ server: tomcat: uri-encoding: UTF-8 basedir: / port: 16009 servlet: context-path: / # mysql spring: jta: transaction-manager-id: txManager datasource: type: com.alibaba.druid.pool.xa.DruidXADataSource emergency: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.0.52:3306/safeplatform.emergency.guotai?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai &allowPublicKeyRetrieval=true username: gkhy_out_team password: sas@sASDa28 type: com.alibaba.druid.pool.DruidDataSource goalmanage: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.0.52:3306/safeplatform.goalmanage.guotai?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_out_team password: sas@sASDa28 type: com.alibaba.druid.pool.DruidDataSource incidentmanage: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.0.52:3306/safeplatform.incidentmanage.guotai?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_out_team password: sas@sASDa28 type: com.alibaba.druid.pool.DruidDataSource equipment: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.0.52:3306/safeplatform.equipment.guotai?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_out_team password: sas@sASDa28 type: com.alibaba.druid.pool.DruidDataSource redis: host: 192.168.0.52 port: 6377 password: SEF98uvs98dUAUEF90Udssa database: 0 # Redis 数据库号,默认为 0 timeout: 15000 # Redis 连接超时时间,单位:毫秒。 lettuce: pool: max-active: 4 max-idle: 4 # 对应 RedisProperties.Jedis 内部类 jedis: pool: max-active: 4 # 连接池最大连接数,默认为 8 。使用负数表示没有限制 同一时间最大只能执行8条sql语句,每执行一条语句就会建立一个连接 max-idle: 4 # 默认连接数最大空闲的连接数,默认为 8 。使用负数表示没有限制。 min-idle: 0 # 默认连接池最小空闲的连接数,默认为 0 。允许设置 0 和 正数。 max-wait: -1 cloud: nacos: discovery: # server-addr: nacos://121.239.169.27:18848?username=nacos&password=guokehongyu # server-addr: 192.168.0.52:8848?namespace=e07a2454-136b-4498-99eb-09dae3336ebe&username=gkhy_team_safeplatform_dev&password=nacosadmin server-addr: http://192.168.0.52:8848 namespace: aa080ed0-5a7c-480c-8b7a-5a0a8d3c986f username: gkhy_safeplatform_out password: 9485uyJHISes09t enabled: true register-enabled: true config: server-addr: http://192.168.0.52:8848 namespace: aa080ed0-5a7c-480c-8b7a-5a0a8d3c986f username: gkhy_safeplatform_out password: 9485uyJHISes09t #是否允许跨域 true:允许;false:不允许 enableCors: false mybatis-plus: configuration: log-impl: org.apache.ibatis.logging.stdout.StdOutImpl dubbo: registry: protocol: nacos address: nacos://192.168.0.52:8848?namespace=aa080ed0-5a7c-480c-8b7a-5a0a8d3c986f&username=gkhy_safeplatform_out&password=9485uyJHISes09t application: name: gkhy-safeplatform-out-test scan: # 扫描rpc接口定义包 base-packages: com.gkhy.safePlatform protocol: name: dubbo port: 18082 serialization: kryo consumer: # 服务连接超时时间 timeout: 3000 # 取消服务启动检查 check: false rocketmq: name-server: 192.168.0.52:9876 producer: group: gkhy-safeplatform-guotai sendMessageTimeout: 300000 consumer: group: gkhy-safeplatform-guotai topic: demoTopic: gkhy-safeplatform-topic-demo minio: endPoint: 192.168.0.52 port: 9000 accessKey: oddER8eSv211WVG3 secretKey: TeaEh8eWNhBbjCYK3G6cIX2QGYECwo7M secure: false bucketName: safeplatform-dev urlPrefix: http://192.168.0.52/file #用户名 gkhy_team_out_dev #密码 12345678 token: header: Authorization secret: safe666 expiration: 7200 refreshExpiration: 14400 tokenHead: Bearer loginUserHeader: uid safePlatfrom-out-web/src/main/resources/config/application-out-dev.yaml
@@ -70,6 +70,9 @@ username: gkhy_safeplatform_out password: 9485uyJHISes09t #是否允许跨域 true:允许;false:不允许 enableCors: true mybatis-plus: configuration: log-impl: org.apache.ibatis.logging.stdout.StdOutImpl safePlatfrom-out-web/src/main/resources/config/application-prod.yaml
文件已删除 safePlatfrom-out-web/src/main/resources/config/application-test.yaml
@@ -8,14 +8,71 @@ # mysql spring: jta: transaction-manager-id: txManager datasource: one: type: com.alibaba.druid.pool.xa.DruidXADataSource emergency: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.0.52:3306/safeplatform.out.test?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai url: jdbc:mysql://192.168.0.52:3306/safeplatform.emergency.dev?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_dev_out_team password: Adsdf675T6AC7yga type: com.alibaba.druid.pool.DruidDataSource goalmanage: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.0.52:3306/safeplatform.goalmanage.dev?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_dev_out_team password: Adsdf675T6AC7yga type: com.alibaba.druid.pool.DruidDataSource incidentmanage: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.0.52:3306/safeplatform.incidentmanage.dev?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_dev_out_team password: Adsdf675T6AC7yga type: com.alibaba.druid.pool.DruidDataSource equipment: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://192.168.0.52:3306/safeplatform.equipment.dev?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true username: gkhy_dev_out_team password: Adsdf675T6AC7yga type: com.alibaba.druid.pool.DruidDataSource redis: host: 192.168.0.52 port: 6377 password: SEF98uvs98dUAUEF90Udssa database: 0 # Redis 数据库号,默认为 0 timeout: 15000 # Redis 连接超时时间,单位:毫秒。 lettuce: pool: max-active: 4 max-idle: 4 # 对应 RedisProperties.Jedis 内部类 jedis: pool: max-active: 4 # 连接池最大连接数,默认为 8 。使用负数表示没有限制 同一时间最大只能执行8条sql语句,每执行一条语句就会建立一个连接 max-idle: 4 # 默认连接数最大空闲的连接数,默认为 8 。使用负数表示没有限制。 min-idle: 0 # 默认连接池最小空闲的连接数,默认为 0 。允许设置 0 和 正数。 max-wait: -1 cloud: nacos: discovery: # server-addr: nacos://121.239.169.27:18848?username=nacos&password=guokehongyu # server-addr: 192.168.0.52:8848?namespace=e07a2454-136b-4498-99eb-09dae3336ebe&username=gkhy_team_safeplatform_dev&password=nacosadmin server-addr: http://192.168.0.52:8848 namespace: aa080ed0-5a7c-480c-8b7a-5a0a8d3c986f username: gkhy_safeplatform_out password: 9485uyJHISes09t enabled: true register-enabled: true config: server-addr: http://192.168.0.52:8848 namespace: aa080ed0-5a7c-480c-8b7a-5a0a8d3c986f username: gkhy_safeplatform_out password: 9485uyJHISes09t #是否允许跨域 true:允许;false:不允许 enableCors: false mybatis-plus: configuration: @@ -24,15 +81,15 @@ dubbo: registry: protocol: nacos address: nacos://192.168.0.52:8848?namespace=e07a2454-136b-4498-99eb-09dae3336ebe&username=gkhy_safeplatform_out&password=9485uyJHISes09t address: nacos://192.168.0.52:8848?namespace=aa080ed0-5a7c-480c-8b7a-5a0a8d3c986f&username=gkhy_safeplatform_out&password=9485uyJHISes09t application: name: gkhy-safeplatform-account-provider name: gkhy-safeplatform-out-test scan: # 扫描rpc接口定义包 base-packages: com.gkhy.safePlatform protocol: name: dubbo port: 18080 port: 18082 serialization: kryo consumer: # 服务连接超时时间 @@ -40,14 +97,33 @@ # 取消服务启动检查 check: false rocketmq: name-server: 192.168.0.52:9876 producer: group: gkhy-safeplatform-guotai sendMessageTimeout: 300000 consumer: group: gkhy-safeplatform-guotai topic: demoTopic: gkhy-safeplatform-topic-demo minio: endPoint: 192.168.0.52 port: 9001 accessKey: MhLac53T2KD88fwD secretKey: dGcLziFwyKaXuMcug385cfb6iGy61U8q port: 9000 accessKey: oddER8eSv211WVG3 secretKey: TeaEh8eWNhBbjCYK3G6cIX2QGYECwo7M secure: false bucketName: safeplatform-test bucketName: safeplatform-dev urlPrefix: http://192.168.0.52/file #用户名 gkhy_team_out_dev #密码 12345678 token: header: Authorization secret: safe666 expiration: 7200 refreshExpiration: 14400 tokenHead: Bearer loginUserHeader: uid safePlatfrom-out-web/src/main/resources/config/application.yaml
@@ -1,9 +1,9 @@ spring: application: name: gkhy-safeplatform-out name: safeplatform-out profiles: # active: prod active: out-dev # active: test active: guotai-demo #mybatis-plus: # mapper-locations: classpath:config/mapper/**/*.xml