songhuangfeng123
2022-09-01 b854d8d7604329dcf99584d15f83ff02076d9e07
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);
@@ -118,7 +122,15 @@
            return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL);
        }
        List<Long> idList = Arrays.asList(ids);
        this.rewardPunishmentDetailService.removeByIds(idList);
        List<RewardPunishmentDetail> delList = new ArrayList<>();
        idList.forEach(f->{
            RewardPunishmentDetail info = new RewardPunishmentDetail();
            info.setDelFlag(1);
            info.setId(f);
            delList.add(info);
        });
        this.rewardPunishmentDetailService.updateBatchById(delList);
        return new ResultVO<>(ResultCodes.OK);
    }