Commit 934262dc authored by limei's avatar limei

安装告知管理

parent fc4e1e60
......@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
import java.util.Set;
/**
* 安装告知表 Mapper 接口
......@@ -22,7 +23,7 @@ import java.util.List;
public interface InstallNoticeMapper extends BaseMapper<InstallNotice> {
//安装告知申请页面分页列表
Page<InstallNoticePageDto> installNoticePage(IPage<InstallNoticePageDto> page,@RequestParam String name,@RequestParam String constructionUnit);
Page<InstallNoticePageDto> installNoticePage(IPage<InstallNoticePageDto> page, @RequestParam String name, @RequestParam String constructionUnit, Set<String> ids);
//根据project_id查询一条数据
InstallNoticeDto selectOneByPid(Long sequenceNbr );
......
......@@ -32,6 +32,12 @@
<if test="constructionUnit != '' and constructionUnit != null">
and a.construction_unit LIKE concat("%",#{constructionUnit},"%")
</if>
<if test="ids != null" >
and tz_ugp_install_notice.project_id in
<foreach collection="ids" item = "item" index="index" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</where>
</select>
......
......@@ -3,13 +3,16 @@ package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticePageDto;
import com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto;
import com.yeejoin.amos.boot.module.ugp.api.entity.InstallNotice;
import com.yeejoin.amos.boot.module.ugp.api.entity.Project;
import com.yeejoin.amos.boot.module.ugp.api.mapper.InstallNoticeMapper;
import com.yeejoin.amos.boot.module.ugp.api.service.IInstallNoticeService;
import com.yeejoin.amos.boot.module.ugp.api.dto.InstallNoticeDto;
import com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -23,8 +26,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.sql.Wrapper;
import java.util.Date;
import java.util.List;
import java.util.*;
/**
* 安装告知表服务实现类
......@@ -43,6 +45,8 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
ProjectInitiationServiceImpl projectInitiationServiceImpl;
@Autowired
OrgServiceImpl orgServiceImpl;
@Autowired
ProjectResourceServiceImpl projectResourceServiceImpl;
/**
* 分页查询
*/
......@@ -61,7 +65,13 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
* 安装告知申请分页查询
*/
public Page<InstallNoticePageDto> installNoticePage(Page<InstallNoticePageDto> page,String name,String constructionUnit) {
Page<InstallNoticePageDto> installNoticePage = installNoticeMapper.installNoticePage(page,name,constructionUnit);
List<Project> projectList = projectResourceServiceImpl.getProjectList();
Set<String> ids = new HashSet<>();
for(Project project : projectList){
String id = String.valueOf(project.getSequenceNbr());
ids.add(id);
}
Page<InstallNoticePageDto> installNoticePage = installNoticeMapper.installNoticePage(page,name,constructionUnit,ids);
List<InstallNoticePageDto> installNoticePageDtos = installNoticePage.getRecords();
for(InstallNoticePageDto installNoticePageDto:installNoticePageDtos){
if(!ValidationUtil.isEmpty(installNoticePageDto.getApproved())){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment