Commit 24d166b0 authored by suhuiguang's avatar suhuiguang

reafact(jg): 压力管道管道长度

1.压力管道管道长度调整为字符串/分隔开
parent 9eefcdb4
package com.yeejoin.amos.boot.biz.common.annotation;
import java.lang.annotation.*;
/**
* @author DELL
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
@Documented
public @interface PipeLengthField {
String sourceField() default "pipeLengthText";
String targetField() default "pipeLength";
}
...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.biz.config; ...@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.biz.config;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
import com.yeejoin.amos.boot.biz.common.annotation.FillCommonUserField; import com.yeejoin.amos.boot.biz.common.annotation.FillCommonUserField;
import com.yeejoin.amos.boot.biz.common.annotation.PipeLengthField;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey; import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
...@@ -15,7 +16,11 @@ import org.springframework.util.ObjectUtils; ...@@ -15,7 +16,11 @@ import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.context.RequestContext;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.Arrays;
import java.util.Date; import java.util.Date;
import java.util.Objects;
/** /**
* @author Dell * @author Dell
...@@ -42,17 +47,37 @@ public class MetaHandler implements MetaObjectHandler { ...@@ -42,17 +47,37 @@ public class MetaHandler implements MetaObjectHandler {
@Override @Override
public void insertFill(MetaObject metaObject) { public void insertFill(MetaObject metaObject) {
Date currentDate = new Date(); Date currentDate = new Date();
Class clazz = metaObject.getOriginalObject().getClass(); Class<?> clazz = metaObject.getOriginalObject().getClass();
FillCommonUserField annotation = (FillCommonUserField) clazz.getAnnotation(FillCommonUserField.class); FillCommonUserField annotation = clazz.getAnnotation(FillCommonUserField.class);
if (annotation == null || annotation.isAutoFill()) { if (annotation == null || annotation.isAutoFill()) {
autoFillUser(metaObject, metaObject.getOriginalObject()); autoFillUser(metaObject, metaObject.getOriginalObject());
} }
//如果有上传创建时间,不需要修改 PipeLengthField pipeLengthField = clazz.getAnnotation(PipeLengthField.class);
// if(metaObject.getValue("createDate")==null){ if(pipeLengthField != null){
// } processAutoFill(metaObject, pipeLengthField);
}
this.setFieldValByName("createDate", currentDate, metaObject); this.setFieldValByName("createDate", currentDate, metaObject);
} }
private void processAutoFill(MetaObject metaObject, PipeLengthField pipeLengthField) {
Object sourceValue = metaObject.getValue(pipeLengthField.sourceField());
if (sourceValue != null && metaObject.hasGetter(pipeLengthField.sourceField()) && metaObject.hasGetter(pipeLengthField.targetField())) {
Object convertedValue = convertValue(sourceValue, pipeLengthField);
metaObject.setValue(pipeLengthField.targetField(), convertedValue);
}
}
private Object convertValue(Object sourceValue, PipeLengthField pipeLengthField) {
// 示例:针对pipeLength的特殊处理
if ("pipeLengthText".equals(pipeLengthField.sourceField())) {
return Arrays.stream(sourceValue.toString().split("/")).filter(Objects::nonNull)
.map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add).setScale(3, RoundingMode.HALF_UP).toPlainString();
}
// 可扩展其他转换规则
return sourceValue;
}
private void autoFillUser(MetaObject metaObject, Object entity) { private void autoFillUser(MetaObject metaObject, Object entity) {
//获取用户信息 以及当前用户登录公司部门,角色 //获取用户信息 以及当前用户登录公司部门,角色
String userId = RequestContext.getExeUserId(); String userId = RequestContext.getExeUserId();
...@@ -165,5 +190,9 @@ public class MetaHandler implements MetaObjectHandler { ...@@ -165,5 +190,9 @@ public class MetaHandler implements MetaObjectHandler {
AgencyUserModel agencyUserModel = reginParams.getUserModel(); AgencyUserModel agencyUserModel = reginParams.getUserModel();
recInfoUpdate(metaObject, agencyUserModel); recInfoUpdate(metaObject, agencyUserModel);
} }
PipeLengthField pipeLengthField = clazz.getAnnotation(PipeLengthField.class);
if(pipeLengthField != null){
processAutoFill(metaObject, pipeLengthField);
}
} }
} }
\ No newline at end of file
...@@ -13,4 +13,8 @@ public interface BizCommonConstant { ...@@ -13,4 +13,8 @@ public interface BizCommonConstant {
String COMPANY_TREE_REDIS_KEY = "REGULATOR_UNIT_TREE"; String COMPANY_TREE_REDIS_KEY = "REGULATOR_UNIT_TREE";
String EQU_CATEGORY_CYLINDER = "2300"; String EQU_CATEGORY_CYLINDER = "2300";
String PIPE_LENGTH = "pipeLengthText";
String PIPE_LENGTH_SPILT = "/";
} }
...@@ -379,6 +379,7 @@ ...@@ -379,6 +379,7 @@
pp."NOMINAL_DIAMETER" nominalDiameter, pp."NOMINAL_DIAMETER" nominalDiameter,
pp."WALL_THICKNESS" wallThickness, pp."WALL_THICKNESS" wallThickness,
pp."PIPE_LENGTH" pipeLength, pp."PIPE_LENGTH" pipeLength,
pp."PIPE_LENGTH_TEXT" AS pipeLengthText,
pp."PRESSURE" pressure, pp."PRESSURE" pressure,
pp."TEMPERATURE" temperature, pp."TEMPERATURE" temperature,
pp."MEDIUM" medium, pp."MEDIUM" medium,
......
...@@ -260,6 +260,7 @@ ...@@ -260,6 +260,7 @@
pp."NOMINAL_DIAMETER" nominalDiameter, pp."NOMINAL_DIAMETER" nominalDiameter,
pp."WALL_THICKNESS" wallThickness, pp."WALL_THICKNESS" wallThickness,
pp."PIPE_LENGTH" pipeLength, pp."PIPE_LENGTH" pipeLength,
pp."PIPE_LENGTH_TEXT" AS pipeLengthText,
pp."PRESSURE" pressure, pp."PRESSURE" pressure,
pp."TEMPERATURE" temperature, pp."TEMPERATURE" temperature,
pp."MEDIUM" medium, pp."MEDIUM" medium,
......
...@@ -1119,6 +1119,7 @@ ...@@ -1119,6 +1119,7 @@
pp."NOMINAL_DIAMETER" nominalDiameter, pp."NOMINAL_DIAMETER" nominalDiameter,
pp."WALL_THICKNESS" wallThickness, pp."WALL_THICKNESS" wallThickness,
pp."PIPE_LENGTH" pipeLength, pp."PIPE_LENGTH" pipeLength,
pp."PIPE_LENGTH_TEXT" AS pipeLengthText,
pp."PRESSURE" pressure, pp."PRESSURE" pressure,
pp."TEMPERATURE" temperature, pp."TEMPERATURE" temperature,
pp."MEDIUM" medium, pp."MEDIUM" medium,
...@@ -1189,6 +1190,7 @@ ...@@ -1189,6 +1190,7 @@
ibjtpp."NOMINAL_DIAMETER" AS nominalDiameter, ibjtpp."NOMINAL_DIAMETER" AS nominalDiameter,
ibjtpp."WALL_THICKNESS" AS wallThickness, ibjtpp."WALL_THICKNESS" AS wallThickness,
ibjtpp."PIPE_LENGTH" AS pipeLength, ibjtpp."PIPE_LENGTH" AS pipeLength,
ibjtpp."PIPE_LENGTH_TEXT" AS pipeLengthText,
ibjtpp."PRESSURE" AS pressure, ibjtpp."PRESSURE" AS pressure,
ibjtpp."TEMPERATURE" AS temperature, ibjtpp."TEMPERATURE" AS temperature,
ibjtpp."MEDIUM" AS medium, ibjtpp."MEDIUM" AS medium,
......
...@@ -732,7 +732,7 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ ...@@ -732,7 +732,7 @@ public class IdxBizJgProjectContraptionServiceImplService extends BaseEntityServ
public void pressurePipeEquData(Map<String, Object> exportParamsMap, List<Map<String, Object>> equData, int current, int size) { public void pressurePipeEquData(Map<String, Object> exportParamsMap, List<Map<String, Object>> equData, int current, int size) {
String[] fieldNames = {"productName", "pipelineNumber", "deviceLevel", "designUnitName", "uscUnitName", String[] fieldNames = {"productName", "pipelineNumber", "deviceLevel", "designUnitName", "uscUnitName",
"uscDate", "useDate", "nominalDiameter", "wallThickness", "pipeLength", "pressure", "temperature", "uscDate", "useDate", "nominalDiameter", "wallThickness", "pipeLengthText", "pressure", "temperature",
"medium", "inspectConclusion", "inspectOrgName", "nextInspectDate", "remarks"}; "medium", "inspectConclusion", "inspectOrgName", "nextInspectDate", "remarks"};
// 填充有效数据 // 填充有效数据
for (int curr = 0; curr < equData.size(); curr++) { for (int curr = 0; curr < equData.size(); curr++) {
......
...@@ -842,6 +842,16 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -842,6 +842,16 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
iIdxBizJgInspectionDetectionInfoService.saveOrUpdateBatch(inspectionDetectionInfoList); iIdxBizJgInspectionDetectionInfoService.saveOrUpdateBatch(inspectionDetectionInfoList);
iIdxBizJgTechParamsPipelineService.saveOrUpdateBatch(paramsPipelineList); iIdxBizJgTechParamsPipelineService.saveOrUpdateBatch(paramsPipelineList);
esEquipmentCategory.saveAll(esEquipmentCategoryList); esEquipmentCategory.saveAll(esEquipmentCategoryList);
projectContraption.setPipelineLength(
paramsPipelineList.stream()
.map(IdxBizJgTechParamsPipeline::getPipeLength)
.filter(Objects::nonNull)
.map(BigDecimal::new)
.reduce(BigDecimal.ZERO, BigDecimal::add)
.setScale(2, RoundingMode.HALF_UP)
.doubleValue()
);
idxBizJgProjectContraptionService.saveOrUpdateData(projectContraption);
if(OPERATESAVE.equals(operateType)){ if(OPERATESAVE.equals(operateType)){
// 记录设备创建履历 // 记录设备创建履历
this.createResumePipeline(sequenceNbr, String.format(pipelineRoutePath, sequenceNbr + ""), company); this.createResumePipeline(sequenceNbr, String.format(pipelineRoutePath, sequenceNbr + ""), company);
......
...@@ -73,12 +73,15 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest; ...@@ -73,12 +73,15 @@ import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.math.BigDecimal;
import java.text.ParseException; import java.text.ParseException;
import java.util.*; import java.util.*;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static com.alibaba.fastjson.JSON.toJSONString; import static com.alibaba.fastjson.JSON.toJSONString;
import static com.yeejoin.amos.boot.module.jg.api.common.BizCommonConstant.PIPE_LENGTH;
import static com.yeejoin.amos.boot.module.jg.api.common.BizCommonConstant.PIPE_LENGTH_SPILT;
/** /**
* 改造告知服务实现类 * 改造告知服务实现类
...@@ -96,7 +99,6 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg ...@@ -96,7 +99,6 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
private static final String PROCESS_DEFINITION_KEY = "renovationNoticeNew"; private static final String PROCESS_DEFINITION_KEY = "renovationNoticeNew";
private static final String TABLE_PAGE_ID = "reformNoticeAdd"; private static final String TABLE_PAGE_ID = "reformNoticeAdd";
public static final String DEVICE_LIST = "deviceList"; public static final String DEVICE_LIST = "deviceList";
public static final String PIPE_LENGTH = "pipeLength";
public static final String RECORD = "record"; public static final String RECORD = "record";
public static final String SEQUENCE_NBR = "SEQUENCE_NBR"; public static final String SEQUENCE_NBR = "SEQUENCE_NBR";
public static final String PROJECT_CONTRAPTION = "projectContraption"; public static final String PROJECT_CONTRAPTION = "projectContraption";
...@@ -651,12 +653,25 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg ...@@ -651,12 +653,25 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
* @return 管道长度变化,正值为增长,负值为减少 * @return 管道长度变化,正值为增长,负值为减少
*/ */
private String calculatePipeLengthChange(JSONArray oldPipData, JSONArray newPipData) { private String calculatePipeLengthChange(JSONArray oldPipData, JSONArray newPipData) {
double oldPipLen = oldPipData.stream().mapToDouble(item -> JSONObject.parseObject(item.toString()).getDoubleValue(PIPE_LENGTH)).sum(); double oldPipLen = getPipLen(oldPipData); ;
double newPipLen = newPipData.stream().mapToDouble(item -> JSONObject.parseObject(item.toString()).getDoubleValue(PIPE_LENGTH)).sum(); double newPipLen = getPipLen(newPipData);
double change = newPipLen - oldPipLen; double change = newPipLen - oldPipLen;
return change == 0 ? "0" : String.format("%+.2f", change); return change == 0 ? "0" : String.format("%+.2f", change);
} }
private static double getPipLen(JSONArray oldPipData) {
return oldPipData.stream()
.map(p -> JSON.parseObject(p.toString()))
.filter(s -> StringUtil.isNotEmpty(s.getString(PIPE_LENGTH)))
.map(d ->
Arrays.stream(d.getString(PIPE_LENGTH).split(PIPE_LENGTH_SPILT)) // 分割字符串
.map(BigDecimal::new) // 转 BigDecimal
.reduce(BigDecimal.ZERO, BigDecimal::add) // 分段求和
)
.reduce(BigDecimal.ZERO, BigDecimal::add) // 全局求和
.doubleValue();
}
private JSONObject getNowPipJsonData(String projectContraptionId) { private JSONObject getNowPipJsonData(String projectContraptionId) {
return new JSONObject(Optional.ofNullable(idxBizJgProjectContraptionMapper.getDetail(projectContraptionId)) return new JSONObject(Optional.ofNullable(idxBizJgProjectContraptionMapper.getDetail(projectContraptionId))
.map(map -> { .map(map -> {
...@@ -1120,7 +1135,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg ...@@ -1120,7 +1135,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
// 产品质量合格证明 PRODUCT_QUALIFICATION_CERTIFICATE 其他附件 OTHER_ACCESSORIES 管道总长度 // 产品质量合格证明 PRODUCT_QUALIFICATION_CERTIFICATE 其他附件 OTHER_ACCESSORIES 管道总长度
// String productQualificationCertificate = JSON.toJSONString(newData.get(PRODUCT_QUALIFICATION_CERTIFICATE)); // String productQualificationCertificate = JSON.toJSONString(newData.get(PRODUCT_QUALIFICATION_CERTIFICATE));
// String otherAccessories = JSON.toJSONString(newData.get(OTHER_ACCESSORIES)); // String otherAccessories = JSON.toJSONString(newData.get(OTHER_ACCESSORIES));
double pipLengthLastSum = newPipData.stream().mapToDouble(item -> JSONObject.parseObject(item.toString()).getDoubleValue(PIPE_LENGTH)).sum(); double pipLengthLastSum = getPipLen(newPipData); // 最终转 double
LambdaUpdateWrapper<IdxBizJgProjectContraption> updateWrapper = new LambdaUpdateWrapper<IdxBizJgProjectContraption>() LambdaUpdateWrapper<IdxBizJgProjectContraption> updateWrapper = new LambdaUpdateWrapper<IdxBizJgProjectContraption>()
.eq(IdxBizJgProjectContraption::getSequenceNbr, notice.getProjectContraptionId()) .eq(IdxBizJgProjectContraption::getSequenceNbr, notice.getProjectContraptionId())
// .set(IdxBizJgProjectContraption::getProductQualificationCertificate, productQualificationCertificate) // .set(IdxBizJgProjectContraption::getProductQualificationCertificate, productQualificationCertificate)
...@@ -1462,7 +1477,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg ...@@ -1462,7 +1477,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
JSONArray alreadyDelPipData = Optional.ofNullable(JSONArray.parseArray(newData.getString(DEL_DEVICE_LIST))).orElse(new JSONArray()); JSONArray alreadyDelPipData = Optional.ofNullable(JSONArray.parseArray(newData.getString(DEL_DEVICE_LIST))).orElse(new JSONArray());
JSONObject oldData = Optional.ofNullable(JSONObject.parseObject(registrationHistory.getOldData())).orElse(new JSONObject()); JSONObject oldData = Optional.ofNullable(JSONObject.parseObject(registrationHistory.getOldData())).orElse(new JSONObject());
JSONArray oldPipData = Optional.ofNullable(JSONArray.parseArray(oldData.getString(DEVICE_LIST))).orElse(new JSONArray()); JSONArray oldPipData = Optional.ofNullable(JSONArray.parseArray(oldData.getString(DEVICE_LIST))).orElse(new JSONArray());
double oldPipLength = oldPipData.stream().mapToDouble(item -> JSON.parseObject(item.toString()).getDoubleValue(PIPE_LENGTH)).sum(); double oldPipLength = getPipLen(oldPipData);
List<String> oldPipDataRecords = oldPipData.stream().map(item -> JSON.parseObject(item.toString()).getString(RECORD)).collect(Collectors.toList()); List<String> oldPipDataRecords = oldPipData.stream().map(item -> JSON.parseObject(item.toString()).getString(RECORD)).collect(Collectors.toList());
List<String> nowPipDataRecords = idxBizJgProjectContraptionMapper.selectEquipList(notice.getProjectContraptionId()).stream().map(item -> String.valueOf(item.get("record"))).collect(Collectors.toList()); List<String> nowPipDataRecords = idxBizJgProjectContraptionMapper.selectEquipList(notice.getProjectContraptionId()).stream().map(item -> String.valueOf(item.get("record"))).collect(Collectors.toList());
List<JSONObject> toAddPipData = alreadyDelPipData.stream().map(item -> JSON.parseObject(item.toString())).collect(Collectors.toList()); List<JSONObject> toAddPipData = alreadyDelPipData.stream().map(item -> JSON.parseObject(item.toString())).collect(Collectors.toList());
......
...@@ -3173,7 +3173,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -3173,7 +3173,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
public void pressurePipeEquData(Map<String, Object> exportParamsMap, List<Object> equData, int current, int size) { public void pressurePipeEquData(Map<String, Object> exportParamsMap, List<Object> equData, int current, int size) {
String[] fieldNames = {"productName", "pipelineNumber", "deviceLevel", "designUnitName", "uscUnitName", String[] fieldNames = {"productName", "pipelineNumber", "deviceLevel", "designUnitName", "uscUnitName",
"uscDate", "useDate", "nominalDiameter", "wallThickness", "pipeLength", "pressure", "temperature", "uscDate", "useDate", "nominalDiameter", "wallThickness", "pipeLengthText", "pressure", "temperature",
"medium", "inspectConclusion", "inspectOrgName", "nextInspectDate", "remarks"}; "medium", "inspectConclusion", "inspectOrgName", "nextInspectDate", "remarks"};
// 填充有效数据 // 填充有效数据
for (int curr = 0; curr < equData.size(); curr++) { for (int curr = 0; curr < equData.size(); curr++) {
......
...@@ -1988,7 +1988,7 @@ ...@@ -1988,7 +1988,7 @@
<w:sz w:val="14"/> <w:sz w:val="14"/>
<w:szCs w:val="14"/> <w:szCs w:val="14"/>
</w:rPr> </w:rPr>
<w:t>${pipeLength1}</w:t> <w:t>${pipeLengthText1!"/"}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -2385,7 +2385,7 @@ ...@@ -2385,7 +2385,7 @@
<w:sz w:val="14"/> <w:sz w:val="14"/>
<w:szCs w:val="14"/> <w:szCs w:val="14"/>
</w:rPr> </w:rPr>
<w:t>${pipeLength2}</w:t> <w:t>${pipeLengthText2!"/"}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -2782,7 +2782,7 @@ ...@@ -2782,7 +2782,7 @@
<w:sz w:val="14"/> <w:sz w:val="14"/>
<w:szCs w:val="14"/> <w:szCs w:val="14"/>
</w:rPr> </w:rPr>
<w:t>${pipeLength3}</w:t> <w:t>${pipeLengthText3!"/"}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -3179,7 +3179,7 @@ ...@@ -3179,7 +3179,7 @@
<w:sz w:val="14"/> <w:sz w:val="14"/>
<w:szCs w:val="14"/> <w:szCs w:val="14"/>
</w:rPr> </w:rPr>
<w:t>${pipeLength4}</w:t> <w:t>${pipeLengthText4!"/"}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -3576,7 +3576,7 @@ ...@@ -3576,7 +3576,7 @@
<w:sz w:val="14"/> <w:sz w:val="14"/>
<w:szCs w:val="14"/> <w:szCs w:val="14"/>
</w:rPr> </w:rPr>
<w:t>${pipeLength5}</w:t> <w:t>${pipeLengthText5!"/"}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -3973,7 +3973,7 @@ ...@@ -3973,7 +3973,7 @@
<w:sz w:val="14"/> <w:sz w:val="14"/>
<w:szCs w:val="14"/> <w:szCs w:val="14"/>
</w:rPr> </w:rPr>
<w:t>${pipeLength6}</w:t> <w:t>${pipeLengthText6!"/"}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -4370,7 +4370,7 @@ ...@@ -4370,7 +4370,7 @@
<w:sz w:val="14"/> <w:sz w:val="14"/>
<w:szCs w:val="14"/> <w:szCs w:val="14"/>
</w:rPr> </w:rPr>
<w:t>${pipeLength7}</w:t> <w:t>${pipeLengthText7!"/"}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -4767,7 +4767,7 @@ ...@@ -4767,7 +4767,7 @@
<w:sz w:val="14"/> <w:sz w:val="14"/>
<w:szCs w:val="14"/> <w:szCs w:val="14"/>
</w:rPr> </w:rPr>
<w:t>${pipeLength8}</w:t> <w:t>${pipeLengthText8!"/"}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -5164,7 +5164,7 @@ ...@@ -5164,7 +5164,7 @@
<w:sz w:val="14"/> <w:sz w:val="14"/>
<w:szCs w:val="14"/> <w:szCs w:val="14"/>
</w:rPr> </w:rPr>
<w:t>${pipeLength9}</w:t> <w:t>${pipeLengthText9!"/"}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
...@@ -5561,7 +5561,7 @@ ...@@ -5561,7 +5561,7 @@
<w:sz w:val="14"/> <w:sz w:val="14"/>
<w:szCs w:val="14"/> <w:szCs w:val="14"/>
</w:rPr> </w:rPr>
<w:t>${pipeLength10}</w:t> <w:t>${pipeLengthText10!"/"}</w:t>
</w:r> </w:r>
</w:p> </w:p>
</w:tc> </w:tc>
......
...@@ -728,6 +728,7 @@ ...@@ -728,6 +728,7 @@
pp."NOMINAL_DIAMETER" nominalDiameter, pp."NOMINAL_DIAMETER" nominalDiameter,
pp."WALL_THICKNESS" wallThickness, pp."WALL_THICKNESS" wallThickness,
pp."PIPE_LENGTH" pipeLength, pp."PIPE_LENGTH" pipeLength,
pp."PIPE_LENGTH_TEXT" AS pipeLengthText,
pp."PRESSURE" pressure, pp."PRESSURE" pressure,
pp."TEMPERATURE" temperature, pp."TEMPERATURE" temperature,
pp."MEDIUM" medium, pp."MEDIUM" medium,
...@@ -775,6 +776,7 @@ ...@@ -775,6 +776,7 @@
pp."NOMINAL_DIAMETER" nominalDiameter, pp."NOMINAL_DIAMETER" nominalDiameter,
pp."WALL_THICKNESS" wallThickness, pp."WALL_THICKNESS" wallThickness,
pp."PIPE_LENGTH" pipeLength, pp."PIPE_LENGTH" pipeLength,
pp."PIPE_LENGTH_TEXT" AS pipeLengthText,
pp."PRESSURE" pressure, pp."PRESSURE" pressure,
pp."TEMPERATURE" temperature, pp."TEMPERATURE" temperature,
pp."MEDIUM" medium, pp."MEDIUM" medium,
......
package com.yeejoin.amos.boot.module.ymt.api.entity; package com.yeejoin.amos.boot.module.ymt.api.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yeejoin.amos.boot.biz.common.annotation.Group; import com.yeejoin.amos.boot.biz.common.annotation.Group;
import com.yeejoin.amos.boot.biz.common.annotation.PipeLengthField;
import com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity; import com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
...@@ -18,6 +20,7 @@ import lombok.experimental.Accessors; ...@@ -18,6 +20,7 @@ import lombok.experimental.Accessors;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Accessors(chain = true) @Accessors(chain = true)
@TableName("idx_biz_jg_tech_params_pipeline") @TableName("idx_biz_jg_tech_params_pipeline")
@PipeLengthField
public class IdxBizJgTechParamsPipeline extends TzsBaseEntity { public class IdxBizJgTechParamsPipeline extends TzsBaseEntity {
...@@ -96,7 +99,7 @@ public class IdxBizJgTechParamsPipeline extends TzsBaseEntity { ...@@ -96,7 +99,7 @@ public class IdxBizJgTechParamsPipeline extends TzsBaseEntity {
/** /**
* *
*/ */
@TableField("\"PIPE_LENGTH\"") @TableField(value = "\"PIPE_LENGTH\"", fill = FieldFill.INSERT_UPDATE)
private String pipeLength; private String pipeLength;
/** /**
...@@ -167,4 +170,10 @@ public class IdxBizJgTechParamsPipeline extends TzsBaseEntity { ...@@ -167,4 +170,10 @@ public class IdxBizJgTechParamsPipeline extends TzsBaseEntity {
@TableField(value = "\"WORK_REMARKS\"") @TableField(value = "\"WORK_REMARKS\"")
private String workRemarks; private String workRemarks;
/**
* 管道长度斜线分隔多段表示用
*/
@TableField("\"PIPE_LENGTH_TEXT\"")
private String pipeLengthText;
} }
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
"NOMINAL_DIAMETER", "NOMINAL_DIAMETER",
"WALL_THICKNESS", "WALL_THICKNESS",
"PIPE_LENGTH", "PIPE_LENGTH",
"PIPE_LENGTH_TEXT",
"PRESSURE", "PRESSURE",
"TEMPERATURE", "TEMPERATURE",
"MEDIUM", "MEDIUM",
......
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
ibjtpp."NOMINAL_DIAMETER" AS nominalDiameter, ibjtpp."NOMINAL_DIAMETER" AS nominalDiameter,
ibjtpp."WALL_THICKNESS" AS wallThickness, ibjtpp."WALL_THICKNESS" AS wallThickness,
ibjtpp."PIPE_LENGTH" AS pipeLength, ibjtpp."PIPE_LENGTH" AS pipeLength,
ibjtpp."PIPE_LENGTH_TEXT" AS pipeLengthText,
ibjtpp."PRESSURE" AS pressure, ibjtpp."PRESSURE" AS pressure,
ibjtpp."TEMPERATURE" AS temperature, ibjtpp."TEMPERATURE" AS temperature,
ibjtpp."MEDIUM" AS medium, ibjtpp."MEDIUM" AS medium,
...@@ -171,6 +172,7 @@ ...@@ -171,6 +172,7 @@
ibjtpp."NOMINAL_DIAMETER" AS nominalDiameter, ibjtpp."NOMINAL_DIAMETER" AS nominalDiameter,
ibjtpp."WALL_THICKNESS" AS wallThickness, ibjtpp."WALL_THICKNESS" AS wallThickness,
ibjtpp."PIPE_LENGTH" AS pipeLength, ibjtpp."PIPE_LENGTH" AS pipeLength,
ibjtpp."PIPE_LENGTH_TEXT" AS pipeLengthText,
ibjtpp."PRESSURE" AS pressure, ibjtpp."PRESSURE" AS pressure,
ibjtpp."TEMPERATURE" AS temperature, ibjtpp."TEMPERATURE" AS temperature,
ibjtpp."MEDIUM" AS medium, ibjtpp."MEDIUM" AS medium,
...@@ -316,6 +318,7 @@ ...@@ -316,6 +318,7 @@
ibjtpp."NOMINAL_DIAMETER" AS nominalDiameter, ibjtpp."NOMINAL_DIAMETER" AS nominalDiameter,
ibjtpp."WALL_THICKNESS" AS wallThickness, ibjtpp."WALL_THICKNESS" AS wallThickness,
ibjtpp."PIPE_LENGTH" AS pipeLength, ibjtpp."PIPE_LENGTH" AS pipeLength,
ibjtpp."PIPE_LENGTH_TEXT" AS pipeLengthText,
ibjtpp."PRESSURE" AS pressure, ibjtpp."PRESSURE" AS pressure,
ibjtpp."TEMPERATURE" AS temperature, ibjtpp."TEMPERATURE" AS temperature,
ibjtpp."MEDIUM" AS medium, ibjtpp."MEDIUM" AS medium,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment