7 changed files with 2640 additions and 0 deletions
@ -0,0 +1,62 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
// 查询初步设计管理列表
|
||||
|
export function listProDesign(query) { |
||||
|
return request({ |
||||
|
url: '/earlyStage/detailDesign/list', |
||||
|
method: 'post', |
||||
|
data: query |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
// 查询初步设计管理详细
|
||||
|
export function getProDesign(id) { |
||||
|
return request({ |
||||
|
url: '/earlyStage/detailDesign/' + id, |
||||
|
method: 'get' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
export function getByCode(projectCode){ |
||||
|
return request({ |
||||
|
url:'/earlyStage/detailDesign/getByNo/'+projectCode, |
||||
|
method:'get' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 新增初步设计管理
|
||||
|
export function addProDesign(data) { |
||||
|
return request({ |
||||
|
url: '/earlyStage/detailDesign', |
||||
|
method: 'post', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 修改初步设计管理
|
||||
|
export function updateProDesign(data) { |
||||
|
return request({ |
||||
|
url: '/earlyStage/detailDesign', |
||||
|
method: 'put', |
||||
|
data: data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 删除初步设计管理
|
||||
|
export function delProDesign(id) { |
||||
|
return request({ |
||||
|
url: '/earlyStage/detailDesign/' + id, |
||||
|
method: 'delete' |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
// 导出初步设计管理
|
||||
|
export function exportProDesign(query) { |
||||
|
return request({ |
||||
|
url: '/earlyStage/detailDesign/export', |
||||
|
method: 'get', |
||||
|
params: query |
||||
|
}) |
||||
|
} |
File diff suppressed because it is too large
@ -0,0 +1,166 @@ |
|||||
|
package com.kms.earlyStage.controller; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.Arrays; |
||||
|
import java.util.List; |
||||
|
|
||||
|
import cn.hutool.core.util.ObjectUtil; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||
|
import com.jianwei.common.core.controller.BaseController; |
||||
|
import com.jianwei.common.core.domain.SearchParam; |
||||
|
import com.jianwei.common.core.domain.entity.SysDept; |
||||
|
import com.jianwei.common.core.domain.entity.SysUser; |
||||
|
import com.jianwei.common.utils.StringUtils; |
||||
|
import com.jianwei.common.utils.poi.ExcelUtil; |
||||
|
import com.kms.common.utils.BaseEntityUtils; |
||||
|
|
||||
|
|
||||
|
import com.kms.common.utils.UserUtils; |
||||
|
import com.kms.earlyStage.domain.SpecialProjectFeasibility; |
||||
|
import com.kms.earlyStage.domain.SpecialProjectProposal; |
||||
|
import com.kms.earlyStage.service.SpecialProjectProposalService; |
||||
|
import com.kms.system.domain.SysXzqh; |
||||
|
import com.kms.system.service.SysDeptService; |
||||
|
import com.kms.system.service.SysXzqhService; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.web.bind.annotation.GetMapping; |
||||
|
import org.springframework.web.bind.annotation.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.PutMapping; |
||||
|
import org.springframework.web.bind.annotation.DeleteMapping; |
||||
|
import org.springframework.web.bind.annotation.PathVariable; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.jianwei.common.mybaitsplus.BeanToWrapper; |
||||
|
|
||||
|
import com.jianwei.common.annotation.Log; |
||||
|
import com.jianwei.common.core.domain.AjaxResult; |
||||
|
import com.jianwei.common.enums.BusinessType; |
||||
|
import com.kms.earlyStage.domain.SpecialProjectDetailDesign; |
||||
|
import com.kms.earlyStage.service.SpecialProjectDetailDesignService; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 初步设计管理Controller |
||||
|
* |
||||
|
* @author kms |
||||
|
* @date 2023-09-18 |
||||
|
*/ |
||||
|
@RestController |
||||
|
@RequestMapping("/earlyStage/detailDesign") |
||||
|
@Api(tags = "初步设计管理") |
||||
|
public class SpecialProjectDetailDesignController extends BaseController |
||||
|
{ |
||||
|
@Autowired |
||||
|
private SpecialProjectDetailDesignService specialProjectDetailDesignService; |
||||
|
|
||||
|
|
||||
|
@Autowired |
||||
|
private SpecialProjectProposalService specialProjectProposalService; |
||||
|
|
||||
|
@Autowired |
||||
|
private SysDeptService sysDeptService; |
||||
|
|
||||
|
@Autowired |
||||
|
private SysXzqhService sysXzqhService; |
||||
|
|
||||
|
/** |
||||
|
* 查询初步设计管理列表 |
||||
|
*/ |
||||
|
@PostMapping("/list") |
||||
|
@ApiOperation("初步设计管理列表") |
||||
|
public IPage list(@RequestBody SearchParam<SpecialProjectDetailDesign> sp) |
||||
|
{ |
||||
|
IPage iPage = specialProjectDetailDesignService.selectPage(sp); |
||||
|
|
||||
|
return iPage; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出初步设计管理列表 |
||||
|
*/ |
||||
|
@Log(title = "初步设计管理导出", businessType = BusinessType.EXPORT) |
||||
|
@PostMapping("/export") |
||||
|
@ApiOperation("初步设计管理导出") |
||||
|
public AjaxResult export(@RequestBody SpecialProjectDetailDesign specialProjectDetailDesign) |
||||
|
{ |
||||
|
List<SpecialProjectDetailDesign> list = specialProjectDetailDesignService.listByIds(specialProjectDetailDesign.getIds()); |
||||
|
ExcelUtil<SpecialProjectDetailDesign> util = new ExcelUtil<>(SpecialProjectDetailDesign.class); |
||||
|
return util.exportExcel(list, "detailDesign"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取初步设计管理详细信息 |
||||
|
*/ |
||||
|
@ApiOperation(" 初步设计管理详情") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
public AjaxResult getInfo(@PathVariable("id") String id) |
||||
|
{ |
||||
|
SpecialProjectDetailDesign byId = specialProjectDetailDesignService.getById(id); |
||||
|
if (ObjectUtil.isEmpty(byId)){ |
||||
|
return AjaxResult.success(); |
||||
|
} |
||||
|
SpecialProjectProposal one = specialProjectProposalService.getOne(Wrappers.lambdaQuery(SpecialProjectProposal.class) |
||||
|
.eq(SpecialProjectProposal::getProjectCode, byId.getProjectCode()) |
||||
|
.eq(SpecialProjectProposal::getProNo, byId.getProNo())); |
||||
|
if (StringUtils.isEmpty(byId.getAdcd())||StringUtils.isEmpty(byId.getProjectName())){ |
||||
|
if (ObjectUtil.isNotEmpty(one)) { |
||||
|
byId.setProjectName(one.getProjectName()); |
||||
|
byId.setAdcd(one.getAdcd()); |
||||
|
} |
||||
|
} |
||||
|
return AjaxResult.success(byId); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 新增初步设计管理 |
||||
|
*/ |
||||
|
@Log(title = "初步设计管理新增", businessType = BusinessType.INSERT) |
||||
|
@PostMapping |
||||
|
@ApiOperation("初步设计管理新增") |
||||
|
public AjaxResult add(@RequestBody SpecialProjectDetailDesign specialProjectDetailDesign) |
||||
|
{ |
||||
|
BaseEntityUtils.preInsert(specialProjectDetailDesign); |
||||
|
return toAjax(specialProjectDetailDesignService.save(specialProjectDetailDesign)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改初步设计管理 |
||||
|
*/ |
||||
|
@ApiOperation("初步设计管理修改") |
||||
|
@Log(title = "初步设计管理修改", businessType = BusinessType.UPDATE) |
||||
|
@PutMapping |
||||
|
public AjaxResult edit(@RequestBody SpecialProjectDetailDesign specialProjectDetailDesign) |
||||
|
{ |
||||
|
return toAjax(specialProjectDetailDesignService.updateById(specialProjectDetailDesign)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除初步设计管理 |
||||
|
*/ |
||||
|
@ApiOperation("初步设计管理删除") |
||||
|
@Log(title = "初步设计管理删除", businessType = BusinessType.DELETE) |
||||
|
@DeleteMapping("/{ids}") |
||||
|
public AjaxResult remove(@PathVariable String[] ids) |
||||
|
{ |
||||
|
return toAjax(specialProjectDetailDesignService.removeByIds(Arrays.asList(ids))); |
||||
|
} |
||||
|
|
||||
|
@GetMapping(value = "getByNo/{projectCode}") |
||||
|
public AjaxResult getInfoByProNo(@PathVariable("projectCode")String projectCode){ |
||||
|
LambdaQueryWrapper<SpecialProjectDetailDesign> lw=new LambdaQueryWrapper<>(); |
||||
|
SpecialProjectDetailDesign one = specialProjectDetailDesignService.getOne(lw.eq( |
||||
|
SpecialProjectDetailDesign::getProjectCode, projectCode |
||||
|
)); |
||||
|
SpecialProjectDetailDesign byNo= one; |
||||
|
return AjaxResult.success(byNo); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,132 @@ |
|||||
|
package com.kms.earlyStage.domain; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableField; |
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import com.kms.build.domain.BsSgcJsjdBuiSectionInfo; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import org.apache.commons.lang3.builder.ToStringBuilder; |
||||
|
import org.apache.commons.lang3.builder.ToStringStyle; |
||||
|
import com.jianwei.common.annotation.Excel; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
|
||||
|
|
||||
|
import com.jianwei.common.core.domain.BaseEntity; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 初步设计管理对象 bs_sgc_qqjd_spe_pro_des_app |
||||
|
* |
||||
|
* @author kms |
||||
|
* @date 2023-09-18 |
||||
|
*/ |
||||
|
@TableName("bs_sgc_qqjd_spe_det_des_app") |
||||
|
@Data |
||||
|
@ApiModel("初步设计管理") |
||||
|
public class SpecialProjectDetailDesign extends BaseEntity |
||||
|
{ |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** 项目名称 */ |
||||
|
@Excel(name = "项目名称") |
||||
|
@ApiModelProperty("项目名称") |
||||
|
private String projectName; |
||||
|
|
||||
|
/** 建设性质 */ |
||||
|
@Excel(name = "建设性质") |
||||
|
@ApiModelProperty("建设性质") |
||||
|
private String constructionNature; |
||||
|
|
||||
|
/** 建设地点 */ |
||||
|
@Excel(name = "建设地点") |
||||
|
@ApiModelProperty("建设地点") |
||||
|
private String constructionLocation; |
||||
|
|
||||
|
/** 项目单位名称 */ |
||||
|
@Excel(name = "项目单位名称") |
||||
|
@ApiModelProperty("项目单位名称") |
||||
|
private String projectUnitName; |
||||
|
|
||||
|
/** 简介 */ |
||||
|
@Excel(name = "简介") |
||||
|
@ApiModelProperty("简介") |
||||
|
private String briefIntroduction; |
||||
|
|
||||
|
/** 项目用地情况 */ |
||||
|
@Excel(name = "项目用地情况") |
||||
|
@ApiModelProperty("项目用地情况") |
||||
|
private String projectLandSituation; |
||||
|
|
||||
|
/** 初步设计概算报告 */ |
||||
|
@Excel(name = "初步设计概算报告") |
||||
|
@ApiModelProperty("初步设计概算报告") |
||||
|
private String designEstimateReport; |
||||
|
|
||||
|
/** 相关上位规划附件 */ |
||||
|
@Excel(name = "相关上位规划附件") |
||||
|
@ApiModelProperty("相关上位规划附件") |
||||
|
private String relatedAttachment; |
||||
|
|
||||
|
/** 项目编码 */ |
||||
|
@Excel(name = "项目编码") |
||||
|
@ApiModelProperty("项目编码") |
||||
|
private String projectCode; |
||||
|
|
||||
|
/** 项目编号 */ |
||||
|
@Excel(name = "项目编号") |
||||
|
@ApiModelProperty("项目编号") |
||||
|
private String proNo; |
||||
|
|
||||
|
/** 创建人 */ |
||||
|
@Excel(name = "创建人") |
||||
|
@ApiModelProperty("创建人") |
||||
|
private String createUid; |
||||
|
|
||||
|
/** 更新人 */ |
||||
|
@Excel(name = "更新人") |
||||
|
@ApiModelProperty("更新人") |
||||
|
private String updateUid; |
||||
|
|
||||
|
/** 数源部门 */ |
||||
|
@Excel(name = "数源部门") |
||||
|
@ApiModelProperty("数源部门") |
||||
|
private String owerDept; |
||||
|
|
||||
|
@ApiModelProperty("项目类型") |
||||
|
private String projectType; |
||||
|
|
||||
|
private String projectKind; |
||||
|
|
||||
|
private String adcd; |
||||
|
|
||||
|
|
||||
|
@TableField(exist = false) |
||||
|
private String bindStatus; |
||||
|
|
||||
|
|
||||
|
private String approvalDepartment; |
||||
|
private String approvalNo; |
||||
|
private String approvalDuration; |
||||
|
private BigDecimal totalInvestment; |
||||
|
|
||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone="GMT+8") |
||||
|
private Date planWorkDate; |
||||
|
private String isApproval; |
||||
|
|
||||
|
private String approvalTime; |
||||
|
private String reportTime; |
||||
|
private String approvalOpinion; |
||||
|
private String preparationUnit; |
||||
|
|
||||
|
private String totalArea; |
||||
|
private String addArea; |
||||
|
|
||||
|
@TableField(exist = false) |
||||
|
private List<BsSgcJsjdBuiSectionInfo>children; |
||||
|
|
||||
|
} |
@ -0,0 +1,44 @@ |
|||||
|
package com.kms.earlyStage.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.kms.build.domain.BsSgcjsjdBuiProInfo; |
||||
|
import com.kms.earlyStage.domain.SpecialProjectInfo; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import org.springframework.stereotype.Repository; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.kms.earlyStage.domain.SpecialProjectDetailDesign; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 初步设计管理Mapper接口 |
||||
|
* |
||||
|
* @author kms |
||||
|
* @date 2023-09-18 |
||||
|
*/ |
||||
|
@Repository |
||||
|
public interface SpecialProjectDetailDesignMapper extends BaseMapper<SpecialProjectDetailDesign> { |
||||
|
|
||||
|
List<SpecialProjectDetailDesign> getXzqh(@Param("id") String id, |
||||
|
@Param("projectName") String projectName, |
||||
|
@Param("adcd") String adcd, |
||||
|
@Param("orderBy") String orderBy, |
||||
|
@Param("pageNum") int pageNum, |
||||
|
@Param("pageSize") int pageSize); |
||||
|
|
||||
|
IPage<SpecialProjectDetailDesign> getByUserPro(@Param("userId") String userId, |
||||
|
@Param("userType") String userType, |
||||
|
@Param("id") String id, |
||||
|
@Param("projectName") String projectName, |
||||
|
@Param("adcd") String adcd, |
||||
|
@Param("projectKind")String projectKind, |
||||
|
@Param("orderBy") String orderBy, |
||||
|
Page page); |
||||
|
|
||||
|
IPage<BsSgcjsjdBuiProInfo> listProject(@Param("userId") String userId, |
||||
|
@Param("adcd") String subString, |
||||
|
@Param("projectName") String projectName, |
||||
|
@Param("bindStatus") String bindStatus, |
||||
|
Page page); |
||||
|
} |
@ -0,0 +1,226 @@ |
|||||
|
package com.kms.earlyStage.service; |
||||
|
|
||||
|
import cn.hutool.core.collection.CollUtil; |
||||
|
import cn.hutool.core.util.ObjectUtil; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.github.pagehelper.util.StringUtil; |
||||
|
import com.jianwei.common.core.domain.SearchParam; |
||||
|
import com.jianwei.common.core.domain.entity.SysDept; |
||||
|
import com.jianwei.common.core.domain.entity.SysUser; |
||||
|
import com.jianwei.common.mybaitsplus.BeanToWrapper; |
||||
|
import com.kms.build.domain.BsSgcJsjdBuiSectionInfo; |
||||
|
import com.kms.build.domain.BsSgcjsjdBuiProInfo; |
||||
|
import com.kms.build.mapper.BsSgcJsjdBuiSectionInfoMapper; |
||||
|
import com.kms.common.utils.UserUtils; |
||||
|
import com.kms.earlyStage.domain.*; |
||||
|
import com.kms.earlyStage.mapper.SpecialProjectDetailDesignMapper; |
||||
|
import com.kms.system.domain.SysUserPro; |
||||
|
import com.kms.system.mapper.SysUserProMapper; |
||||
|
import com.kms.system.service.SysDeptService; |
||||
|
import com.kms.system.service.SysUserProService; |
||||
|
import com.kms.system.service.SysXzqhService; |
||||
|
//import javafx.print.Collation;
|
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import com.jianwei.common.core.service.BaseService; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 初步设计管理Service接口 |
||||
|
* |
||||
|
* @author kms |
||||
|
* @date 2023-09-18 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class SpecialProjectDetailDesignService extends BaseService<SpecialProjectDetailDesignMapper, SpecialProjectDetailDesign>{ |
||||
|
|
||||
|
@Autowired |
||||
|
private SpecialProjectDetailDesignMapper specialProjectDetailDesignMapper; |
||||
|
|
||||
|
@Autowired |
||||
|
private SysXzqhService sysXzqhService; |
||||
|
|
||||
|
@Autowired |
||||
|
private SysDeptService sysDeptService; |
||||
|
|
||||
|
@Autowired |
||||
|
private SpecialProjectProposalService specialProjectProposalService; |
||||
|
|
||||
|
@Autowired |
||||
|
private BsSgcJsjdBuiSectionInfoMapper bsSgcJsjdBuiSectionInfoMapper; |
||||
|
|
||||
|
public IPage selectPage(SearchParam<SpecialProjectDetailDesign> sp) { |
||||
|
|
||||
|
SysUser sysUser = UserUtils.getUser(); |
||||
|
|
||||
|
SpecialProjectDetailDesign data = sp.getData(); |
||||
|
if (sysUser.getUserType().equals("00") && data.getAdcd() == null) { |
||||
|
String deptId = sysUser.getDeptId(); |
||||
|
SysDept sysDept = sysDeptService.get(deptId); |
||||
|
String xzqhId = sysDept.getXzqhId(); |
||||
|
data.setAdcd(xzqhId); |
||||
|
} |
||||
|
Map<String, Object> params = sp.getParams(); |
||||
|
|
||||
|
|
||||
|
assert sysUser != null; |
||||
|
IPage<SpecialProjectDetailDesign> list = null; |
||||
|
|
||||
|
if (ObjectUtil.isNotNull(data.getProNo())) { |
||||
|
Page page = specialProjectDetailDesignMapper.selectPage(new Page<>(sp.getPageNum(), sp.getPageSize()), BeanToWrapper.getWrapper(sp)); |
||||
|
List<SpecialProjectDetailDesign>records = page.getRecords(); |
||||
|
List<SpecialProjectDetailDesign>list1=new ArrayList<>(); |
||||
|
for (SpecialProjectDetailDesign specialProjectDetailDesign:records){ |
||||
|
SpecialProjectProposal one = specialProjectProposalService.getOne(Wrappers.lambdaQuery(SpecialProjectProposal.class) |
||||
|
.eq(SpecialProjectProposal::getProjectCode, specialProjectDetailDesign.getProjectCode()) |
||||
|
.eq(SpecialProjectProposal::getProNo, specialProjectDetailDesign.getProNo())); |
||||
|
if (ObjectUtil.isNotEmpty(one)){ |
||||
|
specialProjectDetailDesign.setAdcd(one.getAdcd()); |
||||
|
specialProjectDetailDesign.setProjectName(one.getProjectName()); |
||||
|
specialProjectDetailDesign.setProjectType(one.getProjectType()); |
||||
|
specialProjectDetailDesign.setProjectKind(one.getProjectKind()); |
||||
|
} |
||||
|
list1.add(specialProjectDetailDesign); |
||||
|
} |
||||
|
page.setRecords(list1); |
||||
|
return page; |
||||
|
} |
||||
|
|
||||
|
if (ObjectUtil.isNull(params)) { |
||||
|
list = specialProjectDetailDesignMapper.getByUserPro(sysUser.getDeptId(),sysUser.getUserType(),data.getId(),data.getProjectName(), |
||||
|
sysXzqhService.getSubString(data.getAdcd()),sp.getData().getProjectKind(),"create_time",new Page<>(sp.getPageNum(),sp.getPageSize())); |
||||
|
}else { |
||||
|
list = specialProjectDetailDesignMapper.getByUserPro(sysUser.getDeptId(),sysUser.getUserType(),data.getId(),data.getProjectName(), |
||||
|
sysXzqhService.getSubString(data.getAdcd()),sp.getData().getProjectKind(),(String)params.get("orderBy"),new Page<>(sp.getPageNum(),sp.getPageSize())); |
||||
|
} |
||||
|
|
||||
|
List<SpecialProjectDetailDesign> records = list.getRecords(); |
||||
|
List<SpecialProjectDetailDesign>list1=new ArrayList<>(); |
||||
|
for (SpecialProjectDetailDesign specialProjectDetailDesign:records){ |
||||
|
SpecialProjectProposal one = specialProjectProposalService.getOne(Wrappers.lambdaQuery(SpecialProjectProposal.class) |
||||
|
.eq(SpecialProjectProposal::getProjectCode, specialProjectDetailDesign.getProjectCode()) |
||||
|
.eq(SpecialProjectProposal::getProNo, specialProjectDetailDesign.getProNo())); |
||||
|
if (ObjectUtil.isNotEmpty(one)){ |
||||
|
specialProjectDetailDesign.setAdcd(one.getAdcd()); |
||||
|
specialProjectDetailDesign.setProjectName(one.getProjectName()); |
||||
|
specialProjectDetailDesign.setProjectType(one.getProjectType()); |
||||
|
specialProjectDetailDesign.setProjectKind(one.getProjectKind()); |
||||
|
} |
||||
|
specialProjectDetailDesignMapper.updateById(specialProjectDetailDesign); |
||||
|
list1.add(specialProjectDetailDesign); |
||||
|
} |
||||
|
list.setRecords(list1); |
||||
|
|
||||
|
return list; |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
||||
|
@Autowired |
||||
|
SysUserProMapper sysUserProMapper; |
||||
|
|
||||
|
|
||||
|
public IPage<BsSgcjsjdBuiProInfo> listProject(SearchParam<BsSgcjsjdBuiProInfo> sp) { |
||||
|
BsSgcjsjdBuiProInfo data = sp.getData(); |
||||
|
|
||||
|
SysUser user = UserUtils.getUser(); |
||||
|
IPage<BsSgcjsjdBuiProInfo> page=new Page<>(); |
||||
|
if (StringUtil.isNotEmpty(user.getUserType())) { |
||||
|
|
||||
|
if (user.getUserType().equals("00")) { |
||||
|
page = specialProjectDetailDesignMapper.listProject(user.getDeptId(), sysXzqhService.getSubString(data.getAdcd()), data.getProjectName(), |
||||
|
data.getBindStatus(), |
||||
|
new Page<>(sp.getPageNum(), sp.getPageSize())); |
||||
|
|
||||
|
List<BsSgcjsjdBuiProInfo> record = page.getRecords(); |
||||
|
for (BsSgcjsjdBuiProInfo pd : record) { |
||||
|
List<String> sysDeptList = new ArrayList<>(); |
||||
|
LambdaQueryWrapper<BsSgcJsjdBuiSectionInfo> lw = new LambdaQueryWrapper<>(); |
||||
|
List<SysUserPro> userPro = sysUserProMapper.selectList(new QueryWrapper<SysUserPro>().eq("pro_no", pd.getProNo())); |
||||
|
if (CollUtil.isNotEmpty(userPro)) { |
||||
|
for (SysUserPro sysUserPro : userPro) { |
||||
|
SysDept sysDept = sysDeptService.get(sysUserPro.getUserId()); |
||||
|
if (ObjectUtil.isNotEmpty(sysDept)) { |
||||
|
sysDeptList.add(sysDept.getDeptName()); |
||||
|
} |
||||
|
List<BsSgcJsjdBuiSectionInfo> bsSgcJsjdBuiSectionInfos = bsSgcJsjdBuiSectionInfoMapper.selectList(lw.eq(BsSgcJsjdBuiSectionInfo::getProNo, pd.getProNo())); |
||||
|
for (BsSgcJsjdBuiSectionInfo se : bsSgcJsjdBuiSectionInfos) { |
||||
|
List<SysUserPro> userPros = sysUserProMapper.selectList(new QueryWrapper<SysUserPro>().eq("section_no", se.getId())); |
||||
|
for (SysUserPro sysUserPro1 : userPros) { |
||||
|
SysDept sysDept1 = sysDeptService.get(sysUserPro1.getUserId()); |
||||
|
if (ObjectUtil.isNotEmpty(sysDept1)) { |
||||
|
sysDeptList.add(sysDept1.getDeptName()); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
pd.setBindingMechanism(sysDeptList); |
||||
|
} |
||||
|
} |
||||
|
if (user.getUserType().equals("01")){ |
||||
|
page = specialProjectDetailDesignMapper.listProject(user.getDeptId(), sysXzqhService.getSubString(data.getAdcd()), data.getProjectName(), |
||||
|
data.getBindStatus(), |
||||
|
new Page<>(sp.getPageNum(), sp.getPageSize())); |
||||
|
List<BsSgcjsjdBuiProInfo>records=page.getRecords(); |
||||
|
List<BsSgcjsjdBuiProInfo>list=new ArrayList<>(); |
||||
|
|
||||
|
|
||||
|
for (BsSgcjsjdBuiProInfo pd:records){ |
||||
|
List<String>sysDeptList=new ArrayList<>(); |
||||
|
LambdaQueryWrapper<BsSgcJsjdBuiSectionInfo>lw=new LambdaQueryWrapper<>(); |
||||
|
List<SysUserPro> userProUnit = sysUserProMapper.selectList(new QueryWrapper<SysUserPro>().eq("pro_no", pd.getProNo())); |
||||
|
if (CollUtil.isNotEmpty(userProUnit)) { |
||||
|
for (SysUserPro sysUserPro : userProUnit) { |
||||
|
SysDept sysDept = sysDeptService.get(sysUserPro.getUserId()); |
||||
|
if (ObjectUtil.isNotEmpty(sysDept)) { |
||||
|
sysDeptList.add(sysDept.getDeptName()); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
List<SysUserPro> userPro = sysUserProMapper.selectList(new QueryWrapper<SysUserPro>().eq("pro_no", pd.getProNo()).eq("user_id", user.getDeptId())); |
||||
|
if (CollUtil.isNotEmpty(userPro)){ |
||||
|
pd.setBindStatus("1"); |
||||
|
}else { |
||||
|
pd.setBindStatus("0"); |
||||
|
} |
||||
|
List<BsSgcJsjdBuiSectionInfo> bsSgcJsjdBuiSectionInfos = bsSgcJsjdBuiSectionInfoMapper.selectList(lw.eq(BsSgcJsjdBuiSectionInfo::getProNo, pd.getProNo())); |
||||
|
for (BsSgcJsjdBuiSectionInfo se:bsSgcJsjdBuiSectionInfos){ |
||||
|
List<SysUserPro> userProsUnit = sysUserProMapper.selectList(new QueryWrapper<SysUserPro>().eq("section_no", se.getId())); |
||||
|
for (SysUserPro sysUserPro:userProsUnit){ |
||||
|
SysDept sysDept = sysDeptService.get(sysUserPro.getUserId()); |
||||
|
sysDeptList.add(sysDept.getDeptName()); |
||||
|
} |
||||
|
|
||||
|
List<SysUserPro> userPros = sysUserProMapper.selectList(new QueryWrapper<SysUserPro>().eq("section_no", se.getId()).eq("user_id", user.getDeptId())); |
||||
|
if (CollUtil.isNotEmpty(userPros)){ |
||||
|
pd.setBindStatus("1"); |
||||
|
se.setBindStatus("1"); |
||||
|
|
||||
|
}else { |
||||
|
se.setBindStatus("0"); |
||||
|
} |
||||
|
} |
||||
|
pd.setBindingMechanism(sysDeptList); |
||||
|
if (CollUtil.isNotEmpty(bsSgcJsjdBuiSectionInfos)){ |
||||
|
pd.setChildren(bsSgcJsjdBuiSectionInfos); |
||||
|
} |
||||
|
list.add(pd); |
||||
|
} |
||||
|
page.setRecords(list); |
||||
|
} |
||||
|
return page; |
||||
|
} |
||||
|
return page; |
||||
|
} |
||||
|
} |
@ -0,0 +1,344 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!DOCTYPE mapper |
||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="com.kms.earlyStage.mapper.SpecialProjectDetailDesignMapper"> |
||||
|
|
||||
|
<sql id="info"> |
||||
|
select da.id, |
||||
|
da.project_name, |
||||
|
da.pro_no, |
||||
|
da.adcd, |
||||
|
da.project_type, |
||||
|
da.project_kind, |
||||
|
da.CONSTRUCTION_NATURE, |
||||
|
da.CONSTRUCTION_LOCATION, |
||||
|
da.PROJECT_UNIT_NAME, |
||||
|
da.BRIEF_INTRODUCTION, |
||||
|
da.PROJECT_LAND_SITUATION, |
||||
|
da.project_code, |
||||
|
da.create_time |
||||
|
from bs_sgc_qqjd_spe_det_des_app da left join bs_slgc_qqjd_spe_pro_proposal pp on pp.pro_no=da.pro_no |
||||
|
</sql> |
||||
|
|
||||
|
<resultMap id="SpecialProjectDetailDesign" type="SpecialProjectDetailDesign"> |
||||
|
<id property="id" column="id"/> |
||||
|
<result property="projectName" column="project_name"/> |
||||
|
<result property="proNo" column="pro_no"/> |
||||
|
<result property="adcd" column="adcd"/> |
||||
|
<result property="constructionNature" column="CONSTRUCTION_NATURE"/> |
||||
|
<result property="constructionLocation" column="CONSTRUCTION_LOCATION"/> |
||||
|
<result property="projectUnitName" column="PROJECT_UNIT_NAME"/> |
||||
|
<result property="briefIntroduction" column="BRIEF_INTRODUCTION"/> |
||||
|
<result property="projectLandSituation" column="PROJECT_LAND_SITUATION"/> |
||||
|
<result property="projectCode" column="project_code"/> |
||||
|
<result property="createTime" column="create_time"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
|
||||
|
<select id="getXzqh" resultMap="SpecialProjectDetailDesign"> |
||||
|
<bind name="pageNum" value="(pageNum-1)*pageSize"></bind> |
||||
|
<include refid="info"/> |
||||
|
<where> |
||||
|
<if test="projectName!=null and projectName!=''"> |
||||
|
and project_name like concat('%',#{projectName},'%') |
||||
|
</if> |
||||
|
<include refid="com.kms.system.mapper.SysXzqhMapper.xzqhCondition"></include> |
||||
|
</where> |
||||
|
order by da.${orderBy} desc LIMIT #{pageNum},#{pageSize}; |
||||
|
</select> |
||||
|
|
||||
|
<select id="getByUserPro" resultMap="SpecialProjectDetailDesign"> |
||||
|
|
||||
|
<include refid="info"/> |
||||
|
<if test="userType==01"> |
||||
|
WHERE |
||||
|
da.PRO_NO IN ( |
||||
|
SELECT |
||||
|
PRO_NO |
||||
|
FROM |
||||
|
sys_user_pro |
||||
|
<where> |
||||
|
<if test="projectKind != null and projectKind != ''"> |
||||
|
AND da.project_kind=#{projectKind} |
||||
|
</if> |
||||
|
<if test="userId!=null and userId!=''"> |
||||
|
AND user_id=#{userId}) |
||||
|
</if> |
||||
|
<if test="projectName!=null and projectName!=''"> |
||||
|
and da.project_name like concat('%',#{projectName},'%') |
||||
|
</if> |
||||
|
|
||||
|
<include refid="com.kms.system.mapper.SysXzqhMapper.xzqhCondition"></include> |
||||
|
</where> |
||||
|
order by da.${orderBy} desc |
||||
|
</if> |
||||
|
<if test="userType==00"> |
||||
|
<where> |
||||
|
<if test="projectKind != null and projectKind != ''"> |
||||
|
AND da.project_kind=#{projectKind} |
||||
|
</if> |
||||
|
<if test="projectName!=null and projectName!=''"> |
||||
|
and da.project_name like concat('%',#{projectName},'%') |
||||
|
</if> |
||||
|
<if test="adcd!=null and adcd !=''"> |
||||
|
and da.adcd like concat(#{adcd},'%') |
||||
|
</if> |
||||
|
</where> |
||||
|
order by da.${orderBy} desc |
||||
|
</if> |
||||
|
</select> |
||||
|
|
||||
|
<resultMap id="listProject" type="BsSgcjsjdBuiProInfo"> |
||||
|
<id property="id" column="id"/> |
||||
|
<result property="projectName" column="project_name"/> |
||||
|
<result property="adcd" column="adcd"/> |
||||
|
<result property="projectType" column="project_type"/> |
||||
|
<result property="proCode" column="pro_code"/> |
||||
|
<result property="constructionNature" column="CONSTRUCTION_NATURE"/> |
||||
|
<result property="total" column="total"/> |
||||
|
<result property="proNo" column="pro_no"/> |
||||
|
<result property="bindStatus" column="bind_status"/> |
||||
|
<result property="source" column="source"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
<select id="listProject" resultMap="listProject"> |
||||
|
SELECT *,'项目过程管理' as source |
||||
|
FROM ( |
||||
|
SELECT DISTINCT |
||||
|
pi.pro_no, |
||||
|
pi.project_name, |
||||
|
pi.adcd, |
||||
|
CASE |
||||
|
WHEN EXISTS ( |
||||
|
SELECT 1 |
||||
|
FROM sys_user_pro sup |
||||
|
WHERE sup.pro_no = pi.pro_no |
||||
|
<if test="userId != null and userId != ''"> |
||||
|
AND sup.user_id = #{userId} |
||||
|
</if> |
||||
|
) THEN 1 |
||||
|
ELSE 0 |
||||
|
END AS bind_status |
||||
|
FROM |
||||
|
bs_sgc_jsjd_bui_pro_info pi |
||||
|
LEFT JOIN |
||||
|
bs_slgc_qqjd_spe_pro_proposal pp ON pi.pro_code = pp.project_code |
||||
|
AND pi.pro_no = pp.pro_no |
||||
|
<where> |
||||
|
1 = 1 |
||||
|
<if test="projectName != null and projectName != ''"> |
||||
|
AND pi.project_name LIKE CONCAT('%', #{projectName}, '%') |
||||
|
</if> |
||||
|
<if test="adcd != null and adcd != ''"> |
||||
|
and pi.adcd like concat(#{adcd},'%') |
||||
|
</if> |
||||
|
</where> |
||||
|
GROUP BY |
||||
|
pi.pro_no, pi.project_name, pi.adcd |
||||
|
) AS subquery |
||||
|
<where> |
||||
|
1 = 1 |
||||
|
<if test="bindStatus != null and bindStatus != ''"> |
||||
|
AND bind_status = #{bindStatus} |
||||
|
</if> |
||||
|
</where> |
||||
|
|
||||
|
UNION |
||||
|
|
||||
|
SELECT *,'项目建议书' as source |
||||
|
FROM ( |
||||
|
SELECT DISTINCT |
||||
|
pp.pro_no, |
||||
|
pp.project_name, |
||||
|
pp.adcd, |
||||
|
CASE |
||||
|
WHEN EXISTS ( |
||||
|
SELECT 1 |
||||
|
FROM sys_user_pro sup |
||||
|
WHERE sup.pro_no = pp.pro_no |
||||
|
<if test="userId != null and userId != ''"> |
||||
|
AND sup.user_id = #{userId} |
||||
|
</if> |
||||
|
|
||||
|
) THEN 1 |
||||
|
ELSE 0 |
||||
|
END AS bind_status |
||||
|
FROM |
||||
|
bs_slgc_qqjd_spe_pro_proposal pp |
||||
|
<where> |
||||
|
1 = 1 |
||||
|
<if test="projectName != null and projectName != ''"> |
||||
|
AND pp.project_name LIKE CONCAT('%', #{projectName}, '%') |
||||
|
</if> |
||||
|
<if test="adcd != null and adcd != ''"> |
||||
|
and pp.adcd like concat(#{adcd},'%') |
||||
|
</if> |
||||
|
</where> |
||||
|
GROUP BY |
||||
|
pp.pro_no, pp.project_name, pp.adcd |
||||
|
) AS subquery |
||||
|
<where> |
||||
|
1 = 1 |
||||
|
<if test="bindStatus != null and bindStatus != ''"> |
||||
|
AND bind_status = #{bindStatus} |
||||
|
</if> |
||||
|
</where> |
||||
|
|
||||
|
UNION |
||||
|
SELECT *,'可行性研究报告' as source |
||||
|
FROM ( |
||||
|
SELECT DISTINCT |
||||
|
fea.pro_no, |
||||
|
fea.project_name, |
||||
|
fea.adcd, |
||||
|
CASE |
||||
|
WHEN EXISTS ( |
||||
|
SELECT 1 |
||||
|
FROM sys_user_pro sup |
||||
|
WHERE sup.pro_no = fea.pro_no |
||||
|
<if test="userId != null and userId != ''"> |
||||
|
AND sup.user_id = #{userId} |
||||
|
</if> |
||||
|
) THEN 1 |
||||
|
ELSE 0 |
||||
|
END AS bind_status |
||||
|
FROM |
||||
|
bs_slgc_qqjd_spe_pro_fea fea |
||||
|
<where> |
||||
|
1 = 1 |
||||
|
<if test="projectName != null and projectName != ''"> |
||||
|
AND fea.project_name LIKE CONCAT('%', #{projectName}, '%') |
||||
|
</if> |
||||
|
<if test="adcd != null and adcd != ''"> |
||||
|
and fea.adcd like concat(#{adcd},'%') |
||||
|
</if> |
||||
|
</where> |
||||
|
GROUP BY |
||||
|
fea.pro_no, fea.project_name, fea.adcd |
||||
|
) AS subquery |
||||
|
<where> |
||||
|
1 = 1 |
||||
|
<if test="bindStatus != null and bindStatus != ''"> |
||||
|
AND bind_status = #{bindStatus} |
||||
|
</if> |
||||
|
</where> |
||||
|
|
||||
|
UNION |
||||
|
SELECT *,'初步设计' as source |
||||
|
FROM ( |
||||
|
SELECT DISTINCT |
||||
|
app.pro_no, |
||||
|
app.project_name, |
||||
|
app.adcd, |
||||
|
CASE |
||||
|
WHEN EXISTS ( |
||||
|
SELECT 1 |
||||
|
FROM sys_user_pro sup |
||||
|
WHERE sup.pro_no = app.pro_no |
||||
|
<if test="userId != null and userId != ''"> |
||||
|
AND sup.user_id = #{userId} |
||||
|
</if> |
||||
|
) THEN 1 |
||||
|
ELSE 0 |
||||
|
END AS bind_status |
||||
|
FROM |
||||
|
bs_sgc_qqjd_spe_pro_des_app app |
||||
|
<where> |
||||
|
1 = 1 |
||||
|
<if test="projectName != null and projectName != ''"> |
||||
|
AND app.project_name LIKE CONCAT('%', #{projectName}, '%') |
||||
|
</if> |
||||
|
<if test="adcd != null and adcd != ''"> |
||||
|
and app.adcd like concat(#{adcd},'%') |
||||
|
</if> |
||||
|
</where> |
||||
|
GROUP BY |
||||
|
app.pro_no, app.project_name, app.adcd |
||||
|
) AS subquery |
||||
|
<where> |
||||
|
1 = 1 |
||||
|
<if test="bindStatus != null and bindStatus != ''"> |
||||
|
AND bind_status = #{bindStatus} |
||||
|
</if> |
||||
|
</where> |
||||
|
|
||||
|
UNION |
||||
|
SELECT *,'计划管理' as source |
||||
|
FROM ( |
||||
|
SELECT DISTINCT |
||||
|
bsqpi.pro_no, |
||||
|
bsqpi.PLAN_NAME, |
||||
|
bsqpi.adcd, |
||||
|
CASE |
||||
|
WHEN EXISTS ( |
||||
|
SELECT 1 |
||||
|
FROM sys_user_pro sup |
||||
|
WHERE sup.pro_no = bsqpi.pro_no |
||||
|
<if test="userId != null and userId != ''"> |
||||
|
AND sup.user_id = #{userId} |
||||
|
</if> |
||||
|
) THEN 1 |
||||
|
ELSE 0 |
||||
|
END AS bind_status |
||||
|
FROM |
||||
|
bs_slgc_qqjd_plan_info bsqpi |
||||
|
<where> |
||||
|
1 = 1 |
||||
|
<if test="projectName != null and projectName != ''"> |
||||
|
AND bsqpi.PLAN_NAME LIKE CONCAT('%', #{projectName}, '%') |
||||
|
</if> |
||||
|
<if test="adcd != null and adcd != ''"> |
||||
|
and bsqpi.adcd like concat(#{adcd},'%') |
||||
|
</if> |
||||
|
</where> |
||||
|
GROUP BY |
||||
|
bsqpi.pro_no, bsqpi.PLAN_NAME, bsqpi.adcd |
||||
|
) AS subquery |
||||
|
<where> |
||||
|
1 = 1 |
||||
|
<if test="bindStatus != null and bindStatus != ''"> |
||||
|
AND bind_status = #{bindStatus} |
||||
|
</if> |
||||
|
</where> |
||||
|
|
||||
|
UNION |
||||
|
SELECT *,'专题管理' as source |
||||
|
FROM ( |
||||
|
SELECT DISTINCT |
||||
|
bsqspi.pro_no, |
||||
|
bsqspi.PROJECT_NAME, |
||||
|
bsqspi.adcd, |
||||
|
CASE |
||||
|
WHEN EXISTS ( |
||||
|
SELECT 1 |
||||
|
FROM sys_user_pro sup |
||||
|
WHERE sup.pro_no = bsqspi.pro_no |
||||
|
<if test="userId != null and userId != ''"> |
||||
|
AND sup.user_id = #{userId} |
||||
|
</if> |
||||
|
) THEN 1 |
||||
|
ELSE 0 |
||||
|
END AS bind_status |
||||
|
FROM |
||||
|
bs_slgc_qqjd_spe_pro_info bsqspi |
||||
|
<where> |
||||
|
1 = 1 |
||||
|
<if test="projectName != null and projectName != ''"> |
||||
|
AND bsqspi.PROJECT_NAME LIKE CONCAT('%', #{projectName}, '%') |
||||
|
</if> |
||||
|
<if test="adcd != null and adcd != ''"> |
||||
|
and bsqspi.adcd like concat(#{adcd},'%') |
||||
|
</if> |
||||
|
</where> |
||||
|
GROUP BY |
||||
|
bsqspi.pro_no, bsqspi.PROJECT_NAME, bsqspi.adcd |
||||
|
) AS subquery |
||||
|
<where> |
||||
|
1 = 1 |
||||
|
<if test="bindStatus != null and bindStatus != ''"> |
||||
|
AND bind_status = #{bindStatus} |
||||
|
</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
</mapper> |
Loading…
Reference in new issue