Commit f8ae75a9 authored by suhuiguang's avatar suhuiguang

Merge branch 'develop_tzs_register' of…

Merge branch 'develop_tzs_register' of http://39.100.92.250:5000/moa/amos-boot-biz into develop_tzs_register
parents 0731dbc2 907d7e55
package com.yeejoin.amos.api.openapi.face.service; package com.yeejoin.amos.api.openapi.face.service;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.dynamic.datasource.annotation.DSTransactional; import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.api.openapi.face.model.TmCylinderFillingExamineModel; import com.yeejoin.amos.api.openapi.face.model.TmCylinderFillingExamineModel;
...@@ -94,6 +95,7 @@ public class TmCylinderFillingExamineService extends MyBaseServiceImpl<TmCylinde ...@@ -94,6 +95,7 @@ public class TmCylinderFillingExamineService extends MyBaseServiceImpl<TmCylinde
} }
} }
@DS("tzs")
private void syncCylinderFillingExamine(List<TmCylinderFillingExamineModel> model) { private void syncCylinderFillingExamine(List<TmCylinderFillingExamineModel> model) {
syncCylinderDataService.syncCylinderFillingExamine(model); syncCylinderDataService.syncCylinderFillingExamine(model);
} }
......
package com.yeejoin.amos.api.openapi.face.service; package com.yeejoin.amos.api.openapi.face.service;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.dynamic.datasource.annotation.DSTransactional; import com.baomidou.dynamic.datasource.annotation.DSTransactional;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.api.openapi.face.model.TmCylinderOffloadingModel; import com.yeejoin.amos.api.openapi.face.model.TmCylinderOffloadingModel;
...@@ -70,6 +71,7 @@ public class TmCylinderOffloadingService extends MyBaseServiceImpl<TmCylinderOff ...@@ -70,6 +71,7 @@ public class TmCylinderOffloadingService extends MyBaseServiceImpl<TmCylinderOff
* 同步气站信息至气瓶服务 * 同步气站信息至气瓶服务
* @param model * @param model
*/ */
@DS("tzs")
private void syncCylinderOffloadingModel(List<TmCylinderOffloadingModel> model) { private void syncCylinderOffloadingModel(List<TmCylinderOffloadingModel> model) {
syncCylinderDataService.syncCylinderOffloading(model); syncCylinderDataService.syncCylinderOffloading(model);
} }
......
...@@ -34,10 +34,6 @@ public class DictParamsConverter implements Converter<String> { ...@@ -34,10 +34,6 @@ public class DictParamsConverter implements Converter<String> {
dictMap.put("过热器出口集箱", "6006"); dictMap.put("过热器出口集箱", "6006");
dictMap.put("启动分离器", "6007"); dictMap.put("启动分离器", "6007");
dictMap.put("长输管道", "5994"); dictMap.put("长输管道", "5994");
dictMap.put("磁粉", "5988");
dictMap.put("射线", "5986");
dictMap.put("超声", "5987");
dictMap.put("渗透", "5989");
dictMap.put("A1", "6094"); dictMap.put("A1", "6094");
dictMap.put("A2", "6095"); dictMap.put("A2", "6095");
dictMap.put("A7", "6100"); dictMap.put("A7", "6100");
......
package com.yeejoin.amos.boot.module.jg.api.dto;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import java.util.HashMap;
import java.util.Map;
public class InspectConclusionConverter implements Converter<String> {
private static final Map<String, String> dictMap = new HashMap<>();
static {
// 填充映射关系
dictMap.put("合格", "6040");
dictMap.put("不合格", "6041");
dictMap.put("复检合格", "6042");
dictMap.put("复检不合格", "6043");
dictMap.put("整改后合格", "6045");
dictMap.put("符合", "6046");
dictMap.put("不符合", "6047");
dictMap.put("符合要求", "6048");
dictMap.put("基本符合要求", "6049");
dictMap.put("不符合要求", "6050");
dictMap.put("允许使用", "6051");
dictMap.put("降压使用", "6052");
dictMap.put("进行合于使用评价", "6053");
dictMap.put("其他", "6044");
}
@Override
public Class<?> supportJavaTypeKey() {
// 实体类中对象属性类型
return String.class;
}
@Override
public CellDataTypeEnum supportExcelTypeKey() {
return CellDataTypeEnum.STRING;
}
@Override
public String convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty,
GlobalConfiguration globalConfiguration) {
// 从Cell中读取数据
String cellValue = cellData.getStringValue();
// 判断Excel中的值,将其转换为预期的数值
return dictMap.getOrDefault(cellValue, null);
}
@Override
public CellData convertToExcelData(String o, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
return new CellData("");
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.jg.api.dto;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import java.util.HashMap;
import java.util.Map;
public class InspectTypeConverter implements Converter<String> {
private static final Map<String, String> dictMap = new HashMap<>();
static {
// 填充映射关系
dictMap.put("定期检验", "DQJY");
dictMap.put("首次检验", "SCJY");
dictMap.put("安装监督检验", "AZJDJY");
dictMap.put("改造监督检验", "GZJDJY");
dictMap.put("维修监督检验", "WXJDJY");
dictMap.put("制造监督检验", "ZZJDJY");
}
@Override
public Class<?> supportJavaTypeKey() {
// 实体类中对象属性类型
return String.class;
}
@Override
public CellDataTypeEnum supportExcelTypeKey() {
return CellDataTypeEnum.STRING;
}
@Override
public String convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty,
GlobalConfiguration globalConfiguration) {
// 从Cell中读取数据
String cellValue = cellData.getStringValue();
// 判断Excel中的值,将其转换为预期的数值
return dictMap.getOrDefault(cellValue, null);
}
@Override
public CellData convertToExcelData(String o, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
return new CellData("");
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.jg.api.dto;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "管道-设备信息", description = "管道-设备信息")
public class PipingExcelDto extends BaseDto {
@ExcelIgnore
private static final long serialVersionUID = 1L;
//----------------------------------------------------------------------基本信息
@ApiModelProperty(value = "设备种类")
@ExcelIgnore
private String equList;
@ApiModelProperty(value = "设备类别")
@ExcelIgnore
private String equCategory;
@ApiModelProperty(value = "设备品种")
@ExcelIgnore
private String equDefine;
@ApiModelProperty(value = "单位内编号")
@ExcelProperty(value = "单位内编号")
private String useInnerCode;
@ApiModelProperty(value = "产品名称")
@ExcelProperty(value = "产品名称")
private String productName;
@ApiModelProperty(value = "管道名称(登记单元)")
@ExcelProperty(value = "管道名称(登记单元)")
private String pipeName;
@ApiModelProperty(value = "设备型号")
@ExcelProperty(value = "设备型号")
private String equType;
@ApiModelProperty(value = "设备总价值(万元)")
@ExcelProperty(value = "设备总价值(万元)")
private String equPrice;
@ApiModelProperty(value = "有无设备代码")
@ExcelProperty(value = "有无设备代码")
private String equCodeType;
@ApiModelProperty(value = "设备代码")
@ExcelProperty(value = "设备代码")
private String equCode;
@ApiModelProperty(value = "工程(装置)名称")
@ExcelProperty(value = "工程(装置)名称")
private String projectContraption;
@ApiModelProperty(value = "工程(装置)编号")
@ExcelProperty(value = "工程(装置)编号")
private String projectContraptionNo;
@ApiModelProperty(value = "使用登记证编号")
@ExcelProperty(value = "使用登记证编号")
private String useOrgCode;
//-----------------------------------------------------------------------使用信息
@ApiModelProperty(value = "使用单位统一社会信用代码")
@ExcelProperty(value = "使用单位统一社会信用代码")
private String useUnitCode;
@ApiModelProperty(value = "使用单位名称")
@ExcelProperty(value = "使用单位名称")
private String useUnit;
//-----------------------------------------------------------------------安装信息
@ApiModelProperty(value = "安装单位统一社会信用代码")
@ExcelProperty(value = "安装单位统一社会信用代码")
private String installUnitCode;
@ApiModelProperty(value = "安装单位名称")
@ExcelProperty(value = "安装单位名称")
private String installUnitName;
//-----------------------------------------------------------------------检验检测信息
@ApiModelProperty(value = "检验检测机构统一社会信用代码")
@ExcelProperty(value = "检验检测机构统一社会信用代码")
private String inspectUnitCode;
@ApiModelProperty(value = "检验检测机构名称")
@ExcelProperty(value = "检验检测机构名称")
private String inspectUnitName;
@ApiModelProperty(value = "检验结论")
@ExcelProperty(value = "检验结论")
private String inspectConclusion;
@ApiModelProperty(value = "检验类型")
@ExcelProperty(value = "检验类型")
private String inspectType;
@ApiModelProperty(value = "检验日期")
@ExcelProperty(value = "检验日期")
private String inspectDate;
@ApiModelProperty(value = "检验人员名称")
@ExcelProperty(value = "检验人员名称")
private String inspectPersonName;
@ApiModelProperty(value = "下次检验日期")
@ExcelProperty(value = "下次检验日期")
private String nextInspectDate;
@ApiModelProperty(value = "检验报告编号")
@ExcelProperty(value = "检验报告编号")
private String inspectReportCode;
//-----------------------------------------------------------------------设计信息
@ApiModelProperty(value = "设计单位统一社会信用代码")
@ExcelProperty(value = "设计单位统一社会信用代码")
private String designUnitCreditCode;
@ApiModelProperty(value = "设计单位名称")
@ExcelProperty(value = "设计单位名称")
private String designUnitName;
//--------------------------------------------------------------------压力管道----技术参数
@ExcelProperty(value = "管道类别")
@ApiModelProperty(value = "管道类别")
private String pipelineClass;
@ExcelProperty(value = "公称壁厚(mm)")
@ApiModelProperty(value = "公称壁厚(mm)")
private String wallThickness;
@ExcelProperty(value = "公称直径(mm)")
@ApiModelProperty(value = "公称直径(mm)")
private String nominalDiameter;
@ExcelProperty(value = "管道长度(m)")
@ApiModelProperty(value = "管道长度(m)")
private String pipeLength;
@ExcelProperty(value = "设计-压力(MPa)")
@ApiModelProperty(value = "设计-压力(MPa)")
private String pressure;
@ExcelProperty(value = "设计-介质")
@ApiModelProperty(value = "设计-介质")
private String medium;
@ExcelProperty(value = "起/始位置 (经纬度)(格式:经度-纬度)")
@ApiModelProperty(value = "起/始位置 (经纬度)(格式:经度-纬度)")
private String startePosition;
@ExcelProperty(value = "设计-温度(℃)")
@ApiModelProperty(value = "设计-温度(℃)")
private String temperature;
@ExcelProperty(value = "管道编号")
@ApiModelProperty(value = "管道编号")
private String pipelineNumber;
@ExcelProperty(value = "管道级别")
@ApiModelProperty(value = "管道级别")
private String deviceLevel;
@ExcelProperty(value = "工作条件-压力(MPa)")
@ApiModelProperty(value = "工作条件-压力(MPa)")
private String workPressure;
@ExcelProperty(value = "工作条件-温度(℃)")
@ApiModelProperty(value = "工作条件-温度(℃)")
private String workTemperature;
@ExcelProperty(value = "工作条件-介质")
@ApiModelProperty(value = "工作条件-介质")
private String workMedium;
@ExcelProperty(value = "备注")
@ApiModelProperty(value = "备注")
private String remarks;
}
\ No newline at end of file
...@@ -267,4 +267,11 @@ public class JgUseRegistration extends BaseEntity { ...@@ -267,4 +267,11 @@ public class JgUseRegistration extends BaseEntity {
*/ */
@TableField("project_contraption_id") @TableField("project_contraption_id")
private String projectContraptionId; private String projectContraptionId;
/**
* 原始需合并工程装置id集合
*/
@TableField("origin_project_contraption_ids")
private String originProjectContraptionIds;
} }
...@@ -40,4 +40,9 @@ public class JgUseRegistrationEq extends BaseEntity { ...@@ -40,4 +40,9 @@ public class JgUseRegistrationEq extends BaseEntity {
@TableField("is_invalid") @TableField("is_invalid")
private Boolean isInvalid =false; private Boolean isInvalid =false;
/**
* 原始需合并工程装置id
*/
@TableField("origin_project_contraption_id")
private String originProjectContraptionId;
} }
...@@ -13,7 +13,9 @@ public enum PipelineEnum { ...@@ -13,7 +13,9 @@ public enum PipelineEnum {
PRESSURE_PIPELINE("压力管道", "8000"), PRESSURE_PIPELINE("压力管道", "8000"),
INDUSTRIAL_PIPELINE("工业管道", "8300"); INDUSTRIAL_PIPELINE("工业管道", "8300"),
LONG_DISTANCE_PIPELINE("长输管道", "8100"),
COMMON_PIPELINE("公用管道", "8200");
private final String name; private final String name;
......
...@@ -7,6 +7,7 @@ import org.apache.commons.io.FilenameUtils; ...@@ -7,6 +7,7 @@ import org.apache.commons.io.FilenameUtils;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.component.event.RestEventTrigger;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
...@@ -58,32 +59,38 @@ public class DataDockController { ...@@ -58,32 +59,38 @@ public class DataDockController {
return ResponseHelper.buildResponse(dataDockService.dataCheckAndImportEquipmentData(remark, file)); return ResponseHelper.buildResponse(dataDockService.dataCheckAndImportEquipmentData(remark, file));
} }
// @TycloudOperation(ApiLevel = UserType.AGENCY) /**
// @PostMapping(value = "/delete") * 工业管道批量检查
// @ApiOperation(httpMethod = "POST", value = "八大类历史设备导入shanchu", notes = "八大类历史设备导入shachu") **/
// public Object importData() { @TycloudOperation(ApiLevel = UserType.AGENCY)
// dataDockService.delete(); @PostMapping(value = "/checkGYGDData")
// return ResponseHelper.buildResponse("ok"); @ApiOperation(httpMethod = "POST", value = "工业管道批量检查", notes = "工业管道批量检查")
// } @RestEventTrigger(value = "operateLogRestEventHandler")
public ResponseModel<?> checkGYGDData(@RequestPart("file") MultipartFile multipartFile) throws Exception {
return ResponseHelper.buildResponse(dataDockService.checkGDData(multipartFile, true));
}
/**
* 工业 、公用、长输管道批量保存
**/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/savePipingData")
@ApiOperation(httpMethod = "POST", value = "工业管道批量保存", notes = "工业管道批量保存")
@RestEventTrigger(value = "operateLogRestEventHandler")
public ResponseModel<?> savePipingData(@RequestBody Map<String, Object> paramMap) {
return ResponseHelper.buildResponse(dataDockService.savePipingData(paramMap));
}
/**
* 公用、长输道批量检查
**/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/checkGYCSGDData")
@ApiOperation(httpMethod = "POST", value = "公用、长输管道批量检查", notes = "公用、长输管道批量检查")
@RestEventTrigger(value = "operateLogRestEventHandler")
public ResponseModel<?> checkGYCSGDData(@RequestPart("file") MultipartFile multipartFile) throws Exception {
return ResponseHelper.buildResponse(dataDockService.checkGDData(multipartFile, false));
}
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @GetMapping(value = "/yanChang/ORG_BRANCH_CODE")
// @ApiOperation(httpMethod = "get", value = "延炼-延长-刷入属地监管部门", notes = "延炼-延长-刷入属地监管部门")
// public Object writeOrgBranchCode2YanChang(@RequestParam String remark) {
// if (ValidationUtil.isEmpty(remark)) {
// throw new BadRequest("remark必填!");
// }
// return ResponseHelper.buildResponse("更新成功,共" + dataDockService.writeOrgBranchCode2YanChang(remark) + "条数据");
// }
//
// @TycloudOperation(ApiLevel = UserType.AGENCY)
// @GetMapping(value = "/yanChang/USE_PLACE")
// @ApiOperation(httpMethod = "get", value = "延炼-延长-刷入所属区域", notes = "延炼-延长-刷入所属区域")
// public Object writeUsePlace2YanChang(@RequestParam String remark) {
// if (ValidationUtil.isEmpty(remark)) {
// throw new BadRequest("remark必填!");
// }
// return ResponseHelper.buildResponse("更新成功,共" + dataDockService.writeUsePlace2YanChang(remark) + "条数据");
// }
} }
...@@ -6,9 +6,11 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams; ...@@ -6,9 +6,11 @@ import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController; import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImpl; import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgProjectContraptionServiceImpl;
import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgProjectContraptionDto; import com.yeejoin.amos.boot.module.ymt.api.dto.IdxBizJgProjectContraptionDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgInspectionDetectionInfo;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption; import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
...@@ -16,6 +18,9 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation; ...@@ -16,6 +18,9 @@ import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper; import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -97,6 +102,7 @@ public class IdxBizJgProjectContraptionController extends BaseController { ...@@ -97,6 +102,7 @@ public class IdxBizJgProjectContraptionController extends BaseController {
return ResponseHelper.buildResponse(idxBizJgProjectContraptionServiceImpl.proConPageByParams(params, page, reginParams)); return ResponseHelper.buildResponse(idxBizJgProjectContraptionServiceImpl.proConPageByParams(params, page, reginParams));
} }
/** /**
* 根据入参 列表查询(当前)单位下的工程管道 * 根据入参 列表查询(当前)单位下的工程管道
* *
...@@ -127,6 +133,70 @@ public class IdxBizJgProjectContraptionController extends BaseController { ...@@ -127,6 +133,70 @@ public class IdxBizJgProjectContraptionController extends BaseController {
} }
/** /**
* 根据sequenceNbr分页查询管道信息
*
* @param sequenceNbr
* @param current 当前页
* @param size 大小
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/techParamsPipelinePage")
@ApiOperation(httpMethod = "GET",value = "根据sequenceNbr查询管道信息", notes = "管道工程装置表分页查询")
public ResponseModel <Page<Map<String, Object>>> techParamsPipelinePage(@RequestParam("sequenceNbr") String sequenceNbr,
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size) {
return ResponseHelper.buildResponse(idxBizJgProjectContraptionServiceImpl.techParamsPipelinePage(sequenceNbr,current,size));
}
/**
* 新增或者更新检验信息
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/saveOrUpdateDetectionInfo")
@ApiOperation(httpMethod = "POST", value = "新增或者更新检验信息", notes = "新增或者更新检验信息")
public ResponseModel<?> saveOrUpdateDetectionInfo(@RequestBody IdxBizJgInspectionDetectionInfo detectionInfo) {
idxBizJgProjectContraptionServiceImpl.saveOrUpdateDetectionInfo(detectionInfo);
return ResponseHelper.buildResponse("更新成功");
}
/**
* 新增或者更新检验信息批量
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/saveOrUpdateDetectionInfoBatch")
@ApiOperation(httpMethod = "POST", value = "新增或者更新检验信息", notes = "新增或者更新检验信息")
public ResponseModel<?> saveOrUpdateDetectionInfoBatch(@RequestBody List<IdxBizJgInspectionDetectionInfo> detectionInfos) {
idxBizJgProjectContraptionServiceImpl.saveOrUpdateDetectionInfoBatch(detectionInfos);
return ResponseHelper.buildResponse("更新成功");
}
/**
* 获取检验信息详情
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/getDetectionInfoDetail")
@ApiOperation(httpMethod = "GET", value = "获取检验信息详情", notes = "获取检验信息详情")
public ResponseModel<IdxBizJgInspectionDetectionInfo> getDetectionInfoDetail(@RequestParam("sequenceNbr") String sequenceNbr) {
return ResponseHelper.buildResponse(idxBizJgProjectContraptionServiceImpl.getDetectionInfoDetail(sequenceNbr));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/summaryBasicInfo/export")
@ApiOperation(httpMethod = "GET", value = "导出基本信息汇总表(长输/公用管道)", notes = "导出基本信息汇总表(长输/公用管道)")
public void exportSummaryBasicInfo(HttpServletResponse response,
@RequestParam("sequenceNbr") String sequenceNbr,
@RequestParam("category") String category) {
idxBizJgProjectContraptionServiceImpl.exportSummaryBasicInfo(sequenceNbr, response, category);
}
/**
* 列表分页查询 * 列表分页查询
* *
* @param current 当前页 * @param current 当前页
...@@ -144,6 +214,7 @@ public class IdxBizJgProjectContraptionController extends BaseController { ...@@ -144,6 +214,7 @@ public class IdxBizJgProjectContraptionController extends BaseController {
return ResponseHelper.buildResponse(idxBizJgProjectContraptionServiceImpl.queryForIdxBizJgProjectContraptionPage(page)); return ResponseHelper.buildResponse(idxBizJgProjectContraptionServiceImpl.queryForIdxBizJgProjectContraptionPage(page));
} }
/** /**
* 列表全部数据查询 * 列表全部数据查询
* *
...@@ -155,4 +226,5 @@ public class IdxBizJgProjectContraptionController extends BaseController { ...@@ -155,4 +226,5 @@ public class IdxBizJgProjectContraptionController extends BaseController {
public ResponseModel<List<IdxBizJgProjectContraptionDto>> selectForList() { public ResponseModel<List<IdxBizJgProjectContraptionDto>> selectForList() {
return ResponseHelper.buildResponse(idxBizJgProjectContraptionServiceImpl.queryForIdxBizJgProjectContraptionList()); return ResponseHelper.buildResponse(idxBizJgProjectContraptionServiceImpl.queryForIdxBizJgProjectContraptionList());
} }
} }
...@@ -346,7 +346,13 @@ public class JgUseRegistrationController extends BaseController { ...@@ -346,7 +346,13 @@ public class JgUseRegistrationController extends BaseController {
return ResponseHelper.buildResponse(jgUseRegistrationServiceImpl.updateCylinderCategoryByEquCodeBatch(cylinderCategory, equCodeList)); return ResponseHelper.buildResponse(jgUseRegistrationServiceImpl.updateCylinderCategoryByEquCodeBatch(cylinderCategory, equCodeList));
} }
/**
* 查询无使用登记证,不在流程中的,已纳管的,装置父ID为空的数据
* @param useUnitCreditCode 使用登记证编号
* @param current 当前页
* @param size 每页数
* @return page
*/
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/jgProjectContraptionPage") @GetMapping(value = "/jgProjectContraptionPage")
@ApiOperation(value = "查询指定使用单位下的可用装置,已纳管且使用登记证编号为空或者null", notes = "不包括流程中的") @ApiOperation(value = "查询指定使用单位下的可用装置,已纳管且使用登记证编号为空或者null", notes = "不包括流程中的")
...@@ -360,11 +366,30 @@ public class JgUseRegistrationController extends BaseController { ...@@ -360,11 +366,30 @@ public class JgUseRegistrationController extends BaseController {
return ResponseHelper.buildResponse(re); return ResponseHelper.buildResponse(re);
} }
/**
* 查询有使用登记证,新增的,没有流程引用的数据
* @param useUnitCreditCode 使用登记证编号
* @param current 当前页
* @param size 每页数
* @return page
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/jgProjectContraptionPageMaster")
@ApiOperation(value = "查询指定使用单位下的可用总装置,已纳管且使用登记证编号不为空或者首次合并为true", notes = "不包括流程中的")
public ResponseModel<IPage<IdxBizJgProjectContraption>> jgProjectContraptionPageMaster(@RequestParam String useUnitCreditCode,
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size) {
Page<IdxBizJgProjectContraption> page = new Page<>();
page.setCurrent(current);
page.setSize(size);
IPage<IdxBizJgProjectContraption> re = jgUseRegistrationServiceImpl.jgProjectContraptionPageMaster(useUnitCreditCode, page);
return ResponseHelper.buildResponse(re);
}
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询工程装置下的所有做过安装告知但是为做使用登记的管道", notes = "查询工程装置下的所有做过安装告知但是为做使用登记的管道") @ApiOperation(httpMethod = "GET", value = "查询工程装置下的所有做过安装告知但是为做使用登记的管道", notes = "查询工程装置下的所有做过安装告知但是为做使用登记的管道")
@GetMapping(value = "/getDeviceListByProjectContraptionSeq") @GetMapping(value = "/getDeviceListByProjectContraptionSeq")
public ResponseModel<Object> getDeviceListByProjectContraption(@RequestParam("record") String projectContraptionSeq) { public ResponseModel<Object> getDeviceListByProjectContraption(@RequestParam("record") String projectContraptionSeq) {
return ResponseHelper.buildResponse(jgUseRegistrationServiceImpl.getDeviceListByProjectContraption(projectContraptionSeq)); return ResponseHelper.buildResponse(jgUseRegistrationServiceImpl.getDeviceListByProjectContraption(projectContraptionSeq));
} }
} }
...@@ -439,6 +439,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -439,6 +439,11 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
throw new IllegalArgumentException("参数类型错误,期望 LinkedHashMap 类型: " + obj); throw new IllegalArgumentException("参数类型错误,期望 LinkedHashMap 类型: " + obj);
} }
// 通用方法初始化 List
private <T> List<T> initializeList() {
return new ArrayList<>(15);
}
private Long batchSubmitOrUpdatePipeline(LinkedHashMap equipmentInfoForm, String submitType) { private Long batchSubmitOrUpdatePipeline(LinkedHashMap equipmentInfoForm, String submitType) {
Date date = new Date(); Date date = new Date();
String operateType = ValidationUtil.isEmpty(equipmentInfoForm.get(SEQUENCE_NBR)) ? OPERATESAVE : OPERATEEDIT; String operateType = ValidationUtil.isEmpty(equipmentInfoForm.get(SEQUENCE_NBR)) ? OPERATESAVE : OPERATEEDIT;
...@@ -505,18 +510,19 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -505,18 +510,19 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
projectContraption.setUscUnitName(companyInfoMap.get("companyName").toString()); projectContraption.setUscUnitName(companyInfoMap.get("companyName").toString());
projectContraption.setUscUnitCreditCode(companyInfoMap.get("creditCode").toString()); projectContraption.setUscUnitCreditCode(companyInfoMap.get("creditCode").toString());
projectContraption.setIsFirstMerge(false);
idxBizJgProjectContraptionService.saveOrUpdateData(projectContraption); idxBizJgProjectContraptionService.saveOrUpdateData(projectContraption);
List<IdxBizJgUseInfo> useInfoList = new ArrayList<>(10); List<IdxBizJgUseInfo> useInfoList = initializeList();
List<IdxBizJgDesignInfo> designInfoList = new ArrayList<>(10); List<IdxBizJgDesignInfo> designInfoList = initializeList();
List<IdxBizJgFactoryInfo> factoryInfoList = new ArrayList<>(10); List<IdxBizJgFactoryInfo> factoryInfoList = initializeList();
List<IdxBizJgConstructionInfo> constructionInfoList = new ArrayList<>(10); List<IdxBizJgConstructionInfo> constructionInfoList = initializeList();
List<IdxBizJgRegisterInfo> registerInfoList = new ArrayList<>(10); List<IdxBizJgRegisterInfo> registerInfoList = initializeList();
List<IdxBizJgSupervisionInfo> supervisionInfoList = new ArrayList<>(10); List<IdxBizJgSupervisionInfo> supervisionInfoList = initializeList();
List<IdxBizJgOtherInfo> otherInfoList = new ArrayList<>(10); List<IdxBizJgOtherInfo> otherInfoList = initializeList();
List<IdxBizJgInspectionDetectionInfo> inspectionDetectionInfoList = new ArrayList<>(10); List<IdxBizJgInspectionDetectionInfo> inspectionDetectionInfoList = initializeList();
List<IdxBizJgTechParamsPipeline> paramsPipelineList = new ArrayList<>(10); List<IdxBizJgTechParamsPipeline> paramsPipelineList = initializeList();
List<ESEquipmentCategoryDto> esEquipmentCategoryList = new ArrayList<>(10); List<ESEquipmentCategoryDto> esEquipmentCategoryList = initializeList();
//设备信息 //设备信息
for (Map<String, Object> pipeline : pipelineList) { for (Map<String, Object> pipeline : pipelineList) {
...@@ -1136,15 +1142,21 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -1136,15 +1142,21 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if ("his".equals(dataSource) || "black".equals(dataSource)) { if ("his".equals(dataSource) || "black".equals(dataSource)) {
// 历史数据导入设备类别限制 bug-21172 // 历史数据导入设备类别限制 bug-21172
if (!ObjectUtils.isEmpty(type) && "PL_DR".equals(type)) { if (!ObjectUtils.isEmpty(type) && "PL_DR".equals(type)) {
return this.baseMapper.queryAllEquCategoriesUnderTheEquList(equList).stream() if (EquipmentClassifityEnum.YLRQ.getCode().equals(equList)) {
.filter(x -> "2300".equals(x.getDictDataKey())) return this.baseMapper.queryAllEquCategoriesUnderTheEquList(equList).stream()
.collect(Collectors.toList()); .filter(x -> "2300".equals(x.getDictDataKey()))
} .collect(Collectors.toList());
// 历史数据新增设备类别限制 bug-21139 }
if (!ObjectUtils.isEmpty(equList) && "8000".equals(equList)) { if (EquipmentClassifityEnum.YLGD.getCode().equals(equList) && "his".equals(dataSource)) {
return this.baseMapper.queryAllEquCategoriesUnderTheEquList(equList).stream() return this.baseMapper.queryAllEquCategoriesUnderTheEquList(equList).stream()
.filter(x -> "8300".equals(x.getDictDataKey())) .filter(x -> "8300".equals(x.getDictDataKey()))
.collect(Collectors.toList()); .collect(Collectors.toList());
}
if (EquipmentClassifityEnum.YLGD.getCode().equals(equList) && "black".equals(dataSource)) {
return this.baseMapper.queryAllEquCategoriesUnderTheEquList(equList).stream()
.filter(x -> !"8300".equals(x.getDictDataKey()))
.collect(Collectors.toList());
}
} }
return this.baseMapper.queryAllEquCategoriesUnderTheEquList(equList); return this.baseMapper.queryAllEquCategoriesUnderTheEquList(equList);
} }
...@@ -2496,7 +2508,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -2496,7 +2508,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
boolMust.must(pBuilder); boolMust.must(pBuilder);
} else { } else {
BoolQueryBuilder pBuilder = QueryBuilders.boolQuery(); BoolQueryBuilder pBuilder = QueryBuilders.boolQuery();
String test = QueryParser.escape("8300");//不查管道,管道新菜单查询 String test = QueryParser.escape("8300");// 不查管道,管道新菜单查询
pBuilder.mustNot(QueryBuilders.termQuery(EQU_CATEGORY_CODE, test)); pBuilder.mustNot(QueryBuilders.termQuery(EQU_CATEGORY_CODE, test));
boolMust.must(pBuilder); boolMust.must(pBuilder);
} }
...@@ -3815,7 +3827,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -3815,7 +3827,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
otherInfo.setRecDate(new Date()); otherInfo.setRecDate(new Date());
otherInfo.setCylinderStampAttachment(cylinderStampAttachment); otherInfo.setCylinderStampAttachment(cylinderStampAttachment);
if ("his".equals(equipInfoDto.getDataSource())) { if ("his".equals(equipInfoDto.getDataSource())) {
otherInfo.setSupervisoryCode(this.getSupervisoryCode(equipInfoDto.getPossession(), registerInfo)); otherInfo.setSupervisoryCode(this.getSupervisoryCode(equipInfoDto.getPossession(), registerInfo.getEquCategory()));
} }
otherInfo.setClaimStatus("已认领"); otherInfo.setClaimStatus("已认领");
otherInfoList.add(otherInfo); otherInfoList.add(otherInfo);
...@@ -4329,13 +4341,13 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -4329,13 +4341,13 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
/** /**
* 生成监管码 * 生成监管码
*/ */
private String getSupervisoryCode(String possession, IdxBizJgRegisterInfo registerInfo) { public String getSupervisoryCode(String possession, String equCategory) {
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
boolean isXiXian = XI_XIAN.getCode().equals(possession); boolean isXiXian = XI_XIAN.getCode().equals(possession);
String cityOrCountyCode = isXiXian ? XIAN_YANG.getCode() : possession; String cityOrCountyCode = isXiXian ? XIAN_YANG.getCode() : possession;
map.put("cityCode", cityOrCountyCode); map.put("cityCode", cityOrCountyCode);
map.put("isXiXian", isXiXian ? 1 : 0); map.put("isXiXian", isXiXian ? 1 : 0);
map.put("equCategory", registerInfo.getEquCategory()); map.put("equCategory", equCategory);
map.put("countyCode", cityOrCountyCode); map.put("countyCode", cityOrCountyCode);
return Optional.ofNullable(tzsServiceFeignClient.createCode(map).getResult()) return Optional.ofNullable(tzsServiceFeignClient.createCode(map).getResult())
.filter(res -> !res.isEmpty()) .filter(res -> !res.isEmpty())
......
...@@ -2434,6 +2434,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -2434,6 +2434,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
String formattedDate = currentDate.format(formatter); String formattedDate = currentDate.format(formatter);
exportParamsMap.put("printDate", formattedDate); exportParamsMap.put("printDate", formattedDate);
//获取分类名称
exportParamsMap.put("categoryName", "工业管道");
// 使用单位 // 使用单位
exportParamsMap.put("useUnitName", jsonObject.get("useUnitName")); exportParamsMap.put("useUnitName", jsonObject.get("useUnitName"));
// 使用单位地址 // 使用单位地址
...@@ -3839,15 +3841,42 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -3839,15 +3841,42 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
Set<String> proIds = flowIngPros.stream().map(JgUseRegistration::getProjectContraptionId).collect(toSet()); Set<String> proIds = flowIngPros.stream().map(JgUseRegistration::getProjectContraptionId).collect(toSet());
proIds.remove(null); proIds.remove(null);
proIds.remove(""); proIds.remove("");
// 查询已纳管且使用登记证编号为空或者null且非流程中的装置 // 查询已纳管且使用登记证编号不为空且非流程中的装置
LambdaQueryWrapper<IdxBizJgProjectContraption> wrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<IdxBizJgProjectContraption> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(IdxBizJgProjectContraption::getUseUnitCreditCode,useUnitCreditCode); wrapper.eq(IdxBizJgProjectContraption::getUseUnitCreditCode,useUnitCreditCode);
wrapper.eq(IdxBizJgProjectContraption::getIsIntoManagement, true); wrapper.eq(IdxBizJgProjectContraption::getIsIntoManagement, true);
wrapper.notIn(!proIds.isEmpty(), BaseEntity::getSequenceNbr, proIds); wrapper.notIn(!proIds.isEmpty(), BaseEntity::getSequenceNbr, proIds);
wrapper.isNull(IdxBizJgProjectContraption::getProjectContraptionParentId);
wrapper.last("and (length(use_registration_code) = 0 or use_registration_code is null)"); wrapper.last("and (length(use_registration_code) = 0 or use_registration_code is null)");
return jgProjectContraptionService.page(page, wrapper); return jgProjectContraptionService.page(page, wrapper);
} }
public IPage<IdxBizJgProjectContraption> jgProjectContraptionPageMaster(String useUnitCreditCode, Page<IdxBizJgProjectContraption> page) {
// 兼容个人业务
if(useUnitCreditCode.contains("_")){
useUnitCreditCode = useUnitCreditCode.split("_")[1];
}
// 查询流程中的装置
List<JgUseRegistration> flowIngPros = this.list(
new LambdaQueryWrapper<JgUseRegistration>()
.notIn(JgUseRegistration::getStatus, NOT_FLOWING_STATE)
.select(BaseEntity::getSequenceNbr, JgUseRegistration::getProjectContraptionId)
);
Set<String> proIds = flowIngPros.stream()
.map(JgUseRegistration::getProjectContraptionId)
.filter(id -> id != null && !id.isEmpty()) // 过滤 null 和空字符串
.collect(toSet());
// 查询已纳管且使用登记证编号为空或 null,非流程中的装置,或首次合并为 true
LambdaQueryWrapper<IdxBizJgProjectContraption> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(IdxBizJgProjectContraption::getUseUnitCreditCode, useUnitCreditCode)
.eq(IdxBizJgProjectContraption::getIsIntoManagement, true)
.notIn(!proIds.isEmpty(), BaseEntity::getSequenceNbr, proIds)
.and(w -> w.isNull(IdxBizJgProjectContraption::getUseRegistrationCode)
.or().eq(IdxBizJgProjectContraption::getUseRegistrationCode, "")
.or().eq(IdxBizJgProjectContraption::getIsFirstMerge, true));
return jgProjectContraptionService.page(page, wrapper);
}
public Map<String, Object> getDeviceListByProjectContraption(String projectContraptionSeq) { public Map<String, Object> getDeviceListByProjectContraption(String projectContraptionSeq) {
IdxBizJgProjectContraption projectContraption = jgProjectContraptionService.getById(projectContraptionSeq); IdxBizJgProjectContraption projectContraption = jgProjectContraptionService.getById(projectContraptionSeq);
Map<String, Object> re = new HashMap<>(); Map<String, Object> re = new HashMap<>();
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
<w:sz w:val="36"/> <w:sz w:val="36"/>
<w:szCs w:val="36"/> <w:szCs w:val="36"/>
</w:rPr> </w:rPr>
<w:t>工业管道</w:t> <w:t>${categoryName}</w:t>
</w:r> </w:r>
</w:p> </w:p>
<w:p w14:paraId="7AEDB7EF" w14:textId="156F0207" w:rsidR="00EA7A71" w:rsidRDefault="00DB6291"> <w:p w14:paraId="7AEDB7EF" w14:textId="156F0207" w:rsidR="00EA7A71" w:rsidRDefault="00DB6291">
......
...@@ -2413,6 +2413,7 @@ public class JGDPStatisticsServiceImpl { ...@@ -2413,6 +2413,7 @@ public class JGDPStatisticsServiceImpl {
equipParamsMap.put(EQU_LIST, String.valueOf(equIpClassMap.get(EQU_LIST))); equipParamsMap.put(EQU_LIST, String.valueOf(equIpClassMap.get(EQU_LIST)));
equipParamsMap.put(EQU_CATEGORY, String.valueOf(equIpClassMap.get(EQU_CATEGORY))); equipParamsMap.put(EQU_CATEGORY, String.valueOf(equIpClassMap.get(EQU_CATEGORY)));
equipParamsMap.put(EQU_DEFINE, String.valueOf(equIpClassMap.get(EQU_DEFINE))); equipParamsMap.put(EQU_DEFINE, String.valueOf(equIpClassMap.get(EQU_DEFINE)));
equipParamsMap.put("PIPELINE_CLASS", String.valueOf(equIpClassMap.get(EQU_DEFINE)));
resultMap.put(EQUIP_PARAMS_FORM_ID, equipParamsMap); resultMap.put(EQUIP_PARAMS_FORM_ID, equipParamsMap);
} }
} }
......
...@@ -302,7 +302,7 @@ public interface PlanTaskMapper extends BaseMapper { ...@@ -302,7 +302,7 @@ public interface PlanTaskMapper extends BaseMapper {
void insertAll(String table, StaticDay item); void insertAll(String table, StaticDay item);
void updateData(String table, List<StaticDay> list); void updateData(String table, @Param(value = "list") List<StaticDay> list);
void updateSingle(String table, int riskEnd, int noRiskEnd, String orgCode, String checkTime); void updateSingle(String table, int riskEnd, int noRiskEnd, String orgCode, String checkTime);
......
...@@ -267,32 +267,29 @@ public class PatrolDataSyncServiceImpl implements IPatrolDataSyncService { ...@@ -267,32 +267,29 @@ public class PatrolDataSyncServiceImpl implements IPatrolDataSyncService {
List<Map<String, Object>> listDay = checkMapper.planCount(runDate, null, String.valueOf(PlanTaskTypeStatusEnum.day.getValue()), null,null,null); List<Map<String, Object>> listDay = checkMapper.planCount(runDate, null, String.valueOf(PlanTaskTypeStatusEnum.day.getValue()), null,null,null);
List<StaticDay> staticDays = listDay.stream().map(e->{ List<StaticDay> staticDays = listDay.stream().map(e->{
String s = JSON.toJSONString(e); String s = JSON.toJSONString(e);
StaticDay staticDay = JSON.parseObject(s, StaticDay.class); return JSON.parseObject(s, StaticDay.class);
return staticDay;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
// 插入周统计表 // 插入周统计表
List<Map<String, Object>> listWeek = checkMapper.planCount(runDate, null, String.valueOf(PlanTaskTypeStatusEnum.week.getValue()), null,null,null); List<Map<String, Object>> listWeek = checkMapper.planCount(runDate, null, String.valueOf(PlanTaskTypeStatusEnum.week.getValue()), null,null,null);
List<StaticDay> staticWeeks = listWeek.stream().map(e->{ List<StaticDay> staticWeeks = listWeek.stream().map(e->{
String s = JSON.toJSONString(e); String s = JSON.toJSONString(e);
StaticDay staticWeek = JSON.parseObject(s, StaticDay.class); return JSON.parseObject(s, StaticDay.class);
return staticWeek;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
// 插入月统计表 // 插入月统计表
List<Map<String, Object>> listMonth = checkMapper.planCount(runDate, null, String.valueOf(PlanTaskTypeStatusEnum.month.getValue()), null,null,null); List<Map<String, Object>> listMonth = checkMapper.planCount(runDate, null, String.valueOf(PlanTaskTypeStatusEnum.month.getValue()), null,null,null);
List<StaticDay> staticMonths = listMonth.stream().map(e->{ List<StaticDay> staticMonths = listMonth.stream().map(e->{
String s = JSON.toJSONString(e); String s = JSON.toJSONString(e);
StaticDay staticMonth = JSON.parseObject(s, StaticDay.class); return JSON.parseObject(s, StaticDay.class);
return staticMonth;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
if(staticDays.size() > 0) { if(!staticDays.isEmpty()) {
planTaskMapper.updateData(P_STATIC_DAY,staticDays); planTaskMapper.updateData(P_STATIC_DAY, staticDays);
} }
if(staticWeeks.size() > 0) { if(!staticWeeks.isEmpty()) {
planTaskMapper.updateData(P_STATIC_WEEK,staticDays); planTaskMapper.updateData(P_STATIC_WEEK, staticWeeks);
} }
if(staticMonths.size() > 0) { if(!staticMonths.isEmpty()) {
planTaskMapper.updateData(P_STATIC_MONTH,staticDays); planTaskMapper.updateData(P_STATIC_MONTH, staticMonths);
} }
log.info("更新统计表完成======="); log.info("更新统计表完成=======");
} }
......
...@@ -262,4 +262,16 @@ public class IdxBizJgProjectContraption extends BaseEntity { ...@@ -262,4 +262,16 @@ public class IdxBizJgProjectContraption extends BaseEntity {
*/ */
@TableField("use_date") @TableField("use_date")
private String useDate; private String useDate;
/**
* 工程装置父级ID(合并用)
*/
@TableField("project_contraption_parent_id")
private String projectContraptionParentId;
/**
* 是否首次合并新增
*/
@TableField("is_first_merge")
private Boolean isFirstMerge;
} }
...@@ -51,4 +51,27 @@ public interface IdxBizJgProjectContraptionMapper extends BaseMapper<IdxBizJgPro ...@@ -51,4 +51,27 @@ public interface IdxBizJgProjectContraptionMapper extends BaseMapper<IdxBizJgPro
* @return 分页 * @return 分页
*/ */
IPage<IdxBizJgProjectContraption> queryJgProjectContraptionPage(Page<IdxBizJgProjectContraption> page, @Param("inspectionType") String inspectionType, @Param("companyCode") String companyCode, @Param("equCategory") String equCategory); IPage<IdxBizJgProjectContraption> queryJgProjectContraptionPage(Page<IdxBizJgProjectContraption> page, @Param("inspectionType") String inspectionType, @Param("companyCode") String companyCode, @Param("equCategory") String equCategory);
/**
* 获取管道信息分页
* @param sequenceNbr
* @param current
* @param size
* @return
*/
List<Map<String, Object>> selectEquipListPage(@Param("sequenceNbr") String sequenceNbr, @Param("current") int current, @Param("size") int size);
/**
* 获取管道信息总数
* @param sequenceNbr
* @return
*/
long selectEquipCount(@Param("sequenceNbr") String sequenceNbr);
/**
* 获取导出传输/公共管道的信息
* @param sequenceNbr
* @return
*/
List<Map<String, Object>> selectEquipListByExport(@Param("sequenceNbr") String sequenceNbr);
} }
...@@ -141,6 +141,47 @@ ...@@ -141,6 +141,47 @@
and p.is_into_management = false and p.is_into_management = false
and n.is_delete = false and n.is_delete = false
</select> </select>
<select id="selectEquipListPage" resultType="java.util.Map">
SELECT ibjtpp."SEQUENCE_NBR" AS sequenceNbr,
ibjtpp."PIPE_NAME" AS pipeName,
ibjtpp."PIPELINE_NUMBER" AS pipelineNumber,
ibjtpp."DEVICE_LEVEL" AS deviceLevel,
ibjtpp."NOMINAL_DIAMETER" AS nominalDiameter,
ibjtpp."WALL_THICKNESS" AS wallThickness,
ibjtpp."PIPE_LENGTH" AS pipeLength,
ibjtpp."PRESSURE" AS pressure,
ibjtpp."TEMPERATURE" AS temperature,
ibjtpp."MEDIUM" AS medium,
ibjtpp."WORK_PRESSURE" AS workPressure,
ibjtpp."WORK_TEMPERATURE" AS workTemperature,
ibjtpp."WORK_MEDIUM" AS workMedium,
ibjtpp."REMARKS" AS remarks,
(select SEQUENCE_NBR from idx_biz_jg_inspection_detection_info where "RECORD" = ibjui."RECORD" ORDER BY INSPECT_DATE DESC limit 1) detectionInfoSequenceNbr,
(select INSPECT_ORG_NAME from idx_biz_jg_inspection_detection_info where "RECORD" = ibjui."RECORD" ORDER BY INSPECT_DATE DESC limit 1) inspectOrgName,
(select INSPECT_CONCLUSION from idx_biz_jg_inspection_detection_info where "RECORD" = ibjui."RECORD" ORDER BY INSPECT_DATE DESC limit 1) inspectConclusion,
(select NEXT_INSPECT_DATE from idx_biz_jg_inspection_detection_info where "RECORD" = ibjui."RECORD" ORDER BY INSPECT_DATE DESC limit 1) nextInspectDate,
(select USC_UNIT_NAME from idx_biz_jg_construction_info jci where ibjui.RECORD = jci.RECORD ORDER BY jci."USC_DATE" DESC limit 1) as uscUnitName,
(select USC_DATE from idx_biz_jg_construction_info jci where ibjui.RECORD = jci.RECORD ORDER BY jci."USC_DATE" DESC limit 1) as uscDate,
ibjdi."DESIGN_UNIT_NAME" AS designUnitName,
ibjui."USE_DATE" AS useDate,
ibjui."RECORD" AS record
FROM idx_biz_jg_use_info ibjui
LEFT JOIN idx_biz_jg_tech_params_pipeline ibjtpp ON ibjui.RECORD = ibjtpp.RECORD
LEFT JOIN idx_biz_jg_design_info ibjdi ON ibjui.RECORD = ibjdi.RECORD
WHERE ibjui.project_contraption_id = #{sequenceNbr}
ORDER BY ibjtpp.REC_DATE ASC
limit #{current},#{size}
</select>
<select id="selectEquipCount" resultType="long">
SELECT count(1)
FROM idx_biz_jg_use_info ibjui
LEFT JOIN idx_biz_jg_tech_params_pipeline ibjtpp ON ibjui.RECORD = ibjtpp.RECORD
LEFT JOIN idx_biz_jg_design_info ibjdi ON ibjui.RECORD = ibjdi.RECORD
WHERE ibjui.project_contraption_id = #{sequenceNbr}
ORDER BY ibjtpp.REC_DATE ASC
</select>
<select id="queryJgProjectContraptionPage" <select id="queryJgProjectContraptionPage"
resultType="com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption"> resultType="com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgProjectContraption">
select select
...@@ -173,4 +214,33 @@ ...@@ -173,4 +214,33 @@
and not EXISTS (SELECt 1 FROM tz_jyjc_inspection_application a where a.status='6611' and a.application_unit_code=#{companyCode} and a.project_contraption_id = pc.sequence_nbr) and not EXISTS (SELECt 1 FROM tz_jyjc_inspection_application a where a.status='6611' and a.application_unit_code=#{companyCode} and a.project_contraption_id = pc.sequence_nbr)
and (pc.project_contraption_parent_id is null or pc.project_contraption_parent_id = '') and (pc.project_contraption_parent_id is null or pc.project_contraption_parent_id = '')
</select> </select>
<select id="selectEquipListByExport" resultType="java.util.Map">
SELECT ibjtpp."PIPE_NAME" AS productName,
ibjtpp."PIPELINE_NUMBER" AS pipelineNumber,
ibjtpp."DEVICE_LEVEL" AS deviceLevel,
ibjtpp."NOMINAL_DIAMETER" AS nominalDiameter,
ibjtpp."WALL_THICKNESS" AS wallThickness,
ibjtpp."PIPE_LENGTH" AS pipeLength,
ibjtpp."PRESSURE" AS pressure,
ibjtpp."TEMPERATURE" AS temperature,
ibjtpp."MEDIUM" AS medium,
ibjtpp."WORK_PRESSURE" AS workPressure,
ibjtpp."WORK_TEMPERATURE" AS workTemperature,
ibjtpp."WORK_MEDIUM" AS workMedium,
ibjtpp."REMARKS" AS remarks,
(select INSPECT_ORG_NAME from idx_biz_jg_inspection_detection_info where "RECORD" = ibjui."RECORD" ORDER BY INSPECT_DATE DESC limit 1) inspectOrgName,
(select INSPECT_CONCLUSION from idx_biz_jg_inspection_detection_info where "RECORD" = ibjui."RECORD" ORDER BY INSPECT_DATE DESC limit 1) inspectConclusion,
(select NEXT_INSPECT_DATE from idx_biz_jg_inspection_detection_info where "RECORD" = ibjui."RECORD" ORDER BY INSPECT_DATE DESC limit 1) nextInspectDate,
(select USC_UNIT_NAME from idx_biz_jg_construction_info jci where ibjui.RECORD = jci.RECORD ORDER BY jci."USC_DATE" DESC limit 1) as uscUnitName,
(select USC_DATE from idx_biz_jg_construction_info jci where ibjui.RECORD = jci.RECORD ORDER BY jci."USC_DATE" DESC limit 1) as uscDate,
ibjdi."DESIGN_UNIT_NAME" AS designUnitName,
ibjui."USE_DATE" AS useDate,
ibjui."RECORD" AS record
FROM idx_biz_jg_use_info ibjui
LEFT JOIN idx_biz_jg_tech_params_pipeline ibjtpp ON ibjui.RECORD = ibjtpp.RECORD
LEFT JOIN idx_biz_jg_design_info ibjdi ON ibjui.RECORD = ibjdi.RECORD
WHERE ibjui.project_contraption_id = #{sequenceNbr}
ORDER BY ibjtpp.REC_DATE ASC
</select>
</mapper> </mapper>
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