fix
songhuangfeng123
2022-08-11 b42343b1a168cdcc9215b1bec1128ad73901c35e
fix
已修改10个文件
72 ■■■■■ 文件已修改
emergency/emergency-service/src/main/java/com/gkhy/safePlatform/emergency/enums/ApproveStatus.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/RewardPunishmentDetailController.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/enums/TargetDutyResultCodes.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/model/dto/resp/ExamineMngDto.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/model/dto/resp/RewardPunishmentDetailDto.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/RewardPunishmentDetailService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/impl/ExamineMngServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/impl/RewardPunishmentDetailServiceImpl.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/impl/TargetMngServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/minioFile/service/MinioAccessService.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
emergency/emergency-service/src/main/java/com/gkhy/safePlatform/emergency/enums/ApproveStatus.java
@@ -2,7 +2,7 @@
public enum ApproveStatus {
    // 应急物资
    // 应急预案
    EMERGENCY(1);
    private Integer status;
goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/controller/RewardPunishmentDetailController.java
@@ -7,7 +7,9 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gkhy.safePlatform.commons.utils.BeanCopyUtils;
import com.gkhy.safePlatform.targetDuty.entity.RewardPunishmentDetail;
import com.gkhy.safePlatform.targetDuty.model.dto.resp.ExamineMngDto;
import com.gkhy.safePlatform.targetDuty.model.dto.resp.ExamineTemplateDto;
import com.gkhy.safePlatform.targetDuty.model.dto.resp.RewardPunishmentDetailDto;
import com.gkhy.safePlatform.targetDuty.model.dto.resp.RewardPunishmentDetailExcel;
import com.gkhy.safePlatform.targetDuty.service.RewardPunishmentDetailService;
import com.gkhy.safePlatform.targetDuty.utils.DateUtils;
@@ -71,7 +73,8 @@
     */
    @GetMapping(value = "/selectOne/{id}")
    public ResultVO selectOne(@PathVariable Serializable id) {
        return new ResultVO<>(ResultCodes.OK,this.rewardPunishmentDetailService.getById(id));
        RewardPunishmentDetailDto mngDto = this.rewardPunishmentDetailService.selectOne(id);
        return new ResultVO<>(ResultCodes.OK,mngDto);
    }
    /**
@@ -99,6 +102,7 @@
//            list.add(new1);
//        });
        if (rewardPunishmentDetail.getId() == null) {
            rewardPunishmentDetail.setCreateTime(new Date());
            return new ResultVO<>(ResultCodes.OK,rewardPunishmentDetailService.save(rewardPunishmentDetail));
        } else {
            rewardPunishmentDetailService.updateById(rewardPunishmentDetail);
goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/enums/TargetDutyResultCodes.java
@@ -4,6 +4,15 @@
    E1("T1001" , "关联的目标指标不存在"),
    E2("T1002" , "关联的目标指标已被分解"),
    APPROVE_RELATE_ID_NULL("A1001","审批业务类型不可为空"),
    APPROVE_RELATE_TYPE_NULL("A1002","审批业务对象不可为空"),
    APPROVE_PERSON_NULL("A1003","审批人不可为空"),
    APPROVE_STATUS_NULL("A1004","审批状态不可为空"),
    APPROVE_NOT_EXIST("A1005" , "审批记录不存在"),
    ERROR("A3000", "未知错误");
    private String code;
goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/model/dto/resp/ExamineMngDto.java
@@ -12,6 +12,8 @@
    private Long id;
    //绩效考核模板ID/外键    
    private Long examineTemplateId;
    //绩效考核模板名称
    private String examineTemplateName;
    //考核标题    
    private String title;
    //考核项目    
@@ -222,4 +224,12 @@
    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }
    public String getExamineTemplateName() {
        return examineTemplateName;
    }
    public void setExamineTemplateName(String examineTemplateName) {
        this.examineTemplateName = examineTemplateName;
    }
}
goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/model/dto/resp/RewardPunishmentDetailDto.java
@@ -13,6 +13,8 @@
    private Long id;
    //奖惩标准/外键    
    private Long rewardPunishmentStandardId;
    //奖惩标准名称
    private String rewardPunishmentStandardName;
    //员工(多个用逗号隔开)    
    private String personId;
    //被奖惩者
@@ -101,4 +103,8 @@
    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }
    public void setRewardPunishmentStandardName(String rewardPunishmentStandardName) {
        this.rewardPunishmentStandardName = rewardPunishmentStandardName;
    }
}
goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/RewardPunishmentDetailService.java
@@ -5,7 +5,9 @@
import com.gkhy.safePlatform.commons.vo.ResultVO;
import com.gkhy.safePlatform.commons.query.PageQuery;
import com.gkhy.safePlatform.targetDuty.model.dto.req.RewardPunishmentDetailQueryCriteria;
import com.gkhy.safePlatform.targetDuty.model.dto.resp.RewardPunishmentDetailDto;
import java.io.Serializable;
import java.util.List;
@@ -21,4 +23,6 @@
    List<RewardPunishmentDetail> queryAll(RewardPunishmentDetailQueryCriteria criteria);
    List<RewardPunishmentDetail> queryAllRelation(RewardPunishmentDetailQueryCriteria criteria);
    RewardPunishmentDetailDto selectOne(Serializable id);
}
goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/impl/ExamineMngServiceImpl.java
@@ -133,7 +133,9 @@
        ExamineTemplate examineTemplate = examineTemplateRepository.selectOne(new QueryWrapper<ExamineTemplate>().eq("id",examineMng.getExamineTemplateId()));
        if(examineTemplate != null){
            dto.setAcceptanceNumber(examineTemplate.getAcceptanceNumber());
            dto.setExamineTemplateName(examineTemplate.getTitle());
        }
        return dto;
    }
}
goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/impl/RewardPunishmentDetailServiceImpl.java
@@ -1,10 +1,16 @@
package com.gkhy.safePlatform.targetDuty.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gkhy.safePlatform.targetDuty.entity.ExamineMng;
import com.gkhy.safePlatform.targetDuty.entity.ExamineTemplate;
import com.gkhy.safePlatform.targetDuty.entity.RewardPunishmentStandard;
import com.gkhy.safePlatform.targetDuty.model.dto.resp.ExamineMngDto;
import com.gkhy.safePlatform.targetDuty.repository.RewardPunishmentDetailRepository;
import com.gkhy.safePlatform.targetDuty.entity.RewardPunishmentDetail;
import com.gkhy.safePlatform.targetDuty.repository.RewardPunishmentStandardRepository;
import com.gkhy.safePlatform.targetDuty.service.RewardPunishmentDetailService;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
@@ -17,6 +23,7 @@
import com.gkhy.safePlatform.targetDuty.utils.QueryHelpPlus;
import com.gkhy.safePlatform.commons.utils.BeanCopyUtils;
import java.io.Serializable;
import java.util.List;
/**
@@ -30,7 +37,9 @@
    @Autowired
    private RewardPunishmentDetailRepository rewardPunishmentDetailRepository;
    @Autowired
    private RewardPunishmentStandardRepository rewardPunishmentStandardRepository;
    
    
    @Override
@@ -64,4 +73,18 @@
    public List<RewardPunishmentDetail> queryAllRelation(RewardPunishmentDetailQueryCriteria criteria) {
        return baseMapper.queryAll(criteria.getPersonId());
    }
    @Override
    public RewardPunishmentDetailDto selectOne(Serializable id) {
        RewardPunishmentDetail info = this.getById(id);
        if(info == null){
            return null;
        }
        RewardPunishmentDetailDto dto = BeanCopyUtils.copyBean(info, RewardPunishmentDetailDto.class);
        RewardPunishmentStandard standard = rewardPunishmentStandardRepository.selectOne(new QueryWrapper<RewardPunishmentStandard>().eq("id",dto.getRewardPunishmentStandardId()));
        dto.setRewardPunishmentStandardName(standard.getqName());
        return dto;
    }
}
goal-manage/goal-manage-service/src/main/java/com/gkhy/safePlatform/targetDuty/service/impl/TargetMngServiceImpl.java
@@ -13,7 +13,6 @@
import com.gkhy.safePlatform.targetDuty.service.CommonService;
import com.gkhy.safePlatform.targetDuty.service.TargetDivideDetailService;
import com.gkhy.safePlatform.targetDuty.service.TargetMngService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import com.gkhy.safePlatform.commons.enums.ResultCodes;
safePlatfrom-out-web/src/main/java/com/gkhy/safePlatform/minioFile/service/MinioAccessService.java
@@ -56,10 +56,12 @@
        return url;
    }
    public String getPresignUrl(String prefixName ,String suffixName){
    public Map<String, String> getPresignUrl(String prefixName ,String suffixName){
        String  uuid= UUIDUtil.initUUID();
        String objName = prefixName+uuid+suffixName;
        String url = null;
        Map<String,String> resMap = new HashMap<>();
        resMap.put("fileName",objName);
        try {
            Map<String, String> reqParams = new HashMap<>();
            reqParams.put("response-content-type", "application/json");
@@ -70,6 +72,7 @@
                    .expiry(60*2)
                    .extraQueryParams(reqParams)
                    .build());
            resMap.put("uploadUrl",url);
        } catch (ErrorResponseException e) {
            e.printStackTrace();
        } catch (InsufficientDataException e) {
@@ -89,7 +92,7 @@
        } catch (ServerException e) {
            e.printStackTrace();
        }
        return url;
        return resMap;
    }