fuliqi
2024-11-29 363cf83f55c886bacb8ccab451071442a3313e67
business/src/main/java/com/ycl/service/impl/ProjectPlanExamineRecordServiceImpl.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper;
import com.ycl.common.utils.SecurityUtils;
import com.ycl.domain.entity.ProjectPlanExamineRecord;
import com.ycl.domain.vo.DepartmentApprovalResponseVO;
import com.ycl.mapper.ProjectPlanExamineRecordMapper;
@@ -132,15 +133,27 @@
        return Result.ok().data(vo);
    }
    /**
     * 回复审批事项
     * @param form
     * @return
     */
    @Override
    public Result replyDepartmentApproval(ProjectPlanExamineRecordForm form) {
        baseMapper.updateByForm(form);
//        new LambdaUpdateChainWrapper<>(baseMapper)
//               .eq(ProjectPlanExamineRecord::getId, form.getId())
//                .set(ProjectPlanExamineRecord::getDepartmentApprovalReply,form.getDepartmentApprovalReply())
//                .set(ProjectPlanExamineRecord::getManageApprovalReply, form.getManageApprovalReply())
//                .set(ProjectPlanExamineRecord::getGmtUpdate ,new Date())
//                .update();
    public Result replyExamine(ProjectPlanExamineRecordForm form) {
        ProjectPlanExamineRecord projectPlanExamineRecord = ProjectPlanExamineRecordForm.getEntityByForm(form, null);
        projectPlanExamineRecord.setId(form.getId().longValue());
        projectPlanExamineRecord.setDepartmentUserId(SecurityUtils.getUserId());
        projectPlanExamineRecord.setManagerUserId(SecurityUtils.getUserId());
        baseMapper.updateById(projectPlanExamineRecord);
        return Result.ok("回复成功");
    }
    @Override
    public Result saveExamine(ProjectPlanExamineRecordForm form) {
        ProjectPlanExamineRecord projectPlanExamineRecord = ProjectPlanExamineRecordForm.getEntityByForm(form, null);
        projectPlanExamineRecord.setDepartmentUserId(SecurityUtils.getUserId());
        projectPlanExamineRecord.setManagerUserId(SecurityUtils.getUserId());
        baseMapper.updateById(projectPlanExamineRecord);
        return Result.ok("回复成功");
    }
}