| | |
| | | import com.baomidou.mybatisplus.extension.conditions.update.LambdaUpdateChainWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.common.base.Result; |
| | | import com.ycl.domain.entity.ProjectPlanExamineRecord; |
| | | import com.ycl.domain.entity.ProjectPlanInfo; |
| | | import com.ycl.domain.entity.ProjectPlanRecord; |
| | | import com.ycl.domain.form.ProjectPlanInfoForm; |
| | |
| | | import com.ycl.domain.vo.ProjectPlanInfoResponseVO; |
| | | import com.ycl.domain.vo.ProjectPlanInfoVO; |
| | | import com.ycl.framework.utils.PageUtil; |
| | | import com.ycl.mapper.ProjectPlanExamineRecordMapper; |
| | | import com.ycl.mapper.ProjectPlanInfoMapper; |
| | | import com.ycl.mapper.ProjectPlanRecordMapper; |
| | | import com.ycl.service.ProjectPlanInfoService; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.Assert; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | |
| | | private final ProjectPlanInfoMapper projectPlanInfoMapper; |
| | | private final ProjectPlanRecordMapper projectPlanRecordMapper; |
| | | private final ProjectPlanExamineRecordMapper projectPlanExamineRecordMapper; |
| | | |
| | | /** |
| | | * 添加 |
| | |
| | | return Result.ok().data(vos); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public Result addPlanInfo(ProjectPlanInfoRequest request) { |
| | | if (request.getAddList() == null || request.getAddList().isEmpty()) {{ |
| | |
| | | .set(ProjectPlanRecord::getActualInvest, request.getActualInvest()) |
| | | .set(ProjectPlanRecord::getReportStatus, 0) |
| | | .update(); |
| | | // 新增一条审核记录 |
| | | ProjectPlanExamineRecord item = new ProjectPlanExamineRecord(); |
| | | item.setProjectPlanRecordId(request.getProjectPlanRecordId().longValue()); |
| | | item.setEventType(0); |
| | | item.setGmtCreate(new Date()); |
| | | list.stream().forEach(i -> { |
| | | item.setProjectPlanInfoId(i.getId().longValue()); |
| | | projectPlanExamineRecordMapper.insertOne(item); |
| | | }); |
| | | return Result.ok("添加成功"); |
| | | } |
| | | |