| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ycl.common.base.Result; |
| | | import com.ycl.domain.entity.File; |
| | | import com.ycl.domain.entity.ProjectInfo; |
| | | import com.ycl.domain.form.ProjectInfoForm; |
| | | import com.ycl.domain.query.ProjectInfoQuery; |
| | | import com.ycl.domain.vo.ProjectInfoVO; |
| | | import com.ycl.domain.vo.*; |
| | | import com.ycl.framework.utils.PageUtil; |
| | | import com.ycl.mapper.ProjectInfoMapper; |
| | | import com.ycl.service.ProjectInfoService; |
| | | 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.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | |
| | | /** |
| | | * 添加 |
| | | * |
| | | * @param form |
| | | * @return |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public Result add(ProjectInfoForm form) { |
| | | //添加基本信息 |
| | | ProjectInfo entity = ProjectInfoForm.getEntityByForm(form, null); |
| | | baseMapper.insert(entity); |
| | | // baseMapper.insert(entity); |
| | | //添加文件 |
| | | List<File> fileList = form.getFileList(); |
| | | |
| | | return Result.ok("添加成功"); |
| | | } |
| | | |
| | | /** |
| | | * 修改 |
| | | * |
| | | * @param form |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 批量删除 |
| | | * |
| | | * @param ids |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * id删除 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 根据id查找 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 列表 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | .collect(Collectors.toList()); |
| | | return Result.ok().data(vos); |
| | | } |
| | | |
| | | @Override |
| | | public IndexCountVO getIndexCount(IndexDTO indexDTO) { |
| | | // {"proPhaseCountVO":[{"type":"储备规划阶段","count":0,"amount":"0.00","text":"储"}, |
| | | // {"type":"项目前期阶段","count":0,"amount":"0.00","text":"新"}, |
| | | // {"type":"实施阶段","count":0,"amount":"0.00","text":"建"},{"type":"竣工投用阶段","count":0,"amount":"0.00","text":"竣"}], |
| | | // "impTypeCountVO":[{"type":"一般项目","count":0,"amount":"0.00","text":"普"}, |
| | | // {"type":"县重点项目","count":0,"amount":"0.00","text":"县"},{"type":"市重点项目","count":0,"amount":"0.00","text":"市"}, |
| | | // {"type":"省重点项目","count":0,"amount":"0.00","text":"省"}]}} |
| | | IndexCountVO indexCountVO = new IndexCountVO(); |
| | | List<IndexProPhaseCountVO> proPhaseCountVO = new ArrayList<>(); |
| | | proPhaseCountVO.add(new IndexProPhaseCountVO("储备规划阶段", 0, "0.00", "储")); |
| | | proPhaseCountVO.add(new IndexProPhaseCountVO("项目前期阶段", 0, "0.00", "新")); |
| | | proPhaseCountVO.add(new IndexProPhaseCountVO("实施阶段", 0, "0.00", "建")); |
| | | proPhaseCountVO.add(new IndexProPhaseCountVO("竣工投用阶段", 0, "0.00", "竣")); |
| | | List<IndexImpTypeCountVO> impTypeCountVO = new ArrayList<>(); |
| | | impTypeCountVO.add(new IndexImpTypeCountVO("一般项目", 0, "0.00", "普")); |
| | | impTypeCountVO.add(new IndexImpTypeCountVO("县重点项目", 0, "0.00", "县")); |
| | | impTypeCountVO.add(new IndexImpTypeCountVO("市重点项目", 0, "0.00", "市")); |
| | | impTypeCountVO.add(new IndexImpTypeCountVO("省重点项目", 0, "0.00", "省")); |
| | | indexCountVO.setImpTypeCountVO(impTypeCountVO); |
| | | indexCountVO.setProPhaseCountVO(proPhaseCountVO); |
| | | |
| | | |
| | | return indexCountVO; |
| | | } |
| | | |
| | | @Override |
| | | public Map<String, Integer> countExceptionProject(IndexDTO indexDTO) { |
| | | Map<String, Integer> map = new HashMap<>(); |
| | | map.put("processExceptionProject", 0); |
| | | return map; |
| | | } |
| | | } |