Commit 5816b7f8 authored by suhuiguang's avatar suhuiguang

Merge branch 'develop_tzs_register' of…

Merge branch 'develop_tzs_register' of http://36.40.66.175:5000/moa/amos-boot-biz into develop_tzs_register
parents 2646f551 ef460ce4
......@@ -193,7 +193,7 @@
<if test="contractDto.maintenanceUnitCodeFilter != '' and contractDto.maintenanceUnitCodeFilter != null">
and (tjmc.maintenance_unit_code = #{contractDto.maintenanceUnitCodeFilter}
or tjmc.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ))
and (tjmc.status <![CDATA[<>]]> '使用单位待提交' and tjmc.status <![CDATA[<>]]> '待提交')
and (tjmc.instance_id <![CDATA[<>]]> '')
</if>
<!-- </otherwise>-->
<!-- </choose>-->
......@@ -201,7 +201,7 @@
<if test="contractDto.receiveOrgCodeFilter != '' and contractDto.receiveOrgCodeFilter != null">
and (tjmc.receive_org_code = #{contractDto.receiveOrgCodeFilter}
or tjmc.transfer_to_user_ids LIKE concat ( '%', #{currentUserId}, '%' ))
and (tjmc.status <![CDATA[<>]]> '使用单位待提交' and tjmc.status <![CDATA[<>]]> '待提交')
and (tjmc.instance_id <![CDATA[<>]]> '')
</if>
-- 数据过滤结束 ----------------------------------------------------
</where>
......
......@@ -254,6 +254,20 @@ public class CommonController extends BaseController {
return ResponseHelper.buildResponse(commonService.superviseBusinessCategory(type));
}
/**
* 查询各类型业务场景
* 使用单位:按照设备种类,按照应用场景
* 安装改造维修单位:按照设备种类
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "查询监管业务名称列表", notes = "查询监管业务名称列表")
@GetMapping(value = "/businessScenarios")
public ResponseModel<Object> businessScenarios(String type) {
return ResponseHelper.buildResponse(commonService.businessScenarios(type));
}
@Autowired
private IJgInstallationNoticeService iJgInstallationNoticeService;
......
......@@ -116,15 +116,16 @@ 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));
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.equCategoryListByCompanyType(getSelectedOrgInfo(), null, null));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/equ-category/listByPersonAndEquList")
@ApiOperation(httpMethod = "GET", value = "按照人员身份、设备种类查询设备类别", notes = "按照人员身份、设备种类查询设备类别")
public ResponseModel<List<DictionarieValueModel>> equCategoryList(@RequestParam(value = "equList") String equList) {
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.equCategoryListByCompanyType(getSelectedOrgInfo(), equList));
public ResponseModel<List<DictionarieValueModel>> equCategoryList(@RequestParam(value = "equList") String equList,
@RequestParam(value = "businessScenarios") String businessScenarios) {
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.equCategoryListByCompanyType(getSelectedOrgInfo(), equList, businessScenarios));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
......
......@@ -51,6 +51,8 @@ public interface ICommonService {
List<Map<String, Object>> superviseBusinessCategory(String type);
List<Map<String, Object>> businessScenarios(String type);
Object invokeBusinessProcess(String submitType, Map<String, Object> obj, ReginParams reginParams);
Object getCompanyUser(Long companyId);
......
......@@ -30,7 +30,7 @@ public interface IIdxBizJgRegisterInfoService {
Map<String, Object> getDetailFieldCamelCaseByRecord(String record);
List<DictionarieValueModel> equCategoryListByCompanyType(ReginParams selectedOrgInfo, String equList);
List<DictionarieValueModel> equCategoryListByCompanyType(ReginParams selectedOrgInfo, String equList,String businessScenarios);
Page<JSONObject> queryForUnitEquipmentPage(JSONObject jsonObject);
......
......@@ -27,10 +27,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.jg.api.dto.*;
import com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory;
import com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.CylinderTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.EquipTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.PrintingTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.*;
import com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper;
import com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationTransferService;
import com.yeejoin.amos.boot.module.jg.api.service.IJgInstallationNoticeService;
......@@ -137,8 +134,6 @@ public class CommonServiceImpl implements ICommonService {
private static final String XZSB = "XZSB";
private static final String CODE = "code";
private static final String PL_DR = "PL_DR";
private static final String SAFETYANDMAINTENANCEUNIT = "安装改造维修单位";
// 管辖机构
private static final String REGULATOR_UNIT = "监管机构";
// 行政审批局
......@@ -168,6 +163,11 @@ public class CommonServiceImpl implements ICommonService {
private static final String SELECTED_ROLE_SEQS = "selectRoleSeqs";
public static final String YWCJ = "YWCJ";
public static final String DICT_DATA_KEY = "dictDataKey";
@Value("${redis.cache.failure.time}")
private Long redisRegionTimeSecond;
......@@ -614,7 +614,7 @@ public class CommonServiceImpl implements ICommonService {
public List<Map<String, Object>> superviseBusinessCategory(String type) {
ReginParams reginParams = getSelectedOrgInfo();
Map<String, List<Map<String, Object>>> resourceJson = JsonUtils.getResourceJson(superviseBusinessCategory);
if (XZSB.equals(type) && SAFETYANDMAINTENANCEUNIT.equals(reginParams.getCompany().getCompanyType())){
if (XZSB.equals(type) && CompanyTypeEnum.CONSTRUCTION.getName().equals(reginParams.getCompany().getCompanyType())){
Iterator<Map<String, Object>> iterator = resourceJson.get(type).iterator();
while (iterator.hasNext()) {
Map<String, Object> item = iterator.next();
......@@ -627,6 +627,25 @@ public class CommonServiceImpl implements ICommonService {
return resourceJson.get(type);
}
@Override
public List<Map<String, Object>> businessScenarios(String type) {
ReginParams reginParams = getSelectedOrgInfo();
Map<String, List<Map<String, Object>>> resourceJson = JsonUtils.getResourceJson(superviseBusinessCategory);
//新增设备 或者 安改维单位 只有按照设备种类选择的业务
if (PL_DR.equals(type) || CompanyTypeEnum.CONSTRUCTION.getName().equals(reginParams.getCompany().getCompanyType())){
Iterator<Map<String, Object>> iterator = resourceJson.get(YWCJ).iterator();
while (iterator.hasNext()) {
Map<String, Object> item = iterator.next();
if (item.get(DICT_DATA_KEY).equals("1")) {
iterator.remove();
}
}
return resourceJson.get(YWCJ);
}
return resourceJson.get(YWCJ);
}
private List<LinkedHashMap> deleteTreeData(List<LinkedHashMap> result, String companyType) {
Iterator it = result.iterator();
while (it.hasNext()) {
......
......@@ -47,6 +47,7 @@ import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.RestHighLevelClient;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.elasticsearch.search.sort.SortOrder;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -97,8 +98,6 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
private static final String EQUIP_PROTECTIONDEVICES_FORM_ID = "protectionDevices";
private static final String EQUSTATE = "EQU_STATE";
private static final String CONSTRUCTIONTYPE = "CONSTRUCTION_TYPE";
private static final String EQUDEFINE = "EQU_DEFINE";
private static final String EQUDEFINECODE = "EQU_DEFINE_CODE";
// 新增修改标识
private static final String OPERATESAVE = "save";
private static final String OPERATEEDIT = "edit";
......@@ -106,11 +105,23 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
private static final String MANAGE_TYPE_UNIT = "unit";
private static final String RECORD = "RECORD";
private static final String MANAGE_TYPE = "manageType";
// 设备代码
private static final String EQU_CODE = "EQU_CODE";
private static final String SEQUENCE_NBR = "SEQUENCE_NBR";
private static final String FACTORY_NUM = "FACTORY_NUM";
// 新增设备是否复制而来
private static final String IS_COPY = "isCopy";
// 设备种类
public static final String EQU_LIST = "EQU_LIST";
// 设备类别
public static final String EQU_CATEGORY = "EQU_CATEGORY";
// 设备品种
public static final String EQU_DEFINE = "EQU_DEFINE";
// 是否车用气瓶
public static final String WHETHER_VEHICLE_CYLINDER = "WHETHER_VEHICLE_CYLINDER";
// 是否撬装式压力容器
public static final String WHETHER_SKID_MOUNTED_PRESSURE_VESSEL = "WHETHER_SKID_MOUNTED_PRESSURE_VESSEL";
// 需要转化成jsonObject的附件字段
public static String[] jsonFields = {"insOtherAccessories", "installContractAttachment", "installProxyStatementAttachment"};
@Autowired
RestHighLevelClient restHighLevelClient;
......@@ -401,14 +412,14 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
resultMap.put(EQUIP_INFO_FORM_ID, equipInfoMap);
}
// 设备参数
if (equIpClassMap.containsKey("EQU_LIST") && !ValidationUtil.isEmpty(equIpClassMap.get("EQU_LIST").toString())) {
Map<String, Object> equipParamsMap = this.getEquipParamsMap(record, "", equIpClassMap.get("EQU_LIST").toString());
if (equIpClassMap.containsKey(EQU_LIST) && !ValidationUtil.isEmpty(equIpClassMap.get(EQU_LIST).toString())) {
Map<String, Object> equipParamsMap = this.getEquipParamsMap(record, "", equIpClassMap.get(EQU_LIST).toString());
if (!ValidationUtil.isEmpty(equipParamsMap)) {
// 给技术参数中添加设备种类,标记技术参数属于那个设备
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(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)));
resultMap.put(EQUIP_PARAMS_FORM_ID, equipParamsMap);
}
}
......@@ -437,8 +448,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
resultMap.putAll(equipInfoMap);
}
// 设备参数
if (equIpClassMap.containsKey("EQU_LIST") && !ValidationUtil.isEmpty(equIpClassMap.get("EQU_LIST").toString())) {
Map<String, Object> equipParamsMap = this.getEquipParamsMap(record, "", equIpClassMap.get("EQU_LIST").toString());
if (equIpClassMap.containsKey(EQU_LIST) && !ValidationUtil.isEmpty(equIpClassMap.get(EQU_LIST).toString())) {
Map<String, Object> equipParamsMap = this.getEquipParamsMap(record, "", equIpClassMap.get(EQU_LIST).toString());
if (!ValidationUtil.isEmpty(equipParamsMap)) {
resultMap.putAll(equipParamsMap);
......@@ -482,14 +493,23 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
@Override
public List<DictionarieValueModel> equCategoryListByCompanyType(ReginParams selectedOrgInfo, String equList) {
public List<DictionarieValueModel> equCategoryListByCompanyType(ReginParams selectedOrgInfo, String equList,String businessScenarios) {
String companyType = selectedOrgInfo.getCompany().getCompanyType();
String dictCodePrefix = getDictCodePrefix(companyType, equList);
if (StringUtils.isEmpty(dictCodePrefix)) {
return new ArrayList<>();
}
String dictCode = String.format("%s_%s", dictCodePrefix, equipAddDictCodeSuffix);
return FeignUtil.remoteCall(() -> Systemctl.dictionarieClient.dictValues(dictCode));
List<DictionarieValueModel> result = FeignUtil.remoteCall(() -> Systemctl.dictionarieClient.dictValues(dictCode));
// 初始化collect列表
List<DictionarieValueModel> collect = new ArrayList<>();
// 使用单位 && 业务场景businessScenarios为1(场景选择)&& 设备种类为2000(压力容器) =》 设备类别只保留固定式压力容器(2100)
// 使用单位 && 业务场景businessScenarios为0(场景选择)&& 设备种类为2000(压力容器) =》 设备类别排除固定式压力容器(2100)
boolean shouldInclude2100 = CompanyTypeEnum.USE.getName().equals(companyType) && "1".equals(businessScenarios) && "2000".equals(equList);
collect = result.stream()
.filter(x -> shouldInclude2100 ? "2100".equals(x.getDictDataKey()) : !"2100".equals(x.getDictDataKey()))
.collect(Collectors.toList());
return collect;
}
private String getDictCodePrefix(String companyType, String equList) {
......@@ -543,7 +563,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
String[] fields = {"PRODUCT_PHOTO"};
registerInfoMap = convertCamelToUnderscore(registerInfo, fields);
registerInfoMap.put("REGISTERINFO_SEQ", registerInfo.getSequenceNbr());
registerInfoMap.put("SEQUENCE_NBR", registerInfo.getSequenceNbr());
registerInfoMap.put(SEQUENCE_NBR, registerInfo.getSequenceNbr());
if (CollectionUtils.isNotEmpty(categoryList1)) {
registerInfoMap.put("EQU_CATEGORY_DESC", categoryList1.get(0).getName());
}
......@@ -772,7 +792,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
String[] fields = {"PRODUCT_PHOTO", "OTHER_ACCESSORIES_REG"};
registerInfoMap = convertCamelToUnderscore(registerInfo, fields);
registerInfoMap.put("REGISTERINFO_SEQ", registerInfo.getSequenceNbr());
registerInfoMap.put("SEQUENCE_NBR", registerInfo.getSequenceNbr());
registerInfoMap.put(SEQUENCE_NBR, registerInfo.getSequenceNbr());
if (CollectionUtils.isNotEmpty(categoryList1)) {
registerInfoMap.put("EQU_CATEGORY_DESC", categoryList1.get(0).getName());
}
......@@ -1213,7 +1233,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
// 根据当前登录用户类型及管辖机构筛选条件添加对应参数
if (ObjectUtils.isEmpty(map.getString("SEQUENCE_NBR")) && ObjectUtils.isEmpty(map.getString("useUnitCreditCode"))) {
if (ObjectUtils.isEmpty(map.getString(SEQUENCE_NBR)) && ObjectUtils.isEmpty(map.getString("useUnitCreditCode"))) {
if (!ValidationUtil.isEmpty(type) && type.contains("使用单位")) {
if (ValidationUtil.isEmpty(map.getString("USE_UNIT_CREDIT_CODE"))) {
map.put("USE_UNIT_CREDIT_CODE", companyCode);
......@@ -1265,17 +1285,17 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
// 通用匹配规则,其他条件构建
if (!ObjectUtils.isEmpty(map.getString("SEQUENCE_NBR"))) {
if (!ObjectUtils.isEmpty(map.getString(SEQUENCE_NBR))) {
BoolQueryBuilder seqBuilder = QueryBuilders.boolQuery();
String param = map.getString("SEQUENCE_NBR");
String param = map.getString(SEQUENCE_NBR);
List<String> strings = Arrays.asList(param.split(","));
seqBuilder.must(QueryBuilders.termsQuery("SEQUENCE_NBR.keyword", strings));
boolMust.must(seqBuilder);
}
if (!ObjectUtils.isEmpty(map.getString("EQU_CATEGORY"))) {
if (!ObjectUtils.isEmpty(map.getString(EQU_CATEGORY))) {
BoolQueryBuilder pBuilder = QueryBuilders.boolQuery();
String param = QueryParser.escape(map.getString("EQU_CATEGORY"));
pBuilder.must(QueryBuilders.matchPhraseQuery("EQU_CATEGORY", "*" + param + "*"));
String param = QueryParser.escape(map.getString(EQU_CATEGORY));
pBuilder.must(QueryBuilders.matchPhraseQuery(EQU_CATEGORY, "*" + param + "*"));
boolMust.must(pBuilder);
}
......@@ -1344,10 +1364,10 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
boolMust.must(elcBuilder);
}
// 设备种类名称
if (!ObjectUtils.isEmpty(map.getString("EQU_LIST"))) {
if (!ObjectUtils.isEmpty(map.getString(EQU_LIST))) {
BoolQueryBuilder elBuilder = QueryBuilders.boolQuery();
String test = QueryParser.escape(map.getString("EQU_LIST"));
elBuilder.must(QueryBuilders.matchPhraseQuery("EQU_LIST", "*" + test + "*"));
String test = QueryParser.escape(map.getString(EQU_LIST));
elBuilder.must(QueryBuilders.matchPhraseQuery(EQU_LIST, "*" + test + "*"));
boolMust.must(elBuilder);
}
......@@ -1359,17 +1379,24 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
boolMust.must(pBuilder);
}
// 是否车用气瓶
if (!ObjectUtils.isEmpty(map.getString("WHETHER_VEHICLE_CYLINDER"))) {
if (!ObjectUtils.isEmpty(map.getString(WHETHER_VEHICLE_CYLINDER))) {
BoolQueryBuilder pBuilder = QueryBuilders.boolQuery();
String test = QueryParser.escape(map.getString("WHETHER_VEHICLE_CYLINDER"));
pBuilder.must(QueryBuilders.termQuery("WHETHER_VEHICLE_CYLINDER", test));
String test = QueryParser.escape(map.getString(WHETHER_VEHICLE_CYLINDER));
pBuilder.must(QueryBuilders.termQuery(WHETHER_VEHICLE_CYLINDER, test));
boolMust.must(pBuilder);
}
// 是否撬装式压力容器
if (!ObjectUtils.isEmpty(map.getString(WHETHER_SKID_MOUNTED_PRESSURE_VESSEL))) {
BoolQueryBuilder pBuilder = QueryBuilders.boolQuery();
String test = QueryParser.escape(map.getString(WHETHER_SKID_MOUNTED_PRESSURE_VESSEL));
pBuilder.must(QueryBuilders.termQuery(WHETHER_SKID_MOUNTED_PRESSURE_VESSEL, test));
boolMust.must(pBuilder);
}
// 设备代码模糊查询
if (!ObjectUtils.isEmpty(map.getString("EQU_CODE"))) {
if (!ObjectUtils.isEmpty(map.getString(EQU_CODE))) {
BoolQueryBuilder pBuilder = QueryBuilders.boolQuery();
String test = QueryParser.escape(map.getString("EQU_CODE"));
pBuilder.must(QueryBuilders.wildcardQuery("EQU_CODE", "*" + test.toLowerCase() + "*"));
String test = QueryParser.escape(map.getString(EQU_CODE));
pBuilder.must(QueryBuilders.wildcardQuery(EQU_CODE, "*" + test.toLowerCase() + "*"));
boolMust.must(pBuilder);
}
// 单位内部编号模糊查询
......@@ -1405,7 +1432,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
try {
SearchResponse response = restHighLevelClient.search(request, RequestOptions.DEFAULT);
for (org.elasticsearch.search.SearchHit hit : response.getHits().getHits()) {
for (SearchHit hit : response.getHits().getHits()) {
System.out.println(hit);
JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit);
JSONObject dto2 = jsonObject.getJSONObject("sourceAsMap");
......@@ -1420,13 +1447,13 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
String status = EquimentEnum.getName.get(integer);
dto2.put(EQUSTATE, status);
}
dto2.put("record", dto2.get("SEQUENCE_NBR"));
dto2.put("record", dto2.get(SEQUENCE_NBR));
list.add(dto2);
}
// 获取所有设备的Id
List<String> equIds = null;
if (!ValidationUtil.isEmpty(list)) {
equIds = list.stream().map(item -> item.get("SEQUENCE_NBR").toString()).collect(Collectors.toList());
equIds = list.stream().map(item -> item.get(SEQUENCE_NBR).toString()).collect(Collectors.toList());
}
if (!ValidationUtil.isEmpty(equIds)) {
// 查询设备地址
......@@ -1458,10 +1485,10 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
// 更新设备使用情况和设备地址
for (JSONObject item : list) {
String fullAddress = equAddressMap.get(item.getString("SEQUENCE_NBR"));
String fullAddress = equAddressMap.get(item.getString(SEQUENCE_NBR));
item.put("ADDRESS", !ValidationUtil.isEmpty(fullAddress) ? fullAddress : "");
item.put("CAN_EDIT", this.checkEquipIsCanEdit(item.getString("SEQUENCE_NBR")));
item.put("CAN_DELETE", this.checkEquipIsCanDelete(item.getString("SEQUENCE_NBR")));
item.put("CAN_EDIT", this.checkEquipIsCanEdit(item.getString(SEQUENCE_NBR)));
item.put("CAN_DELETE", this.checkEquipIsCanDelete(item.getString(SEQUENCE_NBR)));
}
}
totle = response.getInternalResponse().hits().getTotalHits().value;
......@@ -1532,6 +1559,16 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
Date date = new Date();
String record = null;
// 设备种类
String equList = String.valueOf(equipmentClassForm.get(EQU_LIST));
// 设备类别
String equCategory = String.valueOf(equipmentClassForm.get(EQU_CATEGORY));
// 设备品种
String equDefine = String.valueOf(equipmentClassForm.get(EQU_DEFINE));
// 业务场景
String businessScenarios = String.valueOf(equipmentClassForm.get("businessScenarios"));
// 操作类型
String operateType = ValidationUtil.isEmpty(equipmentInfoForm.get(SEQUENCE_NBR)) ? OPERATESAVE : OPERATEEDIT;
// 设备是否复制而来,复制来的设备走新增
......@@ -1635,10 +1672,13 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
registerInfo.setRecDate(date);
registerInfo.setRegisterState(this.getRegCode());
registerInfo.setSequenceNbr(OPERATESAVE.equals(operateType) ? null : String.valueOf(equipmentInfoForm.get("REGISTERINFO_SEQ")));
if (isCopy) {
// 使用登记证号置空
registerInfo.setUseOrgCode(null);
}
// 补丁:saveOrUpdate在update数据时不会更新字段为null的字段,但是编辑设备的代码时,从有改成无,equCode解析成null,但是此时需要将equcode删掉
registerInfo.setEquCode(ObjectUtils.isEmpty(registerInfo.getEquCode()) ? "" : registerInfo.getEquCode());
// 判断是否是撬装式压力容器,条件:使用单位提交的+业务类型为场景选择(1)+ 设备种类为压力容器(2000) +设备类别为固定式压力容器(2100)
boolean whetherSkidMountedPressureVesselFlag = "1".equals(businessScenarios) && EquipmentClassifityEnum.YLRQ.getCode().equals(equList) && "2100".equals(equCategory);
registerInfo.setWhetherSkidMountedPressureVessel(whetherSkidMountedPressureVesselFlag ? "1" : "0");
// copy设备 =》 使用登记证号置空
registerInfo.setUseOrgCode(isCopy ? null : registerInfo.getUseOrgCode());
this.saveOrUpdate(registerInfo);
// 维保备案
......@@ -1675,8 +1715,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
// 八大类技术参数和主要零部件和安全附件表
List<IdxBizJgMainParts> mainPartsList = new ArrayList<>();
List<IdxBizJgProtectionDevices> protectionDevicesList = new ArrayList<>();
// 设备种类
String equList = equipmentClassForm.get("EQU_LIST").toString();
// 电梯
if (EquipmentClassifityEnum.DT.getCode().equals(equList)) {
IdxBizJgTechParamsElevator elevator = JSON.parseObject(JSON.toJSONString(equipmentParamsForm), IdxBizJgTechParamsElevator.class);
......
......@@ -1419,9 +1419,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if (ValidationUtil.isEmpty(useRegistration.getUseUnitName())) {
throw new BadRequest("使用登记证导出失败,使用单位名称为空!");
}
exportParamsMap.put("useUnitName",useRegistration.getUseUnitName().contains("_") ?
useRegistration.getUseUnitName().split("_")[1] :
useRegistration.getUseUnitName());
exportParamsMap.put("useUnitName",useRegistration.getUseUnitName());
// 监管码
if (ValidationUtil.isEmpty(useRegistration.getSupervisoryCode())) {
......
{
"YWCJ": [
{
"dictDataKey": "0",
"dictDataValue": "按设备种类",
"dictDataDesc": "upload/tzs/common/image/按照设备种类选择.png"
},
{
"dictDataKey": "1",
"dictDataValue": "按应用场景",
"dictDataDesc": "upload/tzs/common/image/按照应用场景选择.png"
}
],
"SGGZ": [
{
"name": "安装告知",
......@@ -21,7 +33,7 @@
"image": "upload/tzs/common/image/移装告知.png"
}
],
"DJGL":[
"DJGL": [
{
"name": "使用登记",
"code": "DJ_SY",
......@@ -48,21 +60,21 @@
"image": "upload/tzs/common/image/更名变更登记.png"
}
],
"WBBA":[
"WBBA": [
{
"name": "维保备案",
"code": "WB_BA",
"image": "upload/tzs/common/image/维保备案.png"
}
],
"SBYJ":[
"SBYJ": [
{
"name": "设备移交",
"code": "SB_YJ",
"image": "upload/tzs/common/image/设备移交.png"
}
],
"QTBF":[
"QTBF": [
{
"name": "设备启用",
"code": "SB_QY",
......@@ -84,7 +96,7 @@
"image": "upload/tzs/common/image/注销报废.png"
}
],
"XZSB":[
"XZSB": [
{
"name": "新增设备",
"code": "SB_XZ",
......
......@@ -132,4 +132,7 @@ public class ESEquipmentCategoryDto {
@Field(type = FieldType.Text)
private String WHETHER_VEHICLE_CYLINDER;
@Field(type = FieldType.Text)
private String WHETHER_SKID_MOUNTED_PRESSURE_VESSEL;
}
......@@ -177,5 +177,13 @@ public class IdxBizJgRegisterInfo extends TzsBaseEntity {
@TableField("\"WHETHER_VEHICLE_CYLINDER\"")
private String whetherVehicleCylinder;
/**
* 是否撬装式压力容器(压力容器用于区分普通压力容器(安装改造维修单位新增的)和撬装式压力容器(使用单位新增的))
* 1:是
* 0:不是
*/
@TableField("\"WHETHER_SKID_MOUNTED_PRESSURE_VESSEL\"")
private String whetherSkidMountedPressureVessel;
}
......@@ -102,6 +102,7 @@
EQU_TYPE,
DATA_SOURCE,
WHETHER_VEHICLE_CYLINDER,
WHETHER_SKID_MOUNTED_PRESSURE_VESSEL,
DATE_FORMAT(PRODUCE_DATE, '%Y-%m-%d %H:%i:%s') as PRODUCE_DATE
from idx_biz_view_jg_all
WHERE SEQUENCE_NBR = #{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