Commit 0ed7a6ff authored by chenzhao's avatar chenzhao

Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register

parents 6726fd40 cdcd04f6
......@@ -166,127 +166,127 @@ public class EquipInfoCylinderExcelDto extends BaseDto {
private String inspectDate;
@ApiModelProperty(value = "检验报告编号")
@ExcelProperty(value = "检验报告编号")
@ExcelProperty(value = "检验报告编号", index = 28)
private String inspectReportNo;
//技术参数
@ExcelProperty(value = "额定质量(kg)", index = 28)
@ExcelProperty(value = "额定质量(kg)", index = 29)
@ApiModelProperty(value = "额定质量(kg)")
private String ratedQuality;
@ExcelProperty(value = "使用环境温度(℃)", index = 29)
@ExcelProperty(value = "使用环境温度(℃)", index = 30)
@ApiModelProperty(value = "使用环境温度(℃)")
private String ambientTemperature;
@ExcelProperty(value = "单瓶容积(m3)", index = 30)
@ExcelProperty(value = "单瓶容积(m3)", index = 31)
@ApiModelProperty(value = "单瓶容积(m3)")
@NotBlank(message = "单瓶容积(m3)不能为空")
private String singleBottleVolume;
@ExcelProperty(value = "型号", index = 31)
@ExcelProperty(value = "型号", index = 32)
@ApiModelProperty(value = "型号")
private String modelNumber;
@ExcelProperty(value = "充装介质", index = 32)
@ExcelProperty(value = "充装介质", index = 33)
@ApiModelProperty(value = "充装介质")
@NotBlank(message = "充装介质不能为空")
private String chargingMedium;
@ExcelProperty(value = "规格", index = 33)
@ExcelProperty(value = "规格", index = 34)
@ApiModelProperty(value = "规格")
private String specification;
@ExcelProperty(value = "外径", index = 34)
@ExcelProperty(value = "外径", index = 35)
@ApiModelProperty(value = "外径")
private String outsideDiameter;
@ExcelProperty(value = "壁厚", index = 35)
@ExcelProperty(value = "壁厚", index = 36)
@ApiModelProperty(value = "壁厚")
private String wallThickness;
@ExcelProperty(value = "长度", index = 36)
@ExcelProperty(value = "长度", index = 37)
@ApiModelProperty(value = "长度")
private String length;
@ExcelProperty(value = "公称工作压力(MPa)", index = 37)
@ExcelProperty(value = "公称工作压力(MPa)", index = 38)
@ApiModelProperty(value = "公称工作压力(MPa)")
@NotBlank(message = "公称工作压力(MPa)不能为空")
private String nominalWorkingPressure;
@ExcelProperty(value = "材料(管路)", index = 38)
@ExcelProperty(value = "材料(管路)", index = 39)
@ApiModelProperty(value = "材料(管路)")
private String piping;
@ExcelProperty(value = "无损检测方法(气瓶)", index = 39, converter = NondestructConverter.class)
@ExcelProperty(value = "无损检测方法(气瓶)", index = 40, converter = NondestructConverter.class)
@ApiModelProperty(value = "无损检测方法(气瓶)")
private String qpLossless;//5988
@ExcelProperty(value = "材料(瓶体)", index = 40)
@ExcelProperty(value = "材料(瓶体)", index = 41)
@ApiModelProperty(value = "材料(瓶体)")
private String bottleBody;
@ExcelProperty(value = "材料(端塞)", index = 41)
@ExcelProperty(value = "材料(端塞)", index = 42)
@ApiModelProperty(value = "材料(端塞)")
private String endPlug;
@ExcelProperty(value = "无损检测比例(管路)(%)", index = 42)
@ExcelProperty(value = "无损检测比例(管路)(%)", index = 43)
@ApiModelProperty(value = "无损检测比例(管路)(%)")
private String glRatio;
@ExcelProperty(value = "无损检测比例(气瓶)(%)", index = 43)
@ExcelProperty(value = "无损检测比例(气瓶)(%)", index = 44)
@ApiModelProperty(value = "无损检测比例(气瓶)(%)")
private String qpRatio;
@ExcelProperty(value = "无损检测方法(管路)", index = 44, converter = NondestructConverter.class)
@ExcelProperty(value = "无损检测方法(管路)", index = 45, converter = NondestructConverter.class)
@ApiModelProperty(value = "无损检测方法(管路)")
private String glLossless;
@ExcelProperty(value = "耐压实验压力(气瓶)(Mpa)", index = 45)
@ExcelProperty(value = "耐压实验压力(气瓶)(Mpa)", index = 46)
@ApiModelProperty(value = "耐压实验压力(气瓶)(Mpa)")
private String qpPressure;
@ExcelProperty(value = "耐压实验压力(管路)(Mpa)", index = 46)
@ExcelProperty(value = "耐压实验压力(管路)(Mpa)", index = 47)
@ApiModelProperty(value = "耐压实验压力(管路)(Mpa)")
private String glPressure;
@ExcelProperty(value = "气密性试验压力(气瓶)(Mpa)", index = 47)
@ExcelProperty(value = "气密性试验压力(气瓶)(Mpa)", index = 48)
@ApiModelProperty(value = "气密性试验压力(气瓶)(Mpa)")
private String qpAirTightness;
@ExcelProperty(value = "气体置换后压力(MPa)", index = 48)
@ExcelProperty(value = "气体置换后压力(MPa)", index = 49)
@ApiModelProperty(value = "气体置换后压力(MPa)")
private String displacementPressure;
@ExcelProperty(value = "热处理方式", index = 49)
@ExcelProperty(value = "热处理方式", index = 50)
@ApiModelProperty(value = "热处理方式")
private String heatTreatmentMethod;
@ExcelProperty(value = "气密性实验压力(管路)(MPa)", index = 50)
@ExcelProperty(value = "气密性实验压力(管路)(MPa)", index = 51)
@ApiModelProperty(value = "气密性实验压力(管路)(MPa)")
private String glAirTightness;
@ExcelProperty(value = "气瓶安装位置", index = 51)
@ExcelProperty(value = "气瓶安装位置", index = 52)
@ApiModelProperty(value = "气瓶安装位置")
private String installationPosition;
@ExcelProperty(value = "瓶体内含氧量(%)", index = 52)
@ExcelProperty(value = "瓶体内含氧量(%)", index = 53)
@ApiModelProperty(value = "瓶体内含氧量(%)")
private String oxygen;
@ExcelProperty(value = "热处理温度(℃)", index = 53)
@ExcelProperty(value = "热处理温度(℃)", index = 54)
@ApiModelProperty(value = "热处理温度(℃)")
private String qpHeatTreatmentTemperature;
/**
* 信息化管理字段-信息化管理情况
*/
@ExcelProperty(value = "信息化管理情况",index = 54, converter = InformationSituationConverter.class)
@ExcelProperty(value = "信息化管理情况", index = 55, converter = InformationSituationConverter.class)
private String informationSituation;
/**
* 信息化管理字段-二维码或者电子标签编号
*/
@ExcelProperty(value = "二维码或者电子标签编号",index = 55)
@ExcelProperty(value = "二维码或者电子标签编号", index = 56)
private String informationManageCode;
@ExcelIgnore
......
package com.yeejoin.amos.boot.module.jg.api.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
......@@ -167,4 +168,13 @@ public class JgChangeRegistrationReformDto extends BaseDto {
@ApiModelProperty(value = "作废人员id")
private String cancelUserId;
@ApiModelProperty(value = "工程装置id")
private String projectContraptionId;
@TableField("project_contraption")
@ApiModelProperty(value = "工程装置名称")
private String projectContraption;
}
package com.yeejoin.amos.boot.module.jg.api.dto;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
......@@ -171,6 +172,10 @@ public class JgReformNoticeDto extends BaseDto {
@ApiModelProperty(value = "工程装置名称")
private String projectContraption;
@ApiModelProperty(value = "工程装置id")
private String projectContraptionId;
/* ---------------- -------------- */
@ApiModelProperty (value = "告知设备列表")
......
......@@ -286,4 +286,18 @@ public class JgChangeRegistrationReform extends BaseEntity {
*/
@TableField("cancel_user_name")
private String cancelUserName;
/**
* 工程装置id
*/
@TableField("project_contraption_id")
private String projectContraptionId;
/**
* 工程装置名称
*/
@TableField("project_contraption")
private String projectContraption;
}
......@@ -184,6 +184,12 @@ public class JgReformNotice extends BaseEntity {
private String projectContraption;
/**
* 工程装置id
*/
@TableField("project_contraption_id")
private String projectContraptionId;
/**
* 施工负责人手机
*/
@TableField("construction_manager_phone")
......
......@@ -139,6 +139,7 @@
ur.audit_status as auditStatus,
date_format(ur.reg_date,'%Y-%m-%d') as regDate,
ur.use_unit_name as useUnitName,
ur.supervision_org_code as supervisionOrgCode,
ur.status,
ur.receive_org_name as receiveOrgName,
ur.use_address as place,
......
......@@ -5,10 +5,9 @@ import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.DataHandlerServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.ApiParam;
import org.springframework.util.StopWatch;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
......@@ -154,8 +153,27 @@ public class DataHandlerController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "使用登记、车用气瓶登记历史单据使用登记表生成", notes = "使用登记、车用气瓶登记历史单据使用登记表生成")
@GetMapping(value = "/initFormUrl")
public void initFormUrl() {
public ResponseModel<Boolean> initFormUrl() {
dataHandlerService.initFormUrl();
ResponseHelper.buildResponse(true);
return ResponseHelper.buildResponse(Boolean.TRUE);
}
/**
* 同步设备信息到ES
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "同步设备信息到ES", notes = "同步设备信息到ES")
@PostMapping(value = "/synchronizeEqData2ES")
public ResponseModel<String> synchronizeEqData2ES(@ApiParam(value = "设备的record,多个设备使用英文逗号分割", required = true)
@RequestParam(value = "records") String records,
@ApiParam(value = "是否安改维单位,默认值'false'", required = true, defaultValue = "false")
@RequestParam(value = "isAgw", defaultValue = "false") Boolean isAgw,
@ApiParam(value = "是否纳管,默认值'true'", required = true, defaultValue = "true")
@RequestParam(value = "isIntoManagement", defaultValue = "true") Boolean isIntoManagement) {
StopWatch watch = new StopWatch();
watch.start();
dataHandlerService.synchronizeEqData2ES(records, isAgw, isIntoManagement);
watch.stop();
return ResponseHelper.buildResponse(String.format("同步成功,耗时:%s", watch.getTotalTimeSeconds()));
}
}
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
......@@ -9,6 +11,7 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
import com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
......@@ -18,6 +21,7 @@ import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
import com.yeejoin.amos.boot.module.jg.api.dto.JgInstallationNoticeEqDto;
import com.yeejoin.amos.boot.module.jg.api.dto.PieLineEquipContraptionDto;
import com.yeejoin.amos.boot.module.jg.api.entity.*;
import com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.PipelineEnum;
import com.yeejoin.amos.boot.module.jg.api.mapper.DataHandlerMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeEqMapper;
......@@ -42,12 +46,14 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
import static com.alibaba.fastjson.JSON.toJSONString;
import static com.yeejoin.amos.boot.module.jg.biz.service.impl.JgInstallationNoticeServiceImpl.CONSTRUCTION_TYPE;
import static com.yeejoin.amos.boot.module.jg.biz.service.impl.JgInstallationNoticeServiceImpl.CONSTRUCTION_TYPE_NAME;
......@@ -84,6 +90,8 @@ public class DataHandlerServiceImpl {
private final IdxBizJgProjectContraptionMapper idxBizJgProjectContraptionMapper;
private final JgInstallationNoticeMapper jgInstallationNoticeMapper;
private final DataHandlerMapper dataHandlerMapper;
private final CategoryOtherInfoMapper categoryOtherInfoMapper;
;
/**
......@@ -986,4 +994,39 @@ public class DataHandlerServiceImpl {
jgVehicleInformationService.initFormUrl();
useRegistrationService.initFormUrl();
}
public void synchronizeEqData2ES(String records, Boolean isAgw, Boolean isIntoManagement) {
if (records == null || records.isEmpty()) {
return;
}
String[] recordArr = records.trim().split(",");
for (String record : recordArr) {
Map<String, Object> map = categoryOtherInfoMapper.selectDataById(record);
categoryOtherInfoMapper.updateEsStatus(record);
ESEquipmentCategoryDto dto = JSON.parseObject(toJSONString(map), ESEquipmentCategoryDto.class);
Optional<ESEquipmentCategoryDto> data = esEquipmentCategory.findById(record);
if (!ObjectUtils.isEmpty(data)) {
esEquipmentCategory.deleteById(record);
}
if (!ObjectUtils.isEmpty(dto)) {
long time = Timestamp.valueOf(map.get("REC_DATE").toString().substring(0, 19)).getTime();
dto.setREC_DATE(time);
// 需要安装的设备 安装告知审批通过 清除设备的USC_UNIT_CREDIT_CODE安装单位信息
// 使用单位编辑 防止更新设备时将安改维单位信息更新到es中
if (!isAgw) {
dto.setUSC_UNIT_CREDIT_CODE(null);
dto.setUSC_UNIT_NAME(null);
}
if (map.get("NEXT_INSPECT_DATE") != null) {
Date nextInspectDate = (Date) map.get("NEXT_INSPECT_DATE");
dto.setNEXT_INSPECT_DATE(DateUtil.parse(DateUtil.format(nextInspectDate, DatePattern.NORM_DATE_PATTERN)).getTime());
}
dto.setIS_INTO_MANAGEMENT(isIntoManagement);
IdxBizJgUseInfo useInfo = useInfoService.lambdaQuery().eq(IdxBizJgUseInfo::getRecord, record).one();
dto.setUSE_PLACE_CODE(useInfo.getProvince() + "#" + useInfo.getCity() + "#" + useInfo.getCounty() + "#" + useInfo.getFactoryUseSiteStreet());
dto.setUSE_SITE_CODE(useInfo.getUsePlace());
esEquipmentCategory.save(dto);
}
}
}
}
......@@ -2118,6 +2118,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jsonObject.put("receiveOrgCode", jgUseRegistration.getReceiveCompanyCode() + "_" + jgUseRegistration.getReceiveOrgName());
jsonObject.put("status", jgUseRegistration.getStatus());
jsonObject.put("applyNo", jgUseRegistration.getApplyNo());
jsonObject.put("installAddress", jsonObject.getString("address"));// 前端展示填充数据
Optional.ofNullable(jsonObject.get("safetyManagerName")).ifPresent(name -> jsonObject.put("maintenanceManagerName", name));
Optional.ofNullable(jsonObject.get("phone")).ifPresent(phone -> jsonObject.put("maintenanceManagerPhone", phone));
jsonObject.remove("submit");
......
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