Commit 788d87fa authored by Lambertliu's avatar Lambertliu

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 bf67a71a d301f051
package com.yeejoin.amos.boot.module.elevator.biz.controller;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
......@@ -567,7 +568,7 @@ public class AlertCalledController extends BaseController {
/**
* 冻结工单-维修
*
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
......@@ -603,7 +604,7 @@ public class AlertCalledController extends BaseController {
/**
* 工单结案-投诉
*
*
* @return
*/
@ResubmitCheck
......@@ -785,6 +786,17 @@ public class AlertCalledController extends BaseController {
/**
* 应急大屏使用
*
* @param id 主键
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/detail/{id}")
@ApiOperation(httpMethod = "GET", value = "根据id获取详细信息", notes = "根据id获取详细信息")
public ResponseModel<Object> getDetail(@PathVariable Long id) {
return ResponseHelper.buildResponse(iAlertCalledService.getDetail(id));
}
}
......@@ -34,6 +34,7 @@ import com.yeejoin.amos.boot.module.elevator.api.service.IAlertCalledService;
import com.yeejoin.amos.boot.module.elevator.api.service.TzsAuthService;
import com.yeejoin.amos.boot.module.elevator.biz.utils.BeanDtoVoUtils;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.text.StrBuilder;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.logging.log4j.LogManager;
......@@ -44,12 +45,16 @@ import org.redisson.api.RedissonClient;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.core.io.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
......@@ -58,6 +63,8 @@ import java.time.temporal.ChronoUnit;
import java.util.*;
import java.util.stream.Collectors;
import static com.alibaba.fastjson.JSON.parseArray;
/**
* 警情接警填报记录服务实现类
*
......@@ -127,6 +134,12 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
private RAtomicLong rAtomicLong;
@Autowired
ElevatorServiceImpl elevatorServiceImpl;
@Value("classpath:/json/emergencyInformation.json")
private Resource emergencyInformation;
public AlertCalledServiceImpl(RedissonClient client){
this.redissonClient = client;
rAtomicLong = redissonClient.getAtomicLong("AUTO_INCR_LONG");
......@@ -944,4 +957,98 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
}
return alertCalledMapper.getCountNum(userName, startTime, endTime, groupCode);
}
public Object getDetail(Long id) {
HashMap<String, Object> map = new HashMap<>();
// 基本信息
Map<String, Object> keyInfo = getKeyInfo(id);
// map.put("keyinfo", keyInfo);
return keyInfo;
}
public Map<String, Object> getKeyInfo(Long id) {
HashMap<String, Object> keyinfoData = new HashMap<>();
// 基本信息
List<FormValue> jsonData = getJsonData(emergencyInformation);
AlertCalledFormDto alertCalledFormVo = getAlertCalledFormDto(id);
Map<String, Object> objectMap = Bean.BeantoMap(alertCalledFormVo.getAlertCalledDto());
List<FormValue> dynamicFormAlert = alertCalledFormVo.getDynamicFormAlert();
jsonData.forEach(f -> {
Object o = objectMap.get(f.getKey());
if (!ObjectUtils.isEmpty(o)) {
f.setValue(o.toString());
}
dynamicFormAlert.add(f);
});
// 使用单位信息
// 获取根据警情获取电梯信息
Map<String, Object> map = elevatorServiceImpl.selectByAlertId(id);
// 根据设备id 获取使用单位信息
Map<String, Object> useUnitMap = elevatorServiceImpl.selectUseUnitByAlertId(String.valueOf(map.get("sequenceNbr")));
if (!ObjectUtils.isEmpty(useUnitMap)) {
jsonData.forEach(f -> {
// 单位名称
if ("useUnitName".equals(f.getKey())) {
f.setValue(ObjectUtils.isEmpty(useUnitMap.get("useUnitName")) ? null : String.valueOf(useUnitMap.get("useUnitName")));
}
// 单位电话
// if ("principalPhone".equals(f.getKey())){
//
// }
// 单位地址
if ("unitAddress".equals(f.getKey())) {
f.setValue(ObjectUtils.isEmpty(useUnitMap.get("address")) ? null : String.valueOf(useUnitMap.get("address")));
}
// 安全管理员
if ("securityAdministrator".equals(f.getKey())) {
f.setValue(ObjectUtils.isEmpty(useUnitMap.get("manager")) ? null : String.valueOf(useUnitMap.get("manager")));
}
// 安全管理员电话
if ("securityAdministratorPhone".equals(f.getKey())) {
f.setValue(ObjectUtils.isEmpty(useUnitMap.get("managerPhone")) ? null : String.valueOf(useUnitMap.get("managerPhone")));
}
});
}
// 处置记录
LambdaQueryWrapper<RepairConsult> queryWrapper = new LambdaQueryWrapper<RepairConsult>();
queryWrapper.eq(RepairConsult::getParentId, id).orderByDesc(RepairConsult::getRecDate);
List<RepairConsult> list = repairConsultServiceImpl.list(queryWrapper);
HashMap<String, Object> datas = new HashMap<>();
ArrayList<Map<String, Object>> records = new ArrayList<>();
list.forEach(r -> {
HashMap<String, Object> data = new HashMap<>();
data.put("label", r.getAlertStatus());
data.put("operatingTime", r.getRecDate());
data.put("operater", r.getDescription());
records.add(data);
});
// 监管码
HashMap<String, Object> qrcode = new HashMap<>();
if (!ObjectUtils.isEmpty(alertCalledFormVo.getAlertCalledDto())) {
qrcode.put("value", alertCalledFormVo.getAlertCalledDto().getRegistrationCode());
}
// 96333码
HashMap<String, Object> qrcode2 = new HashMap<>();
if (!ObjectUtils.isEmpty(alertCalledFormVo.getAlertCalledDto())) {
qrcode2.put("value", alertCalledFormVo.getAlertCalledDto().getDeviceId());
}
datas.put("datas", records);
keyinfoData.put("keyParams", dynamicFormAlert);
keyinfoData.put("infoRecords", datas);
keyinfoData.put("qrcode", qrcode);
keyinfoData.put("qrcode2", qrcode2);
return keyinfoData;
}
private List<FormValue> getJsonData(Resource resource) {
String json;
try {
json = IOUtils.toString(resource.getInputStream(), String.valueOf(StandardCharsets.UTF_8));
} catch (IOException e) {
throw new RuntimeException(e);
}
return parseArray(json, FormValue.class);
}
}
\ No newline at end of file
[
{
"key": "emergencyPerson",
"label": "救援人姓名",
"type": "text"
},
{
"key": "callTime",
"label": "接警时间",
"type": "text"
},
{
"key": "contactPhone",
"label": "联系人电话",
"type": "text"
},
{
"key": "useSiteCategory",
"label": "使用场所分类",
"type": "text"
},
{
"key": "deviceId",
"label": "电梯识别码",
"type": "text"
},
{
"key": "useStatus",
"label": "使用情况",
"type": "text"
},
{
"key": "address",
"label": "地址",
"type": "text"
},
{
"key": "useUnitName",
"label": "单位名称",
"type": "text"
},
{
"key": "principalPhone",
"label": "单位电话",
"type": "text"
},
{
"key": "unitAddress",
"label": "单位地址",
"type": "text"
},
{
"key": "securityAdministrator",
"label": "电梯安全管理员",
"type": "text"
},
{
"key": "securityAdministratorPhone",
"label": "电梯安全管理员电话",
"type": "text"
}
]
\ No newline at end of file
......@@ -38,7 +38,7 @@ public enum IssueTypeEnum {
//充装异常(气瓶)
CHARGE_EXCEPTION_CYLINDER("充装异常","14","4"),
//许可超期(设备,气瓶)
LICENSE_OVERDUE("许可超期","14","3,4"),
LICENSE_OVERDUE("许可超期","15","3,4"),
......
......@@ -15,6 +15,10 @@ public enum DPMapStatisticsItemEnum {
*/
TOTAL("特种设备总量 (台)", "total", ""),
OVER15YEARS_ELEVATORS("超过15年电梯数量", "over15yearsCount", ""),
USE_REGISTRATION_COUNT("使用登记办理量", "useRegistrationCount", ""),
CONSTRUCTION_NOTICE_COUNT("施工告知办理量", "constructionNoticeCount", ""),
CHANGE_COUNT("变更办理量", "changeCount", ""),
GAS("气瓶 (台)", "gas", ""),
ELEVATORS("电梯 (台)", "elevators", "3000"),
PRESSURE_VESSELS("压力容器 (台)", "pressureVessels", "2000"),
......@@ -30,6 +34,9 @@ public enum DPMapStatisticsItemEnum {
GAS_UNITS("充装单位 (家)", "gasUnits", ""),
OPERATORS("作业人员 (人)", "operators", ""),
DEVICE_COUNT("已纳管设备数", "deviceCount", ""),
PERSON_ISSUES_COUNT("个人问题数", "个人", ""),
COMPANY_ISSUES_COUNT("企业问题数", "企业", ""),
EQU_ISSUES_COUNT("设备数", "设备", ""),
CERTIFICATE_COUNT("登记证总量", "certificateCount", "");
private String label;
private String code;
......
......@@ -66,4 +66,14 @@ public interface DPStatisticsMapper {
List<Map<String, Object>> disableCountByOrgCodes(@Param("orgCodes") List<String> orgCodes);
List<Map<String, Object>> cancelCountByOrgCodes(@Param("orgCodes") List<String> orgCodes);
long certificateCountByOrgCode(@Param("orgCode") String orgCode);
long useCountByOrgCode(@Param("orgCode") String orgCode);
Long over15yearsCount(@Param("orgCode") String orgCode, @Param("time") String time);
Long constructionNoticeCount(@Param("orgCode") String orgCode);
Long changeCountByOrgCode(@Param("orgCode") String orgCode);
}
......@@ -527,4 +527,114 @@
GROUP BY
T.org_code
</select>
<select id="certificateCountByOrgCode" resultType="java.lang.Long">
SELECT COUNT
(1)
FROM
tzs_jg_use_registration_manage A
INNER JOIN privilege_company C ON A.receive_company_code = C.company_code
WHERE
A.certificate_status = '已登记'
AND C.org_code LIKE concat ( #{orgCode}, '%' )
</select>
<select id="useCountByOrgCode" resultType="java.lang.Long">
SELECT COUNT
( 1 )
FROM
tzs_jg_use_registration T
WHERE
T.audit_status = '已完成'
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' )
</select>
<select id="over15yearsCount" resultType="java.lang.Long">
SELECT COUNT
( 1 )
FROM
idx_biz_jg_factory_info A
INNER JOIN idx_biz_jg_supervision_info B ON A.RECORD = B.RECORD
INNER JOIN idx_biz_jg_register_info C ON A.RECORD = C.RECORD
WHERE
B.ORG_BRANCH_CODE LIKE CONCAT ( #{orgCode}, '%' )
AND A.PRODUCE_DATE &lt; #{time}
AND C.EQU_LIST = '3000'
</select>
<select id="constructionNoticeCount" resultType="java.lang.Long">
SELECT SUM
( T.COUNT )
FROM
(
SELECT COUNT
( 1 )
FROM
tzs_jg_installation_notice T
WHERE
T.notice_status = 6616
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION
SELECT COUNT
( 1 )
FROM
tzs_jg_maintain_notice T
WHERE
T.notice_status = 6616
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION
SELECT COUNT
( 1 )
FROM
tzs_jg_reform_notice T
WHERE
T.notice_status = 6616
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION
SELECT COUNT
( 1 )
FROM
tzs_jg_transfer_notice T
WHERE
T.notice_status = 6616
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' )
) T
</select>
<select id="changeCountByOrgCode" resultType="java.lang.Long">
SELECT SUM
( T.COUNT )
FROM
(
SELECT COUNT
( 1 )
FROM
privilege_company pc
INNER JOIN tzs_jg_change_registration_name crn ON crn.receive_org_code = pc.company_code
AND crn.audit_status = '已完成'
WHERE
pc.org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION
SELECT COUNT
( 1 )
FROM
tzs_jg_change_registration_reform T
WHERE
T.audit_status = '已完成'
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION
SELECT COUNT
( 1 )
FROM
tzs_jg_change_registration_transfer T
WHERE
T.audit_status = '已完成'
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION
SELECT COUNT
( 1 )
FROM
tzs_jg_change_registration_unit T
WHERE
T.status = '已完成'
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' ) UNION
SELECT COUNT
( 1 )
FROM
tzs_jg_change_vehicle_registration_unit T
WHERE
T.status = '已完成'
AND T.receive_company_org_code LIKE CONCAT ( #{orgCode}, '%' )
) T
</select>
</mapper>
......@@ -185,8 +185,11 @@
fi.ins_use_maintain_explain AS insUseMaintainExplain,
useUnit.use_contact AS safetyManager,
useUnit.contact_phone AS safetyManagerPhone,
(select ui.CITY_NAME from idx_biz_jg_use_info ui WHERE ui.record = re.equ_id) AS useUnitCityName,
(select ui.COUNTY_NAME from idx_biz_jg_use_info ui WHERE ui.record = re.equ_id) AS useUnitCountyName,
(select ui.PROVINCE_NAME from idx_biz_jg_use_info ui WHERE ui.record = re.equ_id) AS equipProvinceName,
(select ui.CITY_NAME from idx_biz_jg_use_info ui WHERE ui.record = re.equ_id) AS equipCityName,
(select ui.COUNTY_NAME from idx_biz_jg_use_info ui WHERE ui.record = re.equ_id) AS equipCountyName,
(select ui.STREET_NAME from idx_biz_jg_use_info ui WHERE ui.record = re.equ_id) AS equipStreetName,
(select ui.ADDRESS from idx_biz_jg_use_info ui WHERE ui.record = re.equ_id) AS equipAddress,
useUnit.ADDRESS AS useUnitAddress,
useUnit.ADDRESS AS useUnitLeaderAddress,
installUnit.use_code AS useCode,
......
......@@ -39,15 +39,16 @@
tjmc.next_execute_user_ids,
tjmc.next_task_id,
tjmc.cancel_reason,
ri."EQU_CODE" as equCode,
concat(date_format(IFNULL(inform_start, null),'%Y-%m-%d'),' ~ ',date_format(IFNULL(inform_end, null),'%Y-%m-%d')) as informStartAndEnd,
(SELECT name from tz_equipment_category ec WHERE ec.code = ri.EQU_LIST) AS equList,
(select name from tz_equipment_category ec WHERE ec.code = ri.EQU_CATEGORY) AS equCategory,
(select name from tz_equipment_category ec WHERE ec.code = ri.EQU_DEFINE) AS equDefine
concat(date_format(IFNULL(inform_start, null),'%Y-%m-%d'),' ~ ',date_format(IFNULL(inform_end, null),'%Y-%m-%d')) as informStartAndEnd
<!-- ri."EQU_CODE" as equCode,-->
<!-- (SELECT name from tz_equipment_category ec WHERE ec.code = ri.EQU_LIST) AS equList,-->
<!-- (select name from tz_equipment_category ec WHERE ec.code = ri.EQU_CATEGORY) AS equCategory,-->
<!-- (select name from tz_equipment_category ec WHERE ec.code = ri.EQU_DEFINE) AS equDefine-->
FROM
amos_tzs_biz.tzs_jg_maintenance_contract tjmc
LEFT JOIN tzs_jg_maintenance_contract_eq tjmce ON tjmce.equip_transfer_id = tjmc.sequence_nbr
LEFT JOIN idx_biz_jg_register_info ri ON ri.record = tjmce.equ_id
<!-- LEFT JOIN tzs_jg_maintenance_contract_eq tjmce ON tjmce.equip_transfer_id = tjmc.sequence_nbr-->
<!-- LEFT JOIN idx_biz_jg_register_info ri ON ri.record = tjmce.equ_id-->
<where>
tjmc.is_delete = 0
<if test="contractDto.applyNo != '' and contractDto.applyNo != null">
......@@ -79,18 +80,18 @@
<if test="contractDto.receiveOrgCode != '' and contractDto.receiveOrgCode != null">
and tjmc.receive_org_code = #{contractDto.receiveOrgCode}
</if>
<if test="contractDto.equList != null and contractDto.equList != ''">
AND ri."EQU_LIST" = #{contractDto.equList}
</if>
<if test="contractDto.equCategory != null and contractDto.equCategory != ''">
AND ri."equ_category" = #{contractDto.equCategory}
</if>
<if test="contractDto.equDefine != null and contractDto.equDefine != ''">
AND ri."EQU_DEFINE" = #{contractDto.equDefine}
</if>
<if test="contractDto.equCode != null and contractDto.equCode != ''">
AND ri."EQU_CODE" like concat('%',#{contractDto.equCode},'%')
</if>
<!-- <if test="contractDto.equList != null and contractDto.equList != ''">-->
<!-- AND ri."EQU_LIST" = #{contractDto.equList}-->
<!-- </if>-->
<!-- <if test="contractDto.equCategory != null and contractDto.equCategory != ''">-->
<!-- AND ri."equ_category" = #{contractDto.equCategory}-->
<!-- </if>-->
<!-- <if test="contractDto.equDefine != null and contractDto.equDefine != ''">-->
<!-- AND ri."EQU_DEFINE" = #{contractDto.equDefine}-->
<!-- </if>-->
<!-- <if test="contractDto.equCode != null and contractDto.equCode != ''">-->
<!-- AND ri."EQU_CODE" like concat('%',#{contractDto.equCode},'%')-->
<!-- </if>-->
-- 数据过滤开始 ----------------------------------------------------
<!-- <choose>-->
<!-- <when test="contractDto.useUnitCodeFilter != '' and contractDto.useUnitCodeFilter != null and-->
......
......@@ -146,6 +146,11 @@
fi.factory_standard AS factoryStandard,
fi.product_quality_yield_prove AS productQualityYieldProve,
fi.ins_use_maintain_explain AS insUseMaintainExplain,
(select ui.PROVINCE_NAME from idx_biz_jg_use_info ui WHERE ui.record = re.equ_id) AS equipProvinceName,
(select ui.CITY_NAME from idx_biz_jg_use_info ui WHERE ui.record = re.equ_id) AS equipCityName,
(select ui.COUNTY_NAME from idx_biz_jg_use_info ui WHERE ui.record = re.equ_id) AS equipCountyName,
(select ui.STREET_NAME from idx_biz_jg_use_info ui WHERE ui.record = re.equ_id) AS equipStreetName,
(select ui.ADDRESS from idx_biz_jg_use_info ui WHERE ui.record = re.equ_id) AS equipAddress,
(select useUnit.use_contact from tz_base_enterprise_info useUnit WHERE useUnit.use_code = isn.use_unit_credit_code) AS safetyManager,
(select useUnit.contact_phone from tz_base_enterprise_info useUnit WHERE useUnit.use_code = isn.use_unit_credit_code) AS safetyManagerPhone,
(select useUnit.ADDRESS from tz_base_enterprise_info useUnit WHERE useUnit.use_code = isn.use_unit_credit_code) AS useUnitLeaderAddress,
......
......@@ -90,11 +90,11 @@
</if>
-- 使用登记证编号
<if test="dto.useRegistrationCode != null and dto.useRegistrationCode != ''">
and tjurm.use_registration_code like #{dto.useRegistrationCode}
and tjurm.use_registration_code like concat('%',#{dto.useRegistrationCode},'%')
</if>
-- 申请单号
<if test="dto.applyNo != null and dto.applyNo != ''">
and tjurm.apply_no like #{dto.applyNo}
and tjurm.apply_no like concat('%',#{dto.applyNo},'%')
</if>
-- 登记证书唯一码
<if test="dto.certificateNo != null and dto.certificateNo != ''">
......
......@@ -241,6 +241,6 @@ public class IdxBizJqEquipmentRegisterController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "查询当前单位下已注册或未注册工程装置信息", notes = "查询当前单位下已注册或未注册工程装置信息")
public ResponseModel<List<Map<String, Object>>> getProjectContraptionByCondition() {
String unitCreditCode = getSelectedOrgInfo().getCompany().getCompanyCode();
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.getUnRegisterProjectContraptionList(unitCreditCode));
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.getProjectContraptionList(unitCreditCode));
}
}
package com.yeejoin.amos.boot.module.jg.biz.controller;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
......@@ -11,7 +10,6 @@ import com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgChangeRegistrationReformServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
......@@ -23,7 +21,6 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -149,8 +146,9 @@ public class JgChangeRegistrationReformController extends BaseController {
@RequestParam(value = "EQU_LIST_CODE", required = false) String EQU_LIST_CODE,
@RequestParam(value = "EQU_CATEGORY_CODE", required = false) String EQU_CATEGORY_CODE,
@RequestParam(value = "equList", required = false) String equList,
@RequestParam(value = "receiveCompanyCode") String receiveCompanyCode,
@RequestParam(value = "transferType", required = false) String transferType) {
@RequestParam(value = "receiveCompanyCode", required = false) String receiveCompanyCode,
@RequestParam(value = "transferType", required = false) String transferType,
@RequestParam(value = "useRegistrationCode", required = false) String useRegistrationCode) {
JgUseRegistrationManageDto dto = new JgUseRegistrationManageDto();
Page<JgUseRegistrationManageDto> page = new Page<JgUseRegistrationManageDto>();
page.setCurrent(current);
......@@ -172,6 +170,10 @@ public class JgChangeRegistrationReformController extends BaseController {
if (!ObjectUtils.isEmpty(equList)){
dto.setEquListCode(equList);
}
// 流程页面使用登记证号筛选,适配组件,适配原有表单
if (!ObjectUtils.isEmpty(useRegistrationCode)){
dto.setUseRegistrationCode(useRegistrationCode);
}
// 流程页面使用equList,适配组件,适配原有表单
if (!ObjectUtils.isEmpty(EQU_CATEGORY_CODE)){
dto.setEquCategoryCode(EQU_CATEGORY_CODE);
......@@ -179,7 +181,7 @@ public class JgChangeRegistrationReformController extends BaseController {
if (!ValidationUtil.isEmpty(receiveCompanyCode)){
String[] codes = receiveCompanyCode.split("_");
if (!ValidationUtil.isEmpty(codes)){
dto.setReceiveCompanyCode("1".equals(transferType) ? null : codes[0]);
dto.setReceiveCompanyCode(codes[0]);
}
}
dto.setCertificateStatus("1".equals(transferType) ? "已注销" : "已登记");
......
package com.yeejoin.amos.boot.module.jg.biz.controller;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jg.api.dto.JgChangeVehicleRegistrationUnitDto;
import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationManageDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgChangeVehicleRegistrationUnit;
import com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import java.util.List;
import java.util.Map;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgChangeVehicleRegistrationUnitServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.api.dto.JgChangeVehicleRegistrationUnitDto;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import java.util.List;
import java.util.Map;
/**
*
......@@ -128,8 +125,8 @@ public class JgChangeVehicleRegistrationUnitController extends BaseController {
@RequestParam(value = "size") int size,
@RequestParam(value = "useUnitCreditCode") String useUnitCreditCode,
@RequestParam(value = "whetherVehicleCylinder") String whetherVehicleCylinder,
@RequestParam(value = "certificateStatus") String certificateStatus
) {
@RequestParam(value = "certificateStatus") String certificateStatus,
@RequestParam(value = "useRegistrationCode", required = false) String useRegistrationCode) {
JgUseRegistrationManageDto dto = new JgUseRegistrationManageDto();
Page<JgUseRegistrationManageDto> page = new Page<JgUseRegistrationManageDto>();
page.setCurrent(current);
......@@ -144,6 +141,9 @@ public class JgChangeVehicleRegistrationUnitController extends BaseController {
if (!ValidationUtil.isEmpty(certificateStatus)){
dto.setCertificateStatus(certificateStatus);
}
if (!ObjectUtils.isEmpty(useRegistrationCode)){
dto.setUseRegistrationCode(useRegistrationCode);
}
if (!ValidationUtil.isEmpty(whetherVehicleCylinder)){
dto.setWhetherVehicleCylinder(whetherVehicleCylinder);
}
......
......@@ -279,4 +279,23 @@ public class JgUseRegistrationController extends BaseController {
return ResponseHelper.buildResponse(jgUseRegistrationServiceImpl.saveHistoryEquip(secondMap));
}
/**
* 根据使用登记证查询工程装置名称
* @param useRegistrationCode 使用登记证
* @return projectContraption
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/queryByRegistrationCode")
@ApiOperation(httpMethod = "POST", value = "根据使用登记证查询工程装置名称", notes = "根据使用登记证查询工程装置名称")
public ResponseModel<Object> queryByRegistrationCode(@RequestParam("useRegistrationCode") String useRegistrationCode) {
ReginParams selectedOrgInfo = getSelectedOrgInfo();
String companyCode = selectedOrgInfo.getCompany().getCompanyCode();
String companyType = selectedOrgInfo.getCompany().getCompanyType();
String useUnitCreditCode = "个人主体".equals(companyType) && companyCode.contains("_")? companyCode.split("_", 2)[1]
: companyCode;
HashMap<String, Object> map = new HashMap<>();
map.put("useRegistrationCode", useRegistrationCode);
map.put("useUnitCreditCode", useUnitCreditCode);
return ResponseHelper.buildResponse(jgUseRegistrationServiceImpl.queryByRegistrationCode(map));
}
}
......@@ -55,5 +55,5 @@ public interface IIdxBizJgRegisterInfoService {
* @param useUnitCreditCode 单位统一信用代码
* @return 查询单位下工程装置信息
*/
List<Map<String, Object>> getUnRegisterProjectContraptionList(String useUnitCreditCode);
List<Map<String, Object>> getProjectContraptionList(String useUnitCreditCode);
}
......@@ -930,12 +930,12 @@ public class CommonServiceImpl implements ICommonService {
String docTitle = pdfFile.getName();
FileExporter.exportFile(FileExporter.FileType.valueOf("pdf"), docTitle, bytes, response);
} catch (Exception e) {
log.error("pdf文件转换失败:{}", e);
log.error("pdf文件转换失败", e);
} finally {
try {
Files.deleteIfExists(pdfFile.toPath());
} catch (Exception e) {
log.error("文件找不到,删除失败:{}", e);
log.error("文件找不到,删除失败", e);
}
}
}
......@@ -1750,7 +1750,7 @@ public class CommonServiceImpl implements ICommonService {
* @param supervisoryCompanyCode 接收机构单位代码
* @return 使用登记编号
*/
public String generateRegistrationCode(String equipId, String supervisoryCode, String supervisoryCompanyCode) {
public String generateRegistrationCode(String equipId, String supervisoryCode, String supervisoryCompanyCode, boolean isUnit) {
// 根据设备id查询设备类别、品种
LambdaQueryWrapper<RegistrationInfo> equipWrapper = new LambdaQueryWrapper<>();
equipWrapper.eq(RegistrationInfo::getRecord, equipId);
......@@ -1765,16 +1765,14 @@ public class CommonServiceImpl implements ICommonService {
EquipTypeEnum.getMessage(equCategory.substring(0, 1));
// 设备代码中间两位
String equipType2MidDigits;
equipType2MidDigits = equCategory.substring(1, 3);
//if (ValidationUtil.isEmpty(equDefine)) {
// 没有设备品种的设备取设备类别代码中间两位
//}
//else {
// // 设备品种代码中间两位
// equipType2MidDigits = equDefine.substring(1, 3);
//}
String equipType2MidDigits = equCategory.substring(1, 3);
//台套还是取品种的中间两位
if (!isUnit) {
if (!ValidationUtil.isEmpty(equDefine)) {
equipType2MidDigits = equDefine.substring(1, 3);
}
}
// 登记机关代号
String city = supervisoryCode.substring(0, 1);
// 西咸新区监管码对应的设备使用登记证还按咸阳(D)生成
......
......@@ -764,6 +764,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
useInfoMap.put("USE_ADDRESS", useInfo.getAddress());
useInfoMap.put("FULL_ADDRESS", useInfo.getAddress());
}
useInfoMap.put("EQU_STATE", ObjectUtils.isEmpty(useInfo.getEquState()) ? null : EquimentEnum.getName.get(Integer.valueOf(useInfo.getEquState())));
}
if (!useInfoMap.isEmpty()) {
Map<String, Object> filterMap = useInfoMap.entrySet()
......@@ -1431,10 +1432,10 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
throw new BadRequest("请先选择使用单位等信息!");
}
if (!ValidationUtil.isEmpty(map.get("transferType")) && ValidationUtil.equals(map.get("transferType"), "区内移装")) {
if (ValidationUtil.isEmpty(map.get("county"))) {
throw new BadRequest("请先选择施工区域等信息!");
if (ValidationUtil.isEmpty(map.get("city"))) {
throw new BadRequest("请先选择施施工区域-市!");
} else {
map.put(USE_PLACE_CODE, String.valueOf(map.get("county")).split("_")[0]);
map.put(USE_PLACE_CODE, String.valueOf(map.get("city")).split("_")[0]);
}
}
map.put("USE_UNIT_CREDIT_CODE", String.valueOf(map.get("useUnitCreditCode")).split("_")[0]);
......@@ -2293,7 +2294,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
iIdxBizJgOtherInfoService.saveOrUpdateData(otherInfo);
if (CylinderTypeEnum.CYLINDER.getCode().equals(equCategory) || "2100".equals(equCategory)) {
if (CylinderTypeEnum.CYLINDER.getCode().equals(equCategory) || "2100".equals(equCategory) || "8300".equals(equCategory)) {
IdxBizJgInspectionDetectionInfo inspectionDetectionInfo = JSON.parseObject(JSON.toJSONString(equipmentInfoForm), IdxBizJgInspectionDetectionInfo.class);
List<Map<String, Object>> inspectionAndTestingInstitutions = commonMapper.getUnitListByType(INSPECTION_AND_TESTING_INSTITUTIONS);
Optional<Map<String, Object>> optional = inspectionAndTestingInstitutions.stream().filter(x -> x.get("useCode").equals(inspectionDetectionInfo.getInspectOrgCode())).findFirst();
......@@ -2301,8 +2302,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
inspectionDetectionInfo.setInspectOrgName((String) mapOrDefault.getOrDefault("useUnit", inspectionDetectionInfo.getInspectOrgName()));
inspectionDetectionInfo.setRecord(record);
inspectionDetectionInfo.setRecDate(date);
inspectionDetectionInfo.setInspectType("ZZJDJY");
inspectionDetectionInfo.setInspectConclusion("6040");
inspectionDetectionInfo.setInspectType("8300".equals(equCategory) ? "AZJDJY" : "ZZJDJY");
// inspectionDetectionInfo.setInspectConclusion("6040");
inspectionDetectionInfo.setSequenceNbr(OPERATESAVE.equals(operateType) ? null : String.valueOf(equipmentInfoForm.get("INSPECTIONDETECTIONINFO_SEQ")));
iIdxBizJgInspectionDetectionInfoService.saveOrUpdateData(inspectionDetectionInfo);
}
......@@ -2514,6 +2515,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
Page<JSONObject> page = new Page<>(jsonObject.getLong("number"), jsonObject.getLong("size"));
Set<String> records = EquipUsedCheckStrategyContext.getUsedStrategy("useRegistration").getEquipInFlow(useUnitCreditCode);
if ("8300".equals(jsonObject.get(EQU_CATEGORY_CODE))) {// 管道
if (jsonObject.get("projectContraption") == null) {
throw new BadRequest("请先选择工程装置后,再选择设备信息!");
}
return jgUseRegistrationMapper.queryForUnitPipelineEquipmentPage(page, jsonObject, records);
} else if ("2300".equals(jsonObject.get(EQU_CATEGORY_CODE))) {// 气瓶
List<DictionarieValueModel> fillingMedium = Systemctl.dictionarieClient.dictValues("FILLING_MEDIUM").getResult();
......@@ -3123,7 +3127,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
@Override
public List<Map<String, Object>> getUnRegisterProjectContraptionList(String useUnitCreditCode) {
return this.baseMapper.getUnRegisterProjectContraptionList(useUnitCreditCode);
public List<Map<String, Object>> getProjectContraptionList(String useUnitCreditCode) {
return this.baseMapper.getProjectContraptionList(useUnitCreditCode);
}
}
\ No newline at end of file
......@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.ImmutableMap;
import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.common.api.enums.ReginStepEnum;
......@@ -59,6 +60,7 @@ import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletResponse;
import java.text.SimpleDateFormat;
import java.util.*;
......@@ -66,8 +68,8 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
import static com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationServiceImpl.getAuditPassedDate;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
/**
* 移装变更登记登记服务实现类
......@@ -207,7 +209,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
throw new BadRequest("区内移装只能选择与设备地址中相同地市进行移装!");
}
});
} else{
} else {
deviceList.forEach(device -> {
String deviceCity = Arrays.stream(((String) device.get("USE_PLACE_CODE")).split("#"))
.skip(1)
......@@ -920,21 +922,20 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
Map<String, String> supervisoryCodeMap = this.createSupervisoryCode(historyData);
supervisoryCode = supervisoryCodeMap.get("superviseCode");
code96333 = supervisoryCodeMap.get("code96333");
useRegistrationCode.set(commonServiceImpl.generateRegistrationCode(device.getEquId(), supervisoryCode, transfer.getReceiveCompanyCode()));
useRegistrationCode.set(commonServiceImpl.generateRegistrationCode(device.getEquId(), supervisoryCode, transfer.getReceiveCompanyCode(), false));
useRegistrationCodeList.add(String.valueOf(useRegistrationCode));
isUpdateRegistrationCode.set(true);
}else{
IdxBizJgUseInfo useInfo = useInfoService.getOneData(device.getEquId());
} else {
JSONObject newPosition = JSON.parseObject(historyData.getChangeData());
String county = newPosition.getString("transferCounty").split("_")[0];
boolean shouldUpdateCode = Arrays.stream(ReginStepEnum.values())
.map(ReginStepEnum::getCode)
.anyMatch(code -> code.equals(county));
if (shouldUpdateCode){
if (shouldUpdateCode) {
Map<String, String> supervisoryCodeMap = this.createSupervisoryCode(historyData);
supervisoryCode = supervisoryCodeMap.get("superviseCode");
code96333 = supervisoryCodeMap.get("code96333");
useRegistrationCode.set(commonServiceImpl.generateRegistrationCode(device.getEquId(), supervisoryCode, transfer.getReceiveCompanyCode()));
useRegistrationCode.set(commonServiceImpl.generateRegistrationCode(device.getEquId(), supervisoryCode, transfer.getReceiveCompanyCode(), false));
useRegistrationCodeList.add(String.valueOf(useRegistrationCode));
isUpdateRegistrationCode.set(true);
}
......@@ -979,6 +980,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
registrationManage.setUseRegistrationCode(useRegistrationCode);
}
registrationManage.setCertificateStatus("已登记");
registrationManage.setApplyNo(transfer.getApplyNo());
});
List<JSONObject> updatedRegistrationList = registrationList.stream()
.map(registrationManage -> {
......@@ -1004,7 +1006,8 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
* @param record 设备Id
* @param newData 设备移装的新数据
*/
public void replacementHistoryData(String record, JgChangeRegistrationTransfer transfer, JgRegistrationHistory newData, String supervisoryCode, String code96333) {
public void replacementHistoryData(String record, JgChangeRegistrationTransfer transfer,
JgRegistrationHistory newData, String supervisoryCode, String code96333) {
if (!ValidationUtil.isEmpty(record) && !ValidationUtil.isEmpty(transfer.getApplyNo())) {
//查询设备旧数据
......@@ -1110,7 +1113,9 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
}
useInfo.setEquState("1");
useInfoService.saveOrUpdateData(useInfo);
otherInfo.setSupervisoryCode(supervisoryCode);
if (!StringUtils.isEmpty(supervisoryCode)) {
otherInfo.setSupervisoryCode(supervisoryCode);
}
otherInfo.setCode96333(code96333);
otherInfoService.saveOrUpdateData(otherInfo);
}
......@@ -1143,7 +1148,8 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
* @param useRegistrationCode 使用注册登记证编号
* @param isUpdateRegistrationCode 是否更新使用登记证编号
*/
public void updateRegisterInfoAndEsData(String equId, JgRegistrationHistory newData, String useRegistrationCode, String supervisoryCode, String code96333, AtomicBoolean isUpdateRegistrationCode) {
public void updateRegisterInfoAndEsData(String equId, JgRegistrationHistory newData, String useRegistrationCode,
String supervisoryCode, String code96333, AtomicBoolean isUpdateRegistrationCode) {
//更新使用注册登记证编号
if (isUpdateRegistrationCode.get()) {
idxBizJgRegisterInfoMapper.updateUseOrgCodeByEquip(equId, useRegistrationCode);
......@@ -1215,7 +1221,9 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
if (isUpdateRegistrationCode.get()) {
map1.put("EQU_STATE", "1");
map1.put("USE_ORG_CODE", useRegistrationCode);
map1.put("SUPERVISORY_CODE", supervisoryCode);
if (!StringUtils.isEmpty(supervisoryCode)) {
map1.put("SUPERVISORY_CODE", supervisoryCode);
}
map1.put("CODE96333", code96333);
}
resultMap.put(equId, map1);
......
......@@ -944,7 +944,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
useInfo.setUseUnitCreditCode(registration.getNewUseUnitCreditCode());
useInfoMapper.updateById(useInfo);
}
//es中的编号信息
//修改ES中使用单位信息和使用单位代码
Map<String, Map<String, Object>> resultMap = new HashMap<>();
Map<String, Object> map1 = new HashMap<>();
map1.put("USE_UNIT_CREDIT_CODE", registration.getNewUseUnitCreditCode());
......@@ -964,6 +964,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
List<String> ids = historyJson.stream().map(v -> JSON.parseObject(v.toString()).getString("sequenceNbr")).collect(Collectors.toList());
List<JgUseRegistrationManage> list = useRegistrationManageService.lambdaQuery().in(BaseEntity::getSequenceNbr, ids).list();
for (JgUseRegistrationManage registrationManage : list) {
//修改使用登记证管理使用单位地址、使用单位代码、接收机构、接收机构公司代码、办理日期、使用单位地址
registrationManage.setUseUnitName(registration.getNewUseUnitName());
registrationManage.setUseUnitCreditCode(registration.getNewUseUnitCreditCode());
registrationManage.setReceiveOrgName(registration.getReceiveOrgName());
......@@ -973,7 +974,6 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
TzBaseEnterpriseInfo useCodeResult = tzBaseEnterpriseInfoMapper.selectOne(new QueryWrapper<TzBaseEnterpriseInfo>().eq("use_unit_code", registration.getNewUseUnitCreditCode()));
if (useCodeResult != null) {
registrationManage.setUseUnitAddress(useCodeResult.getAddress());
registrationManage.setEquUseAddress(useCodeResult.getAddress());
}
}
}
......
......@@ -458,18 +458,6 @@ public class JgChangeVehicleRegistrationUnitServiceImpl extends BaseService<JgCh
jgCertificateChangeRecord.setEquCategory(manage.getEquCategory());
jgCertificateChangeRecord.setReceiveCompanyCode(jgChangeVehicleRegistrationUnit.getReceiveCompanyCode());
jgCertificateChangeRecord.setRoutePath(taskV2Model.getRoutePath());
// 组装设备流水
dataList.forEach(item -> {
JSONObject object = JSONObject.parseObject(JSON.toJSONString(item));
JgCertificateChangeRecordEq jgCertificateChangeRecordEq = new JgCertificateChangeRecordEq();
jgCertificateChangeRecordEq.setEquId(object.get("record").toString());
jgCertificateChangeRecordEq.setChangeRecordId(jgCertificateChangeRecord.getSequenceNbr().toString());
jgCertificateChangeRecordEq.setProductCode(object.get("factoryNum").toString());
jgCertificateChangeRecordEqs.add(jgCertificateChangeRecordEq);
});
// 保存设备流水信息
jgCertificateChangeRecordEqService.saveBatch(jgCertificateChangeRecordEqs);
List<String> collect = jgCertificateChangeRecordEqs.stream().map(JgCertificateChangeRecordEq::getEquId).collect(Collectors.toList());
if ("0".equals(jgChangeVehicleRegistrationUnit.getChangeType()) && !ObjectUtils.isEmpty(collect)) {
// 区外变更
......@@ -509,6 +497,18 @@ public class JgChangeVehicleRegistrationUnitServiceImpl extends BaseService<JgCh
// 保存证流水信息
jgCertificateChangeRecord.setUseRegistrationCode(manage.getUseRegistrationCode());
jgCertificateChangeRecordService.save(jgCertificateChangeRecord);
// 组装设备流水
dataList.forEach(item -> {
JSONObject object = JSONObject.parseObject(JSON.toJSONString(item));
JgCertificateChangeRecordEq jgCertificateChangeRecordEq = new JgCertificateChangeRecordEq();
jgCertificateChangeRecordEq.setEquId(object.get("record").toString());
jgCertificateChangeRecordEq.setChangeRecordId(jgCertificateChangeRecord.getSequenceNbr().toString());
jgCertificateChangeRecordEq.setProductCode(object.get("factoryNum").toString());
jgCertificateChangeRecordEqs.add(jgCertificateChangeRecordEq);
});
// 保存设备流水信息
jgCertificateChangeRecordEqService.saveBatch(jgCertificateChangeRecordEqs);
}
/**
......
......@@ -652,7 +652,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
placeholders.put("installType", businessType); // 施工类别
placeholders.put("installLeaderName", getValue.apply("installLeaderName"));
placeholders.put("installLeaderPhone", getValue.apply("installLeaderPhone"));
placeholders.put("fullAddress", getValue.apply("provinceName") + getValue.apply("cityName") + getValue.apply("countyName") + getValue.apply("streetName") + getValue.apply("address"));
placeholders.put("fullAddress", getValue.apply("equipProvinceName") + getValue.apply("equipCityName") + getValue.apply("equipCountyName") + getValue.apply("equipStreetName") + getValue.apply("equipAddress"));
placeholders.put("useUnitName", getValue.apply("useUnitName"));
placeholders.put("useUnitLeaderName", getValue.apply("safetyManager"));
placeholders.put("useUnitLeaderPhone", getValue.apply("safetyManagerPhone"));
......
......@@ -67,7 +67,7 @@ import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
/**
* 移装告知服务实现类
* 移装告知服务实现类
*
* @author system_generator
* @date 2023-12-19
......@@ -114,6 +114,12 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
private RedissonClient redissonClient;
@Autowired
ESEquipmentCategory esEquipmentCategory;
@Autowired
JgRegistrationHistoryServiceImpl jgRegistrationHistoryService;
@Autowired
JgTransferNoticeEqServiceImpl jgTransferNoticeEqService;
@Autowired
ESElavtorRepository esElavtorRepository;
/**
* 根据sequenceNbr查询
......@@ -450,8 +456,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
}
}
@Autowired
ESElavtorRepository esElavtorRepository;
/**
* 分页查询
......@@ -828,7 +833,6 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
// 检查实际状态是否不等于期望状态
commonService.checkExpectedStatus(jgTransferNotice.getNoticeStatus());
// 执行工作流并返回组装好的工作流信息
WorkflowResultDto workflowResultDto = getWorkflowResultDto(op, opinion, jgTransferNotice);
......@@ -848,8 +852,7 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
jgTransferNotice.setPromoter("");
jgTransferNotice.setHandleDate(new Date());
jgTransferNotice.setNoticeStatus(String.valueOf(FlowStatusEnum.TO_BE_FINISHED.getCode()));
//修改设备ES设备使用场所和设备详细使用地址
Map<String, Map<String, Object>> objMap = new HashMap<>();
for (JgTransferNoticeEq eq : jgTransferNoticeEqs) {
Map<String, Object> map1 = new HashMap<>();
......@@ -966,9 +969,6 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
}
}
@Autowired
JgTransferNoticeEqServiceImpl jgTransferNoticeEqService;
private void updateEq(JgTransferNotice jgTransferNotice) {
// 组装设备注册代码
String ym = null;
......@@ -990,9 +990,6 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
jgTransferNoticeEqService.updateBatchById(eqList);
}
@Autowired
JgRegistrationHistoryServiceImpl jgRegistrationHistoryService;
private void saveHisDataBeforeUpdate(JgTransferNotice jgTransferNotice, List<JgTransferNoticeEq> jgTransferNoticeEqs) {
String seq = jgTransferNotice.getSequenceNbr().toString();
JSONObject json = (JSONObject) JSONObject.toJSON(jgTransferNotice);
......
......@@ -661,11 +661,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
CompanyBo company = reginParams.getCompany();
List<Map<String, Object>> equipmentLists = (List<Map<String, Object>>) map.get("equipmentLists");
if (CollectionUtils.isEmpty(equipmentLists) || equipmentLists.stream()
.map(v -> (String) v.get("equDefine"))
.distinct()
.count() != 1) {
throw new BadRequest(CollectionUtils.isEmpty(equipmentLists) ? "请选择设备信息!" : "请选择相同设备品种!");
if (CollectionUtils.isEmpty(equipmentLists)) {
throw new BadRequest( "请选择设备信息!");
}
// 提交时进行校验设备是否在流程中使用(并发及同时打开多个相同的页面时才会出现此种情况)
checkForRepeatUsedEquip(map, equipmentLists, reginParams);
......@@ -1204,7 +1201,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if (!ObjectUtils.isEmpty(jgUseRegistration.getSupervisoryCode())) {
if ("unit".equals(jgUseRegistration.getManageType())) {
if ((Boolean) mapData.get("isFirstEquip")) {
String code = flag ? useRegistrationCode : commonServiceImpl.generateRegistrationCode(String.valueOf(mapData.get("equipId")), jgUseRegistration.getSupervisoryCode(), jgUseRegistration.getReceiveCompanyCode());
String code = flag ? useRegistrationCode : commonServiceImpl.generateRegistrationCode(String.valueOf(mapData.get("equipId")), jgUseRegistration.getSupervisoryCode(),
jgUseRegistration.getReceiveCompanyCode(), true);
jgUseRegistration.setUseRegistrationCode(code);
jgUseRegistration.setAuditPassDate(new Date());
registerInfo.setUseOrgCode(code);
......@@ -1224,7 +1222,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
idxBizJgRegisterInfoService.update(lambda);
}
} else {
String code = commonServiceImpl.generateRegistrationCode(String.valueOf(mapData.get("equipId")), jgUseRegistration.getSupervisoryCode(), jgUseRegistration.getReceiveCompanyCode());
String code = commonServiceImpl.generateRegistrationCode(String.valueOf(mapData.get("equipId")), jgUseRegistration.getSupervisoryCode(), jgUseRegistration.getReceiveCompanyCode(), false);
jgUseRegistration.setUseRegistrationCode(code);
jgUseRegistration.setAuditPassDate(new Date());
registerInfo.setUseOrgCode(code);
......@@ -2950,4 +2948,14 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
jgCertificateChangeRecord.setSequenceNbr(sequenceNbr);
certificateChangeRecordService.save(jgCertificateChangeRecord);
}
public Object queryByRegistrationCode(HashMap<String, Object> map) {
LambdaQueryWrapper<JgUseRegistration> queryWrapper = new LambdaQueryWrapper<JgUseRegistration>()
.eq(JgUseRegistration::getIsDelete, false)
.eq(JgUseRegistration::getUseRegistrationCode, map.get("useRegistrationCode"))
.eq(JgUseRegistration::getUseUnitCreditCode, map.get("useUnitCreditCode"))
.eq(JgUseRegistration::getIsAddEquip, "0")
.ne(JgUseRegistration::getStatus, "已作废");
return this.baseMapper.selectOne(queryWrapper);
}
}
\ No newline at end of file
......@@ -1957,7 +1957,7 @@
</w:rPr>
</w:pPr>
<#list installLicenseNoList as item>
<#list equipList.installLicenseNoList as item>
<w:r>
<w:rPr>
<w:rFonts w:hint="eastAsia" w:ascii="宋体" w:hAnsi="宋体" w:cs="宋体"/>
......@@ -2011,7 +2011,7 @@
<w:gridCol w:w="1640"/>
</w:tblGrid>
<#list installLicenseNoList as item>
<#list equipList.installLicenseNoList as item>
<w:tr>
<w:tblPrEx>
......@@ -2332,7 +2332,7 @@
</w:rPr>
</w:pPr>
<#list installLicenseExpirationDateList as item1>
<#list equipList.installLicenseExpirationDateList as item1>
<w:r>
<w:rPr>
<w:rFonts w:hint="eastAsia" w:ascii="宋体" w:hAnsi="宋体" w:cs="宋体"/>
......
package com.yeejoin.amos.boot.module.jyjc.api.dto;
import lombok.Data;
/**
* 检验机构公示
*
* @author Administrator
*/
@Data
public class InspectionCompanyPublicityDto {
/**
* 单位名称
*/
private String unitName;
/**
* 单位编码
*/
private String unitCode;
/**
* 核准信息:核准证号、核准证有限期
*/
private String approvalInfo;
/**
* 开通区域
*/
private String detectionRegion;
/**
* 业务有效期
*/
private String expiryDate;
/**
* 法人
*/
private String legalPerson;
/**
* 联系人
*/
private String useContact;
/**
* 联系人电话
*/
private String contactPhone;
/**
* 检验及检测人员数量
*/
private Long personNum;
/**
* 开通业务类型
*/
private String openBizType;
}
......@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jyjc.api.mapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.jyjc.api.dto.InspectionCompanyPublicityDto;
import com.yeejoin.amos.boot.module.jyjc.api.dto.PublicityInspectOrgInfoDto;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel;
import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication;
......@@ -36,4 +37,6 @@ public interface JyjcOpeningApplicationMapper extends BaseMapper<JyjcOpeningAppl
* @return List<PublicityInspectOrgInfoDto>
*/
List<PublicityInspectOrgInfoDto> queryInspectionOrgListForPublicity(@Param("orgCode") String orgCode, @Param("dto") DPFilterParamDto dpFilterParamDto);
List<InspectionCompanyPublicityDto> queryInspectionOrgListForBiz();
}
......@@ -83,4 +83,41 @@
and ((b.supervise_org_code != '50' and b.supervise_org_code LIKE CONCAT (#{orgCode}, '%')) or (b.supervise_org_code = '50' and b.office_region LIKE CONCAT ('%', #{dto.cityCode}, '%')))
ORDER BY unitName
</select>
<select id="queryInspectionOrgListForBiz" resultType="com.yeejoin.amos.boot.module.jyjc.api.dto.InspectionCompanyPublicityDto">
select
ei.sequence_nbr,
ei.use_unit as unitName,
oa.unit_code,
oa.detection_region,
oa.expiry_date,
ei.legal_person,
ei.use_contact,
ei.contact_phone,
(select count(1) from tzs_user_info u where u.unit_code = ei.use_unit_code and u.is_delete = false) as personNum,
(
select
group_concat(concat(a.cert_no,'#',a.expiry_date)) cert_no
from
(
SELECT
cert_no,
min(expiry_date) as expiry_date
FROM
"tz_base_unit_licence"
where
unit_code= ei.use_unit_code
and cert_type_code like '1233%'
and expiry_date >= CURRENT_DATE
AND (case when cert_type_code = '1233-1' then 'jy' else 'jc' end) = oa.open_biz_type
GROUP BY cert_no,cert_type_code
) a
) as approvalInfo,
oa.open_biz_type
from
tz_jyjc_opening_application oa,
tz_base_enterprise_info ei
where
oa.unit_code = ei.use_unit_code
and oa.status = 6616
</select>
</mapper>
......@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jyjc.api.dto.InspectionCompanyPublicityDto;
import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationModel;
import com.yeejoin.amos.boot.module.jyjc.api.model.JyjcOpeningApplicationRequstDto;
......@@ -284,4 +285,11 @@ public class JyjcOpeningApplicationController extends BaseController {
return ResponseHelper.buildResponse(result);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "检验检测机构公示", notes = "检验检测机构公示")
@PostMapping(value = "/inspectionOrgList/publicity")
public ResponseModel<List<InspectionCompanyPublicityDto>> inspectionOrgListForPublicity() {
return ResponseHelper.buildResponse(jyjcOpeningApplicationServiceImpl.queryInspectionOrgListForBiz());
}
}
......@@ -17,6 +17,7 @@ import com.yeejoin.amos.boot.biz.common.dao.mapper.DataDictionaryMapper;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.module.common.api.dto.AttachmentDto;
import com.yeejoin.amos.boot.module.jyjc.api.dto.InspectionCompanyPublicityDto;
import com.yeejoin.amos.boot.module.jyjc.api.entity.JyjcOpeningApplication;
import com.yeejoin.amos.boot.module.jyjc.api.enums.BizTypeEnum;
import com.yeejoin.amos.boot.module.jyjc.api.enums.BusinessTypeEnum;
......@@ -967,4 +968,30 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
commonService.saveExecuteFlowData2Redis(inspectionApplication.getWorkflowProstanceId(), this.buildInstanceRuntimeData(inspectionApplication));
});
}
public List<InspectionCompanyPublicityDto> queryInspectionOrgListForBiz() {
// 查询所有已经业务开通的检验检测机构,已机构为维度进行证的合并处理
List<InspectionCompanyPublicityDto> inspectionCompanyPublicityDtos = this.getBaseMapper().queryInspectionOrgListForBiz();
// 枚举转换
inspectionCompanyPublicityDtos.forEach(c->{
c.setDetectionRegion(this.castRegionCode2Name(c.getDetectionRegion()));
c.setApprovalInfo(this.breakNewLineForApprovalInfo(c.getApprovalInfo()));
c.setOpenBizType(this.castOpenBizTypeCode2Name(c.getOpenBizType()));
});
return inspectionCompanyPublicityDtos;
}
private String castRegionCode2Name(String detectionRegion) {
return "";
}
private String breakNewLineForApprovalInfo(String approvalInfo) {
String[] approvalArray = approvalInfo.split("#");
StringBuilder stringBuilder = new StringBuilder();
return "";
}
private String castOpenBizTypeCode2Name(String openBizType) {
return OpenBizTypeEnum.getOneByCode(openBizType).getName();
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.statistics.api.dto;
import lombok.Data;
/**
* @author Administrator
*/
@Data
public class SecurityIndexCountItemDto {
private String regionCode;
private String regionName;
/**
* 充装检查率
*/
private String czjc;
/**
* 许可有效率
*/
String xuke;
/**
* 使用登记办理率
*/
String shiyongdengji;
/**
* 检验超期率
*/
String jianyanchaoqi;
/**
* 检验合格率
*/
String jianyanhege;
/**
* 充装检查率
*/
String czjchege;
}
package com.yeejoin.amos.boot.module.statistics.api.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Getter
@AllArgsConstructor
public enum DPStatusEnum {
EQUIP_STATUS_USE("equipUse", "在用","在用", "", "success"),
EQUIP_STATUS_STOP("equipStop", "停用","停用", "", "error"),
EQUIP_STATUS_LOGOUT("equipLogout", "注销","注销", "", "error"),
EQUIP_STATUS_SCRAP("equipScrap", "报废","报废", "", "error"),
EQUIP_EMPHASIS_MONITOR("equipEmphasis", "重点监控设备","重点监控设备", "", "success"),
USE_YEAR_GT_15("gt15", ">15年","使用年限大于15年", "", "error"),
// 单位类型
COMPANY_SY("sy", "使用单位","使用单位", "", "success"),
COMPANY_CZ("cz", "充装单位","充装单位", "", "success"),
COMPANY_JYJC("jyjc", "检验检测机构","检验检测机构", "", "success"),
COMPANY_ZZ("zz", "制造单位","制造单位", "", "success"),
COMPANY_SJ("sj", "设计单位","设计单位", "", "success"),
COMPANY_AZGZWX("azgzwx", "安装改造维修单位","安装改造维修单位", "", "success"),
MANAGE_STATUS_USE("manageUse", "在业","在业", "", "success"),
MANAGE_STATUS_OPEN("manageOpen", "在业","开业", "", "success"),
MANAGE_STATUS_STOP("manageStop", "停业","停业", "", "error"),
COMPANY_EMPHASIS_MONITOR("emphasisMonitorCompany", "重点监控企业","重点监控企业", "", "success"),
COMPANY_HIGH_RISK("highRisk", "高风险企业","高风险企业", "", "stop");
private String key;
private String label;
private String status;
private String icon;
private String value;
public static DPStatusEnum getEnumByStatus(String status) {
for (DPStatusEnum c : DPStatusEnum.values()) {
if (c.getStatus().equals(status)){
return c;
}
}
return null;
}
public static Map toMap(DPStatusEnum dpStatusEnum) {
Map map = new HashMap<>();
map.put("key", dpStatusEnum.getKey());
map.put("label", dpStatusEnum.getLabel());
map.put("status", dpStatusEnum.getStatus());
map.put("icon", dpStatusEnum.getIcon());
map.put("value", dpStatusEnum.getValue());
return map;
}
}
......@@ -46,10 +46,10 @@ public interface AQZSDPStatisticsMapper {
/**
* 单位按照资质状态分组下的统计数量
*
* @param regionCode 区域
* @param orgCode 区域
* @return List<KeyValueDto>
*/
List<KeyValueDto> queryLicenseEfficiencyOfRegion(@Param(value = "regionCode") String regionCode);
List<KeyValueDto> queryLicenseEfficiencyOfRegion(@Param(value = "orgCode") String orgCode);
/**
* 查询单个单位的有效期信息
*
......@@ -58,8 +58,9 @@ public interface AQZSDPStatisticsMapper {
*/
KeyValueDto queryLicenseEfficiencyOneCompany(@Param(value = "appId") String appId);
Map<String, Object> getInspectionExpiredRate(@Param(value = "regionCode") String regionCode, @Param(value = "appId") String appId);
Map<String, Object> getInspectionExpiredRate(@Param(value = "orgCode") String orgCode, @Param(value = "appId") String appId);
Map<String, Object> getInspectionResultRate(@Param(value = "regionCode") String regionCode, @Param(value = "appId") String appId);
Map<String, Object> getInspectionResultRate(@Param(value = "orgCode") String orgCode, @Param(value = "appId") String appId);
List<Map<String, Object>> selectByOrg(String orgCode);
}
......@@ -13,4 +13,18 @@ import org.apache.ibatis.annotations.Param;
public interface CylinderStatisticsMapper {
Long countEnterpriseNumForCylinder(@Param("orgCode") String orgCode);
/**
* 按照管辖维度,统计充装单位使用登记证的办理率
* @param orgCode 区域对应的单位orgCode
* @return 办理率*100
*/
String queryUserRegisterCertAppPercent(@Param("orgCode") String orgCode);
/**
* 统计气瓶的办证数量
* @param orgCode 区域对应的公司的orgCode
* @return 办证数量
*/
Long countForCylinderCertNum(String orgCode);
}
package com.yeejoin.amos.boot.module.statistics.api.mapper;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* Mapper 接口
*
* @author system_generator
* @date 2023-12-13
*/
@Mapper
public interface DPSubBizMapper {
List<Map<String, String>> equOnJgServiceOperationRecords(String record);
List<Map<String, String>> queryForSafetyProblemTracingList(String sourceId);
}
......@@ -246,8 +246,8 @@
<where>
cu.data_sources = '陕西省内企业'
AND cu.unit_type LIKE '%充装单位%'
<if test="regionCode != null and regionCode != ''">
and cu.org_code like concat(#{regionCode}, '%')
<if test="orgCode != null and orgCode != ''">
and cu.supervise_org_code like concat(#{orgCode}, '%')
</if>
<if test="appId != null and appId != ''">
and cu.app_id = #{appId}
......@@ -264,8 +264,8 @@
<where>
cu.data_sources = '陕西省内企业'
AND cu.unit_type LIKE '%充装单位%'
<if test="regionCode != null and regionCode != ''">
and cu.org_code like concat( #{regionCode}, '%')
<if test="orgCode != null and orgCode != ''">
and cu.supervise_org_code like concat( #{orgCode}, '%')
</if>
<if test="appId != null and appId != ''">
and cu.app_id = #{appId}
......@@ -303,9 +303,21 @@
where
cu.data_sources = '陕西省内企业'
AND cu.unit_type LIKE '%充装单位%'
and cu.org_code like concat('%', #{regionCode}, '%')
and cu.supervise_org_code like concat(#{orgCode}, '%')
GROUP BY strKey
</select>
<select id="selectByOrg" resultType="java.util.Map">
SELECT COUNT
( 1 ),
source_type AS sourceType
FROM
tzs_safety_problem_tracing
WHERE
governing_body_org_code LIKE concat ( #{orgCode}, '%' )
GROUP BY
source_type
</select>
</mapper>
......@@ -10,4 +10,37 @@
unit_type LIKE'%充装单位%'
and supervise_org_code like concat(#{orgCode},'%')
</select>
<select id="queryUserRegisterCertAppPercent" resultType="java.lang.String">
select
case when s2.total= 0 then 0 else round(s1.num/s2.total * 100, 2) end as percent
from
(SELECT
count(DISTINCT(a.use_unit_credit_code)) as num
FROM
"tzs_jg_use_registration_manage" a,
privilege_company c
where
a.receive_company_code = c.company_code
and a.certificate_status='已登记'
and c.org_code like concat(#{orgCode},'%')) s1,
(SELECT
count(1) as total
FROM "tz_base_enterprise_info"
where
unit_type LIKE'%充装单位%'
and supervise_org_code like concat(#{orgCode},'%')
) s2
</select>
<select id="countForCylinderCertNum" resultType="java.lang.Long">
SELECT
count(DISTINCT(a.use_unit_credit_code)) as num
FROM
"tzs_jg_use_registration_manage" a,
privilege_company c
where
a.receive_company_code = c.company_code
and a.certificate_status='已登记'
and a.equ_list_code='2000'
and c.org_code like concat(#{orgCode},'%')
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8"?>
<!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.statistics.api.mapper.DPSubBizMapper">
<select id="equOnJgServiceOperationRecords" resultType="java.util.Map">
select
sequence_nbr as sequenceNbr,
business_type as businessType,
apply_no as applyNo,
rec_User_Id as recUserId,
rec_user_name as recUserName,
DATE_FORMAT(rec_date,'%Y-%m-%d %H:%i:%s') as recDate,
approval_unit as approvalUnit,
status,
route_path as routePath
from tzs_jg_resume_info
where equ_id = #{record}
order by rec_date ASC
</select>
<select id="queryForSafetyProblemTracingList" resultType="java.util.Map">
select
spt.*,
(select extend::json->>'pic' from cb_data_dictionary where type = 'ISSUE_TYPE' and code = spt.problem_type_code) problemTypePic
from tzs_safety_problem_tracing spt
<where>
spt.is_delete = false
<if test="sourceId != null and sourceId != ''">
and spt.source_id = #{sourceId}
</if>
</where>
order by spt.create_date desc
</select>
</mapper>
package com.yeejoin.amos.boot.module.statistcs.biz.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.module.statistcs.biz.service.impl.DPSubServiceImpl;
import io.swagger.annotations.Api;
......@@ -38,17 +39,28 @@ public class DPSubController {
public ResponseModel<JSONObject> commonQuery(@PathVariable String template, @RequestBody Map<String, Object> param) {
if (template.equals("company")) {
Assert.notNull(param.get("useUnitCode"), "企业统一信用代码不能为空");
} else if (template.equals("equip")) {
} else if (template.equals("emergency")){
Assert.notNull(param.get("id"), "id不能为空");
}else if(template.equals("equip")) {
param.put("record", param.get("SEQUENCE_NBR"));
param.put("equList", param.get("EQU_LIST_CODE"));
Assert.notNull(param.get("record"), "设备ID不能为空");
Assert.notNull(param.get("equList"), "设备种类不能为空");
template = template + "_" + param.get("equList");
} else {
} else if (template.equals("issue")){
Assert.notNull(param.get("sequenceNbr"), "sequenceNbr不能为空");
}else {
throw new RuntimeException("暂无模板");
}
return ResponseHelper.buildResponse(subService.commonQuery(template, param));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "tab返回单个详情数据", notes = "tab返回单个详情数据")
@PostMapping(value = "/tab/aloneApi")
public ResponseModel<Object> aloneApi(@RequestBody Map map) {
return ResponseHelper.buildResponse(subService.aloneApi(JSONObject.parseObject(JSON.toJSONString(map))));
}
}
......@@ -228,7 +228,7 @@ public class JGDPStatisticsController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "大屏监管-中屏-各地市数据统计", notes = "大屏监管-中屏-各地市数据统计")
@PostMapping(value = "/centre/dataStatistic")
@PostMapping(value = "/centre/dataStatisticOld")
public ResponseModel<List<Map<String, Object>>> dataStatisticByReginCode(@Validated @RequestBody DPFilterParamDto dpFilterParamDto, BindingResult result) {
List<FieldError> fieldErrors = result.getFieldErrors();
if (!fieldErrors.isEmpty()) {
......@@ -239,7 +239,7 @@ public class JGDPStatisticsController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "大屏监管-中屏-当前区域数据统计", notes = "大屏监管-中屏-当前区域数据统计")
@PostMapping(value = "/centre/dataStatisticCount")
@PostMapping(value = "/centre/dataStatisticCountOld")
public ResponseModel<Map<String, Object>> dataStatisticCountByReginCode(@Validated @RequestBody DPFilterParamDto dpFilterParamDto, BindingResult result) {
List<FieldError> fieldErrors = result.getFieldErrors();
if (!fieldErrors.isEmpty()) {
......@@ -247,4 +247,25 @@ public class JGDPStatisticsController {
}
return ResponseHelper.buildResponse(statisticsService.dataStatisticCountByReginCode(dpFilterParamDto));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "监管大屏-中间地图左右两侧8大类、单位、人员数量全局统计", notes = "大屏总览中间-地图左右两侧8大类、单位、人员数量全局统计")
@PostMapping(value = "/centre/dataStatistic")
public ResponseModel<Map<String, Object>> JGCenterMapCountForGlobal(@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.JGCenterMapCountForGlobal(dpFilterParamDto));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "监管大屏-中间地图地市统计", notes = "大屏总览中间-地图地市统计")
@PostMapping(value = "/centre/dataStatisticCount")
public ResponseModel<List<Map<String, Object>>> JGCenterMapCountForOverview(@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.JGCenterMapCountForOverview(dpFilterParamDto));
}
}
package com.yeejoin.amos.boot.module.statistcs.biz.init;
import com.yeejoin.amos.boot.module.statistcs.biz.service.impl.AQZSDPStatisticsServiceImpl;
import com.yeejoin.amos.boot.module.statistcs.biz.service.impl.JGDPStatisticsServiceImpl;
import com.yeejoin.amos.boot.module.statistcs.biz.service.impl.StCommonServiceImpl;
import com.yeejoin.amos.component.robot.AmosRequestContext;
......@@ -16,14 +17,17 @@ public class DataInitAfterRuning implements ApplicationRunner {
private JGDPStatisticsServiceImpl jgdpStatisticsService;
private AQZSDPStatisticsServiceImpl aqzsdpStatisticsService;
private StCommonServiceImpl stCommonService;
private AmosRequestContext amosRequestContext;
public DataInitAfterRuning(JGDPStatisticsServiceImpl jgdpStatisticsService, StCommonServiceImpl stCommonService, AmosRequestContext amosRequestContext) {
public DataInitAfterRuning(JGDPStatisticsServiceImpl jgdpStatisticsService, StCommonServiceImpl stCommonService, AmosRequestContext amosRequestContext, AQZSDPStatisticsServiceImpl aqzsdpStatisticsService) {
this.jgdpStatisticsService = jgdpStatisticsService;
this.stCommonService = stCommonService;
this.amosRequestContext = amosRequestContext;
this.aqzsdpStatisticsService = aqzsdpStatisticsService;
}
@Override
......@@ -34,5 +38,6 @@ public class DataInitAfterRuning implements ApplicationRunner {
RequestContext.setToken(amosRequestContext.getToken());
jgdpStatisticsService.init();
stCommonService.init();
aqzsdpStatisticsService.init();
}
}
package com.yeejoin.amos.boot.module.statistcs.biz.service.impl;
import com.yeejoin.amos.boot.module.statistics.api.mapper.DPSubBizMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 大屏二级页面实现类
*
* @author Administrator
*/
@Slf4j
@Service
public class DPSubBizServiceImpl {
private DPSubBizMapper dpSubBizMapper;
public DPSubBizServiceImpl(DPSubBizMapper dpSubBizMapper) {
this.dpSubBizMapper = dpSubBizMapper;
}
/**
* 查询设备在jg业务中的记录
*
* @param record
* @return
*/
public List<Map<String, String>> equOnJgServiceOperationRecords(String record) {
return dpSubBizMapper.equOnJgServiceOperationRecords(record).stream()
.map(x -> {
Map<String, String> map = new HashMap<>();
map.put("operatingTime", x.get("recDate"));
String content = String.format("%s 创建人:%s 单号【%s】 审批单位:%s",
x.get("businessType"), x.get("recUserName"), x.get("applyNo"), x.get("approvalUnit"));
map.put("operater", content);
map.put("routePath", x.get("routePath"));
return map;
})
.collect(Collectors.toList());
}
/**
* 问题记录列表
* @param equipId
* @return
*/
public List<Map<String, String>> queryProblemListByEquipId(String equipId) {
return dpSubBizMapper.queryForSafetyProblemTracingList(equipId).stream()
.map(x -> {
Map<String, String> map = new HashMap<>();
map.put("key", x.get("sequence_nbr"));
map.put("type", x.get("problem_type"));
map.put("descr", x.get("problem_desc"));
map.put("createDate", x.get("problem_time"));
return map;
})
.collect(Collectors.toList());
}
}
......@@ -10,6 +10,7 @@ import org.springframework.stereotype.Service;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
/**
* @author Administrator
......@@ -78,4 +79,9 @@ public class StCommonServiceImpl {
}
return regionList;
}
public List<String> buildXData(List<RegionModel> regionList) {
return regionList.stream().map(RegionModel::getRegionName).collect(Collectors.toList());
}
}
......@@ -2,8 +2,22 @@
"name": "企业模板",
"tabs": [
{
"key": "basic",
"key": "keyinfo",
"displayName": "基本信息",
"renderType": "keyinfo",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/tcm/baseEnterprise/getInfoByUseCode/map",
"params": {
"useCode": "{useUnitCode}"
}
}
}
},
{
"key": "basic",
"displayName": "详细信息",
"renderType": "basic",
"formSeq": "1793454184889085953",
"dataConfig": {
......@@ -31,7 +45,7 @@
"key": "devtable",
"displayName": "设备列表",
"renderType": "table",
"formSeq": "",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -59,6 +73,24 @@
}
],
"content": {
"keyinfo": {
"status": [],
"qrcode": {
"title": "监管码",
"problem": []
},
"keyParams": [
{ "key": "unitType", "label": "单位类型" },
{ "key": "useUnit", "label": "单位名称" },
{ "key": "useUnitCode", "label": "证件号码" },
{ "key": "governingBody", "label": "管辖机构" },
{ "key": "address", "label": "地址" },
{ "key": "legalPerson", "label": "法人" },
{ "key": "useContact", "label": "单位联系人" },
{ "key": "contactPhone", "label": "联系电话" },
{ "key": "keyUnit", "label": "是否重点监控单位" }
]
},
"basic": {
"columns": 2,
"datas": [],
......
{
"tabs": [
{
"key": "keyinfo",
"displayName": "基本信息",
"renderType": "keyinfo",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/elevator/alert-called/detail/{id}"
}
}
}
],
"content": {
}
}
......@@ -2,8 +2,23 @@
"name": "设备-锅炉",
"tabs": [
{
"key": "keyinfo",
"displayName": "基本信息",
"renderType": "keyinfo",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/ymt/equipment-category/getFormRecordById/map",
"params": {
"alias": "{EQU_LIST_CODE}",
"id": "{SEQUENCE_NBR}"
}
}
}
},
{
"key": "basic",
"displayName": "设备信息",
"displayName": "详细信息",
"renderType": "basic",
"formSeq": "1793458381554479105",
"dataConfig": {
......@@ -70,7 +85,7 @@
"key": "reghistory",
"displayName": "监管履历信息",
"renderType": "timeline",
"formSeq": "",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -89,7 +104,7 @@
"key": "devtable",
"displayName": "问题列表",
"renderType": "table",
"formSeq": "",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -118,6 +133,33 @@
}
],
"content": {
"keyinfo": {
"status": [],
"qrcode": {
"title": "监管码",
"problem": []
},
"keyParams": [
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "EQU_TYPE", "label": "设备种类", "source": "param" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" },
{ "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" },
{ "key": "USE_INNER_CODE", "label": "单位内编号" },
{ "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" }
],
"infoRecords": {
"title": "监管记录",
"renderType": "timeline",
"showMore": true,
"moreKey": "reghistory",
"datas": []
}
},
"basic": {
"columns": 3,
"datas": [],
......
......@@ -2,8 +2,23 @@
"name": "设备-压力容器",
"tabs": [
{
"key": "keyinfo",
"displayName": "基本信息",
"renderType": "keyinfo",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/ymt/equipment-category/getFormRecordById/map",
"params": {
"alias": "{EQU_LIST_CODE}",
"id": "{SEQUENCE_NBR}"
}
}
}
},
{
"key": "basic",
"displayName": "设备信息",
"displayName": "详细信息",
"renderType": "basic",
"formSeq": "1793458381554479105",
"dataConfig": {
......@@ -74,7 +89,7 @@
"key": "reghistory",
"displayName": "监管履历信息",
"renderType": "timeline",
"formSeq": "",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -93,7 +108,7 @@
"key": "devtable",
"displayName": "问题列表",
"renderType": "table",
"formSeq": "",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -122,6 +137,56 @@
}
],
"content": {
"keyinfo": {
"status": [],
"qrcode": {
"title": "监管码",
"problem": []
},
"keyParams_default": [
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "EQU_TYPE", "label": "设备种类", "source": "param" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" },
{ "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" },
{ "key": "USE_INNER_CODE", "label": "单位内编号" },
{ "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" }
],
"keyParams_2300_true": [
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" }
],
"keyParams_2300_false": [
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "CAR_NUMBER", "label": "车牌号" },
{ "key": "IDENTIFICATION_CODE", "label": "车辆VIN码" },
{ "key": "EQU_TYPE", "label": "气瓶品种" },
{ "key": "PRODUCT_NAME", "label": "产品名称" },
{ "key": "GAS_NUM", "label": "气瓶数量" },
{ "key": "FILLING_MEDIUM", "label": "充装介质" },
{ "key": "NEXT_INSPECTION_DATE", "label": "下次检验日期" }
],
"infoRecords": {
"title": "监管记录",
"renderType": "timeline",
"showMore": true,
"moreKey": "reghistory",
"datas": []
}
},
"basic": {
"columns": 3,
"datas": [],
......
......@@ -2,8 +2,23 @@
"name": "设备-电梯",
"tabs": [
{
"key": "keyinfo",
"displayName": "基本信息",
"renderType": "keyinfo",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/ymt/equipment-category/getFormRecordById/map",
"params": {
"alias": "{EQU_LIST_CODE}",
"id": "{SEQUENCE_NBR}"
}
}
}
},
{
"key": "basic",
"displayName": "设备信息",
"displayName": "详细信息",
"renderType": "basic",
"formSeq": "1793458381554479105",
"dataConfig": {
......@@ -70,7 +85,7 @@
"key": "reghistory",
"displayName": "监管履历信息",
"renderType": "timeline",
"formSeq": "",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -89,7 +104,7 @@
"key": "devtable",
"displayName": "问题列表",
"renderType": "table",
"formSeq": "",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -118,6 +133,35 @@
}
],
"content": {
"keyinfo": {
"status": [],
"qrcode": {
"title": "监管码",
"problem": []
},
"keyParams": [
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "EQU_TYPE", "label": "设备种类", "source": "param" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" },
{ "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" },
{ "key": "USE_INNER_CODE", "label": "单位内编号" },
{ "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" },
{ "key": "ME_UNIT_NAME", "label": "维保单位名称" },
{ "key": "INFORM_END", "label": "维保备案有效期" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" }
],
"infoRecords": {
"title": "监管记录",
"renderType": "timeline",
"showMore": true,
"moreKey": "reghistory",
"datas": []
}
},
"basic": {
"columns": 3,
"datas": [],
......
......@@ -2,8 +2,23 @@
"name": "设备-起重机械",
"tabs": [
{
"key": "keyinfo",
"displayName": "基本信息",
"renderType": "keyinfo",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/ymt/equipment-category/getFormRecordById/map",
"params": {
"alias": "{EQU_LIST_CODE}",
"id": "{SEQUENCE_NBR}"
}
}
}
},
{
"key": "basic",
"displayName": "设备信息",
"displayName": "详细信息",
"renderType": "basic",
"formSeq": "1793458381554479105",
"dataConfig": {
......@@ -66,7 +81,7 @@
"key": "reghistory",
"displayName": "监管履历信息",
"renderType": "timeline",
"formSeq": "",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -85,7 +100,7 @@
"key": "devtable",
"displayName": "问题列表",
"renderType": "table",
"formSeq": "",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -114,6 +129,33 @@
}
],
"content": {
"keyinfo": {
"status": [],
"qrcode": {
"title": "监管码",
"problem": []
},
"keyParams": [
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "EQU_TYPE", "label": "设备种类", "source": "param" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" },
{ "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" },
{ "key": "USE_INNER_CODE", "label": "单位内编号" },
{ "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" }
],
"infoRecords": {
"title": "监管记录",
"renderType": "timeline",
"showMore": true,
"moreKey": "reghistory",
"datas": []
}
},
"basic": {
"columns": 3,
"datas": [],
......
......@@ -2,8 +2,23 @@
"name": "设备-场(厂)内机动车",
"tabs": [
{
"key": "keyinfo",
"displayName": "基本信息",
"renderType": "keyinfo",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/ymt/equipment-category/getFormRecordById/map",
"params": {
"alias": "{EQU_LIST_CODE}",
"id": "{SEQUENCE_NBR}"
}
}
}
},
{
"key": "basic",
"displayName": "设备信息",
"displayName": "详细信息",
"renderType": "basic",
"formSeq": "1793458381554479105",
"dataConfig": {
......@@ -62,7 +77,7 @@
"key": "reghistory",
"displayName": "监管履历信息",
"renderType": "timeline",
"formSeq": "",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -81,7 +96,7 @@
"key": "devtable",
"displayName": "问题列表",
"renderType": "table",
"formSeq": "",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -110,6 +125,33 @@
}
],
"content": {
"keyinfo": {
"status": [],
"qrcode": {
"title": "监管码",
"problem": []
},
"keyParams": [
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "EQU_TYPE", "label": "设备种类", "source": "param" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" },
{ "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" },
{ "key": "USE_INNER_CODE", "label": "单位内编号" },
{ "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" }
],
"infoRecords": {
"title": "监管记录",
"renderType": "timeline",
"showMore": true,
"moreKey": "reghistory",
"datas": []
}
},
"basic": {
"columns": 3,
"datas": [],
......
......@@ -2,8 +2,23 @@
"name": "设备-大型游乐设施",
"tabs": [
{
"key": "keyinfo",
"displayName": "基本信息",
"renderType": "keyinfo",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/ymt/equipment-category/getFormRecordById/map",
"params": {
"alias": "{EQU_LIST_CODE}",
"id": "{SEQUENCE_NBR}"
}
}
}
},
{
"key": "basic",
"displayName": "设备信息",
"displayName": "详细信息",
"renderType": "basic",
"formSeq": "1793458381554479105",
"dataConfig": {
......@@ -56,7 +71,7 @@
"key": "reghistory",
"displayName": "监管履历信息",
"renderType": "timeline",
"formSeq": "",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -75,7 +90,7 @@
"key": "devtable",
"displayName": "问题列表",
"renderType": "table",
"formSeq": "",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -104,6 +119,33 @@
}
],
"content": {
"keyinfo": {
"status": [],
"qrcode": {
"title": "监管码",
"problem": []
},
"keyParams": [
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "EQU_TYPE", "label": "设备种类", "source": "param" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" },
{ "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" },
{ "key": "USE_INNER_CODE", "label": "单位内编号" },
{ "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" }
],
"infoRecords": {
"title": "监管记录",
"renderType": "timeline",
"showMore": true,
"moreKey": "reghistory",
"datas": []
}
},
"basic": {
"columns": 3,
"datas": [],
......
......@@ -2,8 +2,23 @@
"name": "设备-压力管道",
"tabs": [
{
"key": "keyinfo",
"displayName": "基本信息",
"renderType": "keyinfo",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/ymt/equipment-category/getFormRecordById/map",
"params": {
"alias": "{EQU_LIST_CODE}",
"id": "{SEQUENCE_NBR}"
}
}
}
},
{
"key": "basic",
"displayName": "设备信息",
"displayName": "详细信息",
"renderType": "basic",
"formSeq": "1793458381554479105",
"dataConfig": {
......@@ -62,7 +77,7 @@
"key": "reghistory",
"displayName": "监管履历信息",
"renderType": "timeline",
"formSeq": "",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -81,7 +96,7 @@
"key": "devtable",
"displayName": "问题列表",
"renderType": "table",
"formSeq": "",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -110,6 +125,42 @@
}
],
"content": {
"keyinfo": {
"status": [],
"qrcode": {
"title": "监管码",
"problem": []
},
"keyParams_default": [
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "EQU_TYPE", "label": "设备种类", "source": "param" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" },
{ "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" },
{ "key": "USE_INNER_CODE", "label": "单位内编号" },
{ "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" }
],
"keyParams_8300": [
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" }
],
"infoRecords": {
"title": "监管记录",
"renderType": "timeline",
"showMore": true,
"moreKey": "reghistory",
"datas": []
}
},
"basic": {
"columns": 3,
"datas": [],
......
......@@ -2,8 +2,23 @@
"name": "设备-客运索道",
"tabs": [
{
"key": "keyinfo",
"displayName": "基本信息",
"renderType": "keyinfo",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/ymt/equipment-category/getFormRecordById/map",
"params": {
"alias": "{EQU_LIST_CODE}",
"id": "{SEQUENCE_NBR}"
}
}
}
},
{
"key": "basic",
"displayName": "设备信息",
"displayName": "详细信息",
"renderType": "basic",
"formSeq": "1793458381554479105",
"dataConfig": {
......@@ -62,7 +77,7 @@
"key": "reghistory",
"displayName": "监管履历信息",
"renderType": "timeline",
"formSeq": "",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -81,7 +96,7 @@
"key": "devtable",
"displayName": "问题列表",
"renderType": "table",
"formSeq": "",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
......@@ -110,6 +125,33 @@
}
],
"content": {
"keyinfo": {
"status": [],
"qrcode": {
"title": "监管码",
"problem": []
},
"keyParams": [
{ "key": "USE_ORG_CODE", "label": "使用登记证编号" },
{ "key": "ORG_BRANCH_NAME", "label": "登记机关" },
{ "key": "REC_DATE", "label": "登记日期" },
{ "key": "USE_UNIT_NAME", "label": "使用单位名称" },
{ "key": "ADDRESS", "label": "设备使用地点" },
{ "key": "EQU_TYPE", "label": "设备种类", "source": "param" },
{ "key": "EQU_LIST", "label": "设备类别", "source": "param" },
{ "key": "EQU_CATEGORY", "label": "设备品种", "source": "param" },
{ "key": "USE_INNER_CODE", "label": "单位内编号" },
{ "key": "PRODUCE_UNIT_CREDIT_CODE", "label": "设备代码" },
{ "key": "NEXT_INSPECT_DATE", "label": "下一次检验日期" }
],
"infoRecords": {
"title": "监管记录",
"renderType": "timeline",
"showMore": true,
"moreKey": "reghistory",
"datas": []
}
},
"basic": {
"columns": 3,
"datas": [],
......
{
"name": "问题模板",
"tabs": [
{
"key": "keyinfo",
"displayName": "基本信息",
"renderType": "keyinfo",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/safety-problem-tracing/{sequenceNbr}",
"params": {
"sequenceNbr": "{sequenceNbr}"
}
}
}
},
{
"key": "devtable",
"displayName": "关联设备",
"renderType": "table",
"formSeq": "",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/safety-problem-tracing/equip/list",
"params": {
"number": 1,
"size": 14,
"sequenceNbr": "{sequenceNbr}"
}
}
},
"visualParams": {
"rowKey": "record",
"columns": [
{"dataRenderingMode": "defaultText","dataIndex": "problemStatusName","width": 150,"align": "left","title": "状态","key": "AA6DE857-C788-494F-8F16-2ECFC7E34528"},
{"dataRenderingMode": "defaultText","dataIndex": "equList","width": 160,"align": "left","title": "设备种类","key": "611DAF3D-5B79-466C-BEF2-CC91580091FA"},
{"dataRenderingMode": "defaultText","dataIndex": "equCategory","width": 150,"align": "left","title": "设备类别","key": "D1CB84A4-E037-446A-9469-65B76E381585"},
{"dataRenderingMode": "defaultText","dataIndex": "supervisoryCode","width": 180,"align": "left","title": "监管码","key": "0BB7318F-5134-42B6-A835-FC86D68066C2"},
{"dataRenderingMode": "defaultText","dataIndex": "code96333","width": 180,"align": "left","title": "96333码","key": "6EB924FB-EFEA-4779-ADF8-78F310818D2D"},
{"dataRenderingMode": "defaultText","dataIndex": "useUnitName","width": 180,"align": "left","title": "主体单位","key": "87C53BEA-829C-4539-9FCA-E2AF6A53DA15"}
]
}
},
{
"key": "devtable1",
"displayName": "关联企业",
"renderType": "table",
"formSeq": "",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/jg/safety-problem-tracing/unit/list",
"params": {
"number": 1,
"size": 14,
"sequenceNbr": "{sequenceNbr}"
}
}
},
"visualParams": {
"rowKey": "record",
"columns": [
{"dataRenderingMode": "defaultText","dataIndex": "problemStatusName","width": 150,"align": "left","title": "状态","key": "AA6DE857-C788-494F-8F16-2ECFC7E34528"},
{"dataRenderingMode": "defaultText","dataIndex": "governingBody","width": 160,"align": "left","title": "企业名称","key": "611DAF3D-5B79-466C-BEF2-CC91580091FA"},
{"dataRenderingMode": "defaultText","dataIndex": "unitType","width": 150,"align": "left","title": "企业类型","key": "D1CB84A4-E037-446A-9469-65B76E381585"},
{"dataRenderingMode": "defaultText","dataIndex": "useUnitCode","width": 180,"align": "left","title": "企业统一信用代码","key": "0BB7318F-5134-42B6-A835-FC86D68066C2"},
{"dataRenderingMode": "defaultText","dataIndex": "useContact","width": 180,"align": "left","title": "企业联系人","key": "6EB924FB-EFEA-4779-ADF8-78F310818D2D"},
{"dataRenderingMode": "defaultText","dataIndex": "contactPhone","width": 180,"align": "left","title": "联系电话","key": "87C53BEA-829C-4539-9FCA-E2AF6A53DA15"}
]
}
}
],
"content": {
"keyinfo": {
"keyParams": [
{ "key": "sourceType", "label": "问题主体类型" },
{ "key": "problemType", "label": "问题类型" },
{ "key": "problemDesc", "label": "问题描述" },
{ "key": "problemTime", "label": "问题时间" },
{ "key": "problemLevel", "label": "问题等级", "value": "重大" },
{ "key": "principalUnit", "label": "主体单位" },
{ "key": "principalUnitType", "label": "单位类型" },
{ "key": "governingBody", "label": "管辖机构" },
{ "key": "governingBodyCode", "label": "所属区域" },
{ "key": "problemStatus", "label": "问题状态" },
{ "key": "equipSuperviseCode", "label": "监管吗" },
{ "key": "equipList", "label": "设备种类" }
]
},
"basic": {
"columns": 2,
"datas": [],
"qrcode": {},
"subs": []
}
}
}
\ No newline at end of file
......@@ -2,8 +2,9 @@ package com.yeejoin.amos.boot.module.ymt.api.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.ymt.api.entity.EquipTechParamPipeline;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface EquipTechParamPipelineMapper extends BaseMapper<EquipTechParamPipeline> {
/**
* 在用的最新需求整理的技术参数--需求未出
......
......@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.ymt.api.dto.EquipmentCategoryDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.UseUnitCreditCodeCategoryDto;
import com.yeejoin.amos.boot.module.ymt.api.vo.EquipExportVo;
import com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
......@@ -19,6 +20,7 @@ import java.util.Map;
* @author system_generator
* @date 2021-10-20
*/
@Mapper
public interface EquipmentCategoryMapper extends BaseMapper<EquipmentCategory> {
@Select("select * from tz_equipment_category where code in('1000','2000','3000','4000','5000','6000','8000','9000')")
......
......@@ -17,7 +17,7 @@ import java.util.Map;
public interface IdxBizJgRegisterInfoMapper extends BaseMapper<IdxBizJgRegisterInfo> {
@Select("select \"USE_ORG_CODE\" from idx_biz_jg_register_info where \"RECORD\" = #{equipCode}")
String getUseOrgCodeByEquip(@Param("equipCode") String equipCode);
String getUseOrgCodeByEquip(@Param("equipCode") String equipCode);
@Select("update idx_biz_jg_register_info set \"USE_ORG_CODE\" = #{useOrgCode} where \"RECORD\" = #{equipCode}")
Boolean updateUseOrgCodeByEquip(@Param("equipCode") String equipCode,@Param("useOrgCode") String useOrgCode);
......@@ -32,15 +32,20 @@ public interface IdxBizJgRegisterInfoMapper extends BaseMapper<IdxBizJgRegisterI
List<Map<String, Object>> esSynchronousProjectContraption();
@Select("SELECT\n" +
"\tjui.PROJECT_CONTRAPTION AS value \n" +
"\tjui.PROJECT_CONTRAPTION AS value,\n" +
"\ttjur.use_registration_code\n" +
"FROM\n" +
"\tidx_biz_jg_use_info jui\n" +
"\tLEFT JOIN idx_biz_jg_register_info jri ON jri.\"RECORD\" = jui.\"RECORD\"\n" +
"\tLEFT JOIN tzs_jg_use_registration_eq tjure ON tjure.\"equ_id\" = jui.\"RECORD\"\n" +
"\tLEFT JOIN tzs_jg_use_registration tjur ON tjure.\"equip_transfer_id\" = tjur.\"sequence_nbr\"\n" +
"WHERE\n" +
"\tjui.USE_UNIT_CREDIT_CODE = #{useUnitCreditCode} \n" +
"\tjui.USE_UNIT_CREDIT_CODE = #{useUnitCreditCode}\n" +
"\tAND jui.PROJECT_CONTRAPTION IS NOT NULL\n" +
"\tAND jri.\"USE_ORG_CODE\" IS NULL\n" +
"\tAND tjur.use_registration_code IS NULL\n" +
"\tAND tjur.status <> '已完成'\n" +
"GROUP BY\n" +
"\tjui.PROJECT_CONTRAPTION")
List<Map<String, Object>> getUnRegisterProjectContraptionList(String useUnitCreditCode);
List<Map<String, Object>> getProjectContraptionList(String useUnitCreditCode);
}
......@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.biz.common.dto.CountDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.EquEnterDto;
import com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzBaseEnterpriseInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......@@ -17,6 +18,7 @@ import java.util.List;
* @author duanwei
* @date 2022-08-10
*/
@Mapper
public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseInfo> {
/**
......
......@@ -4,8 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.ymt.api.dto.TzsUserInfoDto;
import com.yeejoin.amos.boot.module.ymt.api.entity.TzsUserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface TzsUserInfoMapper extends BaseMapper<TzsUserInfo> {
Page<TzsUserInfoDto> selectPageMessage(@Param("page") Page<TzsUserInfoDto> page, @Param("dto") TzsUserInfoDto dto);
......
......@@ -146,16 +146,17 @@
SELECT
count(1)
FROM
tz_base_enterprise_info u
tz_base_enterprise_info u
RIGHT JOIN tzs_user_info ui ON ui.unit_code = u.use_unit_code
WHERE
u.data_sources = '陕西省内企业'
AND u.unit_type LIKE'%充装单位%'
AND ui.post like '%6552%'
u.data_sources = '陕西省内企业'
AND u.unit_type LIKE'%充装单位%'
AND ui.post like '%6552%'
and ui.is_delete = false
<if test="orgCodes != null and orgCodes.size > 0">
AND
<foreach collection="orgCodes" open="(" item="orgCode" close=")" separator=" or ">
(u.org_code like concat(#{orgCode}, '%') )
(u.supervise_org_code like concat(#{orgCode}, '%') )
</foreach>
</if>
</select>
......
......@@ -517,9 +517,11 @@
jsi.ORG_BRANCH_NAME,
joi.SUPERVISORY_CODE,
jsi.RECORD as id,
jsi.SEQUENCE_NBR as sequenceNbr
jsi.SEQUENCE_NBR as sequenceNbr,
jfi.PRODUCE_DATE as produceDate
from idx_biz_jg_supervision_info jsi
LEFT JOIN idx_biz_jg_other_info joi on jsi."RECORD" = joi."RECORD"
LEFT JOIN idx_biz_jg_factory_info jfi on jsi."RECORD" = jfi."RECORD"
WHERE jsi.RECORD = #{record}
......
......@@ -26,6 +26,7 @@ import com.yeejoin.amos.boot.module.ymt.api.service.IGenerateCodeService;
import com.yeejoin.amos.boot.module.ymt.api.vo.EquipExportVo;
import com.yeejoin.amos.boot.module.ymt.biz.dao.ESElavtorRepository;
import com.yeejoin.amos.boot.module.ymt.biz.utils.JsonUtils;
import com.yeejoin.amos.boot.module.ymt.biz.utils.StringUtils;
import com.yeejoin.amos.boot.module.ymt.flc.api.feign.IdxFeignService;
import com.yeejoin.amos.boot.module.ymt.flc.api.feign.PrivilegeFeginService;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
......@@ -72,6 +73,8 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.io.IOException;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
......@@ -930,6 +933,15 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
result.put(equipmentMessage.getDesInfo(), desInfo);
// 监督管理信息
Map<String, Object> supInfo = getSupInfo(map);
if(!ValidationUtil.isEmpty(supInfo.get("produceDate"))){
LocalDate produceDate = LocalDate.parse(supInfo.get("produceDate").toString().substring(0, 10), DateTimeFormatter.ofPattern("yyyy-MM-dd"));
LocalDate localDate = LocalDate.now().minusYears(15);
if(produceDate.isBefore(localDate)){
supInfo.put("OVER_FIFTEEN_YEARS","0");
}else{
supInfo.put("OVER_FIFTEEN_YEARS","1");
}
}
if ("1".equals(useInfo.get("IS_NOT_XIXIAN"))) {
supInfo.put("CITY", "咸阳");
} else {
......
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