Commit b84d5175 authored by tianbo's avatar tianbo

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 55ec1018 f489d872
...@@ -283,4 +283,20 @@ public class JgInstallationNoticeDto extends BaseDto { ...@@ -283,4 +283,20 @@ public class JgInstallationNoticeDto extends BaseDto {
@ApiModelProperty (value = "其他附件") @ApiModelProperty (value = "其他附件")
private List<Map<String, Object>> otherAccessoriesList; private List<Map<String, Object>> otherAccessoriesList;
@ApiModelProperty(value = "告知书编号")
private String informNumber;
@ApiModelProperty(value = "96333码")
private String code96333;
@ApiModelProperty(value = "设备代码")
private String equCode;
@ApiModelProperty(value = "设备品种")
private String equDefine;
@ApiModelProperty(value = "设备类别")
private String equipCategory;
} }
package com.yeejoin.amos.boot.module.jg.api.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
@Getter
@AllArgsConstructor
public enum CylinderTypeEnum {
CYLINDER("瓶", "2300"),
SEAMLESS_CYLINDER("无缝气瓶(车用)", "2310"),
WELDED_CYLINDER("焊接气瓶(车用)", "2320"),
SPECIAL_CYLINDER("特种气瓶(车用)", "23T0");
private final String name;
private final String code;
public static String of(String code) {
for (CylinderTypeEnum constants : values()) {
if (constants.getCode().equals(code)) {
return constants.getName();
}
}
return null;
}
}
...@@ -24,7 +24,7 @@ public interface JgInstallationNoticeMapper extends CustomBaseMapper<JgInstallat ...@@ -24,7 +24,7 @@ public interface JgInstallationNoticeMapper extends CustomBaseMapper<JgInstallat
* @param type 类型:enterprise-企业端、supervision-监管端 * @param type 类型:enterprise-企业端、supervision-监管端
* @return 安装告知列表 * @return 安装告知列表
*/ */
Page<JgInstallationNotice> queryForPage(Page<JgInstallationNotice> page, @Param("param") JgInstallationNoticeDto model, @Param("type") String type, @Param("orgCode") String orgCode); Page<Map<String, Object>> queryForPage(Page<JgInstallationNotice> page, @Param("param") JgInstallationNoticeDto model, @Param("type") String type, @Param("orgCode") String orgCode);
/** /**
* 根据安装告知编号查询设备、设计、制造等信息 * 根据安装告知编号查询设备、设计、制造等信息
......
...@@ -44,7 +44,7 @@ public interface IJgInstallationNoticeService extends IService<JgInstallationNot ...@@ -44,7 +44,7 @@ public interface IJgInstallationNoticeService extends IService<JgInstallationNot
* @param type 类型:enterprise-企业端、supervision-监管端 * @param type 类型:enterprise-企业端、supervision-监管端
* @return 安装告知列表 * @return 安装告知列表
*/ */
Page<JgInstallationNoticeDto> queryForJgInstallationNoticePage(Page<JgInstallationNotice> page, JgInstallationNoticeDto model, String type, ReginParams reginParams); Page<Map<String, Object>> queryForJgInstallationNoticePage(Page<JgInstallationNotice> page, JgInstallationNoticeDto model, String type, ReginParams reginParams);
/** /**
* 批量删除 * 批量删除
......
...@@ -2,16 +2,16 @@ ...@@ -2,16 +2,16 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeMapper"> <mapper namespace="com.yeejoin.amos.boot.module.jg.api.mapper.JgInstallationNoticeMapper">
<select id="queryForPage" resultType="com.yeejoin.amos.boot.module.jg.api.entity.JgInstallationNotice"> <select id="queryForPage" resultType="java.util.Map">
select select
isn.sequence_nbr AS sequenceNbr, isn.sequence_nbr AS sequenceNbr,
isn.apply_no AS applyNo, isn.apply_no AS applyNo,
isn.supervisory_code AS supervisoryCode, isn.supervisory_code AS supervisoryCode,
isn.notice_date AS noticeDate, DATE_FORMAT(isn.notice_date,'%Y-%m-%d') AS noticeDate,
isn.use_unit_name AS useUnitName, isn.use_unit_name AS useUnitName,
isn.receive_org_name AS receiveOrgName, isn.receive_org_name AS receiveOrgName,
isn.region_no AS regionNo, isn.region_no AS regionNo,
isn.install_start_date AS installStartDate, DATE_FORMAT(isn.install_start_date,'%Y-%m-%d') AS installStartDate,
isn.address AS address, isn.address AS address,
isn.notice_status AS noticeStatus, isn.notice_status AS noticeStatus,
isn.install_unit_name AS installUnitName, isn.install_unit_name AS installUnitName,
...@@ -19,20 +19,27 @@ ...@@ -19,20 +19,27 @@
isn.city_name AS cityName, isn.city_name AS cityName,
isn.county_name AS countyName, isn.county_name AS countyName,
isn.instance_id AS instanceId, isn.instance_id AS instanceId,
isn.inform_number AS informNumber,
isn.promoter, isn.promoter,
isn.next_execute_ids AS nextExecuteIds, isn.next_execute_ids AS nextExecuteIds,
isn.instance_status AS instanceStatus, isn.instance_status AS instanceStatus,
isn.handle_date AS handleDate, DATE_FORMAT(isn.handle_date,'%Y-%m-%d') AS handleDate,
other.CODE96333 AS code96333,
(select name from tz_equipment_category ec WHERE ec.code = ri.equ_category) AS equList, (select name from tz_equipment_category ec WHERE ec.code = ri.equ_category) AS equList,
isn.notice_report_url AS noticeReportUrl, isn.notice_report_url AS noticeReportUrl,
isn.create_user_id as createUserId, isn.create_user_id as createUserId,
isn.next_task_id AS nextTaskId, isn.next_task_id AS nextTaskId,
isn.next_execute_user_ids as nextExecuteUserIds, isn.next_execute_user_ids as nextExecuteUserIds,
concat(ibjui."PROVINCE_NAME", '', ibjui."CITY_NAME", '', ibjui."COUNTY_NAME", '', ibjui."STREET_NAME", '', ibjui."ADDRESS") as equAddress ri.EQU_CODE AS equCode,
(select name from tz_equipment_category ec WHERE ec.code = ri.EQU_DEFINE) AS equDefine,
(SELECT name from tz_equipment_category where code = ri.EQU_LIST) AS equListName,
concat(ibjui."PROVINCE_NAME", '', ibjui."CITY_NAME", '', ibjui."COUNTY_NAME", '', ibjui."STREET_NAME") as equAddress,
ibjui."ADDRESS" as detailedAddress
FROM tzs_jg_installation_notice isn FROM tzs_jg_installation_notice isn
LEFT JOIN tzs_jg_installation_notice_eq insEq on insEq.equip_transfer_id = isn.sequence_nbr LEFT JOIN tzs_jg_installation_notice_eq insEq on insEq.equip_transfer_id = isn.sequence_nbr
LEFT JOIN idx_biz_jg_use_info ibjui on insEq.equ_id = ibjui.RECORD LEFT JOIN idx_biz_jg_use_info ibjui on insEq.equ_id = ibjui.RECORD
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = insEq.equ_id LEFT JOIN idx_biz_jg_register_info ri ON ri.record = insEq.equ_id
LEFT JOIN idx_biz_jg_other_info other on other.RECORD = insEq.equ_id
<where> <where>
isn.is_delete = false isn.is_delete = false
<if test="param != null "> <if test="param != null ">
...@@ -42,15 +49,47 @@ ...@@ -42,15 +49,47 @@
<if test="param.receiveOrgCreditCode != null and param.receiveOrgCreditCode != ''"> <if test="param.receiveOrgCreditCode != null and param.receiveOrgCreditCode != ''">
AND isn.receive_org_credit_code = #{param.receiveOrgCreditCode} AND isn.receive_org_credit_code = #{param.receiveOrgCreditCode}
</if> </if>
<if test="param.useUnitName != null and param.useUnitName != ''"> <if test="param.installUnitId != null and param.installUnitId != ''">
AND isn.use_unit_credit_code = #{param.useUnitName} AND isn.install_unit_credit_code = #{param.installUnitId}
</if>
<if test="param.installUnitName != null and param.installUnitName != ''">
AND isn.install_unit_credit_code = #{param.installUnitName}
</if> </if>
<if test="param.noticeStatus != null and param.noticeStatus != ''"> <if test="param.noticeStatus != null and param.noticeStatus != ''">
AND isn.notice_status = #{param.noticeStatus} AND isn.notice_status = #{param.noticeStatus}
</if> </if>
<if test="param.noticeDate != null">
AND isn."notice_date" LIKE concat('%',DATE_FORMAT(#{param.noticeDate},'%Y-%m-%d'),'%')
</if>
<if test="param.informNumber != null and param.informNumber != ''">
AND isn."inform_number" LIKE concat('%',#{param.informNumber},'%')
</if>
<if test="param.supervisoryCode != null and param.supervisoryCode != ''">
AND isn."supervisory_code" LIKE concat('%',#{param.supervisoryCode},'%')
</if>
<if test="param.code96333 != null and param.code96333 != ''">
AND other."CODE96333" LIKE concat('%',#{param.code96333},'%')
</if>
<if test="param.equCode != null and param.equCode != ''">
AND ri."EQU_CODE" LIKE concat('%',#{param.equCode},'%')
</if>
<if test="param.equList != null and param.equList != ''">
AND ri."EQU_LIST" = #{param.equList}
</if>
<if test="param.equipCategory != null and param.equipCategory != ''">
AND ri."equ_category" = #{param.equipCategory}
</if>
<if test="param.equDefine != null and param.equDefine != ''">
AND ri."EQU_DEFINE" = #{param.equDefine}
</if>
<if test="param.equAddress != null and param.equAddress != ''">
AND (
ibjui."PROVINCE_NAME" LIKE CONCAT('%', #{param.equAddress}, '%')
OR ibjui."CITY_NAME" LIKE CONCAT('%', #{param.equAddress}, '%')
OR ibjui."COUNTY_NAME" LIKE CONCAT('%', #{param.equAddress}, '%')
OR ibjui."STREET_NAME" LIKE CONCAT('%', #{param.equAddress}, '%')
)
</if>
<if test="param.useUnitCreditCode != null and param.useUnitCreditCode != ''">
AND isn.use_unit_credit_code = #{param.useUnitCreditCode}
</if>
</if> </if>
<if test="type == 'supervision'"> <if test="type == 'supervision'">
AND (isn.receive_org_credit_code = #{orgCode} or isn.transfer_to_user_ids like concat('%',#{param.transferToUserIds},'%')) AND (isn.receive_org_credit_code = #{orgCode} or isn.transfer_to_user_ids like concat('%',#{param.transferToUserIds},'%'))
...@@ -88,9 +127,9 @@ ...@@ -88,9 +127,9 @@
isn.use_unit_name AS useUnitName, isn.use_unit_name AS useUnitName,
isn.inform_number AS informNumber, isn.inform_number AS informNumber,
isn.other_accessories AS otherAccessories, isn.other_accessories AS otherAccessories,
(select name from tz_equipment_category tec2 where ri."EQU_DEFINE"::text = tec2.code::text) AS equCategory, tec2.name AS equCategory,
(select name from tz_equipment_category tec1 where ri."EQU_LIST"::text = tec1.code::text) AS equList, tec1.name AS equList,
(select name from tz_equipment_category tec where ri."EQU_CATEGORY"::text = tec.code::text) AS equDefine, tec.name AS equDefine,
if(ri.EQU_CODE is null or ri.EQU_CODE = 'null', '', ri.EQU_CODE) AS equRegisterCode, if(ri.EQU_CODE is null or ri.EQU_CODE = 'null', '', ri.EQU_CODE) AS equRegisterCode,
re.equ_id as equId, re.equ_id as equId,
ri.PRODUCT_NAME AS productName, ri.PRODUCT_NAME AS productName,
...@@ -118,19 +157,25 @@ ...@@ -118,19 +157,25 @@
fi.factory_standard AS factoryStandard, fi.factory_standard AS factoryStandard,
fi.product_quality_yield_prove AS productQualityYieldProve, fi.product_quality_yield_prove AS productQualityYieldProve,
fi.ins_use_maintain_explain AS insUseMaintainExplain, fi.ins_use_maintain_explain AS insUseMaintainExplain,
(select useUnit.use_contact from tz_base_enterprise_info useUnit Where useUnit.use_unit_code = isn.use_unit_credit_code) AS safetyManager, useUnit.use_contact AS safetyManager,
(select useUnit.contact_phone from tz_base_enterprise_info useUnit where useUnit.use_unit_code = isn.use_unit_credit_code) AS safetyManagerPhone, useUnit.contact_phone AS safetyManagerPhone,
(select useUnit.use_code from tz_base_enterprise_info useUnit Where useUnit.use_unit_code = isn.use_unit_credit_code) AS useCode, useUnit.use_code AS useCode,
(select idi.INSPECT_REPORT from idx_biz_jg_inspection_detection_info idi Where idi.record = re.equ_id) as inspectReport, installUnit.use_code AS installUnitCreditCode,
(select useUnit.address from tz_base_enterprise_info useUnit Where useUnit.use_unit_code = isn.use_unit_credit_code) as useUnitLeaderAddress, useUnit.address as useUnitLeaderAddress,
(select use_code from tz_base_enterprise_info tbei Where tbei.use_code = isn.install_unit_credit_code) AS installUnitCreditCode, re.equ_id as equId,
(select address from tz_base_enterprise_info tbei Where tbei.use_code = isn.install_unit_credit_code) AS installUnitAddress installUnit.address installUnitAddress,
(select idi.INSPECT_REPORT from idx_biz_jg_inspection_detection_info idi Where idi.record = re.equ_id ORDER BY idi.INSPECT_DATE desc LIMIT 1) as inspectReport
FROM FROM
tzs_jg_installation_notice isn tzs_jg_installation_notice isn
LEFT JOIN tzs_jg_installation_notice_eq re ON re.equip_transfer_id = isn.sequence_nbr LEFT JOIN tzs_jg_installation_notice_eq re ON re.equip_transfer_id = isn.sequence_nbr
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = re.equ_id LEFT JOIN idx_biz_jg_register_info ri ON ri.record = re.equ_id
LEFT JOIN idx_biz_jg_design_info di ON di.record = re.equ_id LEFT JOIN idx_biz_jg_design_info di ON di.record = re.equ_id
LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = re.equ_id LEFT JOIN idx_biz_jg_factory_info fi ON fi.record = re.equ_id
LEFT JOIN tz_base_enterprise_info useUnit ON useUnit.use_unit_code = isn.use_unit_credit_code
LEFT JOIN tz_base_enterprise_info installUnit ON installUnit.use_code = isn.install_unit_credit_code
LEFT JOIN amos_tzs_biz.tz_equipment_category tec ON ri."EQU_CATEGORY"::text = tec.code::text
LEFT JOIN amos_tzs_biz.tz_equipment_category tec1 ON ri."EQU_LIST"::text = tec1.code::text
LEFT JOIN amos_tzs_biz.tz_equipment_category tec2 ON ri."EQU_DEFINE"::text = tec2.code::text
WHERE WHERE
isn.sequence_nbr = #{sequenceNbr} isn.sequence_nbr = #{sequenceNbr}
LIMIT 1 LIMIT 1
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
ur.apply_no as applyNo, ur.apply_no as applyNo,
ur.next_execute_ids as nextExecuteIds, ur.next_execute_ids as nextExecuteIds,
ur.promoter, ur.promoter,
ur.supervisory_code as supervisoryCode, GROUP_CONCAT(DISTINCT other.supervisory_code) as supervisoryCode,
ur.use_registration_code as useRegistrationCode, ur.use_registration_code as useRegistrationCode,
date_format(ur.audit_pass_date,'%Y-%m-%d') as auditPassDate, date_format(ur.audit_pass_date,'%Y-%m-%d') as auditPassDate,
ur.receive_org_name as receiveOrgName, ur.receive_org_name as receiveOrgName,
...@@ -233,7 +233,7 @@ ...@@ -233,7 +233,7 @@
ur.apply_no as applyNo, ur.apply_no as applyNo,
ur.next_execute_ids as nextExecuteIds, ur.next_execute_ids as nextExecuteIds,
ur.promoter as promoter, ur.promoter as promoter,
ur.supervisory_code as supervisoryCode, GROUP_CONCAT(DISTINCT other.supervisory_code) as supervisoryCode,
ur.use_registration_code as useRegistrationCode, ur.use_registration_code as useRegistrationCode,
date_format(ur.audit_pass_date, '%Y-%m-%d') as auditPassDate, date_format(ur.audit_pass_date, '%Y-%m-%d') as auditPassDate,
ur.receive_org_name as receiveOrgName, ur.receive_org_name as receiveOrgName,
......
...@@ -162,6 +162,20 @@ public class CommonController extends BaseController { ...@@ -162,6 +162,20 @@ public class CommonController extends BaseController {
return ResponseHelper.buildResponse(commonService.getSecurityAdmin(type, useUnitCode)); return ResponseHelper.buildResponse(commonService.getSecurityAdmin(type, useUnitCode));
} }
/**
* 设备分类
* @param type 1,设备种类 2,设备类别 3,设备品种
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/equipmentClassification")
@ApiOperation(httpMethod = "GET", value = "设备分类", notes = "1,设备种类 2,设备类别 3,设备品种")
public ResponseModel<List<EquipmentCategory>> equipmentClassification(@RequestParam(value = "type") String type) {
return ResponseHelper.buildResponse(commonService.equipmentClassification(type));
}
/** /**
* 查询安全管理员的基本信息 * 查询安全管理员的基本信息
......
...@@ -137,10 +137,11 @@ public class JgInstallationNoticeController extends BaseController { ...@@ -137,10 +137,11 @@ public class JgInstallationNoticeController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/page") @PostMapping(value = "/page")
@ApiOperation(httpMethod = "GET", value = "安装告知分页查询", notes = "安装告知分页查询") @ApiOperation(httpMethod = "GET", value = "安装告知分页查询", notes = "安装告知分页查询")
public ResponseModel<Page<JgInstallationNoticeDto>> queryForPage( public ResponseModel<Page<Map<String, Object>>> queryForPage(
@ApiParam(value = "当前页码", required = true) @RequestParam(value = "current", defaultValue = "1") int current, @ApiParam(value = "当前页码", required = true) @RequestParam(value = "current", defaultValue = "1") int current,
@ApiParam(value = "每页大小", required = true) @RequestParam(value = "size", defaultValue = "20") int size, @ApiParam(value = "每页大小", required = true) @RequestParam(value = "size", defaultValue = "20") int size,
@ApiParam(value = "类型:enterprise-企业端、supervision-监管端", required = true) @RequestParam(value = "type", defaultValue = "enterprise") String type, @ApiParam(value = "类型:enterprise-企业端、supervision-监管端", required = true)
@RequestParam(value = "type", defaultValue = "enterprise") String type,
@RequestBody(required = false) JgInstallationNoticeDto model @RequestBody(required = false) JgInstallationNoticeDto model
) { ) {
Page<JgInstallationNotice> page = new Page<>(current, size); Page<JgInstallationNotice> page = new Page<>(current, size);
......
...@@ -62,7 +62,8 @@ public class JgVehicleInformationController extends BaseController { ...@@ -62,7 +62,8 @@ public class JgVehicleInformationController extends BaseController {
String.valueOf(map.get("instanceId")), String.valueOf(map.get("instanceId")),
String.valueOf(map.get("operate")), String.valueOf(map.get("operate")),
String.valueOf(map.get("comment")), String.valueOf(map.get("comment")),
String.valueOf(map.get("nextTaskId"))); String.valueOf(map.get("nextTaskId")),
String.valueOf(map.get("EQU_DEFINE_CODE")));
return ResponseHelper.buildResponse("ok"); return ResponseHelper.buildResponse("ok");
} }
......
...@@ -147,6 +147,13 @@ public interface ICommonService { ...@@ -147,6 +147,13 @@ public interface ICommonService {
Integer countEquipInUseTimesForDel(String record); Integer countEquipInUseTimesForDel(String record);
/** /**
* 设备分类
* @param type 1,设备种类 2,设备类别 3,设备品种
* @return
*/
List<EquipmentCategory> equipmentClassification(String type);
/**
* 套打使用标志生成 * 套打使用标志生成
* @param useFlagParamDto 参数 * @param useFlagParamDto 参数
* @param response 文件信息 * @param response 文件信息
......
...@@ -26,6 +26,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils; ...@@ -26,6 +26,7 @@ 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.dto.*;
import com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory; 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.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.EquipTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.PrintingTypeEnum; import com.yeejoin.amos.boot.module.jg.api.enums.PrintingTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper;
...@@ -89,6 +90,7 @@ import java.net.URLEncoder; ...@@ -89,6 +90,7 @@ import java.net.URLEncoder;
import java.nio.file.Files; import java.nio.file.Files;
import java.util.*; import java.util.*;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.regex.Pattern;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -799,7 +801,7 @@ public class CommonServiceImpl implements ICommonService { ...@@ -799,7 +801,7 @@ public class CommonServiceImpl implements ICommonService {
* @param response response * @param response response
* @param pathResource PDF模版路径 * @param pathResource PDF模版路径
* @param printFileName 生成文件名称 * @param printFileName 生成文件名称
* @param v * @param textSize 字体大小
*/ */
private void fillParamValueToPdf(Map<String, Object> map, HttpServletResponse response, String pathResource, String printFileName, float textSize) { private void fillParamValueToPdf(Map<String, Object> map, HttpServletResponse response, String pathResource, String printFileName, float textSize) {
// 读取资源文件夹下的模板 // 读取资源文件夹下的模板
...@@ -927,14 +929,14 @@ public class CommonServiceImpl implements ICommonService { ...@@ -927,14 +929,14 @@ public class CommonServiceImpl implements ICommonService {
JSONObject jsonObject = new JSONObject(provideMap); JSONObject jsonObject = new JSONObject(provideMap);
return jgTransferNoticeService.saveNotice(submitType, jsonObject, reginParams); return jgTransferNoticeService.saveNotice(submitType, jsonObject, reginParams);
} else if (type.equals(ApplicationFormTypeEnum.SYDJ.getBusinessCode())) { } else if (type.equals(ApplicationFormTypeEnum.SYDJ.getBusinessCode())) {
String code = (String) basicObj.get("equDefineCode"); String code = (String) basicObj.get("businessScenarios");
noticeObj.put("receiveOrgCode", !ObjectUtils.isEmpty(basicObj.get("receiveOrgCreditCode")) ? String.valueOf(basicObj.get("receiveOrgCreditCode")) : String.valueOf(basicObj.get("receiveOrgCreditCode1"))); noticeObj.put("receiveOrgCode", !ObjectUtils.isEmpty(basicObj.get("receiveOrgCreditCode")) ? String.valueOf(basicObj.get("receiveOrgCreditCode")) : String.valueOf(basicObj.get("receiveOrgCreditCode1")));
JSONObject jsonObject = new JSONObject(noticeObj); JSONObject jsonObject = new JSONObject(noticeObj);
if (submitType.equals("1")) { if (submitType.equals("1")) {
jsonObject.put("submit", Boolean.TRUE); jsonObject.put("submit", Boolean.TRUE);
} }
//判断是否为车用气瓶使用登记或者设备使用登记 //判断是否为车用气瓶使用登记或者设备使用登记
return code != null && code.equals("23T0") ? jgVehicleInformationService.save(submitType, jsonObject) : jgUseRegistrationServiceImpl.save(jsonObject); return code != null && code.equals("1") ? jgVehicleInformationService.save(submitType, jsonObject) : jgUseRegistrationServiceImpl.save(jsonObject);
} else if (type.equals(ApplicationFormTypeEnum.GZBG.getBusinessCode())) { } else if (type.equals(ApplicationFormTypeEnum.GZBG.getBusinessCode())) {
// 兼容业务逻辑代码 // 兼容业务逻辑代码
if (submitType.equals("1")) { if (submitType.equals("1")) {
...@@ -1482,7 +1484,11 @@ public class CommonServiceImpl implements ICommonService { ...@@ -1482,7 +1484,11 @@ public class CommonServiceImpl implements ICommonService {
String equDefine = equipRegistrationInfo.getEquDefine(); // 设备品种 "3110" String equDefine = equipRegistrationInfo.getEquDefine(); // 设备品种 "3110"
if (!ObjectUtils.isEmpty(equCategory)) { if (!ObjectUtils.isEmpty(equCategory)) {
// 设备种类简称 // 设备种类简称
String equCategoryAbbrName = EquipTypeEnum.getMessage(equCategory.substring(0, 1)); String equCategoryAbbrName = Optional.ofNullable(CylinderTypeEnum.CYLINDER.getCode().equals(equCategory) ?
CylinderTypeEnum.CYLINDER.getName() : equCategory)
.map(category -> category.substring(0, 1))
.map(EquipTypeEnum::getMessage)
.orElse(null);
// 设备代码中间两位 // 设备代码中间两位
String equipType2MidDigits; String equipType2MidDigits;
...@@ -1660,6 +1666,29 @@ public class CommonServiceImpl implements ICommonService { ...@@ -1660,6 +1666,29 @@ public class CommonServiceImpl implements ICommonService {
} }
} }
/**
* 设备分类
* @param type 1,设备种类 2,设备类别 3,设备品种
* @return
*/
@Override
public List<EquipmentCategory> equipmentClassification(String type){
List<EquipmentCategory> categoryList = equipmentCategoryMapper.selectList(new QueryWrapper<>());
List<EquipmentCategory> result = Collections.emptyList();
switch (type){
case "1":
result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0]*000$").matcher(category.getCode()).matches()).collect(Collectors.toList());
break;
case "2":
result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0]*00$").matcher(category.getCode()).matches()).collect(Collectors.toList());
break;
case "3":
result = categoryList.stream().filter(category -> Pattern.compile("^[^\\D0]*0$").matcher(category.getCode()).matches()).collect(Collectors.toList());
break;
}
return result;
}
@Override @Override
public void fightUseFlagGenerate(UseFlagParamDto useFlagParamDto, HttpServletResponse response) { public void fightUseFlagGenerate(UseFlagParamDto useFlagParamDto, HttpServletResponse response) {
Objects.requireNonNull(useFlagParamDto, "参数不能为空"); Objects.requireNonNull(useFlagParamDto, "参数不能为空");
......
...@@ -1186,15 +1186,15 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -1186,15 +1186,15 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
boolMust.must(nullOrEmptyQuery); boolMust.must(nullOrEmptyQuery);
} else if (ValidationUtil.equals(queryType, "WB")) { } else if (ValidationUtil.equals(queryType, "WB")) {
// 查询 维保备案【可绑定设备列表】【(EQU_STATE=== null || "")】 // 查询 维保备案【可绑定设备列表】【(EQU_STATE=== null || "")】
BoolQueryBuilder nullOrEmptyQuery = QueryBuilders.boolQuery() BoolQueryBuilder wbBuilder = QueryBuilders.boolQuery();
.mustNot(QueryBuilders.wildcardQuery("EQU_STATE", "*")); wbBuilder.mustNot(QueryBuilders.existsQuery("EQU_STATE"));
boolMust.must(nullOrEmptyQuery); boolMust.must(wbBuilder);
} else if (!ObjectUtils.isEmpty(queryType) && ValidationUtil.equals(queryType, "SY")) { } else if (!ObjectUtils.isEmpty(queryType) && ValidationUtil.equals(queryType, "SY")) {
// 查询 使用登记【可选设备列表】【(EQU_STATUS=== null || "" ) && (USE_ORG_CODE ==="" || null)】 // 查询 使用登记【可选设备列表】【(EQU_STATUS=== null || "" ) && (USE_ORG_CODE(使用登记证编号) ==="" || null)】
BoolQueryBuilder nullOrEmptyQuery = QueryBuilders.boolQuery() BoolQueryBuilder syBuilder = QueryBuilders.boolQuery();
.mustNot(QueryBuilders.wildcardQuery("EQU_STATE", "*")) syBuilder.mustNot(QueryBuilders.existsQuery("EQU_STATE"));
.mustNot(QueryBuilders.wildcardQuery("USE_ORG_CODE", "*")); syBuilder.mustNot(QueryBuilders.wildcardQuery("USE_ORG_CODE", "*"));
boolMust.must(nullOrEmptyQuery); boolMust.must(syBuilder);
} }
} }
......
...@@ -381,28 +381,21 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -381,28 +381,21 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
* @return 安装告知列表 * @return 安装告知列表
*/ */
@Override @Override
public Page<JgInstallationNoticeDto> queryForJgInstallationNoticePage(Page<JgInstallationNotice> page, JgInstallationNoticeDto model, String type , ReginParams reginParams) { public Page<Map<String, Object>> queryForJgInstallationNoticePage(Page<JgInstallationNotice> page, JgInstallationNoticeDto model, String type , ReginParams reginParams) {
String orgCode; String orgCode;
orgCode = reginParams.getCompany().getCompanyCode(); orgCode = reginParams.getCompany().getCompanyCode();
model.setTransferToUserIds(reginParams.getUserModel().getUserId()); model.setTransferToUserIds(reginParams.getUserModel().getUserId());
Page<JgInstallationNotice> noticePage = jgInstallationNoticeMapper.queryForPage(page, model, type, orgCode); Page<Map<String, Object>> noticePage = jgInstallationNoticeMapper.queryForPage(page, model, type, orgCode);
List<Map<String, Object>> mappedRecords = noticePage.getRecords().stream().peek(notice -> {
// 将Page<JgInstallationNotice>转化为Page<JgInstallationNoticeDto> Optional<Long> noticeStatusOpt = Optional.ofNullable((String) notice.get("noticeStatus")).map(Long::valueOf);
Page<JgInstallationNoticeDto> noticeDtoPage = new Page<>(); noticeStatusOpt.ifPresent(status -> {
BeanUtils.copyProperties(noticePage, noticeDtoPage, "records"); String noticeStatusDesc = FlowStatusEnum.getNameByType(status);
List<JgInstallationNoticeDto> records = noticePage.getRecords().stream().map(notice -> { notice.put("noticeStatusDesc", noticeStatusDesc);
JgInstallationNoticeDto noticeDto = new JgInstallationNoticeDto(); });
BeanUtils.copyProperties(notice, noticeDto);
if (Objects.nonNull(notice.getNoticeStatus())) {
String noticeStatusDesc = FlowStatusEnum.getNameByType(Long.valueOf(notice.getNoticeStatus()));
noticeDto.setNoticeStatusDesc(noticeStatusDesc);
}
return noticeDto;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
noticeDtoPage.setRecords(records); noticePage.setRecords(mappedRecords);
return noticePage;
return noticeDtoPage;
} }
/** /**
...@@ -485,7 +478,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -485,7 +478,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
Map<String, Object> placeholders = new HashMap<>(); Map<String, Object> placeholders = new HashMap<>();
placeholders.put("doMain", TZSDOMAIN); placeholders.put("doMain", TZSDOMAIN);
placeholders.put("installUnitName", getValue.apply("installUnitName")); placeholders.put("installUnitName", getValue.apply("installUnitName"));
placeholders.put("informNumber", "".equals(getValue.apply("informNumber")) ? getValue.apply("applyNo") : getValue.apply("informNumber")); placeholders.put("informNumber", getValue.apply("informNumber"));
placeholders.put("productName", getValue.apply("productName")); placeholders.put("productName", getValue.apply("productName"));
placeholders.put("equipType", getValue.apply("equType")); placeholders.put("equipType", getValue.apply("equType"));
placeholders.put("equipCode", getValue.apply("equRegisterCode")); placeholders.put("equipCode", getValue.apply("equRegisterCode"));
......
...@@ -22,6 +22,7 @@ import com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory; ...@@ -22,6 +22,7 @@ import com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration; import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq; import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq;
import com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum; 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.EquipTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum; import com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationEqMapper; import com.yeejoin.amos.boot.module.jg.api.mapper.JgUseRegistrationEqMapper;
...@@ -519,15 +520,18 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -519,15 +520,18 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
CompanyBo company = reginParams.getCompany(); CompanyBo company = reginParams.getCompany();
List<Map<String, Object>> equipmentLists = (List<Map<String, Object>>) map.get("equipmentLists"); List<Map<String, Object>> equipmentLists = (List<Map<String, Object>>) map.get("equipmentLists");
if (CollectionUtils.isEmpty(equipmentLists)) { if (org.springframework.util.CollectionUtils.isEmpty(equipmentLists) || equipmentLists.stream()
throw new BadRequest("请先选择设备信息!"); .map(v -> (String) v.get("EQU_DEFINE_CODE"))
.distinct()
.count() != 1) {
throw new BadRequest(CollectionUtils.isEmpty(equipmentLists) ? "请选择设备信息!" : "请选择相同设备种类!");
} }
List<IdxBizJgInspectionDetectionInfo> inspectionDetectionInfoList = idxBizJgInspectionDetectionInfoService.checkInspectionInfo( List<IdxBizJgInspectionDetectionInfo> inspectionDetectionInfoList = idxBizJgInspectionDetectionInfoService.checkInspectionInfo(
equipmentLists.stream() equipmentLists.stream()
.map(v -> (String) v.get("record")) .map(v -> (String) v.get("record"))
.collect(Collectors.toList()) .collect(Collectors.toList())
); );
if (!"2300".equals(map.get("EQU_CATEGORY_CODE")) && inspectionDetectionInfoList.stream().anyMatch(info -> if (!CylinderTypeEnum.CYLINDER.getCode().equals(map.get("EQU_CATEGORY_CODE")) && inspectionDetectionInfoList.stream().anyMatch(info ->
ObjectUtils.isEmpty(info) || ObjectUtils.isEmpty(info.getInspectType()) || ObjectUtils.isEmpty(info) || ObjectUtils.isEmpty(info.getInspectType()) ||
ObjectUtils.isEmpty(info.getInspectConclusion()) || ObjectUtils.isEmpty(info.getInspectOrgCode()) || ObjectUtils.isEmpty(info.getInspectConclusion()) || ObjectUtils.isEmpty(info.getInspectOrgCode()) ||
ObjectUtils.isEmpty(info.getInspectOrgName()))) { ObjectUtils.isEmpty(info.getInspectOrgName()))) {
...@@ -850,6 +854,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -850,6 +854,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
LambdaQueryWrapper<IdxBizJgOtherInfo> lambdaOth = new QueryWrapper<IdxBizJgOtherInfo>().lambda(); LambdaQueryWrapper<IdxBizJgOtherInfo> lambdaOth = new QueryWrapper<IdxBizJgOtherInfo>().lambda();
lambdaOth.eq(IdxBizJgOtherInfo::getRecord, String.valueOf(mapData.get("equipId"))); lambdaOth.eq(IdxBizJgOtherInfo::getRecord, String.valueOf(mapData.get("equipId")));
IdxBizJgOtherInfo otherInfo = otherInfoMapper.selectOne(lambdaOth); IdxBizJgOtherInfo otherInfo = otherInfoMapper.selectOne(lambdaOth);
jgUseRegistration.setSupervisoryCode(otherInfo.getSupervisoryCode());
// 注册信息 // 注册信息
LambdaQueryWrapper<IdxBizJgRegisterInfo> lambdaReg = new QueryWrapper<IdxBizJgRegisterInfo>().lambda(); LambdaQueryWrapper<IdxBizJgRegisterInfo> lambdaReg = new QueryWrapper<IdxBizJgRegisterInfo>().lambda();
lambdaReg.eq(IdxBizJgRegisterInfo::getRecord, String.valueOf(mapData.get("equipId"))); lambdaReg.eq(IdxBizJgRegisterInfo::getRecord, String.valueOf(mapData.get("equipId")));
...@@ -1173,7 +1178,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -1173,7 +1178,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
List<Map<String, Object>> equipmentLists = (List<Map<String, Object>>) jsonObject.get("equipmentLists"); List<Map<String, Object>> equipmentLists = (List<Map<String, Object>>) jsonObject.get("equipmentLists");
List<String> records = equipmentLists.stream().map(v -> (String) v.get("record")).collect(Collectors.toList()); List<String> records = equipmentLists.stream().map(v -> (String) v.get("record")).collect(Collectors.toList());
jsonObject.remove("equipmentLists"); jsonObject.remove("equipmentLists");
if ("2300".equals(jsonObject.get("EQU_CATEGORY_CODE"))) { if (CylinderTypeEnum.CYLINDER.getCode().equals(jsonObject.get("EQU_CATEGORY_CODE"))) {
jsonObject.put("equipmentLists", jgUseRegistrationMapper.queryForUnitVesselEquipment(records)); jsonObject.put("equipmentLists", jgUseRegistrationMapper.queryForUnitVesselEquipment(records));
} else { } else {
jsonObject.put("equipmentLists", jgUseRegistrationMapper.queryForUnitPipelineEquipment(records)); jsonObject.put("equipmentLists", jgUseRegistrationMapper.queryForUnitPipelineEquipment(records));
......
...@@ -129,6 +129,8 @@ public class TzsBaseInstitutionServiceImpl extends BaseService<TzsBaseInstitutio ...@@ -129,6 +129,8 @@ public class TzsBaseInstitutionServiceImpl extends BaseService<TzsBaseInstitutio
}).collect(Collectors.toList()); }).collect(Collectors.toList());
if (!baseUnitLicences.isEmpty()) { if (!baseUnitLicences.isEmpty()) {
baseUnitLicenceService.saveOrUpdateBatch(baseUnitLicences); baseUnitLicenceService.saveOrUpdateBatch(baseUnitLicences);
//添加不在字典中的登记机关
regUnitInfoService.addNotInDJJGDictionary(baseUnitLicences);
} }
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
......
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