Commit d64d540f authored by tianbo's avatar tianbo

bugfix:

1、压力管道新增长输和公用类别 2、气瓶对接多数据源错误修改 3、两个规定bug修改
parent 51ccb6ee
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.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.api.openapi.face.model.TmCylinderFillingExamineModel;
......@@ -94,6 +95,7 @@ public class TmCylinderFillingExamineService extends MyBaseServiceImpl<TmCylinde
}
}
@DS("tzs")
private void syncCylinderFillingExamine(List<TmCylinderFillingExamineModel> model) {
syncCylinderDataService.syncCylinderFillingExamine(model);
}
......
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.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.api.openapi.face.model.TmCylinderOffloadingModel;
......@@ -70,6 +71,7 @@ public class TmCylinderOffloadingService extends MyBaseServiceImpl<TmCylinderOff
* 同步气站信息至气瓶服务
* @param model
*/
@DS("tzs")
private void syncCylinderOffloadingModel(List<TmCylinderOffloadingModel> model) {
syncCylinderDataService.syncCylinderOffloading(model);
}
......
......@@ -138,6 +138,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
public static final String DATA_SOURCE_NAME = "DATA_SOURCE_NAME";
public static final String USE_PLACE_CODE = "USE_PLACE_CODE";
public static final String EQU_CATEGORY_CODE = "EQU_CATEGORY_CODE";
public static final String EQU_LIST_CODE = "EQU_LIST_CODE";
public static final String PROJECT_CONTRAPTION = "PROJECT_CONTRAPTION";// 工程装置名称
/**
* 业务类型 0:单个新增 1:批量导入
......@@ -393,9 +394,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
LinkedHashMap equipmentInfoForm = (LinkedHashMap) checkAndCast(paramMap.get(EQUIP_INFO_FORM_ID));
String dataSource = (String) equipmentInfoForm.get(DATA_SOURCE);
String equCategory = (String) equipmentInfoForm.get(EQU_CATEGORY);
String equListCode = (String) equipmentInfoForm.get(EQU_LIST);
//管道添加设备
if (PipelineEnum.INDUSTRIAL_PIPELINE.getCode().equals(equCategory)) {
if (PipelineEnum.PRESSURE_PIPELINE.getCode().equals(equListCode)) {
return this.pipelineEquipCreateOrUpdate(paramMap);
}
if(dataSource.contains("black")){
......@@ -2473,13 +2474,19 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
boolMust.must(scBuilder);
}
// 设备种类编码
if (!ObjectUtils.isEmpty(map.getString("EQU_LIST_CODE"))) {
if (!ObjectUtils.isEmpty(map.getString(EQU_LIST_CODE))) {
BoolQueryBuilder elcBuilder = QueryBuilders.boolQuery();
String test = QueryParser.escape(map.getString("EQU_LIST_CODE"));
elcBuilder.must(QueryBuilders.matchPhraseQuery("EQU_LIST_CODE", test));
String test = QueryParser.escape(map.getString(EQU_LIST_CODE));
elcBuilder.must(QueryBuilders.matchPhraseQuery(EQU_LIST_CODE, test));
boolMust.must(elcBuilder);
} else {
BoolQueryBuilder pBuilder = QueryBuilders.boolQuery();
String test = QueryParser.escape("8000");//不查管道,管道新菜单查询
pBuilder.mustNot(QueryBuilders.termQuery(EQU_LIST_CODE, test));
boolMust.must(pBuilder);
}
// 设备类别编码
// 设备品种编码
if (!ObjectUtils.isEmpty(map.getString("EQU_DEFINE_CODE"))) {
BoolQueryBuilder elcBuilder = QueryBuilders.boolQuery();
String test = QueryParser.escape(map.getString("EQU_DEFINE_CODE"));
......@@ -2500,11 +2507,6 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
String test = QueryParser.escape(map.getString(EQU_CATEGORY_CODE));
pBuilder.must(QueryBuilders.termQuery(EQU_CATEGORY_CODE, test));
boolMust.must(pBuilder);
} else {
BoolQueryBuilder pBuilder = QueryBuilders.boolQuery();
String test = QueryParser.escape("8300");//不查管道,管道新菜单查询
pBuilder.mustNot(QueryBuilders.termQuery(EQU_CATEGORY_CODE, test));
boolMust.must(pBuilder);
}
// 是否车用气瓶
if (!ObjectUtils.isEmpty(map.getString(WHETHER_VEHICLE_CYLINDER))) {
......
......@@ -2413,6 +2413,7 @@ public class JGDPStatisticsServiceImpl {
equipParamsMap.put(EQU_LIST, String.valueOf(equIpClassMap.get(EQU_LIST)));
equipParamsMap.put(EQU_CATEGORY, String.valueOf(equIpClassMap.get(EQU_CATEGORY)));
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);
}
}
......
......@@ -302,7 +302,7 @@ public interface PlanTaskMapper extends BaseMapper {
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);
......
......@@ -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<StaticDay> staticDays = listDay.stream().map(e->{
String s = JSON.toJSONString(e);
StaticDay staticDay = JSON.parseObject(s, StaticDay.class);
return staticDay;
return JSON.parseObject(s, StaticDay.class);
}).collect(Collectors.toList());
// 插入周统计表
List<Map<String, Object>> listWeek = checkMapper.planCount(runDate, null, String.valueOf(PlanTaskTypeStatusEnum.week.getValue()), null,null,null);
List<StaticDay> staticWeeks = listWeek.stream().map(e->{
String s = JSON.toJSONString(e);
StaticDay staticWeek = JSON.parseObject(s, StaticDay.class);
return staticWeek;
return JSON.parseObject(s, StaticDay.class);
}).collect(Collectors.toList());
// 插入月统计表
List<Map<String, Object>> listMonth = checkMapper.planCount(runDate, null, String.valueOf(PlanTaskTypeStatusEnum.month.getValue()), null,null,null);
List<StaticDay> staticMonths = listMonth.stream().map(e->{
String s = JSON.toJSONString(e);
StaticDay staticMonth = JSON.parseObject(s, StaticDay.class);
return staticMonth;
return JSON.parseObject(s, StaticDay.class);
}).collect(Collectors.toList());
if(staticDays.size() > 0) {
planTaskMapper.updateData(P_STATIC_DAY,staticDays);
if(!staticDays.isEmpty()) {
planTaskMapper.updateData(P_STATIC_DAY, staticDays);
}
if(staticWeeks.size() > 0) {
planTaskMapper.updateData(P_STATIC_WEEK,staticDays);
if(!staticWeeks.isEmpty()) {
planTaskMapper.updateData(P_STATIC_WEEK, staticWeeks);
}
if(staticMonths.size() > 0) {
planTaskMapper.updateData(P_STATIC_MONTH,staticDays);
if(!staticMonths.isEmpty()) {
planTaskMapper.updateData(P_STATIC_MONTH, staticMonths);
}
log.info("更新统计表完成=======");
}
......
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