Commit 934262dc authored by limei's avatar limei

安装告知管理

parent fc4e1e60
...@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestParam; ...@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List; import java.util.List;
import java.util.Set;
/** /**
* 安装告知表 Mapper 接口 * 安装告知表 Mapper 接口
...@@ -22,7 +23,7 @@ import java.util.List; ...@@ -22,7 +23,7 @@ import java.util.List;
public interface InstallNoticeMapper extends BaseMapper<InstallNotice> { 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查询一条数据 //根据project_id查询一条数据
InstallNoticeDto selectOneByPid(Long sequenceNbr ); InstallNoticeDto selectOneByPid(Long sequenceNbr );
......
...@@ -32,6 +32,12 @@ ...@@ -32,6 +32,12 @@
<if test="constructionUnit != '' and constructionUnit != null"> <if test="constructionUnit != '' and constructionUnit != null">
and a.construction_unit LIKE concat("%",#{constructionUnit},"%") and a.construction_unit LIKE concat("%",#{constructionUnit},"%")
</if> </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> </where>
</select> </select>
......
...@@ -3,13 +3,16 @@ package com.yeejoin.amos.boot.module.ugp.biz.service.impl; ...@@ -3,13 +3,16 @@ package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; 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.InstallNoticePageDto;
import com.yeejoin.amos.boot.module.ugp.api.dto.ProjectDto; 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.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.mapper.InstallNoticeMapper;
import com.yeejoin.amos.boot.module.ugp.api.service.IInstallNoticeService; 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.api.dto.InstallNoticeDto;
import com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
...@@ -23,8 +26,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper; ...@@ -23,8 +26,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.sql.Wrapper; import java.sql.Wrapper;
import java.util.Date; import java.util.*;
import java.util.List;
/** /**
* 安装告知表服务实现类 * 安装告知表服务实现类
...@@ -43,6 +45,8 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta ...@@ -43,6 +45,8 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
ProjectInitiationServiceImpl projectInitiationServiceImpl; ProjectInitiationServiceImpl projectInitiationServiceImpl;
@Autowired @Autowired
OrgServiceImpl orgServiceImpl; OrgServiceImpl orgServiceImpl;
@Autowired
ProjectResourceServiceImpl projectResourceServiceImpl;
/** /**
* 分页查询 * 分页查询
*/ */
...@@ -61,7 +65,13 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta ...@@ -61,7 +65,13 @@ public class InstallNoticeServiceImpl extends BaseService<InstallNoticeDto,Insta
* 安装告知申请分页查询 * 安装告知申请分页查询
*/ */
public Page<InstallNoticePageDto> installNoticePage(Page<InstallNoticePageDto> page,String name,String constructionUnit) { 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(); List<InstallNoticePageDto> installNoticePageDtos = installNoticePage.getRecords();
for(InstallNoticePageDto installNoticePageDto:installNoticePageDtos){ for(InstallNoticePageDto installNoticePageDto:installNoticePageDtos){
if(!ValidationUtil.isEmpty(installNoticePageDto.getApproved())){ 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