Commit 6098a5ed authored by 刘林's avatar 刘林

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

parents 2eae243e 63f45e00
...@@ -132,4 +132,11 @@ public class ProjectContraptionChangeDataDto extends BaseChangeDataDto { ...@@ -132,4 +132,11 @@ public class ProjectContraptionChangeDataDto extends BaseChangeDataDto {
@FieldDisplayDefine(value = "使用登记编号") @FieldDisplayDefine(value = "使用登记编号")
private String useRegistrationCode; private String useRegistrationCode;
@FieldDisplayDefine(value = "监管码", isExist = false)
private String supervisoryCode;
@FieldDisplayDefine(value = "设备代码", isExist = false)
private String equCode;
} }
...@@ -113,6 +113,8 @@ public class PieLineDataChangeServiceImpl { ...@@ -113,6 +113,8 @@ public class PieLineDataChangeServiceImpl {
private ProjectContraptionChangeDataDto getOldProjectContraptionData(ProjectContraptionChangeDataDto projectContraptionChangeDataDtoNew) { private ProjectContraptionChangeDataDto getOldProjectContraptionData(ProjectContraptionChangeDataDto projectContraptionChangeDataDtoNew) {
IdxBizJgProjectContraption projectContraption = idxBizJgProjectContraptionServiceImpl.getById(projectContraptionChangeDataDtoNew.getProjectContraptionId()); IdxBizJgProjectContraption projectContraption = idxBizJgProjectContraptionServiceImpl.getById(projectContraptionChangeDataDtoNew.getProjectContraptionId());
projectContraptionChangeDataDtoNew.setEquCode(projectContraption.getEquCode());
projectContraptionChangeDataDtoNew.setSupervisoryCode(projectContraption.getSupervisoryCode());
return BeanUtil.copyProperties(projectContraption, ProjectContraptionChangeDataDto.class); return BeanUtil.copyProperties(projectContraption, ProjectContraptionChangeDataDto.class);
} }
...@@ -197,7 +199,7 @@ public class PieLineDataChangeServiceImpl { ...@@ -197,7 +199,7 @@ public class PieLineDataChangeServiceImpl {
// 汇总表打印会使用 // 汇总表打印会使用
useInfo.setUseDate(projectContraptionChangeDataDto.getUseDate()); useInfo.setUseDate(projectContraptionChangeDataDto.getUseDate());
useInfo.setDataSource(projectContraptionChangeDataDto.getDataSource()); useInfo.setDataSource(projectContraptionChangeDataDto.getDataSource());
useInfo.setIsIntoManagement(Boolean.FALSE); useInfo.setIsIntoManagement(Boolean.TRUE);
useInfo.setEquState(String.valueOf(EquipmentEnum.ZAIYONG.getCode())); useInfo.setEquState(String.valueOf(EquipmentEnum.ZAIYONG.getCode()));
SingleProjectEquipChangeProcess.setNewUseAddressInfo(projectContraptionChangeDataDto, useInfo); SingleProjectEquipChangeProcess.setNewUseAddressInfo(projectContraptionChangeDataDto, useInfo);
commonEquipDataProcessService.getIdxBizJgUseInfoService().save(useInfo); commonEquipDataProcessService.getIdxBizJgUseInfoService().save(useInfo);
...@@ -255,6 +257,7 @@ public class PieLineDataChangeServiceImpl { ...@@ -255,6 +257,7 @@ public class PieLineDataChangeServiceImpl {
otherInfo.setSequenceNbr(null); otherInfo.setSequenceNbr(null);
otherInfo.setClaimStatus("已认领"); otherInfo.setClaimStatus("已认领");
otherInfo.setRecDate(new Date()); otherInfo.setRecDate(new Date());
otherInfo.setSupervisoryCode(projectContraptionChangeDataDto.getSupervisoryCode());
commonEquipDataProcessService.getIdxBizJgOtherInfoMapper().insert(otherInfo); commonEquipDataProcessService.getIdxBizJgOtherInfoMapper().insert(otherInfo);
//管道技术参数 //管道技术参数
...@@ -291,6 +294,11 @@ public class PieLineDataChangeServiceImpl { ...@@ -291,6 +294,11 @@ public class PieLineDataChangeServiceImpl {
esEquipmentDto.setORG_BRANCH_NAME(projectContraptionChangeDataDto.getOrgName()); esEquipmentDto.setORG_BRANCH_NAME(projectContraptionChangeDataDto.getOrgName());
esEquipmentDto.setOrgBranchCode(projectContraptionChangeDataDto.getOrgCode()); esEquipmentDto.setOrgBranchCode(projectContraptionChangeDataDto.getOrgCode());
esEquipmentDto.setCREATE_DATE(new Date().getTime()); esEquipmentDto.setCREATE_DATE(new Date().getTime());
esEquipmentDto.setUSE_PLACE(String.join("/", projectContraptionChangeDataDto.getProvinceName(), projectContraptionChangeDataDto.getCityName(), projectContraptionChangeDataDto.getCountyName(), projectContraptionChangeDataDto.getStreetName()));
esEquipmentDto.setUSE_PLACE_CODE(String.join("#", projectContraptionChangeDataDto.getProvince(), projectContraptionChangeDataDto.getCity(), projectContraptionChangeDataDto.getCounty(), projectContraptionChangeDataDto.getStreet()));
esEquipmentDto.setADDRESS(projectContraptionChangeDataDto.getAddress());
esEquipmentDto.setSUPERVISORY_CODE(projectContraptionChangeDataDto.getSupervisoryCode());
esEquipmentDto.setEQU_CODE(projectContraptionChangeDataDto.getEquCode());
esEquipmentDto.setProjectContraptionId(projectContraptionChangeDataDto.getProjectContraptionId()); esEquipmentDto.setProjectContraptionId(projectContraptionChangeDataDto.getProjectContraptionId());
if (inspectionDetectionInfo.getNextInspectDate() != null) { if (inspectionDetectionInfo.getNextInspectDate() != null) {
esEquipmentDto.setNEXT_INSPECT_DATE(inspectionDetectionInfo.getNextInspectDate().getTime()); esEquipmentDto.setNEXT_INSPECT_DATE(inspectionDetectionInfo.getNextInspectDate().getTime());
...@@ -387,6 +395,11 @@ public class PieLineDataChangeServiceImpl { ...@@ -387,6 +395,11 @@ public class PieLineDataChangeServiceImpl {
esEquipmentDto.setORG_BRANCH_NAME(projectContraptionChangeDataDto.getOrgName()); esEquipmentDto.setORG_BRANCH_NAME(projectContraptionChangeDataDto.getOrgName());
esEquipmentDto.setOrgBranchCode(projectContraptionChangeDataDto.getOrgCode()); esEquipmentDto.setOrgBranchCode(projectContraptionChangeDataDto.getOrgCode());
esEquipmentDto.setUSE_ORG_CODE(projectContraptionChangeDataDto.getUseRegistrationCode()); esEquipmentDto.setUSE_ORG_CODE(projectContraptionChangeDataDto.getUseRegistrationCode());
esEquipmentDto.setUSE_PLACE(String.join("/", projectContraptionChangeDataDto.getProvinceName(), projectContraptionChangeDataDto.getCityName(), projectContraptionChangeDataDto.getCountyName(), projectContraptionChangeDataDto.getStreetName()));
esEquipmentDto.setUSE_PLACE_CODE(String.join("#", projectContraptionChangeDataDto.getProvince(), projectContraptionChangeDataDto.getCity(), projectContraptionChangeDataDto.getCounty(), projectContraptionChangeDataDto.getStreet()));
esEquipmentDto.setADDRESS(projectContraptionChangeDataDto.getAddress());
esEquipmentDto.setSUPERVISORY_CODE(projectContraptionChangeDataDto.getSupervisoryCode());
esEquipmentDto.setEQU_CODE(projectContraptionChangeDataDto.getEquCode());
if (pipelineNew.getNextInspectDate() != null) { if (pipelineNew.getNextInspectDate() != null) {
esEquipmentDto.setNEXT_INSPECT_DATE(pipelineNew.getNextInspectDate().getTime()); esEquipmentDto.setNEXT_INSPECT_DATE(pipelineNew.getNextInspectDate().getTime());
} }
......
...@@ -842,7 +842,7 @@ public class DataDockServiceImpl { ...@@ -842,7 +842,7 @@ public class DataDockServiceImpl {
* @param record 设备唯一编码 * @param record 设备唯一编码
*/ */
private void saveEquInfoToEs(String record, String isCompleteXa) { private void saveEquInfoToEs(String record, String isCompleteXa) {
Map<String, Object> map = categoryOtherInfoMapper.selectDataById(record); Map<String, Object> map = categoryOtherInfoMapper.selectJgAllViewDataById(record);
ESEquipmentCategoryDto equipmentCategoryDto = JSON.parseObject(toJSONString(map), ESEquipmentCategoryDto.class); ESEquipmentCategoryDto equipmentCategoryDto = JSON.parseObject(toJSONString(map), ESEquipmentCategoryDto.class);
if (!ObjectUtils.isEmpty(equipmentCategoryDto)) { if (!ObjectUtils.isEmpty(equipmentCategoryDto)) {
long recTime; long recTime;
...@@ -2975,7 +2975,7 @@ public class DataDockServiceImpl { ...@@ -2975,7 +2975,7 @@ public class DataDockServiceImpl {
idxBizJgUseInfoService.updateById(useInfo); idxBizJgUseInfoService.updateById(useInfo);
// es更新 // es更新
Map<String, Object> map = categoryOtherInfoMapper.selectDataById(useInfo.getRecord()); Map<String, Object> map = categoryOtherInfoMapper.selectJgAllViewDataById(useInfo.getRecord());
ESEquipmentCategoryDto equipmentCategoryDto = JSON.parseObject(toJSONString(map), ESEquipmentCategoryDto.class); ESEquipmentCategoryDto equipmentCategoryDto = JSON.parseObject(toJSONString(map), ESEquipmentCategoryDto.class);
equipmentCategoryDto.setIS_INTO_MANAGEMENT(Boolean.TRUE); equipmentCategoryDto.setIS_INTO_MANAGEMENT(Boolean.TRUE);
esEquipmentCategory.save(equipmentCategoryDto); esEquipmentCategory.save(equipmentCategoryDto);
......
...@@ -106,7 +106,6 @@ import java.util.concurrent.atomic.AtomicReference; ...@@ -106,7 +106,6 @@ import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import java.util.stream.StreamSupport;
import static com.alibaba.fastjson.JSON.toJSONString; 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;
...@@ -1141,7 +1140,7 @@ public class DataHandlerServiceImpl { ...@@ -1141,7 +1140,7 @@ public class DataHandlerServiceImpl {
} }
String[] recordArr = records.trim().split(","); String[] recordArr = records.trim().split(",");
for (String record : recordArr) { for (String record : recordArr) {
Map<String, Object> map = categoryOtherInfoMapper.selectDataById(record); Map<String, Object> map = categoryOtherInfoMapper.selectJgAllViewDataById(record);
categoryOtherInfoMapper.updateEsStatus(record); categoryOtherInfoMapper.updateEsStatus(record);
ESEquipmentCategoryDto dto = JSON.parseObject(toJSONString(map), ESEquipmentCategoryDto.class); ESEquipmentCategoryDto dto = JSON.parseObject(toJSONString(map), ESEquipmentCategoryDto.class);
Optional<ESEquipmentCategoryDto> data = esEquipmentCategory.findById(record); Optional<ESEquipmentCategoryDto> data = esEquipmentCategory.findById(record);
......
...@@ -13,7 +13,9 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey; ...@@ -13,7 +13,9 @@ 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;
import com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil; import com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil;
import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory; import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory;
import com.yeejoin.amos.boot.module.common.api.dao.EsEquipmentDao;
import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto; import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
import com.yeejoin.amos.boot.module.common.api.entity.ESEquipmentInfo;
import com.yeejoin.amos.boot.module.jg.api.dto.ShCarDto; import com.yeejoin.amos.boot.module.jg.api.dto.ShCarDto;
import com.yeejoin.amos.boot.module.jg.api.entity.*; import com.yeejoin.amos.boot.module.jg.api.entity.*;
import com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum; import com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum;
...@@ -94,6 +96,8 @@ public class ShCarServiceImpl extends BaseService<ShCar, ShCar, ShCarMapper> imp ...@@ -94,6 +96,8 @@ public class ShCarServiceImpl extends BaseService<ShCar, ShCar, ShCarMapper> imp
@Resource @Resource
private ESEquipmentCategory esEquipmentCategory; private ESEquipmentCategory esEquipmentCategory;
@Resource @Resource
private EsEquipmentDao esEquipmentDao;
@Resource
private TzsServiceFeignClient tzsServiceFeignClient; private TzsServiceFeignClient tzsServiceFeignClient;
@Resource @Resource
private JgVehicleInformationServiceImpl vehicleInformationService; private JgVehicleInformationServiceImpl vehicleInformationService;
...@@ -707,13 +711,23 @@ public class ShCarServiceImpl extends BaseService<ShCar, ShCar, ShCarMapper> imp ...@@ -707,13 +711,23 @@ public class ShCarServiceImpl extends BaseService<ShCar, ShCar, ShCarMapper> imp
* 认领过程中报错,回滚第一步的es数据 * 认领过程中报错,回滚第一步的es数据
*/ */
public void handleClaimFailed(List<String> records) { public void handleClaimFailed(List<String> records) {
if (!records.isEmpty()) { esEquipmentCategory.deleteAll(this.buildEquipCategoryData(records));
records.forEach(record -> { esEquipmentDao.deleteAll(this.buildEquipData(records));
Optional<ESEquipmentCategoryDto> data = esEquipmentCategory.findById(record);
if (!ObjectUtils.isEmpty(data)) {
esEquipmentCategory.deleteById(record);
} }
});
private Iterable<? extends ESEquipmentInfo> buildEquipData(List<String> records) {
return records.stream().map(record->{
ESEquipmentInfo esEquipmentInfo = new ESEquipmentInfo();
esEquipmentInfo.setSEQUENCE_NBR(record);
return esEquipmentInfo;
}).collect(Collectors.toList());
} }
private Iterable<? extends ESEquipmentCategoryDto> buildEquipCategoryData(List<String> records) {
return records.stream().map(record->{
ESEquipmentCategoryDto esEquipmentInfo = new ESEquipmentCategoryDto();
esEquipmentInfo.setSEQUENCE_NBR(record);
return esEquipmentInfo;
}).collect(Collectors.toList());
} }
} }
\ No newline at end of file
...@@ -313,6 +313,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR ...@@ -313,6 +313,7 @@ public class JyjcInspectionResultServiceImpl extends BaseService<JyjcInspectionR
JyjcInspectionResultModel dbResultModel = this.queryBySeq(model.getSequenceNbr()); JyjcInspectionResultModel dbResultModel = this.queryBySeq(model.getSequenceNbr());
// 更新使用信息、检验信息、技术参数 // 更新使用信息、检验信息、技术参数
Set<String> records = this.updateTechParamAndInspectInfo(dbResultModel, jybgFile); Set<String> records = this.updateTechParamAndInspectInfo(dbResultModel, jybgFile);
sendDataRefreshMsg(records);
return dbResultModel; return dbResultModel;
} }
......
...@@ -30,7 +30,7 @@ public interface CategoryOtherInfoMapper extends BaseMapper<CategoryOtherInfo> { ...@@ -30,7 +30,7 @@ public interface CategoryOtherInfoMapper extends BaseMapper<CategoryOtherInfo> {
int updateOtherInfo(String supervisorCode, String editStatus); int updateOtherInfo(String supervisorCode, String editStatus);
Map<String, Object> selectDataById(String id); Map<String, Object> selectJgAllViewDataById(String id);
CategoryOtherInfo queryInitCode(@Param("initCode") @NonNull String initCode); CategoryOtherInfo queryInitCode(@Param("initCode") @NonNull String initCode);
......
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
LEFT JOIN idx_biz_jg_use_info ibjui ON ibjoi.RECORD = ibjui.RECORD LEFT JOIN idx_biz_jg_use_info ibjui ON ibjoi.RECORD = ibjui.RECORD
WHERE ibjoi."RECORD" = #{record} WHERE ibjoi."RECORD" = #{record}
</select> </select>
<select id="selectDataById" resultType="java.util.Map"> <select id="selectJgAllViewDataById" resultType="java.util.Map">
SELECT "SEQUENCE_NBR", SELECT "SEQUENCE_NBR",
"REC_DATE", "REC_DATE",
"CREATE_DATE", "CREATE_DATE",
......
...@@ -1664,7 +1664,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -1664,7 +1664,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
@Override @Override
public void checkEsData(String id) { public void checkEsData(String id) {
Map<String, Object> map = categoryOtherInfoMapper.selectDataById(id); Map<String, Object> map = categoryOtherInfoMapper.selectJgAllViewDataById(id);
categoryOtherInfoMapper.updateEsStatus(id); categoryOtherInfoMapper.updateEsStatus(id);
ESEquipmentCategoryDto dto = JSON.parseObject(toJSONString(map), ESEquipmentCategoryDto.class); ESEquipmentCategoryDto dto = JSON.parseObject(toJSONString(map), ESEquipmentCategoryDto.class);
Optional<ESEquipmentCategoryDto> data = esEquipmentCategory.findById(id); Optional<ESEquipmentCategoryDto> data = esEquipmentCategory.findById(id);
......
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