项目/单项工程
This commit is contained in:
parent
3bebc87313
commit
0b1705d8b0
|
|
@ -55,4 +55,10 @@ public class ParamDto {
|
|||
|
||||
@ApiModelProperty(value = "人员id")
|
||||
private String userId;
|
||||
|
||||
@ApiModelProperty(value = "项目编码")
|
||||
private String proNo;
|
||||
|
||||
@ApiModelProperty(value = "单项编码")
|
||||
private String signNo;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,10 @@ package com.securitycontrol.entity.background.vo;
|
|||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
/**
|
||||
* @author:cwchen
|
||||
|
|
@ -16,17 +20,70 @@ public class ProjectVo {
|
|||
private String id;
|
||||
|
||||
@ApiModelProperty("项目名称")
|
||||
@NotBlank(message = "项目名称不能为空", groups = {Query.class})
|
||||
@Length(max = 200, message = "项目名称字符长度不能超过200", groups = {Query.class})
|
||||
private String proName;
|
||||
|
||||
@ApiModelProperty("项目编码")
|
||||
@NotBlank(message = "项目编码不能为空", groups = {Query.class})
|
||||
@Length(max = 30, message = "项目编码字符长度不能超过30", groups = {Query.class})
|
||||
private String proNo;
|
||||
|
||||
@ApiModelProperty("建管单位ID")
|
||||
@NotBlank(message = "建管单位不能为空", groups = {Query.class})
|
||||
@Length(max = 32, message = "建管单位字符长度不能超过32", groups = {Query.class})
|
||||
private String orgId;
|
||||
|
||||
@ApiModelProperty("建管单位名称")
|
||||
private String orgName;
|
||||
|
||||
@ApiModelProperty("电压等级")
|
||||
private String vlotage;
|
||||
|
||||
@ApiModelProperty("工程类型")
|
||||
private String proType;
|
||||
|
||||
@ApiModelProperty("建设性质")
|
||||
private String constructionNature;
|
||||
|
||||
@ApiModelProperty("计划性质")
|
||||
private String planNature;
|
||||
|
||||
@ApiModelProperty("建设规模-线路")
|
||||
@Length(max = 32, message = "建设规模-线路字符长度不能超过32", groups = {Query.class})
|
||||
@Pattern(regexp = "(([0-9]+\\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\\.[0-9]+)|([0-9]*[1-9][0-9]*))",message = "建设规模-线路为大于0的数字",groups = {Query.class})
|
||||
private String line;
|
||||
|
||||
@ApiModelProperty("建设规模-变电")
|
||||
@Length(max = 32, message = "建设规模-变电字符长度不能超过32", groups = {Query.class})
|
||||
@Pattern(regexp = "(([0-9]+\\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\\.[0-9]+)|([0-9]*[1-9][0-9]*))",message = "建设规模-变电为大于0的数字",groups = {Query.class})
|
||||
private String power;
|
||||
|
||||
@ApiModelProperty("计划开始时间")
|
||||
@NotBlank(message = "计划开始时间不能为空", groups = {Query.class})
|
||||
@Length(max = 32, message = "计划开始时间字符长度不能超过32", groups = {Query.class})
|
||||
private String planStartTime;
|
||||
|
||||
@ApiModelProperty("计划结束时间")
|
||||
@NotBlank(message = "计划结束时间不能为空", groups = {Query.class})
|
||||
@Length(max = 32, message = "计划结束时间字符长度不能超过32", groups = {Query.class})
|
||||
private String planEndTime;
|
||||
|
||||
@ApiModelProperty("实际开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty("实际结束时间")
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty("投产时间")
|
||||
private String tcTime;
|
||||
|
||||
@ApiModelProperty("1.新增 2.修改")
|
||||
private int type;
|
||||
|
||||
/**
|
||||
* 查询条件限制
|
||||
*/
|
||||
public interface Query {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,99 @@
|
|||
package com.securitycontrol.entity.background.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
/**
|
||||
* @author:cwchen
|
||||
* @date:2024-04-02-13:10
|
||||
* @version:1.0
|
||||
* @description:单项工程-vo
|
||||
*/
|
||||
@Data
|
||||
public class SignProVo {
|
||||
|
||||
@ApiModelProperty("项目ID")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty("单项工程名称")
|
||||
@NotBlank(message = "单项工程名称不能为空", groups = {Query.class})
|
||||
@Length(max = 200, message = "单项工程名称字符长度不能超过200", groups = {Query.class})
|
||||
private String singleName;
|
||||
|
||||
@ApiModelProperty("项目名称")
|
||||
private String projectName;
|
||||
|
||||
@ApiModelProperty("单项工程编码")
|
||||
@NotBlank(message = "单项工程编码不能为空", groups = {Query.class})
|
||||
@Length(max = 80, message = "单项工程编码字符长度不能超过80", groups = {Query.class})
|
||||
private String signleNo;
|
||||
|
||||
@ApiModelProperty("项目编码")
|
||||
@NotBlank(message = "项目编码不能为空", groups = {Query.class})
|
||||
@Length(max = 50, message = "项目编码字符长度不能超过50", groups = {Query.class})
|
||||
private String proNo;
|
||||
|
||||
@ApiModelProperty("wbs编码")
|
||||
@Length(max = 255, message = "wbs编码字符长度不能超过255", groups = {Query.class})
|
||||
private String wbsCode;
|
||||
|
||||
@ApiModelProperty("单项工程描述")
|
||||
@Length(max = 255, message = "单项工程描述长度不能超过255", groups = {Query.class})
|
||||
private String singleDesc;
|
||||
|
||||
@ApiModelProperty("电压等级")
|
||||
@Length(max = 32, message = "电压等级长度不能超过32", groups = {Query.class})
|
||||
private String volLevel;
|
||||
|
||||
@ApiModelProperty("可研线路长度")
|
||||
@Length(max = 32, message = "线路长度字符长度不能超过32", groups = {Query.class})
|
||||
@Pattern(regexp = "(([0-9]+\\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\\.[0-9]+)|([0-9]*[1-9][0-9]*))",message = "线路长度为大于0的数字",groups = {Query.class})
|
||||
private String lineLength;
|
||||
|
||||
@ApiModelProperty("可研变电容量")
|
||||
@Length(max = 32, message = "建设规模-线路字符长度不能超过32", groups = {Query.class})
|
||||
@Pattern(regexp = "(([0-9]+\\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\\.[0-9]+)|([0-9]*[1-9][0-9]*))",message = "变电容量为大于0的数字",groups = {Query.class})
|
||||
private String subsCap;
|
||||
|
||||
@ApiModelProperty("单项类型(1:变电;2:线路)")
|
||||
@NotBlank(message = "单项类型不能为空", groups = {Query.class})
|
||||
@Length(max = 11, message = "单项工程编码字符长度不能超过11", groups = {Query.class})
|
||||
private String proType;
|
||||
|
||||
@ApiModelProperty("变电站类型包括:1 土建,2 电气,3 变电")
|
||||
@Length(max = 11, message = "变电站类型字符长度不能超过11", groups = {Query.class})
|
||||
private String subsType;
|
||||
|
||||
@ApiModelProperty("估算类型")
|
||||
private String estimateType;
|
||||
|
||||
@ApiModelProperty("建管单位ID")
|
||||
@NotBlank(message = "建管单位不能为空", groups = {Query.class})
|
||||
@Length(max = 30, message = "建管单位字符长度不能超过30", groups = {Query.class})
|
||||
private String orgId;
|
||||
|
||||
@ApiModelProperty("建管单位名称")
|
||||
private String orgName;
|
||||
|
||||
@ApiModelProperty("实际开工时间")
|
||||
private String startDate;
|
||||
|
||||
@ApiModelProperty("实际投产时间")
|
||||
private String endDate;
|
||||
|
||||
@ApiModelProperty("实际竣工时间")
|
||||
private String completeDate;
|
||||
|
||||
@ApiModelProperty("1.新增 2.修改")
|
||||
private int type;
|
||||
|
||||
/**
|
||||
* 查询条件限制
|
||||
*/
|
||||
public interface Query {
|
||||
}
|
||||
}
|
||||
|
|
@ -27,4 +27,7 @@ public class SelectDto {
|
|||
private String orgId;
|
||||
@ApiModelProperty(value = "cityName")
|
||||
private String cityName;
|
||||
|
||||
@ApiModelProperty(value = "项目编码")
|
||||
private String proNo;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,15 +2,15 @@ package com.securitycontrol.background.controller;
|
|||
|
||||
import com.securitycontrol.background.service.ISignProService;
|
||||
import com.securitycontrol.common.core.web.controller.BaseController;
|
||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.common.core.web.page.TableDataInfo;
|
||||
import com.securitycontrol.common.log.annotation.Log;
|
||||
import com.securitycontrol.common.log.enums.OperationType;
|
||||
import com.securitycontrol.entity.background.dto.ParamDto;
|
||||
import com.securitycontrol.entity.background.vo.ProjectVo;
|
||||
import com.securitycontrol.entity.background.vo.SignProVo;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -38,4 +38,68 @@ public class SignProController extends BaseController {
|
|||
list = service.getProLists(dto);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "新增项目")
|
||||
@PostMapping("addProject")
|
||||
@Log(title = "工程管理", menu = "工程管理->项目管理", grade = OperationType.ADD_BUSINESS, details = "新增项目", type = "业务日志")
|
||||
public AjaxResult addProject(@RequestBody ProjectVo vo) {
|
||||
return service.addOrUpdateProject(vo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改项目")
|
||||
@PostMapping("updateProject")
|
||||
@Log(title = "工程管理", menu = "工程管理->项目管理", grade = OperationType.ADD_BUSINESS, details = "修改项目", type = "业务日志")
|
||||
public AjaxResult updateProject(@RequestBody ProjectVo vo) {
|
||||
return service.addOrUpdateProject(vo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "项目详情")
|
||||
@GetMapping(value="getProjectById")
|
||||
public AjaxResult getProjectById(ParamDto dto){
|
||||
return service.getProjectById(dto);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除项目")
|
||||
@PostMapping(value="delProjectById")
|
||||
@Log(title = "工程管理", menu = "工程管理->项目管理", grade = OperationType.DELETE_BUSINESS, details = "删除项目", type = "业务日志")
|
||||
public AjaxResult delProjectById(@RequestBody ParamDto dto){
|
||||
return service.delProjectById(dto);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取单项工程列表")
|
||||
@GetMapping("getSignProLists")
|
||||
@Log(title = "工程管理", menu = "工程管理->单项工程管理", grade = OperationType.QUERY_BUSINESS, details = "查询单项工程列表", type = "业务日志")
|
||||
public TableDataInfo getSignProLists(ParamDto dto) {
|
||||
startPage();
|
||||
List<SignProVo> list = new ArrayList<>();
|
||||
list = service.getSignProLists(dto);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "新增单项工程")
|
||||
@PostMapping("addSignProject")
|
||||
@Log(title = "工程管理", menu = "工程管理->单项工程管理", grade = OperationType.ADD_BUSINESS, details = "新增单项工程", type = "业务日志")
|
||||
public AjaxResult addSignProject(@RequestBody SignProVo vo) {
|
||||
return service.addOrUpdateSignProject(vo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改单项工程")
|
||||
@PostMapping("updateSignProject")
|
||||
@Log(title = "工程管理", menu = "工程管理->单项工程管理", grade = OperationType.ADD_BUSINESS, details = "修改单项工程", type = "业务日志")
|
||||
public AjaxResult updateSignProject(@RequestBody SignProVo vo) {
|
||||
return service.addOrUpdateSignProject(vo);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "单项工程详情")
|
||||
@GetMapping(value="getSignProById")
|
||||
public AjaxResult getSignProById(ParamDto dto){
|
||||
return service.getSignProById(dto);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除单项工程")
|
||||
@PostMapping(value="delSignProById")
|
||||
@Log(title = "工程管理", menu = "工程管理->项目管理", grade = OperationType.DELETE_BUSINESS, details = "删除单项工程", type = "业务日志")
|
||||
public AjaxResult delSignProById(@RequestBody ParamDto dto){
|
||||
return service.delSignProById(dto);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.securitycontrol.background.mapper;
|
|||
|
||||
import com.securitycontrol.entity.background.dto.ParamDto;
|
||||
import com.securitycontrol.entity.background.vo.ProjectVo;
|
||||
import com.securitycontrol.entity.background.vo.SignProVo;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -18,6 +19,7 @@ public interface ISignProMapper {
|
|||
|
||||
/**
|
||||
* 获取项目列表
|
||||
*
|
||||
* @param dto
|
||||
* @return List<ProjectVo>
|
||||
* @description
|
||||
|
|
@ -25,4 +27,121 @@ public interface ISignProMapper {
|
|||
* @date 2024/4/1 20:02
|
||||
*/
|
||||
List<ProjectVo> getProLists(ParamDto dto);
|
||||
|
||||
/**
|
||||
* 项目工程是否存在
|
||||
*
|
||||
* @param vo
|
||||
* @param type
|
||||
* @return int
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/2 10:24
|
||||
*/
|
||||
int isProject(ProjectVo vo);
|
||||
|
||||
/**
|
||||
* 新增/修改 项目
|
||||
*
|
||||
* @param vo
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/2 10:36
|
||||
*/
|
||||
void addOrUpdateProject(ProjectVo vo);
|
||||
|
||||
/**
|
||||
* 项目详情
|
||||
*
|
||||
* @param dto
|
||||
* @return ProjectVo
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/2 10:48
|
||||
*/
|
||||
ProjectVo getProjectById(ParamDto dto);
|
||||
|
||||
/**
|
||||
* 项目包含是否单项工程
|
||||
*
|
||||
* @param dto
|
||||
* @return int
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/2 10:53
|
||||
*/
|
||||
int isHasChildPro(ParamDto dto);
|
||||
|
||||
/**
|
||||
* 删除项目
|
||||
*
|
||||
* @param dto
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/2 10:53
|
||||
*/
|
||||
void delProjectById(ParamDto dto);
|
||||
|
||||
/**
|
||||
* 单项工程列表
|
||||
*
|
||||
* @param dto
|
||||
* @return List<SignProVo>
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/2 13:18
|
||||
*/
|
||||
List<SignProVo> getSignProLists(ParamDto dto);
|
||||
|
||||
/**
|
||||
* 单项工程是否存在
|
||||
*
|
||||
* @param vo
|
||||
* @return int
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/2 13:36
|
||||
*/
|
||||
int isSignPro(SignProVo vo);
|
||||
|
||||
/**
|
||||
* 新增/修改 单项工程
|
||||
*
|
||||
* @param vo
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/2 13:36
|
||||
*/
|
||||
void addOrUpdateSignProject(SignProVo vo);
|
||||
|
||||
/**
|
||||
* 单项工程详情
|
||||
*
|
||||
* @param dto
|
||||
* @return SignProVo
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/2 13:49
|
||||
*/
|
||||
SignProVo getSignProById(ParamDto dto);
|
||||
|
||||
/**
|
||||
* 单项工程是否包含标段工程
|
||||
*
|
||||
* @param dto
|
||||
* @return int
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/2 13:49
|
||||
*/
|
||||
int isHasBidChildPro(ParamDto dto);
|
||||
|
||||
/**
|
||||
* 删除单项工程
|
||||
* @param dto
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/2 13:49
|
||||
*/
|
||||
void delSignProById(ParamDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
package com.securitycontrol.background.service;
|
||||
|
||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.entity.background.dto.ParamDto;
|
||||
import com.securitycontrol.entity.background.vo.ProjectVo;
|
||||
import com.securitycontrol.entity.background.vo.SignProVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -14,6 +16,7 @@ import java.util.List;
|
|||
public interface ISignProService {
|
||||
/**
|
||||
* 获取项目列表
|
||||
*
|
||||
* @param dto
|
||||
* @return List<ProjectVo>
|
||||
* @description
|
||||
|
|
@ -21,4 +24,80 @@ public interface ISignProService {
|
|||
* @date 2024/4/1 19:59
|
||||
*/
|
||||
List<ProjectVo> getProLists(ParamDto dto);
|
||||
|
||||
/**
|
||||
* 新增/修改项目
|
||||
*
|
||||
* @param vo
|
||||
* @return AjaxResult
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/2 10:17
|
||||
*/
|
||||
AjaxResult addOrUpdateProject(ProjectVo vo);
|
||||
|
||||
/**
|
||||
* 项目详情
|
||||
*
|
||||
* @param dto
|
||||
* @return AjaxResult
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/2 10:46
|
||||
*/
|
||||
AjaxResult getProjectById(ParamDto dto);
|
||||
|
||||
/**
|
||||
* 删除项目
|
||||
*
|
||||
* @param dto
|
||||
* @return AjaxResult
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/2 10:50
|
||||
*/
|
||||
AjaxResult delProjectById(ParamDto dto);
|
||||
|
||||
/**
|
||||
* 获取单项工程列表
|
||||
*
|
||||
* @param dto
|
||||
* @return List<SignProVo>
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/2 13:17
|
||||
*/
|
||||
List<SignProVo> getSignProLists(ParamDto dto);
|
||||
|
||||
/**
|
||||
* 新增/修改 单项工程
|
||||
*
|
||||
* @param vo
|
||||
* @return AjaxResult
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/2 13:29
|
||||
*/
|
||||
AjaxResult addOrUpdateSignProject(SignProVo vo);
|
||||
|
||||
/**
|
||||
* 单项工程详情
|
||||
*
|
||||
* @param dto
|
||||
* @return AjaxResult
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/2 13:46
|
||||
*/
|
||||
AjaxResult getSignProById(ParamDto dto);
|
||||
|
||||
/**
|
||||
* 删除单项工程
|
||||
* @param dto
|
||||
* @return AjaxResult
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/2 13:46
|
||||
*/
|
||||
AjaxResult delSignProById(ParamDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,11 +2,18 @@ package com.securitycontrol.background.service.impl;
|
|||
|
||||
import com.securitycontrol.background.mapper.ISignProMapper;
|
||||
import com.securitycontrol.background.service.ISignProService;
|
||||
import com.securitycontrol.common.core.utils.StringUtils;
|
||||
import com.securitycontrol.common.core.utils.uuid.IdUtils;
|
||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
import com.securitycontrol.common.security.utils.ValidatorsUtils;
|
||||
import com.securitycontrol.entity.background.dto.ParamDto;
|
||||
import com.securitycontrol.entity.background.vo.HumanManageVo;
|
||||
import com.securitycontrol.entity.background.vo.ProjectVo;
|
||||
import com.securitycontrol.entity.background.vo.SignProVo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -25,6 +32,9 @@ public class SignProServiceImpl implements ISignProService {
|
|||
@Resource(name = "ISignProMapper")
|
||||
private ISignProMapper mapper;
|
||||
|
||||
@Resource(name = "ValidatorsUtils")
|
||||
private ValidatorsUtils validatorsUtils;
|
||||
|
||||
@Override
|
||||
public List<ProjectVo> getProLists(ParamDto dto) {
|
||||
List<ProjectVo> list = new ArrayList<>();
|
||||
|
|
@ -35,4 +45,143 @@ public class SignProServiceImpl implements ISignProService {
|
|||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult addOrUpdateProject(ProjectVo vo) {
|
||||
try {
|
||||
String validResult = validatorsUtils.valid(vo, ProjectVo.Query.class);
|
||||
if (StringUtils.isNotBlank(validResult)) {
|
||||
return AjaxResult.error(validResult);
|
||||
}
|
||||
int result = mapper.isProject(vo);
|
||||
if (result > 0) {
|
||||
return AjaxResult.error("项目编码不能重复");
|
||||
}
|
||||
if (StringUtils.isEmpty(vo.getId())) {
|
||||
String id = IdUtils.getUUId();
|
||||
vo.setId(id);
|
||||
vo.setType(1);
|
||||
} else {
|
||||
vo.setType(2);
|
||||
}
|
||||
mapper.addOrUpdateProject(vo);
|
||||
} catch (Exception e) {
|
||||
log.error("新增/修改项目",e);
|
||||
//手动回滚异常
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
return AjaxResult.error();
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getProjectById(ParamDto dto) {
|
||||
ProjectVo vo = new ProjectVo();
|
||||
try {
|
||||
if(StringUtils.isEmpty(dto.getId())){
|
||||
return AjaxResult.error("参数不完整");
|
||||
}
|
||||
vo = mapper.getProjectById(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("项目详情",e);
|
||||
}
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult delProjectById(ParamDto dto) {
|
||||
try {
|
||||
if(StringUtils.isEmpty(dto.getId()) || StringUtils.isEmpty(dto.getProNo())){
|
||||
return AjaxResult.error("参数不完整");
|
||||
}
|
||||
int result = mapper.isHasChildPro(dto);
|
||||
if(result > 0){
|
||||
return AjaxResult.error("项目包含单项工程");
|
||||
}
|
||||
mapper.delProjectById(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("删除项目",e);
|
||||
//手动回滚异常
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
return AjaxResult.error();
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SignProVo> getSignProLists(ParamDto dto) {
|
||||
List<SignProVo> list = new ArrayList<>();
|
||||
try {
|
||||
list = mapper.getSignProLists(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("单项工程列表",e);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult addOrUpdateSignProject(SignProVo vo) {
|
||||
try {
|
||||
String validResult = validatorsUtils.valid(vo, SignProVo.Query.class);
|
||||
if (StringUtils.isNotBlank(validResult)) {
|
||||
return AjaxResult.error(validResult);
|
||||
}
|
||||
int result = mapper.isSignPro(vo);
|
||||
if (result > 0) {
|
||||
return AjaxResult.error("单项编码不能重复");
|
||||
}
|
||||
if (StringUtils.isEmpty(vo.getId())) {
|
||||
String id = IdUtils.getUUId();
|
||||
vo.setId(id);
|
||||
vo.setType(1);
|
||||
} else {
|
||||
vo.setType(2);
|
||||
}
|
||||
mapper.addOrUpdateSignProject(vo);
|
||||
} catch (Exception e) {
|
||||
log.error("新增/修改单项工程",e);
|
||||
//手动回滚异常
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
return AjaxResult.error();
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getSignProById(ParamDto dto) {
|
||||
SignProVo vo = new SignProVo();
|
||||
try {
|
||||
if(StringUtils.isEmpty(dto.getId())){
|
||||
return AjaxResult.error("参数不完整");
|
||||
}
|
||||
vo = mapper.getSignProById(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("单项工程详情",e);
|
||||
}
|
||||
return AjaxResult.success(vo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult delSignProById(ParamDto dto) {
|
||||
try {
|
||||
if(StringUtils.isEmpty(dto.getId()) || StringUtils.isEmpty(dto.getSignNo())){
|
||||
return AjaxResult.error("参数不完整");
|
||||
}
|
||||
int result = mapper.isHasBidChildPro(dto);
|
||||
if(result > 0){
|
||||
return AjaxResult.error("单项工程包含标段工程");
|
||||
}
|
||||
mapper.delSignProById(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("删除单项工程",e);
|
||||
//手动回滚异常
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
return AjaxResult.error();
|
||||
}
|
||||
return AjaxResult.success();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@
|
|||
<if test="deviceName != null and deviceName!=''">device_name,</if>
|
||||
<if test="createTime != null and createTime!=''">create_time,</if>
|
||||
<if test="updateTime != null and updateTime!=''">update_time,</if>
|
||||
del_flage,
|
||||
del_flag,
|
||||
<if test="updateTime != null and updateTime!=''">device_model,</if>
|
||||
<if test="bdId != null and bdId!=''">bd_id,</if>
|
||||
<if test="areaId != null and areaId!=''">area_id,</if>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,260 @@
|
|||
<?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.securitycontrol.background.mapper.ISignProMapper">
|
||||
<!--新增/修改 项目-->
|
||||
<insert id="addOrUpdateProject">
|
||||
<if test="type == 1">
|
||||
INSERT INTO tb_jj_project
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id,</if>
|
||||
<if test="proName != null and proName!=''">pro_name,</if>
|
||||
<if test="proNo != null and proNo!=''">pro_no,</if>
|
||||
<if test="orgId != null and orgId!=''">org_id,</if>
|
||||
<if test="vlotage != null and vlotage!=''">vlotage,</if>
|
||||
<if test="proType != null and proType!=''">pro_type,</if>
|
||||
del_flag,
|
||||
<if test="constructionNature != null and constructionNature!=''">construction_nature,</if>
|
||||
<if test="planNature != null and planNature!=''">plan_nature,</if>
|
||||
<if test="line != null and line!=''">line,</if>
|
||||
<if test="power != null and power!=''">power,</if>
|
||||
<if test="planStartTime != null and planStartTime!=''">plan_start_time,</if>
|
||||
<if test="planEndTime != null and planEndTime!=''">plan_end_time,</if>
|
||||
<if test="startTime != null and startTime!=''">start_time,</if>
|
||||
<if test="endTime != null and endTime!=''">end_time,</if>
|
||||
<if test="tcTime != null and tcTime!=''">tc_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
<if test="proName != null and proName!=''">#{proName},</if>
|
||||
<if test="proNo != null and proNo!=''">#{proNo},</if>
|
||||
<if test="orgId != null and orgId!=''">#{orgId},</if>
|
||||
<if test="vlotage != null and vlotage != ''">#{vlotage},</if>
|
||||
<if test="proType != null and proType!=''">#{proType},</if>
|
||||
0,
|
||||
<if test="constructionNature != null and constructionNature!=''">#{constructionNature},</if>
|
||||
<if test="planNature != null and planNature!=''">#{planNature},</if>
|
||||
<if test="line != null and line!=''">#{line},</if>
|
||||
<if test="power != null and power!=''">#{power},</if>
|
||||
<if test="planStartTime != null and planStartTime!=''">#{planStartTime},</if>
|
||||
<if test="planEndTime != null and planEndTime!=''">#{planEndTime},</if>
|
||||
<if test="startTime != null and startTime!=''">#{startTime},</if>
|
||||
<if test="endTime != null and endTime!=''">#{endTime},</if>
|
||||
<if test="tcTime != null and tcTime!=''">#{tcTime},</if>
|
||||
</trim>
|
||||
</if>
|
||||
<if test="type == 2">
|
||||
UPDATE tb_jj_project
|
||||
<set>
|
||||
<if test="proName != null and proName != ''">pro_name = #{proName},</if>
|
||||
<if test="proNo != null and proNo != ''">pro_no = #{proNo},</if>
|
||||
<if test="orgId != null and orgId != ''">org_id = #{orgId},</if>
|
||||
<if test="vlotage != null and vlotage != ''">vlotage = #{vlotage},</if>
|
||||
<if test="proType != null and proType != ''">pro_type = #{proType},</if>
|
||||
<if test="constructionNature != null and constructionNature != ''">construction_nature = #{constructionNature},</if>
|
||||
<if test="planNature != null and planNature != ''">plan_nature = #{planNature},</if>
|
||||
<if test="line != null and line != ''">line = #{line},</if>
|
||||
<if test="power != null and power != ''">power = #{power},</if>
|
||||
<if test="planStartTime != null and planStartTime != ''">plan_start_time = #{planStartTime},</if>
|
||||
<if test="planEndTime != null and planEndTime != ''">plan_end_time = #{planEndTime},</if>
|
||||
<if test="startTime != null and startTime != ''">start_time = #{startTime},</if>
|
||||
<if test="endTime != null and endTime != ''">end_time = #{endTime},</if>
|
||||
<if test="tcTime != null and tcTime != ''">tc_time = #{tcTime},</if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</if>
|
||||
</insert>
|
||||
<!--新增/修改单项工程-->
|
||||
<insert id="addOrUpdateSignProject">
|
||||
<if test="type == 1">
|
||||
INSERT INTO tb_sign_project
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">id,</if>
|
||||
<if test="singleName != null and singleName!=''">single_name,</if>
|
||||
<if test="signleNo != null and signleNo!=''">signle_no,</if>
|
||||
<if test="wbsCode != null and wbsCode!=''">wbs_code,</if>
|
||||
<if test="proNo != null and proNo!=''">project_no,</if>
|
||||
<if test="singleDesc != null and singleDesc!=''">single_desc,</if>
|
||||
del_flag,
|
||||
<if test="volLevel != null and volLevel!=''">vol_level,</if>
|
||||
<if test="lineLength != null and lineLength!=''">line_length,</if>
|
||||
<if test="subsCap != null and subsCap!=''">subs_cap,</if>
|
||||
<if test="proType != null and proType!=''">pro_type,</if>
|
||||
<if test="subsType != null and subsType!=''">subs_type,</if>
|
||||
<if test="estimateType != null and estimateType!=''">estimate_type,</if>
|
||||
<if test="orgId != null and orgId!=''">org_id,</if>
|
||||
<if test="startDate != null and startDate!=''">start_date,</if>
|
||||
<if test="endDate != null and endDate!=''">end_date,</if>
|
||||
<if test="completeDate != null and completeDate!=''">complete_date,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
<if test="singleName != null and singleName!=''">#{singleName},</if>
|
||||
<if test="signleNo != null and signleNo!=''">#{signleNo},</if>
|
||||
<if test="wbsCode != null and wbsCode!=''">#{wbsCode},</if>
|
||||
<if test="proNo != null and proNo != ''">#{proNo},</if>
|
||||
<if test="singleDesc != null and singleDesc!=''">#{singleDesc},</if>
|
||||
0,
|
||||
<if test="volLevel != null and volLevel!=''">#{volLevel},</if>
|
||||
<if test="lineLength != null and lineLength!=''">#{lineLength},</if>
|
||||
<if test="subsCap != null and subsCap!=''">#{subsCap},</if>
|
||||
<if test="proType != null and proType!=''">#{proType},</if>
|
||||
<if test="subsType != null and subsType!=''">#{subsType},</if>
|
||||
<if test="estimateType != null and estimateType!=''">#{estimateType},</if>
|
||||
<if test="orgId != null and orgId!=''">#{orgId},</if>
|
||||
<if test="startDate != null and startDate!=''">#{startDate},</if>
|
||||
<if test="endDate != null and endDate!=''">#{endDate},</if>
|
||||
<if test="completeDate != null and completeDate!=''">#{completeDate},</if>
|
||||
</trim>
|
||||
</if>
|
||||
<if test="type == 2">
|
||||
UPDATE tb_sign_project
|
||||
<set>
|
||||
<if test="singleName != null and singleName != ''">single_name = #{singleName},</if>
|
||||
<if test="signleNo != null and signleNo != ''">signle_no = #{signleNo},</if>
|
||||
<if test="wbsCode != null and wbsCode != ''">wbs_code = #{wbsCode},</if>
|
||||
<if test="proNo != null and proNo != ''">project_no = #{proNo},</if>
|
||||
<if test="singleDesc != null and singleDesc != ''">single_desc = #{singleDesc},</if>
|
||||
<if test="volLevel != null and volLevel != ''">vol_level = #{volLevel},</if>
|
||||
<if test="lineLength != null and lineLength != ''">line_length = #{lineLength},</if>
|
||||
<if test="subsCap != null and subsCap != ''">subs_cap = #{subsCap},</if>
|
||||
<if test="proType != null and proType != ''">pro_type = #{proType},</if>
|
||||
<if test="subsType != null and subsType != ''">subs_type = #{subsType},</if>
|
||||
<if test="estimateType != null and estimateType != ''">estimate_type = #{estimateType},</if>
|
||||
<if test="orgId != null and orgId != ''">org_id = #{orgId},</if>
|
||||
<if test="startDate != null and startDate != ''">start_date = #{startDate},</if>
|
||||
<if test="endDate != null and endDate != ''">end_date = #{endDate},</if>
|
||||
<if test="completeDate != null and completeDate != ''">complete_date = #{completeDate},</if>
|
||||
</set>
|
||||
WHERE id = #{id}
|
||||
</if>
|
||||
</insert>
|
||||
<!--删除项目-->
|
||||
<update id="delProjectById">
|
||||
UPDATE tb_jj_project SET del_flag = 1 WHERE id = #{id}
|
||||
</update>
|
||||
<!--删除单项工程-->
|
||||
<update id="delSignProById">
|
||||
UPDATE tb_sign_project SET del_flag = 1 WHERE id = #{id}
|
||||
</update>
|
||||
|
||||
<!--获取项目列表-->
|
||||
<select id="getProLists" resultType="com.securitycontrol.entity.background.vo.ProjectVo">
|
||||
|
||||
SELECT tjp.id,
|
||||
tjp.pro_name AS proName,
|
||||
tjp.pro_no AS proNo,
|
||||
sb.city_name AS orgName,
|
||||
sd.dict_name AS vlotage,
|
||||
tjp.construction_nature AS constructionNature,
|
||||
tjp.plan_nature AS planNature,
|
||||
tjp.line,
|
||||
tjp.power,
|
||||
tjp.plan_start_time AS planStartTime,
|
||||
tjp.plan_end_time AS planEndTime,
|
||||
tjp.start_time AS startTime,
|
||||
tjp.end_time AS endTime,
|
||||
tjp.tc_time AS tcTime,
|
||||
tjp.vlotage
|
||||
FROM tb_jj_project tjp
|
||||
LEFT JOIN sys_build sb ON tjp.org_id = sb.org_id
|
||||
LEFT JOIN sys_dict sd on tjp.vlotage = sd.dict_code AND sd.del_flag = 0
|
||||
WHERE tjp.del_flag = 0
|
||||
<if test="keyWord!=null and keyWord!=''">
|
||||
AND (
|
||||
INSTR(tjp.pro_name,#{keyWord}) > 0 OR
|
||||
INSTR(tjp.pro_no,#{keyWord}) > 0
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
<!--项目工程/单项工程是否存在-->
|
||||
<select id="isProject" resultType="java.lang.Integer">
|
||||
<if test="id == null or id == ''">
|
||||
SELECT COUNT(*) FROM tb_jj_project tp WHERE pro_no = #{proNo} AND del_flag = 0
|
||||
</if>
|
||||
<if test="id != null and id != ''">
|
||||
SELECT COUNT(*) FROM tb_jj_project tp WHERE pro_no = #{proNo} AND id != #{id} AND del_flag = 0
|
||||
</if>
|
||||
</select>
|
||||
<!--项目详情-->
|
||||
<select id="getProjectById" resultType="com.securitycontrol.entity.background.vo.ProjectVo">
|
||||
SELECT tjp.id,
|
||||
tjp.pro_name AS proName,
|
||||
tjp.pro_no AS proNo,
|
||||
tjp.org_id AS orgId,
|
||||
tjp.vlotage AS vlotage,
|
||||
tjp.construction_nature AS constructionNature,
|
||||
tjp.plan_nature AS planNature,
|
||||
tjp.line,
|
||||
tjp.power,
|
||||
tjp.plan_start_time AS planStartTime,
|
||||
tjp.plan_end_time AS planEndTime,
|
||||
tjp.start_time AS startTime,
|
||||
tjp.end_time AS endTime,
|
||||
tjp.tc_time AS tcTime
|
||||
FROM tb_jj_project tjp
|
||||
WHERE tjp.id = #{id}
|
||||
</select>
|
||||
<!--项目包含是否单项工程-->
|
||||
<select id="isHasChildPro" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*) FROM tb_sign_project WHERE project_no = #{proNo} AND del_flag = 0
|
||||
</select>
|
||||
<!--单项工程列表-->
|
||||
<select id="getSignProLists" resultType="com.securitycontrol.entity.background.vo.SignProVo">
|
||||
SELECT tsp.id,
|
||||
tsp.single_name AS singleName,
|
||||
tjp.pro_name AS projectName,
|
||||
tsp.project_no AS proNo,
|
||||
tsp.single_desc AS singleDesc,
|
||||
tsp.vol_level AS volLevel,
|
||||
tsp.line_length AS lineLength,
|
||||
tsp.subs_cap AS subsCap,
|
||||
CASE tsp.pro_type WHEN '1' THEN '变电' WHEN '2' THEN '线路' END AS proType,
|
||||
CASE tsp.subs_type WHEN '1' THEN '土建' WHEN '2' THEN '电气' WHEN '3' THEN '变电' END AS subsType,
|
||||
tsp.estimate_type AS estimateType,
|
||||
tsp.start_date AS startDate,
|
||||
tsp.end_date AS endDate,
|
||||
tsp.complete_date AS completeDate,
|
||||
sb.city_name AS orgName
|
||||
FROM tb_sign_project tsp
|
||||
LEFT JOIN sys_build sb ON tsp.org_id = sb.org_id
|
||||
LEFT JOIN tb_jj_project tjp ON tsp.project_no = tjp.pro_no AND tjp.del_flag = 0
|
||||
WHERE tsp.del_flag = 0
|
||||
<if test="keyWord!=null and keyWord!=''">
|
||||
AND (
|
||||
INSTR(tsp.single_name,#{keyWord}) > 0 OR
|
||||
INSTR(tsp.signle_no,#{keyWord}) > 0
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
<!--单项工程是否存在-->
|
||||
<select id="isSignPro" resultType="java.lang.Integer">
|
||||
<if test="id == null or id == ''">
|
||||
SELECT COUNT(*) FROM tb_sign_project tsp WHERE signle_no = #{signleNo} AND del_flag = 0
|
||||
</if>
|
||||
<if test="id != null and id != ''">
|
||||
SELECT COUNT(*) FROM tb_sign_project tsp WHERE signle_no = #{signleNo} AND id != #{id} AND del_flag = 0
|
||||
</if>
|
||||
</select>
|
||||
<!--单项工程详情-->
|
||||
<select id="getSignProById" resultType="com.securitycontrol.entity.background.vo.SignProVo">
|
||||
SELECT tsp.id,
|
||||
tsp.single_name AS singleName,
|
||||
tsp.project_no AS proNo,
|
||||
tsp.single_desc AS singleDesc,
|
||||
tsp.vol_level AS volLevel,
|
||||
tsp.line_length AS lineLength,
|
||||
tsp.subs_cap AS subsCap,
|
||||
CASE tsp.pro_type WHEN '1' THEN '变电' WHEN '2' THEN '线路' END AS proType,
|
||||
CASE tsp.subs_type WHEN '1' THEN '土建' WHEN '2' THEN '电气' WHEN '3' THEN '变电' END AS subsType,
|
||||
tsp.estimate_type AS estimateType,
|
||||
tsp.start_date AS startDate,
|
||||
tsp.end_date AS endDate,
|
||||
tsp.complete_date AS completeDate,
|
||||
tsp.org_id AS orgId
|
||||
FROM tb_sign_project tsp
|
||||
WHERE tsp.id = #{id}
|
||||
</select>
|
||||
<!--单项工程是否包含标段工程-->
|
||||
<select id="isHasBidChildPro" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*) FROM tb_project tp WHERE del_flag = 0 AND sign_code = #{signNo}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -118,4 +118,15 @@ public class SelectController extends BaseController {
|
|||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "项目下拉选")
|
||||
@GetMapping("getProjectList")
|
||||
public AjaxResult getProjectList(SelectDto dto){
|
||||
return service.getProjectList(dto);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "单项工程下拉选")
|
||||
@GetMapping("getSignProList")
|
||||
public AjaxResult getSignProList(SelectDto dto){
|
||||
return service.getSignProList(dto);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,6 +123,7 @@ public interface ISelectMapper {
|
|||
|
||||
/**
|
||||
* 边带下拉选
|
||||
*
|
||||
* @param dto
|
||||
* @return List<SelectVo>
|
||||
* @description
|
||||
|
|
@ -132,7 +133,8 @@ public interface ISelectMapper {
|
|||
List<SelectVo> getBdLists(SelectDto dto);
|
||||
|
||||
/**
|
||||
* 工程下拉选集合
|
||||
* 工程下拉选集合
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -140,5 +142,26 @@ public interface ISelectMapper {
|
|||
|
||||
List<SelectVo> getSelectLists();
|
||||
|
||||
List<SelectVo> getGtLists(@Param("bidCode") String bidCode);
|
||||
List<SelectVo> getGtLists(@Param("bidCode") String bidCode);
|
||||
|
||||
/**
|
||||
* 项目下拉选
|
||||
*
|
||||
* @param dto
|
||||
* @return List<SelectVo>
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/2 14:12
|
||||
*/
|
||||
List<SelectVo> getProjectList(SelectDto dto);
|
||||
|
||||
/**
|
||||
* 单项工程下拉选
|
||||
* @param dto
|
||||
* @return List<SelectVo>
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/2 14:12
|
||||
*/
|
||||
List<SelectVo> getSignProList(SelectDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,6 +119,7 @@ public interface ISelectService {
|
|||
|
||||
/**
|
||||
* 边带下拉选
|
||||
*
|
||||
* @param dto
|
||||
* @return AjaxResult
|
||||
* @description
|
||||
|
|
@ -129,6 +130,7 @@ public interface ISelectService {
|
|||
|
||||
/**
|
||||
* 下拉选
|
||||
*
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -136,6 +138,7 @@ public interface ISelectService {
|
|||
|
||||
/**
|
||||
* 获取工程下拉选
|
||||
*
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
|
|
@ -143,13 +146,35 @@ public interface ISelectService {
|
|||
|
||||
/**
|
||||
* 建管单位下拉选
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getSelectLists();
|
||||
|
||||
/**
|
||||
* 杆塔表下拉选
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getGtLists(String bidCode);
|
||||
|
||||
/**
|
||||
* 项目下拉选
|
||||
* @param dto
|
||||
* @return AjaxResult
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/2 14:11
|
||||
*/
|
||||
AjaxResult getProjectList(SelectDto dto);
|
||||
|
||||
/**
|
||||
* 单项工程下拉选
|
||||
* @param dto
|
||||
* @return AjaxResult
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/4/2 14:11
|
||||
*/
|
||||
AjaxResult getSignProList(SelectDto dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -227,4 +227,26 @@ public class SelectServiceImpl implements ISelectService {
|
|||
}
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getProjectList(SelectDto dto) {
|
||||
List<SelectVo> list = new ArrayList<>();
|
||||
try {
|
||||
list = mapper.getProjectList(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("项目下拉选");
|
||||
}
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getSignProList(SelectDto dto) {
|
||||
List<SelectVo> list = new ArrayList<>();
|
||||
try {
|
||||
list = mapper.getSignProList(dto);
|
||||
} catch (Exception e) {
|
||||
log.error("单项工程下拉选");
|
||||
}
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -143,4 +143,19 @@
|
|||
SELECT gt_id AS gtId,gt_name AS name FROM t_pro_gt tpg
|
||||
WHERE tpg.bid_code = #{bidCode}
|
||||
</select>
|
||||
<!--项目下拉选-->
|
||||
<select id="getProjectList" resultType="com.securitycontrol.entity.system.vo.SelectVo">
|
||||
SELECT pro_no AS id,
|
||||
pro_name AS name
|
||||
FROM tb_jj_project WHERE del_flag = 0
|
||||
</select>
|
||||
<!--单项工程下拉选-->
|
||||
<select id="getSignProList" resultType="com.securitycontrol.entity.system.vo.SelectVo">
|
||||
SELECT signle_no AS id,
|
||||
single_name AS name
|
||||
FROM tb_sign_project WHERE del_flag = 0
|
||||
<if test="proNo!=null and proNo!=''">
|
||||
AND project_no = #{proNo}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue