zhangf
2024-05-09 4915493db5013f4e0857ac7127616781732c2d6c
spi统计
已修改3个文件
30 ■■■■■ 文件已修改
emergency/emergency-rpc-provider/src/main/java/com/gkhy/safePlatform/emergency/rpc/provider/EmergencyRpcProvider.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
emergency/emergency-service/src/main/java/com/gkhy/safePlatform/emergency/service/impl/EmergencySuppliesServiceImpl.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
safePlatfrom-out-web/src/main/resources/config/application.yaml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
emergency/emergency-rpc-provider/src/main/java/com/gkhy/safePlatform/emergency/rpc/provider/EmergencyRpcProvider.java
@@ -320,11 +320,12 @@
        ResultVO<List<EmergencySuppliesInfoRPCRespDTO>> result = new ResultVO<>(ResultCodes.OK);
        try{
            List<EmergencySuppliesInfoRespDTO> emergencySupplies = emergencySuppliesService.getEmergencySupplies();
            List<EmergencySuppliesInfoRPCRespDTO> collect = emergencySupplies.stream().map(es -> {
                EmergencySuppliesInfoRPCRespDTO emergencySuppliesInfoRPCRespDTO = new EmergencySuppliesInfoRPCRespDTO();
                BeanUtils.copyProperties(es, emergencySuppliesInfoRPCRespDTO);
                return emergencySuppliesInfoRPCRespDTO;
            }).collect(Collectors.toList());
            List<EmergencySuppliesInfoRPCRespDTO> collect = new ArrayList<>();
            for (EmergencySuppliesInfoRespDTO emergencySupply : emergencySupplies) {
                EmergencySuppliesInfoRPCRespDTO emergencySupplyDTO = new EmergencySuppliesInfoRPCRespDTO();
                BeanUtils.copyProperties(emergencySupply, emergencySupplyDTO);
                collect.add(emergencySupplyDTO);
            }
            result.setData(collect);
        }catch (EmergencyException e){
            result.setCode(e.getCode());
emergency/emergency-service/src/main/java/com/gkhy/safePlatform/emergency/service/impl/EmergencySuppliesServiceImpl.java
@@ -25,6 +25,8 @@
import com.gkhy.safePlatform.emergency.service.EmergencySuppliesService;
import com.gkhy.safePlatform.emergency.service.baseService.*;
import org.apache.dubbo.config.annotation.DubboReference;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -36,6 +38,7 @@
@Service("emergencySuppliesService")
public class EmergencySuppliesServiceImpl implements EmergencySuppliesService {
    private static final Logger log = LoggerFactory.getLogger(EmergencySuppliesServiceImpl.class);
    @Autowired
    private EmergencySuppliesInfoService emergencySuppliesInfoService;
@@ -284,19 +287,21 @@
    public List<EmergencySuppliesInfoRespDTO> getEmergencySupplies(){
        List<EmergencySuppliesInfo> allEmergencySupplies = emergencySuppliesInfoService.getAllEmergencySupplies();
        List<EmergencySuppliesInfoRespDTO> collect = allEmergencySupplies.stream().map(es -> {
        List<EmergencySuppliesInfoRespDTO> collect = new ArrayList<>();
        for (EmergencySuppliesInfo allEmergencySupply : allEmergencySupplies) {
            EmergencySuppliesInfoRespDTO e = new EmergencySuppliesInfoRespDTO();
            BeanUtils.copyProperties(es,e);
            e.setClassificationName(EmergencySuppliesClassificationEnum.getByCode(es.getClassification()).getValue());
            ResultVO<DepInfoRPCRespDTO> rpcResult = accountDepartmentService.getDepInfoByDepId(es.getDepartmentId());
            BeanUtils.copyProperties(allEmergencySupply,e);
            String value = EmergencySuppliesClassificationEnum.getByCode(allEmergencySupply.getClassification()).getValue();
            e.setClassificationName(StringUtils.isEmpty(value) ? "" : value);
            ResultVO<DepInfoRPCRespDTO> rpcResult = accountDepartmentService.getDepInfoByDepId(allEmergencySupply.getDepartmentId());
            if (rpcResult != null && rpcResult.getCode().equals(ResultCodes.OK.getCode())) {
                if (rpcResult.getData() != null) {
                    DepInfoRPCRespDTO dep = (DepInfoRPCRespDTO) rpcResult.getData();
                    e.setDepartmentName(dep.getDepName());
                }
            }
            return e;
        }).collect(Collectors.toList());
            collect.add(e);
        }
        return collect;
    }
safePlatfrom-out-web/src/main/resources/config/application.yaml
@@ -4,7 +4,7 @@
  profiles:
    #active: uat
#### dev out-dev  test  uat  online-uat guotai-demo
     active: dev
     active: guotai-prod
#    active: online-uat   线上预发环境
#    active: dev  本地开发环境
#    active: out-dev  外包对接环境