Commit 4e1e870c authored by 王果's avatar 王果

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into…

Merge remote-tracking branch 'origin/develop_tzs_register_to_0715' into develop_tzs_register_to_0715
parents 50325ded eb8e36ad
package com.yeejoin.amos.boot.module.jg.api.dto;
import lombok.Data;
import java.util.List;
/**
* 四色数字统计
*
* @author Administrator
*/
@Data
public class FourColorCountDataDto {
private String label;
private String img;
private String key;
private Long value;
private List<FourColorCountDataDto> children;
}
......@@ -269,7 +269,7 @@ public class PressureVesselListener extends AnalysisEventListener<EquipInfoCylin
inspectionDetectionInfo.setRecord(record);
inspectionDetectionInfo.setRecDate(date);
inspectionDetectionInfo.setInspectType("ZZJDJY");
inspectionDetectionInfo.setInspectConclusion("6040");//默认合格
//inspectionDetectionInfo.setInspectConclusion("6040");//默认合格
inspectionDetectionInfo.setInspectDate(DateUtil.parse(data.getInspectDate(), "yyyy-MM-dd"));
// 根据条件确定增加的年数
inspectionDetectionInfo.setNextInspectDate(Date.from(
......
......@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.controller;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.jg.api.dto.FourColorCountDataDto;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.DPStatisticsServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -81,4 +82,37 @@ public class DPStatisticsController {
}
return ResponseHelper.buildResponse(statisticsService.useRegisterCount(dpFilterParamDto));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "大屏总览-左侧-安全指数", notes = "大屏总览-一码知风险-安全指数")
@PostMapping(value = "/zl/left/safetyIndex")
public ResponseModel<Map<String, Object>> querySafetyIndex(@Validated @RequestBody DPFilterParamDto dpFilterParamDto, BindingResult result) {
List<FieldError> fieldErrors = result.getFieldErrors();
if (!fieldErrors.isEmpty()) {
throw new BadRequest(fieldErrors.get(0).getDefaultMessage());
}
return ResponseHelper.buildResponse(statisticsService.querySafetyIndex(dpFilterParamDto));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "大屏总览-左侧-四色管安全", notes = "大屏总览-左侧-四色管安全")
@PostMapping(value = "/zl/left/fourColorManager")
public ResponseModel<List<FourColorCountDataDto>> fourColorManagerSafety(@Validated @RequestBody DPFilterParamDto dpFilterParamDto, BindingResult result) {
List<FieldError> fieldErrors = result.getFieldErrors();
if (!fieldErrors.isEmpty()) {
throw new BadRequest(fieldErrors.get(0).getDefaultMessage());
}
return ResponseHelper.buildResponse(statisticsService.queryFourColorManagerSafetyData(dpFilterParamDto));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "大屏总览-右侧-业务全过程", notes = "大屏总览-右侧-业务全过程")
@PostMapping(value = "/zl/right/bizCycle")
public ResponseModel<Map<String, Object>> queryBizCycleData(@Validated @RequestBody DPFilterParamDto dpFilterParamDto, BindingResult result) {
List<FieldError> fieldErrors = result.getFieldErrors();
if (!fieldErrors.isEmpty()) {
throw new BadRequest(fieldErrors.get(0).getDefaultMessage());
}
return ResponseHelper.buildResponse(statisticsService.queryBizCycleData(dpFilterParamDto));
}
}
......@@ -127,7 +127,7 @@ public class IdxBizJqEquipmentRegisterController extends BaseController {
@GetMapping(value = "/category/list")
@ApiOperation(httpMethod = "GET", value = "查询不同单位类型可新增的设备种类列表", notes = "查询不同单位类型可新增的设备种类列表")
public ResponseModel<List<DictionarieValueModel>> equCategoryListByCompanyType() {
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.equCategoryListByCompanyType(getSelectedOrgInfo(), null, null,null));
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.equCategoryListByCompanyType(getSelectedOrgInfo(), null, null,null, null));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
......@@ -135,8 +135,9 @@ public class IdxBizJqEquipmentRegisterController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "按照人员身份、设备种类查询设备类别", notes = "按照人员身份、设备种类查询设备类别")
public ResponseModel<List<DictionarieValueModel>> equCategoryList(@RequestParam(value = "equList") String equList,
@RequestParam(value = "dataSource",required = false) String dataSource,
@RequestParam(value = "businessScenarios",required = false) String businessScenarios) {
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.equCategoryListByCompanyType(getSelectedOrgInfo(), equList, businessScenarios,dataSource));
@RequestParam(value = "businessScenarios",required = false) String businessScenarios,
@RequestParam(value = "type",required = false) String type) {
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.equCategoryListByCompanyType(getSelectedOrgInfo(), equList, businessScenarios,dataSource, type));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
......
......@@ -31,7 +31,7 @@ public interface IIdxBizJgRegisterInfoService {
Map<String, Object> getDetailFieldCamelCaseByRecord(String record);
List<DictionarieValueModel> equCategoryListByCompanyType(ReginParams selectedOrgInfo, String equList,String businessScenarios,String dataSource);
List<DictionarieValueModel> equCategoryListByCompanyType(ReginParams selectedOrgInfo, String equList,String businessScenarios,String dataSource, String type);
Page<JSONObject> queryForUnitEquipmentPage(JSONObject jsonObject);
......
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONArray;
import com.yeejoin.amos.boot.biz.common.dto.CountDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.common.api.dto.LegendDataDto;
import com.yeejoin.amos.boot.module.jg.api.dto.EquipBizCountDto;
import com.yeejoin.amos.boot.module.jg.api.dto.FourColorCountDataDto;
import com.yeejoin.amos.boot.module.jg.api.enums.DPMapStatisticsItemEnum;
import com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgEnableDisableMapper;
......@@ -439,4 +441,94 @@ public class DPStatisticsServiceImpl {
});
}
}
public Map<String, Object> querySafetyIndex(DPFilterParamDto dpFilterParamDto) {
Map<String, Object> result = new HashMap<>();
result.put("riskScore", 89.2);
return result;
}
public List<FourColorCountDataDto> queryFourColorManagerSafetyData(DPFilterParamDto dpFilterParamDto) {
String mockData = "[{\n" +
"\t\t\"label\": \"设备\",\n" +
"\t\t\"img\": \"/upload/tzs/dqscreen/images/设备.png\",\n" +
"\t\t\"children\": [{\n" +
"\t\t\t\t\"label\": \"正常在用\",\n" +
"\t\t\t\t\"value\": 112372,\n" +
"\t\t\t\t\"img\": \"/upload/tzs/dqscreen/images/qrcodeFour.png\"\n" +
"\t\t\t},\n" +
"\t\t\t{\n" +
"\t\t\t\t\"label\": \"超期末检\",\n" +
"\t\t\t\t\"value\": 72,\n" +
"\t\t\t\t\"img\": \"/upload/tzs/dqscreen/images/qrcodeThree.png\"\n" +
"\t\t\t},\n" +
"\t\t\t{\n" +
"\t\t\t\t\"label\": \"临期告警\",\n" +
"\t\t\t\t\"value\": 72,\n" +
"\t\t\t\t\"img\": \"/upload/tzs/dqscreen/images/qrcodeTwo.png\"\n" +
"\t\t\t},\n" +
"\t\t\t{\n" +
"\t\t\t\t\"label\": \"未注册、停用或注销\",\n" +
"\t\t\t\t\"value\": 72,\n" +
"\t\t\t\t\"img\": \"/upload/tzs/dqscreen/images/qrcodeOne.png\"\n" +
"\t\t\t}\n" +
"\t\t]\n" +
"\t},\n" +
"\t{\n" +
"\t\t\"label\": \"企业\",\n" +
"\t\t\"img\": \"/upload/tzs/dqscreen/images/企业.png\",\n" +
"\t\t\"children\": [{\n" +
"\t\t\t\t\"label\": \"正常在业\",\n" +
"\t\t\t\t\"value\": 72,\n" +
"\t\t\t\t\"img\": \"/upload/tzs/dqscreen/images/qrcodeFour.png\"\n" +
"\t\t\t},\n" +
"\t\t\t{\n" +
"\t\t\t\t\"label\": \"超期未检\",\n" +
"\t\t\t\t\"value\": 72,\n" +
"\t\t\t\t\"img\": \"/upload/tzs/dqscreen/images/qrcodeThree.png\"\n" +
"\t\t\t},\n" +
"\t\t\t{\n" +
"\t\t\t\t\"label\": \"临期告警\",\n" +
"\t\t\t\t\"value\": 72,\n" +
"\t\t\t\t\"img\": \"/upload/tzs/dqscreen/images/qrcodeTwo.png\"\n" +
"\t\t\t},\n" +
"\t\t\t{\n" +
"\t\t\t\t\"label\": \"停业\",\n" +
"\t\t\t\t\"value\": 72,\n" +
"\t\t\t\t\"img\": \"/upload/tzs/dqscreen/images/qrcodeOne.png\"\n" +
"\t\t\t}\n" +
"\t\t]\n" +
"\t},\n" +
"\t{\n" +
"\t\t\"label\": \"人员\",\n" +
"\t\t\"img\": \"/upload/tzs/dqscreen/images/人员.png\",\n" +
"\t\t\"children\": [{\n" +
"\t\t\t\t\"label\": \"许可正常\",\n" +
"\t\t\t\t\"value\": 72,\n" +
"\t\t\t\t\"img\": \"/upload/tzs/dqscreen/images/qrcodeFour.png\"\n" +
"\t\t\t},\n" +
"\t\t\t{\n" +
"\t\t\t\t\"label\": \"许可超期\",\n" +
"\t\t\t\t\"value\": 72,\n" +
"\t\t\t\t\"img\": \"/upload/tzs/dqscreen/images/qrcodeThree.png\"\n" +
"\t\t\t},\n" +
"\t\t\t{\n" +
"\t\t\t\t\"label\": \"许可临期\",\n" +
"\t\t\t\t\"value\": 72,\n" +
"\t\t\t\t\"img\": \"/upload/tzs/dqscreen/images/qrcodeTwo.png\"\n" +
"\t\t\t}\n" +
"\t\t]\n" +
"\t}\n" +
"]";
return JSONArray.parseArray(mockData, FourColorCountDataDto.class);
}
public Map<String, Object> queryBizCycleData(DPFilterParamDto dpFilterParamDto) {
Map<String, Object> result = new HashMap<>();
result.put("xdata", Arrays.asList("安装告知", "监督检验", "使用登记", "定期检验", "变更登录", "注销报废"));
result.put("ydata", Arrays.asList(35, 13, 19, 18, 87, 71));
result.put("allCount", 1021);
result.put("completionRate", 90.2);
return result;
}
}
......@@ -543,9 +543,21 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
@Override
public List<DictionarieValueModel> equCategoryListByCompanyType(ReginParams selectedOrgInfo, String equList, String businessScenarios, String dataSource) {
public List<DictionarieValueModel> equCategoryListByCompanyType(ReginParams selectedOrgInfo, String equList, String businessScenarios, String dataSource, String type) {
// 历史设备录入 直接取所有的设备种类(equList)下的所有设备类别
if ("his".equals(dataSource)) {
// 历史数据导入设备类别限制 bug-21172
if (!ObjectUtils.isEmpty(type) && "PL_DR".equals(type)){
return this.baseMapper.queryAllEquCategoriesUnderTheEquList(equList).stream()
.filter(x -> "2300".equals(x.getDictDataKey()))
.collect(Collectors.toList());
}
// 历史数据新增设备类别限制 bug-21139
if (!ObjectUtils.isEmpty(equList) && "8000".equals(equList)){
return this.baseMapper.queryAllEquCategoriesUnderTheEquList(equList).stream()
.filter(x -> "8300".equals(x.getDictDataKey()))
.collect(Collectors.toList());
}
return this.baseMapper.queryAllEquCategoriesUnderTheEquList(equList);
}
......@@ -2166,10 +2178,10 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
inspectionDetectionInfo.setInspectOrgName((String) mapOrDefault.getOrDefault("useUnit", inspectionDetectionInfo.getInspectOrgName()));
inspectionDetectionInfo.setRecord(record);
inspectionDetectionInfo.setRecDate(date);
inspectionDetectionInfo.setInspectConclusion(null);
inspectionDetectionInfo.setSequenceNbr(OPERATESAVE.equals(operateType) ? null : String.valueOf(equipmentInfoForm.get("INSPECTIONDETECTIONINFO_SEQ")));
iIdxBizJgInspectionDetectionInfoService.saveOrUpdateData(inspectionDetectionInfo);
// 八大类技术参数和主要零部件和安全附件表
List<IdxBizJgMainParts> mainPartsList = new ArrayList<>();
List<IdxBizJgProtectionDevices> protectionDevicesList = new ArrayList<>();
......
......@@ -842,6 +842,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
jgScrapCancel.setNextTaskId(nextTaskId);
JgScrapCancelDto scrapCancelDto = new JgScrapCancelDto();
BeanUtils.copyProperties(jgScrapCancel, scrapCancelDto);
scrapCancelDto.setAuditStatus(FlowStatusEnum.TO_BE_FINISHED.getName());
// 更新代办
TaskV2Model taskV2Model = updateTaskModel(scrapCancelDto, operate);
// 修改业务信息
......
......@@ -384,11 +384,12 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
sequenceNbr = String.valueOf(vehicleInformation.getSequenceNbr());
jgVehicleInformationService.exportVehicleUseRegistrationCertificate(sequenceNbr, response, getPrintTypeCode(printType));
} else if (BusinessTypeEnum.JG_USAGE_REGISTRATION.getName().equals(regType)) {
JgUseRegistration useRegistration = jgUseRegistrationService.getOne(
jgUseRegistrationService.list(
new LambdaQueryWrapper<JgUseRegistration>()
.eq(JgUseRegistration::getUseRegistrationCode, useRegistrationCode));
sequenceNbr = String.valueOf(useRegistration.getSequenceNbr());
jgUseRegistrationService.exportUseRegistrationCertificate(sequenceNbr, response, getPrintTypeCode(printType));
.eq(JgUseRegistration::getUseRegistrationCode, useRegistrationCode)
).stream()
.max(Comparator.comparing(JgUseRegistration::getRecDate))
.ifPresent(useRegistration -> jgUseRegistrationService.exportUseRegistrationCertificate(String.valueOf(useRegistration.getSequenceNbr()), response, getPrintTypeCode(printType)));
}
break;
case "exportSummaryTable":// 工业管道和气瓶 汇总表下载
......
......@@ -2059,9 +2059,9 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
*/
private void fillHistoryDataWithNewEquip(JSONObject jsonObject, JgUseRegistration jgUseRegistration, String record) {
// 非已完成、非作废时显示设备最新信息。前置需求:一个设备只能同时发起一个流程
if (!(jgUseRegistration.getStatus().equals(FlowStatusEnum.TO_BE_FINISHED.getName())
|| jgUseRegistration.getStatus().equals(FlowStatusEnum.TO_BE_DISCARD.getName()))
|| jgUseRegistration.getRegType().equals("1")) {
if (!(FlowStatusEnum.TO_BE_FINISHED.getName().equals(jgUseRegistration.getStatus())
|| FlowStatusEnum.TO_BE_DISCARD.getName().equals(jgUseRegistration.getStatus()))
|| "1".equals(jgUseRegistration.getRegType())) {
// 基本信息 + 制造信息
Map<String, Object> detail = this.baseMapper.getDetail(record);
// 设计信息
......
......@@ -1240,7 +1240,7 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
// 单位内部编号模糊查询
if (!ObjectUtils.isEmpty(map.getString("USE_INNER_CODE"))) {
String test = QueryParser.escape(map.getString("USE_INNER_CODE"));
boolMust.must(QueryBuilders.wildcardQuery("USE_INNER_CODE", "*" + test.toLowerCase() + "*"));
boolMust.must(QueryBuilders.matchPhraseQuery("USE_INNER_CODE", test));
}
this.setFilterOfInFlowing(boolMust);
builder.query(boolMust);
......
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