zhangfeng
2023-07-24 58566970404520f7939f1c7b1c601de85af80971
bug修改
已修改2个文件
45 ■■■■ 文件已修改
src/main/java/com/gk/hotwork/Mapper/mybatis/InspectionHiddenDangerMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/hotwork/Service/ServiceImpl/SafetySelfInspectionImpl.java 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/gk/hotwork/Mapper/mybatis/InspectionHiddenDangerMapper.xml
@@ -31,7 +31,7 @@
            and s.inspection_name like concat("%",#{params.inspectionName},"%")
        </if>
        <if test="params.checkedCompanyName != null and params.checkedCompanyName != ''">
            and h.checked_company_name like concat("%",#{params.checkedCompanyName},"%")
            and s.checked_company_name like concat("%",#{params.checkedCompanyName},"%")
        </if>
        <if test="params.flag != null  and params.flag != '' ">
            and s.flag = #{params.flag}
src/main/java/com/gk/hotwork/Service/ServiceImpl/SafetySelfInspectionImpl.java
@@ -79,17 +79,15 @@
        if (CollectionUtils.isNotEmpty(records)){
            DecimalFormat df = new DecimalFormat("0.00%");
            records = records.stream().map((safetySelfInspection) -> {
                if (safetySelfInspection.getStatus() == 2) {
                    Long id = safetySelfInspection.getId();
                    SafetySelfInspectionItemQualifiedCountDO countDO = safetySelfInspectionItemMapper.countQualifiedDataById(id);
                    safetySelfInspection.setUnqualifiedItem(countDO.getItemSum() - countDO.getQualifiedItem());
                    if (countDO != null && countDO.getItemSum() != 0 && countDO.getItemSum() != null) {
                        BigDecimal rate = new BigDecimal(countDO.getQualifiedItem())
                                .divide(new BigDecimal(countDO.getItemSum()), 4, BigDecimal.ROUND_HALF_UP);
                        String qualifiedRate = df.format(rate);
                        safetySelfInspection.setQualifiedRate(qualifiedRate);
                        safetySelfInspection.setItemSum(countDO.getItemSum());
                    }
                Long id = safetySelfInspection.getId();
                SafetySelfInspectionItemQualifiedCountDO countDO = safetySelfInspectionItemMapper.countQualifiedDataById(id);
                safetySelfInspection.setUnqualifiedItem(countDO.getItemSum() - countDO.getQualifiedItem());
                if (countDO != null && countDO.getItemSum() != 0 && countDO.getItemSum() != null) {
                    BigDecimal rate = new BigDecimal(countDO.getQualifiedItem())
                            .divide(new BigDecimal(countDO.getItemSum()), 4, BigDecimal.ROUND_HALF_UP);
                    String qualifiedRate = df.format(rate);
                    safetySelfInspection.setQualifiedRate(qualifiedRate);
                    safetySelfInspection.setItemSum(countDO.getItemSum());
                }
                return safetySelfInspection;
            }).collect(Collectors.toList());
@@ -123,17 +121,15 @@
        if (CollectionUtils.isNotEmpty(records)){
            DecimalFormat df = new DecimalFormat("0.00%");
            records = records.stream().map((safetySelfInspection) -> {
                if (safetySelfInspection.getStatus() == 2) {
                    Long id = safetySelfInspection.getId();
                    SafetySelfInspectionItemQualifiedCountDO countDO = safetySelfInspectionItemMapper.countQualifiedDataById(id);
                    safetySelfInspection.setUnqualifiedItem(countDO.getItemSum() - countDO.getQualifiedItem());
                    if (countDO != null && countDO.getItemSum() != 0 && countDO.getItemSum() != null) {
                        BigDecimal rate = new BigDecimal(countDO.getQualifiedItem())
                                .divide(new BigDecimal(countDO.getItemSum()), 4, BigDecimal.ROUND_HALF_UP);
                        String qualifiedRate = df.format(rate);
                        safetySelfInspection.setQualifiedRate(qualifiedRate);
                        safetySelfInspection.setItemSum(countDO.getItemSum());
                    }
                Long id = safetySelfInspection.getId();
                SafetySelfInspectionItemQualifiedCountDO countDO = safetySelfInspectionItemMapper.countQualifiedDataById(id);
                safetySelfInspection.setUnqualifiedItem(countDO.getItemSum() - countDO.getQualifiedItem());
                if (countDO != null && countDO.getItemSum() != 0 && countDO.getItemSum() != null) {
                    BigDecimal rate = new BigDecimal(countDO.getQualifiedItem())
                            .divide(new BigDecimal(countDO.getItemSum()), 4, BigDecimal.ROUND_HALF_UP);
                    String qualifiedRate = df.format(rate);
                    safetySelfInspection.setQualifiedRate(qualifiedRate);
                    safetySelfInspection.setItemSum(countDO.getItemSum());
                }
                return safetySelfInspection;
            }).collect(Collectors.toList());
@@ -324,6 +320,7 @@
     * @param param
     * @param user
     */
    @Transactional
    @Override
    public void addSupervise(SafetySelfInspection param, UserInfo user) {
        requiredSuperviseVerification(param);
@@ -459,6 +456,7 @@
    /**
     * @Description: 删除
     */
    @Transactional
    @Override
    public void delOne(Long id, UserInfo user) {
        selectVerification(id);
@@ -695,6 +693,7 @@
        return safetySelfInspectionItem;
    }
    @Transactional
    @Override
    public void modItemInfo(SafetySelfInspectionItem param, UserInfo user) {