标段工程修改

This commit is contained in:
cwchen 2024-04-02 15:27:36 +08:00
parent 0b1705d8b0
commit 1821429870
7 changed files with 111 additions and 20 deletions

View File

@ -61,6 +61,12 @@ public class Constant {
"12G0,宣城","12H0,阜阳","12J0,铜陵","12L0,蚌埠","12M0,滁州","12N0,六安","12P0,淮北","12Q0,宿州","12R0,池州",
"12S0,黄山","12T0,亳州","12Z0,建设分公司"};
/*工程阶段*/
public final static String[] BID_TYPE_ARR = {"0,设计","1,监理","2,施工","3,监理加施工"};
/*变电站类型*/
public final static String[] SUB_TYPE_ARR = {"1,土建","2,电气","3,变电"};
public final static Integer CELL_1 = 1;
public final static Integer CELL_2 = 2;
public final static Integer CELL_3 = 3;

View File

@ -213,6 +213,26 @@ public class ImportExcelUtils {
// 工程简介
obj.put("proBrief", row.getCell(Constant.CELL_17).getStringCellValue());
}
if (row.getCell(Constant.CELL_18) != null) {
// 工程阶段
obj.put("bidType", row.getCell(Constant.CELL_18).getStringCellValue());
}
if (row.getCell(Constant.CELL_19) != null) {
// 施工项目经理
obj.put("sgManage", row.getCell(Constant.CELL_19).getStringCellValue());
}
if (row.getCell(Constant.CELL_20) != null) {
// 监理工程师
obj.put("jlManage", row.getCell(Constant.CELL_20).getStringCellValue());
}
if (row.getCell(Constant.CELL_21) != null) {
// 变电站类型包括:1 土建,2 电气,3 变电
obj.put("subType", row.getCell(Constant.CELL_21).getStringCellValue());
}
if (row.getCell(Constant.CELL_22) != null) {
// 投产时间
obj.put("tcDate", row.getCell(Constant.CELL_22).getStringCellValue());
}
obj = setFileObj(row, obj, files);
return obj;
}
@ -343,25 +363,25 @@ public class ImportExcelUtils {
continue;
}
String keyName = null;
if (cAnchor.getCol1() == 18) {
if (cAnchor.getCol1() == 23) {
PRONAME_LIST.add(row.getCell(1).getStringCellValue());
keyName = "file" + "_" + cAnchor.getRow1() + "_1";
} else if (cAnchor.getCol1() == 19) {
} else if (cAnchor.getCol1() == 24) {
PRONAME_LIST.add(row.getCell(1).getStringCellValue());
keyName = "file" + "_" + cAnchor.getRow1() + "_2";
} else if (cAnchor.getCol1() == 20) {
} else if (cAnchor.getCol1() == 25) {
PRONAME_LIST.add(row.getCell(1).getStringCellValue());
keyName = "file" + "_" + cAnchor.getRow1() + "_3";
} else if (cAnchor.getCol1() == 21) {
} else if (cAnchor.getCol1() == 26) {
PRONAME_LIST.add(row.getCell(1).getStringCellValue());
keyName = "file" + "_" + cAnchor.getRow1() + "_4";
} else if (cAnchor.getCol1() == 22) {
} else if (cAnchor.getCol1() == 27) {
PRONAME_LIST.add(row.getCell(1).getStringCellValue());
keyName = "file" + "_" + cAnchor.getRow1() + "_5";
} else if (cAnchor.getCol1() == 23) {
} else if (cAnchor.getCol1() == 28) {
PRONAME_LIST.add(row.getCell(1).getStringCellValue());
keyName = "file" + "_" + cAnchor.getRow1() + "_6";
} else if (cAnchor.getCol1() == 24) {
} else if (cAnchor.getCol1() == 29) {
PRONAME_LIST.add(row.getCell(1).getStringCellValue());
keyName = "file" + "_" + cAnchor.getRow1() + "_7";
}
@ -415,19 +435,19 @@ public class ImportExcelUtils {
if (Objects.equals(className, Constant.PRO_IMPORT_VO)) {
switch (col) {
case "<xdr:col>18</xdr:col>":
return "file" + "_" + row.getRowNum() + "_1";
case "<xdr:col>19</xdr:col>":
return "file" + "_" + row.getRowNum() + "_2";
case "<xdr:col>20</xdr:col>":
return "file" + "_" + row.getRowNum() + "_3";
case "<xdr:col>21</xdr:col>":
return "file" + "_" + row.getRowNum() + "_4";
case "<xdr:col>22</xdr:col>":
return "file" + "_" + row.getRowNum() + "_5";
case "<xdr:col>23</xdr:col>":
return "file" + "_" + row.getRowNum() + "_6";
return "file" + "_" + row.getRowNum() + "_1";
case "<xdr:col>24</xdr:col>":
return "file" + "_" + row.getRowNum() + "_2";
case "<xdr:col>25</xdr:col>":
return "file" + "_" + row.getRowNum() + "_3";
case "<xdr:col>26</xdr:col>":
return "file" + "_" + row.getRowNum() + "_4";
case "<xdr:col>27</xdr:col>":
return "file" + "_" + row.getRowNum() + "_5";
case "<xdr:col>28</xdr:col>":
return "file" + "_" + row.getRowNum() + "_6";
case "<xdr:col>29</xdr:col>":
return "file" + "_" + row.getRowNum() + "_7";
default:
return null;

View File

@ -69,6 +69,21 @@ public class ProImportVo {
@ApiModelProperty(value = "实际竣工时间")
private String endTime;
@ApiModelProperty(value = "0设计1监理2施工3监理加施工")
private String bidType;
@ApiModelProperty(value = "施工项目经理")
private String sgManage;
@ApiModelProperty(value = "监理工程师")
private String jlManage;
@ApiModelProperty(value = "变电站类型包括:1 土建,2 电气,3 变电")
private String subType;
@ApiModelProperty(value = "投产时间")
private String tcDate;
@ApiModelProperty(value = "工程平面图")
private MultipartFile file;

View File

@ -109,6 +109,21 @@ public class ProVo {
@ApiModelProperty(value = "平面图数量")
private int proFileNum;
@ApiModelProperty(value = "0设计1监理2施工3监理加施工")
private String bidType;
@ApiModelProperty(value = "施工项目经理")
private String sgManage;
@ApiModelProperty(value = "监理工程师")
private String jlManage;
@ApiModelProperty(value = "变电站类型包括:1 土建,2 电气,3 变电")
private String subType;
@ApiModelProperty(value = "投产时间")
private String tcDate;
@ApiModelProperty(value = "类型 1.新增 2.修改")
private int type;

View File

@ -464,6 +464,11 @@ public class ProServiceImpl implements IProService {
vo.setPlanEndTime(obj.getString("planEndTime"));
vo.setStartTime(obj.getString("startTime"));
vo.setEndTime(obj.getString("endTime"));
vo.setBidType(getBidAndSubType(obj.getString("bidType"),1));
vo.setSgManage(obj.getString("sgManage"));
vo.setJlManage(obj.getString("jlManage"));
vo.setSubType(getBidAndSubType(obj.getString("subType"),2));
vo.setTcDate(obj.getString("tcDate"));
vo.setFile(obj.get("file") != null ? (MultipartFile) obj.get("file") : null);
List<MultipartFile> files = new ArrayList<MultipartFile>();
if (obj.get(Constant.FILE_2) != null) {
@ -507,7 +512,6 @@ public class ProServiceImpl implements IProService {
if (!StringUtils.isEmpty(buildName)) {
for (String build : Constant.BUILD_ARR) {
if (build.contains(buildName)) {
System.err.println(build);
return build.split(",")[0];
}
}
@ -515,6 +519,17 @@ public class ProServiceImpl implements IProService {
return null;
}
public static String getBidAndSubType(String name,int type) {
if (!StringUtils.isEmpty(name)) {
for (String value : type == 1 ? Constant.BID_TYPE_ARR : Constant.SUB_TYPE_ARR) {
if (value.contains(name)) {
return value.split(",")[0];
}
}
}
return null;
}
@Override
@Transactional(rollbackFor = Exception.class)
public AjaxResult editProStatus(ProVo vo) {

View File

@ -27,6 +27,11 @@
<if test="endTime != null and endTime!=''">end_time,</if>
<if test="org != null and org!=''">org,</if>
del_flag,
<if test="bidType != null and bidType!=''">bid_type,</if>
<if test="sgManage != null and sgManage!=''">sg_manage,</if>
<if test="jlManage != null and jlManage!=''">jl_manage,</if>
<if test="subType != null and subType!=''">sub_type,</if>
<if test="tcDate != null and tcDate!=''">tc_date,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="proId != null and proId != ''">#{proId},</if>
@ -50,6 +55,11 @@
<if test="endTime != null and endTime!=''">#{endTime},</if>
<if test="org != null and org!=''">#{org},</if>
0,
<if test="bidType != null and bidType!=''">#{bidType},</if>
<if test="sgManage != null and sgManage!=''">#{sgManage},</if>
<if test="jlManage != null and jlManage!=''">#{jlManage},</if>
<if test="subType != null and subType!=''">#{subType},</if>
<if test="tcDate != null and tcDate!=''">#{tcDate},</if>
</trim>
</if>
<if test="type == 2">
@ -73,6 +83,11 @@
<if test="startTime != null and startTime != ''">start_time = #{startTime},</if>
<if test="endTime != null and endTime != ''">end_time = #{endTime},</if>
<if test="org != null and org != ''">org = #{org},</if>
<if test="bidType != null and bidType!=''">bid_type = #{bidType},</if>
<if test="sgManage != null and sgManage!=''">sg_manage = #{sgManage},</if>
<if test="jlManage != null and jlManage!=''">jl_manage = #{jlManage},</if>
<if test="subType != null and subType!=''">sub_type = #{subType},</if>
<if test="tcDate != null and tcDate!=''">tc_date = #{tcDate},</if>
</set>
WHERE pro_id = #{proId}
</if>
@ -234,7 +249,12 @@
tp.plan_end_time AS planEndTime,
tp.start_time AS startTime,
tp.end_time AS endTime,
tp.org
tp.org,
tp.bid_type AS bidType,
tp.sg_manage AS sgManage,
tp.jl_manage AS jlManage,
tp.sub_type AS subType,
tp.tc_date AS tcDate
FROM tb_project tp
WHERE pro_id = #{proId}
</select>