工程进度
This commit is contained in:
parent
ae86ef6d33
commit
d669798282
|
|
@ -1,5 +1,8 @@
|
|||
package com.securitycontrol.common.core.constant;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author:cwchen
|
||||
* @date:2024-02-27-18:13
|
||||
|
|
@ -30,6 +33,10 @@ public class Constant {
|
|||
|
||||
public final static String XL = "线路";
|
||||
|
||||
public final static String[] buildArr = {"12A0,合肥","12B0,马鞍山","12C0,芜湖","12D0,安庆","12F0,淮南",
|
||||
"12G0,宣城","12H0,阜阳","12J0,铜陵","12L0,蚌埠","12M0,滁州","12N0,六安","12P0,淮北","12Q0,宿州","12R0,池州",
|
||||
"12S0,黄山","12T0,亳州","12Z0,建设分公司"};
|
||||
|
||||
public final static Integer CELL_1 = 1;
|
||||
public final static Integer CELL_2 = 2;
|
||||
public final static Integer CELL_3 = 3;
|
||||
|
|
|
|||
|
|
@ -28,12 +28,18 @@ public class ProVo {
|
|||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "标段工程编码")
|
||||
@NotBlank(message = "标段工程编码不能为空", groups = {Query.class})
|
||||
@Length(max = 50, message = "标段工程编码字符长度不能超过50", groups = {Query.class})
|
||||
private String bidCode;
|
||||
|
||||
@ApiModelProperty(value = "单项工程编码")
|
||||
@NotBlank(message = "单项工程编码不能为空", groups = {Query.class})
|
||||
@Length(max = 50, message = "单项工程编码字符长度不能超过50", groups = {Query.class})
|
||||
private String signCode;
|
||||
|
||||
@ApiModelProperty(value = "工程编码")
|
||||
@NotBlank(message = "工程编码不能为空", groups = {Query.class})
|
||||
@Length(max = 50, message = "工程编码字符长度不能超过50", groups = {Query.class})
|
||||
private String proCode;
|
||||
|
||||
@ApiModelProperty(value = "工程名称")
|
||||
|
|
@ -42,36 +48,53 @@ public class ProVo {
|
|||
private String proName;
|
||||
|
||||
@ApiModelProperty(value = "工程成本")
|
||||
@NotBlank(message = "工程成本不能为空", groups = {Query.class})
|
||||
@Length(max = 50, message = "工程成本字符长度不能超过50", groups = {Query.class})
|
||||
private String proCost;
|
||||
|
||||
@ApiModelProperty(value = "施工单位")
|
||||
@NotBlank(message = "施工单位不能为空", groups = {Query.class})
|
||||
@Length(max = 30, message = "施工单位字符长度不能超过30", groups = {Query.class})
|
||||
private String sgUnit;
|
||||
|
||||
@ApiModelProperty(value = "监理单位")
|
||||
@NotBlank(message = "监理单位不能为空", groups = {Query.class})
|
||||
@Length(max = 30, message = "监理单位字符长度不能超过30", groups = {Query.class})
|
||||
private String jlUnit;
|
||||
|
||||
@ApiModelProperty(value = "工程类型")
|
||||
@NotBlank(message = "工程类型不能为空", groups = {Query.class})
|
||||
@Length(max = 10, message = "工程类型字符长度不能超过10", groups = {Query.class})
|
||||
private String proType;
|
||||
|
||||
@ApiModelProperty(value = "工程规模")
|
||||
@NotBlank(message = "工程规模不能为空", groups = {Query.class})
|
||||
@Length(max = 300, message = "工程规模字符长度不能超过300", groups = {Query.class})
|
||||
private String proScale;
|
||||
|
||||
@ApiModelProperty(value = "项目经理")
|
||||
@NotBlank(message = "项目经理不能为空", groups = {Query.class})
|
||||
@Length(max = 10, message = "项目经理字符长度不能超过10", groups = {Query.class})
|
||||
private String manager;
|
||||
|
||||
@ApiModelProperty(value = "工程简介")
|
||||
@NotBlank(message = "工程简介不能为空", groups = {Query.class})
|
||||
private String proBrief;
|
||||
|
||||
@ApiModelProperty(value = "当前工序")
|
||||
private String nowGx;
|
||||
|
||||
@ApiModelProperty(value = "工程状态")
|
||||
@NotBlank(message = "工程状态不能为空", groups = {Query.class})
|
||||
@Length(max = 10, message = "工程状态字符长度不能超过10", groups = {Query.class})
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty(value = "计划开始时间")
|
||||
@NotBlank(message = "计划开始时间不能为空", groups = {Query.class})
|
||||
private String planStartTime;
|
||||
|
||||
@ApiModelProperty(value = "计划结束时间")
|
||||
@NotBlank(message = "计划结束时间不能为空", groups = {Query.class})
|
||||
private String planEndTime;
|
||||
|
||||
@ApiModelProperty(value = "实际开始时间")
|
||||
|
|
|
|||
|
|
@ -14,4 +14,7 @@ public class SelectDto {
|
|||
|
||||
@ApiModelProperty(value = "参数")
|
||||
private String param;
|
||||
|
||||
@ApiModelProperty(value = "1.变电 2线路")
|
||||
private String proType;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public class SelectController extends BaseController {
|
|||
return service.getDictLists(dto);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "杆塔下拉选")
|
||||
@ApiOperation(value = "杆塔下拉选/变电工序下拉选")
|
||||
@GetMapping("getTowerLists")
|
||||
public AjaxResult getTowerLists(SelectDto dto){
|
||||
return service.getTowerLists(dto);
|
||||
|
|
|
|||
|
|
@ -177,6 +177,7 @@ public interface IProMapper {
|
|||
|
||||
/**
|
||||
* 当前工序计划是否存在进度填报数据
|
||||
*
|
||||
* @param dto
|
||||
* @return int
|
||||
* @description
|
||||
|
|
@ -184,4 +185,14 @@ public interface IProMapper {
|
|||
* @date 2024/3/16 15:56
|
||||
*/
|
||||
int hasGxProgress(GxPlanDto dto);
|
||||
|
||||
/**
|
||||
* 工程是否存在
|
||||
* @param vo
|
||||
* @return int
|
||||
* @description
|
||||
* @author cwchen
|
||||
* @date 2024/3/16 18:20
|
||||
*/
|
||||
int proIsExist(ProVo vo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,12 +60,12 @@ public class ProServiceImpl implements IProService {
|
|||
@Override
|
||||
public List<ProVo> getProLists(ProDto dto) {
|
||||
List<ProVo> list = new ArrayList<>();
|
||||
list = mapper.getProLists(dto);
|
||||
list.forEach(item -> {
|
||||
List<Integer> fileNums = mapper.getProFiles(item.getProId());
|
||||
item.setProImgFileNum(fileNums.get(0));
|
||||
item.setProFileNum(fileNums.get(1));
|
||||
});
|
||||
list = mapper.getProLists(dto);
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
@ -80,6 +80,10 @@ public class ProServiceImpl implements IProService {
|
|||
return AjaxResult.error(validResult);
|
||||
}
|
||||
String proId = UUID.randomUUID().toString().replace("-", "");
|
||||
int result = mapper.proIsExist(vo);
|
||||
if(result > 0){
|
||||
return AjaxResult.error("标段编码已存在");
|
||||
}
|
||||
if (StringUtils.isBlank(vo.getProId())) {
|
||||
if (files == null || types == null) {
|
||||
return AjaxResult.error("图片未上传");
|
||||
|
|
@ -278,7 +282,7 @@ public class ProServiceImpl implements IProService {
|
|||
public ProImportVo setProData(ProImportVo vo, JSONObject obj) {
|
||||
String proId = UUID.randomUUID().toString().replace("-", "");
|
||||
vo.setProId(proId);
|
||||
vo.setOrg(obj.getString("org"));
|
||||
vo.setOrg(getBuildCode(obj.getString("org")));
|
||||
vo.setBidCode(obj.getString("bidCode"));
|
||||
vo.setSignCode(obj.getString("signCode"));
|
||||
vo.setProCode(obj.getString("proCode"));
|
||||
|
|
@ -334,6 +338,18 @@ public class ProServiceImpl implements IProService {
|
|||
return fileVo;
|
||||
}
|
||||
|
||||
public static String getBuildCode(String buildName){
|
||||
if (!StringUtils.isEmpty(buildName)) {
|
||||
for (String build : Constant.buildArr) {
|
||||
if (build.contains(buildName)) {
|
||||
System.err.println(build);
|
||||
return build.split(",")[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult editProStatus(ProVo vo) {
|
||||
|
|
|
|||
|
|
@ -206,9 +206,9 @@
|
|||
</select>
|
||||
<!--工程图片/平面图数量-->
|
||||
<select id="getProFiles" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*) FROM tb_resource_file WHERE source_id = #{proId} AND file_type = 0
|
||||
SELECT COUNT(*) FROM tb_resource_file WHERE source_id = #{proId} AND file_type = 1 AND source_type = '工程图片'
|
||||
UNION ALL
|
||||
SELECT COUNT(*) FROM tb_resource_file WHERE source_id = #{proId} AND file_type = 1
|
||||
SELECT COUNT(*) FROM tb_resource_file WHERE source_id = #{proId} AND file_type = 1 AND source_type = '工程平面图'
|
||||
</select>
|
||||
<!--工程详情-->
|
||||
<select id="getProById" resultType="com.securitycontrol.entity.system.base.vo.ProVo">
|
||||
|
|
@ -230,7 +230,8 @@
|
|||
tp.plan_start_time AS planStartTime,
|
||||
tp.plan_end_time AS planEndTime,
|
||||
tp.start_time AS startTime,
|
||||
tp.end_time AS endTime
|
||||
tp.end_time AS endTime,
|
||||
tp.org
|
||||
FROM tb_project tp
|
||||
WHERE pro_id = #{proId}
|
||||
</select>
|
||||
|
|
@ -284,4 +285,12 @@
|
|||
<select id="hasGxProgress" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*) FROM tb_project_progress WHERE plan_id = #{planId}
|
||||
</select>
|
||||
<select id="proIsExist" resultType="java.lang.Integer">
|
||||
<if test="proId == null or proId == ''">
|
||||
SELECT COUNT(*) FROM tb_project tp WHERE bid_code = #{bidCode}
|
||||
</if>
|
||||
<if test="proId != null and proId != ''">
|
||||
SELECT COUNT(*) FROM tb_project tp WHERE bid_code = #{bidCode} AND pro_id != #{proId}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -54,8 +54,19 @@
|
|||
</select>
|
||||
<!--杆塔下拉选-->
|
||||
<select id="getTowerLists" resultType="com.securitycontrol.entity.system.vo.SelectVo">
|
||||
SELECT gt_id AS id,
|
||||
gt_name AS name
|
||||
FROM t_pro_gt WHERE bid_code = #{param}
|
||||
<if test="type == 1">
|
||||
SELECT sd2.dict_code AS id,
|
||||
sd2.dict_name AS name
|
||||
FROM sys_dict sd
|
||||
LEFT JOIN sys_dict sd2 ON sd.dict_code = sd2.p_code AND sd2.del_flag = 0
|
||||
WHERE sd.dict_code = #{param} AND sd.del_flag = 0
|
||||
ORDER BY sd2.dict_sort
|
||||
</if>
|
||||
<if test="type == 2">
|
||||
SELECT gt_id AS id,
|
||||
gt_name AS name
|
||||
FROM t_pro_gt WHERE bid_code = #{param}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue