Commit 3cc360d2 authored by suhuiguang's avatar suhuiguang

Merge branch 'develop_tzs_register' into develop_tzs_register_edit

# Conflicts: # amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-api/src/main/java/com/yeejoin/amos/boot/module/jg/api/mapper/CommonMapper.java # amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/JgUseRegistrationServiceImpl.java
parents a1161683 cddf265b
......@@ -31,5 +31,13 @@ public class CommonVideoDto {
@JsonIgnore
private String parent;
/**
* 请判断播放端是否要求播放视频为H265编码格式,1表示需要,0表示不要求
*/
private Integer supportH265;
/**
* 视频清晰度,1-高清(主码流)、2-流畅(子码流)
*/
private Integer quality;
}
......@@ -271,26 +271,26 @@ public class XiAnDataDockServiceImpl {
// 基本信息
checkNotBlank(data.getEquList(), "设备种类不能为空;", rowError);
checkNotBlank(data.getEquCategory(), "设备类别不能为空;", rowError);
checkNotBlank(data.getUseInnerCode(), "单位内编号不能为空;", rowError);
if (useInnerCodeList.contains(data.getUseInnerCode())) {
rowError.append("单位内编号不能重复;");
}
checkNotBlank(data.getProductName(), "产品名称不能为空;", rowError);
checkNotBlank(data.getEquType(), "设备型号不能为空;", rowError);
//checkNotBlank(data.getUseInnerCode(), "单位内编号不能为空;", rowError);
//if (useInnerCodeList.contains(data.getUseInnerCode())) {
// rowError.append("单位内编号不能重复;");
//}
//checkNotBlank(data.getProductName(), "产品名称不能为空;", rowError);
//checkNotBlank(data.getEquType(), "设备型号不能为空;", rowError);
checkNotBlank(data.getEquCodeType(), "有无设备代码不能为空;", rowError);
if ("1".equals(data.getEquCodeType())) {
checkNotBlank(data.getEquCode(), "设备代码不能为空;", rowError);
String equCode = data.getEquCode();
if (equCode.matches("[a-zA-Z0-9]+")) {
if (equCode.length() <= 17) {
rowError.append("设备代码不能小于17位;");
}
if (equCode.length() >= 20) {
rowError.append("设备代码不能大于20位;");
}
} else {
rowError.append("设备代码不能包含特殊字符;");
}
//if (equCode.matches("[a-zA-Z0-9]+")) {
//if (equCode.length() <= 17) {
// rowError.append("设备代码不能小于17位;");
//}
//if (equCode.length() >= 20) {
// rowError.append("设备代码不能大于20位;");
//}
//} else {
// rowError.append("设备代码不能包含特殊字符;");
//}
if (equCodeList.contains(data.getEquCode())) {
rowError.append("设备代码不能重复;");
}
......@@ -299,7 +299,7 @@ public class XiAnDataDockServiceImpl {
data.setEquCode("");
}
if (isPressurePiping) {// 校验压力管道特有的参数
checkNotBlank(data.getProjectContraption(), "工程(装置)名称不能为空;", rowError);
//checkNotBlank(data.getProjectContraption(), "工程(装置)名称不能为空;", rowError);
} else {
data.setProjectContraption("");
}
......@@ -361,22 +361,22 @@ public class XiAnDataDockServiceImpl {
Optional.ofNullable(data.getUseUnitCode()).ifPresent(v -> checkCreditCode(v, "使用单位统一社会信用代码格式不正确;", rowError));
checkNotBlank(data.getUseUnit(), "使用单位名称不能为空;", rowError);
// 设计信息
checkNotBlank(data.getDesignUnitCreditCode(), "设计单位统一社会信用代码不能为空;", rowError);
//checkNotBlank(data.getDesignUnitCreditCode(), "设计单位统一社会信用代码不能为空;", rowError);
Optional.ofNullable(data.getDesignUnitCreditCode()).ifPresent(v -> checkCreditCode(v, "设计单位统一社会信用代码格式不正确;", rowError));
checkNotBlank(data.getDesignUnitName(), "设计单位名称不能为空;", rowError);
checkNotBlank(data.getDesignUseDate(), "设计使用年限不能为空;", rowError);
//checkNotBlank(data.getDesignUnitName(), "设计单位名称不能为空;", rowError);
//checkNotBlank(data.getDesignUseDate(), "设计使用年限不能为空;", rowError);
Optional.ofNullable(data.getDesignUseDate()).ifPresent(v -> checkDateFormatNumber(v, "设计使用年限不能为数字以外的其他类型;", rowError));
checkNotBlank(data.getDesignUseDate(), "设计日期不能为空;", rowError);
Optional.ofNullable(data.getDesignDate()).ifPresent(v -> checkDateFormatCorrect(v, "设计日期格式不正确;", rowError));
//checkNotBlank(data.getDesignUseDate(), "设计日期不能为空;", rowError);
//Optional.ofNullable(data.getDesignDate()).ifPresent(v -> checkDateFormatCorrect(v, "设计日期格式不正确;", rowError));
Optional.ofNullable(data.getAppraisalDate()).ifPresent(v -> checkDateFormatCorrect(v, "设计文件鉴定日期格式不正确;", rowError));
// 制造信息
checkNotBlank(data.getProduceUnitCreditCode(), "制造单位统一社会信用代码不能为空;", rowError);
//checkNotBlank(data.getProduceUnitCreditCode(), "制造单位统一社会信用代码不能为空;", rowError);
Optional.ofNullable(data.getProduceUnitCreditCode()).ifPresent(v -> checkCreditCode(v, "制造单位统一社会信用代码格式不正确;", rowError));
checkNotBlank(data.getProduceUnitName(), "制造单位名称不能为空;", rowError);
checkNotBlank(data.getProduceLicenseNum(), "制造许可编号不能为空;", rowError);
checkNotBlank(data.getFactoryNum(), "出厂编号/产品编码不能为空;", rowError);
checkNotBlank(data.getProduceDate(), "制造日期不能为空;", rowError);
Optional.ofNullable(data.getProduceDate()).ifPresent(v -> checkDateFormatCorrect(v, "制造日期格式不正确;", rowError));
//checkNotBlank(data.getProduceUnitName(), "制造单位名称不能为空;", rowError);
//checkNotBlank(data.getProduceLicenseNum(), "制造许可编号不能为空;", rowError);
//checkNotBlank(data.getFactoryNum(), "出厂编号/产品编码不能为空;", rowError);
//checkNotBlank(data.getProduceDate(), "制造日期不能为空;", rowError);
//Optional.ofNullable(data.getProduceDate()).ifPresent(v -> checkDateFormatCorrect(v, "制造日期格式不正确;", rowError));
}
/**
......@@ -478,9 +478,9 @@ public class XiAnDataDockServiceImpl {
* @param rowError
*/
private void YLRQTechnicalParamsCheck(XiAnEquipInfoExcelDto data, StringBuilder rowError) {
checkNotBlank(data.getSingleBottleVolume(), "单瓶容积不能为空;", rowError);
checkNotBlank(data.getChargingMedium(), "充装介质不能为空;", rowError);
checkNotBlank(data.getNominalWorkingPressure(), "公称工作压力不能为空;", rowError);
//checkNotBlank(data.getSingleBottleVolume(), "单瓶容积不能为空;", rowError);
//checkNotBlank(data.getChargingMedium(), "充装介质不能为空;", rowError);
//checkNotBlank(data.getNominalWorkingPressure(), "公称工作压力不能为空;", rowError);
}
/**
......@@ -490,14 +490,14 @@ public class XiAnDataDockServiceImpl {
* @param rowError
*/
private void YLGDTechnicalParamsCheck(XiAnEquipInfoExcelDto data, StringBuilder rowError) {
checkNotBlank(data.getWallThickness_YLGD(), "公称壁厚不能为空;", rowError);
//checkNotBlank(data.getWallThickness_YLGD(), "公称壁厚不能为空;", rowError);
checkNotBlank(data.getNominalDiameter(), "公称直径不能为空;", rowError);
checkNotBlank(data.getPipeLength(), "管道长度不能为空;", rowError);
checkNotBlank(data.getPressure(), "压力不能为空;", rowError);
checkNotBlank(data.getMedium_YLGD(), "介质不能为空;", rowError);
checkNotBlank(data.getTemperature_YLGD(), "温度不能为空;", rowError);
checkNotBlank(data.getPipelineNumber(), "管道编号不能为空;", rowError);
checkNotBlank(data.getDeviceLevel_YLGD(), "管道级别不能为空;", rowError);
//checkNotBlank(data.getTemperature_YLGD(), "温度不能为空;", rowError);
//checkNotBlank(data.getPipelineNumber(), "管道编号不能为空;", rowError);
//checkNotBlank(data.getDeviceLevel_YLGD(), "管道级别不能为空;", rowError);
Optional.ofNullable(data.getStartePosition()).ifPresent(v -> {
if (v.split("-").length <= 1) {
rowError.append("起/始位置 (经纬度)格式不正确");
......
......@@ -11,9 +11,12 @@ import java.util.Date;
@ApiModel(value="maintenanceRecordInfo", description="")
public class MaintenanceInfoModelForWX {
@ApiModelProperty(value = "最近维保日期")
@ApiModelProperty(value = "维保合同开始日期")
private Date informStart;
@ApiModelProperty(value = "维保合同结束日期")
private Date informEnd;
@ApiModelProperty(value = "维保单位")
private String meUnitName;
......
......@@ -64,5 +64,6 @@ public class OtherInfo extends AbstractEquipBaseEntity {
@TableField(value ="\"SUPERVISORY_CODE\"")
private String supervisoryCode;
@TableField(value ="\"STATUS\"")
private String status;
}
......@@ -19,7 +19,6 @@ import com.yeejoin.amos.boot.module.app.api.dto.*;
import com.yeejoin.amos.boot.module.app.api.entity.*;
import com.yeejoin.amos.boot.module.app.api.enums.EquipmentCategoryEnum;
import com.yeejoin.amos.boot.module.app.api.enums.EquipmentClassifityEnum;
import com.yeejoin.amos.boot.module.app.api.mapper.AppCommonMapper;
import com.yeejoin.amos.boot.module.app.api.mapper.CategoryOtherInfoMapper;
import com.yeejoin.amos.boot.module.app.api.mapper.EquipmentCategoryMapper;
import com.yeejoin.amos.boot.module.app.biz.utils.HttpUtils;
......@@ -254,7 +253,7 @@ public class TzsAppService {
otherJsonObject.put("tabValue", otherList);
jsonArray.add(otherJsonObject);
map.put("tab", jsonArray);
map.put("color", this.getQrCodeColor(record));
return map;
}
......@@ -409,9 +408,19 @@ public class TzsAppService {
jsonArray.add(constructionJsonObject);
map.put("tab", jsonArray);
}
map.put("color", this.getQrCodeColor(record));
return map;
}
private String getQrCodeColor(String record) {
// 二维码颜色赋值逻辑
OtherInfo otherInfo = otherInfoService.getOne(new LambdaQueryWrapper<OtherInfo>().eq(OtherInfo::getRecord, record));
if (otherInfo != null) {
return "0".equals(otherInfo.getStatus()) ? "#ff0000" : "#00ff00";
}
return "#f2f2f2";
}
public void getGroupList(HashMap putMap, String record, Class entity, Class dto, BaseService service, List list, boolean isOne, List<DataDictionary> dictionaryList, List<EquipmentCategory> equipmentCategories) {
TableInfoHelper.initTableInfo(new MapperBuilderAssistant(new MybatisConfiguration(), ""), entity);
QueryWrapper wrapper = new QueryWrapper();
......
......@@ -26,10 +26,10 @@ public enum IssueTypeEnum {
LICENSE_OVERDUE_COMPANY("许可超期","9","2"),
//维保备案超期(公司)
MAINTENANCE_RECORD_OVERDUE_COMPANY("维保备案超期","10","2"),
//许可临期(个人)
LICENSE_EXPIRY_PERSON("许可临期","11","1"),
//许可超期(个人)
LICENSE_OVERDUE_PERSON("许可超期","12","1"),
//资质临期(个人)
LICENSE_EXPIRY_PERSON("资质临期","11","1"),
//资质超期(个人)
LICENSE_OVERDUE_PERSON("资质超期","12","1"),
//操作人员资质超期(气瓶)
OPERATOR_QUALIFICATION_OVERDUE_CYLINDER("操作人员资质超期","13","4"),
//充装异常(气瓶)
......
......@@ -8,18 +8,18 @@ import java.util.*;
@Getter
@AllArgsConstructor
public enum ZBGLEnum {
YJCZ("应急处置","yjcz",true,null,""),
DTGZYYZBFX("电梯故障原因占比分析","dtgzyyzbfx",false,"yjcz","dtgzyyzbfxServiceImpl"),
DTKRSJCSFX("电梯困人事件场所分布","dtkrsjcsfx",false,"yjcz","dtkrsjcsfxServiceImpl"),
KRJYYDQK("困人救援月度情况","krjyydqk",false,"yjcz","krjyydqkServiceImpl"),
JDGL("监督管理","jdgl",true,null,""),
YWBLPJSXTJ("业务办理平均时效统计","ywblpjsxtj",false,"jdgl",""),
AQZS("安全追溯","aqzs",true,null,""),
// YHSLQS("隐患数量趋势(近12个月)","yhslqs",false,"aqzs",""),
AYHLXYHSLPM("按隐患类型隐患数量排名(Top10)","ayhlxyhslpm",false,"aqzs","ayhlxyhslpmServiceImpl"),
DNZTDWYHPM("当年主体单位隐患排名(Top10)","dnztdwyhpm",false,"aqzs","dnztdwyhpmServiceImpl"),
QP("气瓶","qp",true,null,""),
QYAQZSTJ("区域安全指数统计","qyaqzstj",false,"qp",""),
YJCZ("应急处置","yjcz",true,null,"",false),
DTGZYYZBFX("电梯故障原因占比分析","dtgzyyzbfx",false,"yjcz","dtgzyyzbfxServiceImpl",false),
DTKRSJCSFX("电梯困人事件场所分布","dtkrsjcsfx",false,"yjcz","dtkrsjcsfxServiceImpl",false),
KRJYYDQK("困人救援月度情况","krjyydqk",false,"yjcz","krjyydqkServiceImpl",false),
JDGL("监督管理","jdgl",true,null,"",false),
YWBLPJSXTJ("业务办理平均时效统计","ywblpjsxtj",false,"jdgl","ywblpjsxtjServiceImpl",false),
AQZS("安全追溯","aqzs",true,null,"",false),
// YHSLQS("隐患数量趋势(近12个月)","yhslqs",false,"aqzs","",false),
AYHLXYHSLPM("按隐患类型隐患数量排名(Top10)","ayhlxyhslpm",false,"aqzs","ayhlxyhslpmServiceImpl",false),
DNZTDWYHPM("当年主体单位隐患排名(Top10)","dnztdwyhpm",false,"aqzs","dnztdwyhpmServiceImpl",true),
QP("气瓶","qp",true,null,"",false),
QYAQZSTJ("区域安全指数统计","qyaqzstj",false,"qp","qyaqzstjServiceImpl",false),
;
......@@ -28,6 +28,7 @@ public enum ZBGLEnum {
Boolean isMainBody;
String mainBody;
String className;
Boolean havePage;
public static List<Map<String,Object>> getEnumList() {
List<Map<String,Object>> result = new ArrayList<>();
......@@ -42,6 +43,7 @@ public enum ZBGLEnum {
HashMap<String,Object> childrenMap = new HashMap<>();
childrenMap.put("title",childrenEnum.name);
childrenMap.put("value",childrenEnum.code);
childrenMap.put("havePage",childrenEnum.havePage);
childrenList.add(childrenMap);
}
}
......
......@@ -64,6 +64,8 @@ public class BaseEnterpriseVideoServiceImpl extends BaseService<BaseEnterpriseVi
requestVideosInfo.put("deviceSerial", video.getDeviceSerial());
requestVideosInfo.put("channelNo", channelNo.getKey());
requestVideosInfo.put("protocol", video.getProtocol());
requestVideosInfo.put("quality", channelNo.getQuality());
requestVideosInfo.put("supportH265", channelNo.getSupportH265());
requestVideosInfo.put("expireTime", video.getExpireTime());
log.info("开始获取通道信息:{}", JSONObject.toJSONString(requestVideosInfo));
String videoData = HttpUtil.post(video.getUrl(), requestVideosInfo);
......@@ -80,6 +82,8 @@ public class BaseEnterpriseVideoServiceImpl extends BaseService<BaseEnterpriseVi
commonVideoDto.setType(CommonVideoEnum.getEnum(video.getProtocol()).getName());
commonVideoDto.setTitle(channelNo.getTitle());
commonVideoDto.setThumb(channelNo.getThumb());
commonVideoDto.setQuality(channelNo.getQuality());
commonVideoDto.setSupportH265(channelNo.getSupportH265());
result.add(commonVideoDto);
} else {
String errorMsg = "code:" + codeVideo + "msg:" + msgVideo + "appKey:" + video.getAppKey() + "appSecret:" + video.getAppSecret() + "accessToken:" + accessToken;
......
......@@ -62,7 +62,7 @@ public class DispatchTask extends BaseEntity {
* 响应单位id
*/
@TableField("response_org_id")
private Long responseOrgId;
private String responseOrgId;
/**
* 响应单位名称
......
......@@ -62,7 +62,7 @@ public class DispatchTask extends BaseEntity {
* 响应单位id
*/
@TableField("response_org_id")
private Long responseOrgId;
private String responseOrgId;
/**
* 响应单位名称
......
package com.yeejoin.amos.boot.module.jczs.api.entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PageParam {
int current = 0;
......
......@@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jczs.api.dto.EquEnterDto;
import com.yeejoin.amos.boot.module.jczs.api.dto.TzBaseEnterpriseInfoDto;
import com.yeejoin.amos.boot.module.jczs.api.entity.TzBaseEnterpriseInfo;
import com.yeejoin.amos.boot.module.jczs.api.vo.BaseEnterpriseVo;
import org.apache.ibatis.annotations.Param;
/**
* 企业数据信息 Mapper 接口
......@@ -45,4 +47,6 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI
IPage<TzBaseEnterpriseInfoDto> page(Page<TzBaseEnterpriseInfoDto> page, TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto);
IPage<TzBaseEnterpriseInfoDto> pageList(Page<TzBaseEnterpriseInfoDto> page, TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto, List orgCodeList);
List<BaseEnterpriseVo> queryBaseEnterpriseInIds(@Param("ids") List<String> ids);
}
......@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.module.jczs.api.dto.TzBaseEnterpriseInfoDto;
import com.yeejoin.amos.boot.module.jczs.api.entity.PageParam;
import com.yeejoin.amos.boot.module.jczs.api.entity.TzBaseEnterpriseInfo;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
......@@ -44,4 +45,6 @@ public interface ITzBaseEnterpriseInfoService extends IService<TzBaseEnterpriseI
TzBaseEnterpriseInfoDto getInfoByUseCode(String useCode);
String setLabel(List<Long> enterpriseIds, List<String> enterpriseLabels);
void export(HttpServletResponse response, String ids,TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto);
}
......@@ -146,6 +146,24 @@
order by rec_date desc
</select>
<select id="queryBaseEnterpriseInIds" resultType="com.yeejoin.amos.boot.module.jczs.api.vo.BaseEnterpriseVo">
SELECT
*,
CONCAT(province,'/',city,'/',district) AS region,
CONCAT(street,'/',address) AS full_address
FROM
tz_base_enterprise_info
<where>
<if test='ids != null'>
and sequence_nbr in
<foreach collection="ids" item="id" open="(" close=")" separator=",">
#{id}
</foreach>
</if>
</where>
order by rec_date desc
</select>
<select id="selectByUseUnit" resultType="com.yeejoin.amos.boot.module.jczs.api.entity.TzBaseEnterpriseInfo">
select * from tz_base_enterprise_info where use_unit = #{useUnit}
</select>
......
......@@ -27,6 +27,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
......@@ -249,4 +250,11 @@ public class TzBaseEnterpriseInfoController {
return ResponseHelper.buildResponse(iTzBaseEnterpriseInfoService.setLabel(enterpriseIds, enterpriseLabel));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/export")
@ApiOperation(httpMethod = "GET", value = "企业信息列表数据导出", notes = "企业信息列表数据导出")
public void baseEnterpriseExport(HttpServletResponse response, String ids, TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto) {
iTzBaseEnterpriseInfoService.export(response, ids, tzBaseEnterpriseInfoDto);
}
}
......@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.excel.ExcelUtil;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.module.jczs.api.dto.BaseUnitLicenceDto;
......@@ -20,6 +21,7 @@ import com.yeejoin.amos.boot.module.jczs.api.entity.SpeUseUnit;
import com.yeejoin.amos.boot.module.jczs.api.entity.TzBaseEnterpriseInfo;
import com.yeejoin.amos.boot.module.jczs.api.mapper.TzBaseEnterpriseInfoMapper;
import com.yeejoin.amos.boot.module.jczs.api.service.ITzBaseEnterpriseInfoService;
import com.yeejoin.amos.boot.module.jczs.api.vo.BaseEnterpriseVo;
import com.yeejoin.amos.boot.module.jczs.biz.utils.RedisUtil;
import com.yeejoin.amos.boot.module.jczs.flc.api.dto.RegUnitIcDto;
import com.yeejoin.amos.boot.module.jczs.flc.api.dto.RegUnitInfoDto;
......@@ -38,8 +40,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import javax.servlet.http.HttpServletResponse;
import java.text.ParseException;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
......@@ -575,4 +579,23 @@ public class TzBaseEnterpriseInfoServiceImpl
return map;
}
/**
* 企业信息列表数据导出
*
* @param response 响应
* @param ids 数据id
*/
@Override
public void export(HttpServletResponse response, String ids, TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto) {
List<BaseEnterpriseVo> exportData;
if (StringUtils.isEmpty(ids)) { // 前端不选行,导出列表所有的数据
IPage<TzBaseEnterpriseInfoDto> page = this.page(new PageParam(1,Integer.MAX_VALUE), tzBaseEnterpriseInfoDto);
exportData =JSON.parseArray(JSON.toJSONString(page.getRecords()), BaseEnterpriseVo.class) ;
} else { // 前端选行,导出所选行的数据
List<String> idsList = Arrays.asList(ids.split(","));
exportData = this.baseMapper.queryBaseEnterpriseInIds(idsList);
}
ExcelUtil.createTemplate(response, "企业信息列表数据", "企业信息列表", exportData, BaseEnterpriseVo.class, null, false);
}
}
......@@ -16,7 +16,7 @@ import java.util.Date;
* @date 2024-11-08
*/
@Data
@ApiModel(value="ShCarDto", description="三环系统-车辆信息表")
@ApiModel(value = "ShCarDto", description = "三环系统-车辆信息表")
@Builder
@AllArgsConstructor
@NoArgsConstructor
......@@ -145,4 +145,33 @@ public class ShCarDto {
@TableField("CLAIMED_FLAG")
private String claimedFlag;
@ApiModelProperty(value = "登记证管理表的seq")
@TableField(exist = false)
private String certificateSeq;
@ApiModelProperty(value = "单位类型,个人、企业")
@TableField(exist = false)
private String companyType;
@ApiModelProperty(value = "使用单位名称")
@TableField(exist = false)
private String useUnitName;
@ApiModelProperty(value = "使用单位统一社会信用代码")
@TableField(exist = false)
private String useUnitCreditCode;
@ApiModelProperty(value = "使用单位地址")
@TableField(exist = false)
private String useUnitAddress;
@ApiModelProperty(value = "安全管理员")
@TableField(exist = false)
private String safetyManagerId;
@ApiModelProperty(value = "安全管理员联系电话")
@TableField(exist = false)
private String phone;
}
......@@ -6,7 +6,6 @@ import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.util.Date;
/**
......@@ -258,17 +257,15 @@ public class JgTransferNotice extends BaseEntity {
private String isXixian;
/**
* * 设备使用地点-街道(镇)
* */
@TableField(value ="\"factory_use_site_street\"")
* 设备使用地点-街道(镇)
*/
@TableField(value = "factory_use_site_street")
private String factoryUseSiteStreet;
/**
* * 设备使用地点-街道(镇)-名称
* */
@TableField(value ="\"street_name\"")
* 设备使用地点-街道(镇)-名称
*/
@TableField(value = "street_name")
private String streetName;
@TableField("county_name")
......@@ -295,18 +292,16 @@ public class JgTransferNotice extends BaseEntity {
@TableField(value = "handle_date")
private Date handleDate;
@TableField(value = "\"create_user_company_name\"")
@TableField(value = "create_user_company_name")
private String createUserCompanyName;
//下一步任务ID
@TableField(value = "\"next_task_id\"")
@TableField(value = "next_task_id")
private String nextTaskId;
@TableField(exist = false)
private String supervisoryCode;
@TableField(value = "equ_category")
private String equCategory;
......@@ -318,7 +313,7 @@ public class JgTransferNotice extends BaseEntity {
/**
* 下一节点可执行人
*/
@TableField("\"next_execute_user_ids\"")
@TableField("next_execute_user_ids")
private String nextExecuteUserIds;
@TableField(exist = false)
......@@ -334,14 +329,12 @@ public class JgTransferNotice extends BaseEntity {
// @TableField(value = "inform_number")
// private String informNumber;
/**
* 其他附件
*/
@TableField(value = "other_accessories")
private String otherAccessories;
/**
* 接收机构公司的org_code
*/
......
......@@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity;
import com.yeejoin.amos.boot.biz.common.entity.BaseEntity;
import java.util.Date;
......
......@@ -185,6 +185,15 @@ public interface CommonMapper extends BaseMapper<EquipmentCategory> {
Page<Map<String,Object>> countBizFinishedNumForDPListBGDJ(@Param("page") Page<Map<String,Object>> page, @Param("orgCode") String orgCode, @Param("dto") DPFilterParamDto dpFilterParamForDetailDto);
Page<Map<String,Object>> countBizFinishedNumForDPListZXBX(@Param("page") Page<Map<String,Object>> page, @Param("orgCode") String orgCode, @Param("dto") DPFilterParamDto dpFilterParamForDetailDto);
void updateTechParamDynamic(@Param(value = "tableName") String tableName,@Param(value = "record") String record, @Param(value = "columns") List<DynamicColumnDto> columns);
/**
* 当前设备在流程中的申请单号
* @param record 设备id
* @return 申请单号
*/
List<String> findEquipInUseService(@Param("record") String record);
}
......@@ -2,6 +2,8 @@ package com.yeejoin.amos.boot.module.jg.api.mapper;
import com.yeejoin.amos.boot.module.jg.api.entity.JgResumeInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* Mapper 接口
......@@ -11,4 +13,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public interface JgResumeInfoMapper extends BaseMapper<JgResumeInfo> {
void deleteBatchByBusinessId(@Param("idList") List<String> idList);
}
......@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.api.dto.ShCarDto;
import com.yeejoin.amos.boot.module.jg.api.entity.ShCar;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
/**
* 三环系统-车辆信息表 Mapper 接口
......@@ -15,4 +17,6 @@ public interface ShCarMapper extends BaseMapper<ShCar> {
Page<ShCarDto> queryForshCarPage(Page<ShCarDto> page, ShCarDto dto);
Integer alreadyExist(@Param("value") String value);
}
......@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.api.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.api.dto.ShCarDto;
import com.yeejoin.amos.boot.module.jg.api.entity.ShCar;
import java.util.Map;
......@@ -16,4 +17,6 @@ public interface IShCarService {
Page<ShCarDto> queryForShCarPage(Page<ShCarDto> page, ShCarDto dto);
Boolean claim(Map<String, Object> paramMap);
ShCar searchForSanHan(Map<?, ?> map);
}
package com.yeejoin.amos.boot.module.jg.api.vo;
import com.yeejoin.amos.boot.module.jg.api.dto.ShCarDto;
import com.yeejoin.amos.boot.module.jg.api.entity.ShCar;
import lombok.AllArgsConstructor;
import lombok.Data;
......@@ -12,6 +13,6 @@ import java.util.List;
@Data
@AllArgsConstructor
public class CarAndEquVo {
private ShCar shCar;
private ShCarDto shCar;
private List<ShCarEquVo> shCarEquVoList;
}
......@@ -2,4 +2,10 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.jg.api.mapper.JgResumeInfoMapper">
<delete id="deleteBatchByBusinessId">
delete from tzs_jg_resume_info where "business_id" in
<foreach collection="idList" separator="," item="id" open="(" close=");">
#{id}
</foreach>
</delete>
</mapper>
......@@ -74,8 +74,12 @@
ui."USE_UNIT_CREDIT_CODE" useUnitCreditCode,
ui."USE_UNIT_NAME" useUnitName,
(select name from tz_equipment_category where code = ri."EQU_LIST") equList,
( SELECT NAME FROM tz_equipment_category WHERE code = ri."EQU_LIST" ) EQU_LIST,
ri.equ_list AS equListCode,
(select name from tz_equipment_category where code = ri."EQU_CATEGORY") equCategory,
( SELECT NAME FROM tz_equipment_category WHERE code = ri."EQU_CATEGORY" ) EQU_CATEGORY,
( SELECT NAME FROM tz_equipment_category WHERE code = ri."EQU_DEFINE" ) EQU_DEFINE,
ri.PRODUCT_NAME,
oi."CODE96333" code96333,
oi."SUPERVISORY_CODE" supervisoryCode,
oi."STATUS" problemStatus,
......
......@@ -25,4 +25,18 @@
ORDER BY
tsc.USE_REGISTRATION_CODE DESC
</select>
<select id="alreadyExist" resultType="java.lang.Integer">
SELECT SUM(num) AS total_count
FROM (SELECT COUNT(*) AS num
FROM "amos_tzs_biz"."idx_biz_jg_register_info" jri
LEFT JOIN "amos_tzs_biz"."idx_biz_jg_other_info" joi ON joi."RECORD" = jri."RECORD"
WHERE (jri."USE_ORG_CODE" = #{value} OR jri."CAR_NUMBER" = #{value})
AND joi.CLAIM_STATUS = '已认领'
UNION ALL
SELECT COUNT(*) AS num
FROM "amos_tzs_biz"."tzs_jg_vehicle_information"
WHERE "identification_code" = #{value}
and "status" != '已作废') AS combined_counts;
</select>
</mapper>
......@@ -323,4 +323,16 @@ public class JgUseRegistrationManageController extends BaseController {
return ResponseHelper.buildResponse("Redis初始化完成!");
}
/**
* 根据sequenceNbr查询---大屏使用
*
* @param applyNo 申请单号
* @return s
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/handleErrorDeviceCode")
@ApiOperation(httpMethod = "GET", value = "根据applyNo查询证管理表", notes = "根据applyNo查询证管理表")
public ResponseModel<Object> handleErrorDeviceCode(@RequestParam(value = "applyNo") String applyNo) {
return ResponseHelper.buildResponse(jgUseRegistrationManageServiceImpl.handleErrorDeviceCode(applyNo));
}
}
......@@ -234,4 +234,20 @@ public class SafetyProblemTracingController extends BaseController {
safetyProblemTracingGenService.executeMaintenanceCheck();
return ResponseHelper.buildResponse("success");
}
/**
* update3 -- 修复
*
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@ApiOperation(httpMethod = "GET",value = "修改维保超期脏数据 && 修改检验检测超期数据",
notes = "修改维保超期脏数据 && 修改检验检测超期数据")
@GetMapping(value = "/gen/update3")
public ResponseModel<String> update3() {
safetyProblemTracingGenService.update3MaintenanceCheck();
return ResponseHelper.buildResponse("success");
}
}
......@@ -2,11 +2,16 @@ package com.yeejoin.amos.boot.module.jg.biz.controller;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sun.org.apache.xpath.internal.operations.Bool;
import com.yeejoin.amos.boot.module.jg.api.dto.ShCarDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationManage;
import com.yeejoin.amos.boot.module.jg.api.entity.ShCar;
import com.yeejoin.amos.boot.module.jg.api.entity.ShCarEqu;
import com.yeejoin.amos.boot.module.jg.api.service.IShCarService;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationManageServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.ShCarEquServiceImpl;
import io.swagger.annotations.ApiParam;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.Api;
......@@ -38,14 +43,17 @@ import java.util.*;
public class ShCarController extends BaseController {
@Autowired
ShCarServiceImpl shCarServiceImpl;
ShCarEquServiceImpl shCarEquService;
@Resource
ShCarEquServiceImpl shCarEquServiceImpl;
@Autowired
ShCarServiceImpl shCarServiceImpl;
@Autowired
IShCarService iShCarService;
@Autowired
JgUseRegistrationManageServiceImpl jgUseRegistrationManageServiceImpl;
/**
* 新增
*
......@@ -120,6 +128,10 @@ public class ShCarController extends BaseController {
shCarDtoPage.getRecords().forEach(record -> {
if ("1".equals(record.getClaimedFlag())) {
record.setClaimedFlag("是");
// 填充 证管理表的seq,用与认领后跳转证详情页
JgUseRegistrationManage manage = jgUseRegistrationManageServiceImpl.getBaseMapper().selectOne(new LambdaQueryWrapper<JgUseRegistrationManage>()
.eq(JgUseRegistrationManage::getUseRegistrationCode, record.getUseRegistrationCode()));
record.setCertificateSeq(String.valueOf(manage.getSequenceNbr()));
} else if ("0".equals(record.getClaimedFlag())) {
record.setClaimedFlag("否");
}
......@@ -152,58 +164,37 @@ public class ShCarController extends BaseController {
if (map == null || map.isEmpty()) {
return ResponseHelper.buildResponse(new ShCar()); // 返回空对象
}
ShCar shCar = null;
for (Object value : map.values()) {
String sanHuanInputValue = String.valueOf(value);
// 如果值为空,直接跳过
if (ValidationUtil.isEmpty(sanHuanInputValue)) {
continue;
}
// 查询 ShCar 表
shCar = shCarServiceImpl.getBaseMapper()
.selectList(new LambdaQueryWrapper<ShCar>()
.eq(ShCar::getClaimedFlag, Boolean.FALSE)
.and(w -> w
.eq(ShCar::getCarNumber, sanHuanInputValue)
.or()
.eq(ShCar::getUseRegistrationCode, sanHuanInputValue)
.or()
.eq(ShCar::getFrameNumber, sanHuanInputValue)
)
).stream().findFirst().orElse(null);
// 如果找到符合条件的 ShCar,直接返回
if (shCar != null && !ValidationUtil.isEmpty(shCar.getSequenceNbr())) {
return ResponseHelper.buildResponse(shCar);
}
// 查询 ShCarEqu 表
Optional<ShCarEqu> carEqu = shCarEquServiceImpl.getBaseMapper()
.selectList(new LambdaQueryWrapper<ShCarEqu>()
.eq(ShCarEqu::getEquCode, sanHuanInputValue))
.stream().findFirst();
// 如果 ShCarEqu 存在,继续查询 ShCar
if (carEqu.isPresent()) {
shCar = shCarServiceImpl.getBaseMapper()
.selectList(new LambdaQueryWrapper<ShCar>()
.eq(ShCar::getClaimedFlag, Boolean.FALSE)
.eq(ShCar::getSequenceNbr, carEqu.get().getCarId())
).stream().findFirst().orElse(null);
// 如果找到,直接返回
if (shCar != null && !ValidationUtil.isEmpty(shCar.getSequenceNbr())) {
return ResponseHelper.buildResponse(shCar);
}
}
return ResponseHelper.buildResponse(shCarServiceImpl.searchForSanHan(map));
}
// 如果未找到,返回空对象
/**
* 数据查询,校验是否是三环系统数据 (三个入参必须同时满足)
*
* @param useRegistrationCode 使用登记证编号
* @param carNumber 车牌号
* @param identificationCode 车辆VIN码
* @return result
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "数据查询,校验是否是三环系统数据", notes = "数据查询,校验是否是三环系统数据")
@GetMapping(value = "/searchForSanHanAllParams")
public ResponseModel<ShCar> searchForSanHan(@ApiParam(name = "使用登记证编号") @RequestParam String useRegistrationCode,
@ApiParam(name = "车牌号") @RequestParam String carNumber,
@ApiParam(name = "车辆VIN码") @RequestParam String identificationCode) {
if (StringUtils.isEmpty(useRegistrationCode) || StringUtils.isEmpty(carNumber) || StringUtils.isEmpty(identificationCode))
return ResponseHelper.buildResponse(new ShCar());
LambdaQueryWrapper<ShCar> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(ShCar::getClaimedFlag, Boolean.FALSE);
wrapper.eq(ShCar::getCarNumber, carNumber.trim());
wrapper.eq(ShCar::getUseRegistrationCode, useRegistrationCode.trim());
wrapper.eq(ShCar::getFrameNumber, identificationCode.trim());
ShCar shCar = shCarServiceImpl.getBaseMapper().selectList(wrapper)
.stream()
.findFirst()
.orElse(new ShCar());
if (StringUtils.isEmpty(shCar.getSequenceNbr()))
return ResponseHelper.buildResponse(new ShCar());
return ResponseHelper.buildResponse(shCar);
}
......
package com.yeejoin.amos.boot.module.jg.biz.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.module.jg.api.entity.ShCarEqu;
import com.yeejoin.amos.boot.module.jg.api.vo.CarAndEquVo;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -120,6 +121,7 @@ public class ShCarEquController extends BaseController {
@ApiOperation(httpMethod = "GET",value = "汽车详细信息列表", notes = "汽车详细信息列表")
@GetMapping(value = "/selectByCarId")
public ResponseModel<CarAndEquVo> selectByCarId(@RequestParam String carId) {
return ResponseHelper.buildResponse(shCarEquServiceImpl.queryByCarId(carId));
ReginParams reginParams = getSelectedOrgInfo();
return ResponseHelper.buildResponse(shCarEquServiceImpl.queryByCarId(carId,reginParams));
}
}
package com.yeejoin.amos.boot.module.jg.biz.handler;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory;
import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
......@@ -16,7 +16,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import java.util.Optional;
import java.util.List;
import java.util.stream.Collectors;
/**
* WBCQEventHandler 类实现了 SafetyProblemEventHandler 接口,
......@@ -48,25 +49,25 @@ public class JYBJEventHandler implements SafetyProblemEventHandler {
@Override
public void handle(SafetyProblemEvent event) {
// 此处为处理安全问题事件的逻辑代码
handleInspectionRecord(JSON.parseObject(event.getMessage().toString()));
JSONArray jsonArray = JSONObject.parseArray(event.getMessage().toString());
handleInspectionRecord(jsonArray);
}
private void handleInspectionRecord(JSONObject jsonObject) {
String equipRecord = jsonObject.getString("record");
if (!ValidationUtil.isEmpty(equipRecord)) {
private void handleInspectionRecord(JSONArray jsonArray) {
List<String> equipRecords = jsonArray.stream().map(obj -> JSONObject.parseObject(obj.toString()).getString("record")).collect(Collectors.toList());
if (!ValidationUtil.isEmpty(equipRecords)) {
safetyProblemTracingService.lambdaUpdate()
.set(SafetyProblemTracing::getProblemStatusCode, SafetyProblemStatusEnum.HANDLED.getCode())
.set(SafetyProblemTracing::getProblemStatus, SafetyProblemStatusEnum.HANDLED.getName())
.eq(SafetyProblemTracing::getSourceId, equipRecord)
.in(SafetyProblemTracing::getSourceId, equipRecords)
.eq(SafetyProblemTracing::getProblemTypeCode, SafetyProblemTypeEnum.JYCQ.getCode()).update();
idxBizJgOtherInfoService.lambdaUpdate().set(IdxBizJgOtherInfo::getStatus, SafetyProblemStatusEnum.HANDLED.getCode())
.eq(IdxBizJgOtherInfo::getRecord, equipRecord).update();
Optional<ESEquipmentCategoryDto> equipEsDto = esEquipmentCategory.findById(equipRecord);
if (equipEsDto.isPresent()) {
ESEquipmentCategoryDto equipDto = equipEsDto.get();
equipDto.setProblemStatus(SafetyProblemStatusEnum.HANDLED.getCode());
esEquipmentCategory.save(equipDto);
.in(IdxBizJgOtherInfo::getRecord, equipRecords).update();
Iterable<ESEquipmentCategoryDto> equipEsDtoIter = esEquipmentCategory.findAllById(equipRecords);
for (ESEquipmentCategoryDto equipEsDto : equipEsDtoIter) {
equipEsDto.setProblemStatus(SafetyProblemStatusEnum.HANDLED.getCode());
}
esEquipmentCategory.saveAll(equipEsDtoIter);
}
}
}
......
package com.yeejoin.amos.boot.module.jg.biz.handler;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.module.jg.api.enums.SafetyProblemTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.event.SafetyProblemEvent;
......@@ -32,12 +33,12 @@ public class JYCQEventHandler implements SafetyProblemEventHandler {
@Override
public void handle(SafetyProblemEvent event) {
// 此处为处理安全问题事件的逻辑代码
JSONObject jsonObject = JSONObject.parseObject(event.getMessage().toString());
generateProblem(jsonObject);
JSONArray jsonArray = JSONObject.parseArray(event.getMessage().toString());
generateProblem(jsonArray);
}
private void generateProblem(JSONObject jsonObject) {
SafetyProblemTopicMessage.generateProblem(jsonObject, SafetyProblemTypeEnum.JYCQ, safetyProblemTracingService);
private void generateProblem(JSONArray jsonArray) {
SafetyProblemTopicMessage.generateProblem(jsonArray, SafetyProblemTypeEnum.JYCQ, safetyProblemTracingService);
}
}
......@@ -23,7 +23,7 @@ public class SafetyProblemEventHandlerFactory {
if (topic.startsWith(SafetyProblemTypeEnum.WBCQ.getTopic())) {
return new WBCQEventHandler(safetyProblemTracingService);
} else if (topic.startsWith(SafetyProblemTypeEnum.WBBA.getTopic())) {
return new WBBAEventHandler();
return new WBBAEventHandler(safetyProblemTracingService, idxBizJgOtherInfoService, esEquipmentCategory);
} else if (topic.startsWith(SafetyProblemTypeEnum.JYCQ.getTopic())) {
return new JYCQEventHandler(safetyProblemTracingService);
} else if (topic.startsWith(SafetyProblemTypeEnum.JYBJ.getTopic())) {
......
package com.yeejoin.amos.boot.module.jg.biz.handler;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory;
import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
import com.yeejoin.amos.boot.module.jg.api.entity.SafetyProblemTracing;
import com.yeejoin.amos.boot.module.jg.api.enums.SafetyProblemStatusEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.SafetyProblemTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.event.SafetyProblemEvent;
import com.yeejoin.amos.boot.module.jg.api.event.handler.SafetyProblemEventHandler;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.IdxBizJgOtherInfoServiceImpl;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.SafetyProblemTracingServiceImpl;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgOtherInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import java.util.List;
import java.util.stream.Collectors;
/**
* WBBAEventHandler 类实现了 SafetyProblemEventHandler 接口,
......@@ -12,6 +26,19 @@ import org.springframework.stereotype.Component;
@Component
public class WBBAEventHandler implements SafetyProblemEventHandler {
SafetyProblemTracingServiceImpl safetyProblemTracingService;
IdxBizJgOtherInfoServiceImpl idxBizJgOtherInfoService;
ESEquipmentCategory esEquipmentCategory;
@Autowired
public WBBAEventHandler(SafetyProblemTracingServiceImpl safetyProblemTracingService, IdxBizJgOtherInfoServiceImpl idxBizJgOtherInfoService, ESEquipmentCategory esEquipmentCategory) {
this.safetyProblemTracingService = safetyProblemTracingService;
this.idxBizJgOtherInfoService = idxBizJgOtherInfoService;
this.esEquipmentCategory = esEquipmentCategory;
}
/**
* 处理安全问题事件。
*
......@@ -21,11 +48,26 @@ public class WBBAEventHandler implements SafetyProblemEventHandler {
@Override
public void handle(SafetyProblemEvent event) {
// 此处为处理安全问题事件的逻辑代码
handleMaintenanceRecord(JSONObject.parseObject(event.getMessage().toString()));
JSONArray jsonArray = JSONObject.parseArray(event.getMessage().toString());
handleMaintenanceRecord(jsonArray);
}
private void handleMaintenanceRecord(JSONObject jsonObject) {
// JSONArray maintenanceRecords = JSONArray.parseArray(String.valueOf(jsonObject));
private void handleMaintenanceRecord(JSONArray jsonArray) {
List<String> equipRecords = jsonArray.stream().map(obj -> JSONObject.parseObject(obj.toString()).getString("record")).collect(Collectors.toList());
if (!ValidationUtil.isEmpty(equipRecords)) {
safetyProblemTracingService.lambdaUpdate()
.set(SafetyProblemTracing::getProblemStatusCode, SafetyProblemStatusEnum.HANDLED.getCode())
.set(SafetyProblemTracing::getProblemStatus, SafetyProblemStatusEnum.HANDLED.getName())
.in(SafetyProblemTracing::getSourceId, equipRecords)
.eq(SafetyProblemTracing::getProblemTypeCode, SafetyProblemTypeEnum.WBCQ.getCode()).update();
idxBizJgOtherInfoService.lambdaUpdate().set(IdxBizJgOtherInfo::getStatus, SafetyProblemStatusEnum.HANDLED.getCode())
.in(IdxBizJgOtherInfo::getRecord, equipRecords).update();
Iterable<ESEquipmentCategoryDto> equipEsDtoIter = esEquipmentCategory.findAllById(equipRecords);
for (ESEquipmentCategoryDto equipEsDto : equipEsDtoIter) {
equipEsDto.setProblemStatus(SafetyProblemStatusEnum.HANDLED.getCode());
}
esEquipmentCategory.saveAll(equipEsDtoIter);
}
}
}
package com.yeejoin.amos.boot.module.jg.biz.handler;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.module.jg.api.enums.SafetyProblemTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.event.SafetyProblemEvent;
......@@ -32,12 +33,12 @@ public class WBCQEventHandler implements SafetyProblemEventHandler {
@Override
public void handle(SafetyProblemEvent event) {
// 此处为处理安全问题事件的逻辑代码
JSONObject jsonObject = JSONObject.parseObject(event.getMessage().toString());
generateProblem(jsonObject);
JSONArray jsonArray = JSONObject.parseArray(event.getMessage().toString());
generateProblem(jsonArray);
}
private void generateProblem(JSONObject jsonObject) {
SafetyProblemTopicMessage.generateProblem(jsonObject, SafetyProblemTypeEnum.WBCQ, safetyProblemTracingService);
private void generateProblem(JSONArray jsonArray) {
SafetyProblemTopicMessage.generateProblem(jsonArray, SafetyProblemTypeEnum.WBCQ, safetyProblemTracingService);
}
}
......@@ -81,7 +81,7 @@ public class SafetyProblemTopicMessage extends EmqxListener {
try {
while (true) {
SafetyProblemEvent safetyProblemMessageEvent = blockingQueue.take();
JSONObject jsonObject = JSON.parseObject(safetyProblemMessageEvent.getMessage().toString());
JSONArray jsonObject = JSON.parseArray(safetyProblemMessageEvent.getMessage().toString());
log.info("接收到问题生产消息:{}", jsonObject);
SafetyProblemEventHandler eventHandler = SafetyProblemEventHandlerFactory.createProblemHandler(safetyProblemMessageEvent.getTopic());
eventHandler.handle(safetyProblemMessageEvent);
......@@ -103,13 +103,13 @@ public class SafetyProblemTopicMessage extends EmqxListener {
log.info("接收问题生产消息完成");
}
public static void generateProblem(JSONObject jsonObject, SafetyProblemTypeEnum problemTypeEnum, SafetyProblemTracingServiceImpl safetyProblemTracingService) {
if (jsonObject == null || problemTypeEnum == null) {
public static void generateProblem(JSONArray jsonArray, SafetyProblemTypeEnum problemTypeEnum, SafetyProblemTracingServiceImpl safetyProblemTracingService) {
if (jsonArray == null || problemTypeEnum == null) {
throw new IllegalArgumentException("jsonObject and problemTypeEnum must not be null.");
}
JSONArray records = jsonObject.getJSONArray(problemTypeEnum.getMsgKey());
if (!ValidationUtil.isEmpty(records)) {
List<SafetyProblemTracing> safetyProblemTracingList = records.stream().map(item -> {
// JSONArray records = jsonObject.getJSONArray(problemTypeEnum.getMsgKey());
if (!ValidationUtil.isEmpty(jsonArray)) {
List<SafetyProblemTracing> safetyProblemTracingList = jsonArray.stream().map(item -> {
if (!(item instanceof JSONObject)) {
throw new IllegalArgumentException("item is not a JSONObject.");
}
......
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.yeejoin.amos.boot.module.jg.api.dto.FlowingEquipRedisKeyDTO;
import com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper;
import com.yeejoin.amos.boot.module.jg.api.service.IEquipUsedCheck;
import com.yeejoin.amos.boot.module.jg.biz.context.FlowingEquipRedisContext;
import lombok.extern.slf4j.Slf4j;
import org.redisson.api.RBucket;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import java.util.Collections;
import java.util.List;
import java.util.Set;
......@@ -22,6 +23,8 @@ import java.util.stream.Collectors;
@Slf4j
public abstract class BaseEquipUsedCheckService implements IEquipUsedCheck {
@Autowired
CommonMapper commonMapper;
/**
* 并发校验(页面同时提交或者页面同时打开多个时,某些设备都是为使用状态)校验设备流程在用状态及更新不在用为再使用状态
......@@ -40,8 +43,12 @@ public abstract class BaseEquipUsedCheckService implements IEquipUsedCheck {
}
RBucket<Set<String>> RBucket = getRedisClient().getBucket(this.getFlowingEquipRedisKey(companyCode, getApplyBizType()));
Set<String> equipListOfUsed = RBucket.get();
// 查询当前设备在流程中的申请单号列表
List<String> equipInUseList = commonMapper.findEquipInUseService(record);
if (equipListOfUsed != null && equipListOfUsed.contains(record)) {
throw new BadRequest("设备已被其他流程使用,不允许重复提交!");
String joinedEquipInUse = String.join(",", equipInUseList);
log.error("设备已被其他流程使用,不允许重复提交,设备ID:{},在流程中申请单:{}", record, joinedEquipInUse);
throw new BadRequest("设备已被其他流程使用,不允许重复提交,请联系管理员!");
}
if (equipListOfUsed == null || equipListOfUsed.isEmpty()) {
equipListOfUsed = new TreeSet<>();
......@@ -68,8 +75,12 @@ public abstract class BaseEquipUsedCheckService implements IEquipUsedCheck {
}
RBucket<Set<String>> RBucket = getRedisClient().getBucket(this.getFlowingEquipRedisKey(companyCode, getApplyBizType()));
Set<String> equipListOfUsed = RBucket.get();
// 查询当前设备在用的申请单号列表
List<String> equipInUseList = commonMapper.findEquipInUseService(record);
if (equipListOfUsed != null && equipListOfUsed.contains(record)) {
throw new BadRequest("使用登记证已被其他流程使用,不允许重复提交!");
String joinedEquipInUse = String.join(",", equipInUseList);
log.error("使用登记证已被其他流程使用,不允许重复提交,设备ID:{},在流程中申请单:{}", record, joinedEquipInUse);
throw new BadRequest("使用登记证已被其他流程使用,不允许重复提交,请联系管理员!");
}
if (equipListOfUsed == null || equipListOfUsed.isEmpty()) {
equipListOfUsed = new TreeSet<>();
......
......@@ -2166,12 +2166,23 @@ public class CommonServiceImpl implements ICommonService {
} catch (ParseException e) {
log.error("日期转换失败:", e);
}
String equCode = Optional.ofNullable(equType.get("equCategoryCode")).orElse(equType.get("equDefineCode"));
ResponseModel<String> responseModel = null;
if (isValidCreditCode(receiveCompanyCode)) {
String equCode = Optional.ofNullable(equType.get("equDefineCode")).orElse(equType.get("equCategoryCode"));
String registrationCode = equCode + receiveCompanyCode + ym;
ResponseModel<String> responseModel = tzsServiceFeignClient.deviceRegistrationCode(registrationCode);
responseModel = tzsServiceFeignClient.deviceRegistrationCode(registrationCode);
}
return responseModel.getResult();
}
// 校验信用代码是否符合要求
public static boolean isValidCreditCode(String creditCode) {
// 检查是否是数字
if (!creditCode.matches("\\d+")) {
throw new BadRequest("接收机构编码错误: " + creditCode + ",请联系管理员!");
}
return true;
}
/**
* 获取最新的使用登记证书
......
......@@ -1580,6 +1580,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
// 历史设备且做过历史登记
BoolQueryBuilder hisBuilder = QueryBuilders.boolQuery();
hisBuilder.must(QueryBuilders.prefixQuery("DATA_SOURCE", "jg_his"));
hisBuilder.mustNot(QueryBuilders.prefixQuery("DATA_SOURCE", "jg_his_ymt"));//排除一码通设备
hisBuilder.must(QueryBuilders.termQuery("EQU_STATE", EquimentEnum.ZAIYONG.getCode()));
dBuilder.should(hisBuilder);
// 或新设备
......@@ -3363,7 +3364,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
} catch (ParseException e) {
log.error("日期转换失败:", e);
}
String equCode = Optional.ofNullable(dto.getEquCategoryCode()).orElse(dto.getEquDefineCode());
String equCode = Optional.ofNullable(dto.getEquDefineCode()).orElse(dto.getEquCategoryCode());
String registrationCode = equCode + receiveCompanyCode + ym;
ResponseModel<String> responseModel = tzsServiceFeignClient.deviceRegistrationCode(registrationCode);
return responseModel.getResult();
......
......@@ -1206,20 +1206,23 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
changeRecordEq.setEquId(jgRelationEquip.getEquId());//设备主键
changeRecordEq.setProductCode(idxBizJgFactoryInfo.getFactoryNum());
certificateChangeRecordEqService.save(changeRecordEq);
jgResumeInfoService.createWithModel(JgResumeInfoDto.builder()
});
// 更新关联设备表
jgInstallationNoticeEqService.updateBatchById(jgRelationEquips);
jgResumeInfoService.saveBatchResume(
jgRelationEquips.stream()
.map(v -> JgResumeInfoDto.builder()
.applyNo(jgInstallationNotice.getApplyNo())
.businessType(BusinessTypeEnum.JG_INSTALLATION_NOTIFICATION.getName())
.businessId(jgInstallationNotice.getSequenceNbr() + "")
.equId(jgRelationEquip.getEquId())
.businessType(BusinessTypeEnum.JG_MAINTENANCE_RECORD.getName())
.businessId(String.valueOf(jgInstallationNotice.getSequenceNbr()))
.equId(String.valueOf(v.getEquId()))
.approvalUnit(jgInstallationNotice.getReceiveOrgName())
.approvalUnitCode(jgInstallationNotice.getReceiveOrgCreditCode())
.status("正常")
.routePath(taskV2Model1.getRoutePath())
.build());
});
// 更新关联设备表
jgInstallationNoticeEqService.updateBatchById(jgRelationEquips);
.build())
.collect(Collectors.toList())
);
} else {
jgInstallationNotice.setNextExecuteIds(workflowResultDto.getNextExecutorRoleIds());
jgInstallationNotice.setNextExecuteUserIds(workflowResultDto.getNextExecutorUserIds());
......@@ -1616,6 +1619,14 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
// 6.es 回退
this.rollBackEsInfo(jgRelationEquip, idxBizJgRegisterInfo);
});
//删除设备履历信息
List<String> equipTransferIds = jgInstallationNoticeEqs.stream()
.map(JgInstallationNoticeEq::getEquipTransferId)
.filter(Objects::nonNull)
.collect(Collectors.toList());
if (!equipTransferIds.isEmpty()) {
jgResumeInfoService.deleteBatchByBusinessId(equipTransferIds);
}
}
/**
......
......@@ -14,7 +14,6 @@ import com.yeejoin.amos.boot.module.jg.api.dto.*;
import com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContract;
import com.yeejoin.amos.boot.module.jg.api.entity.JgMaintenanceContractEq;
import com.yeejoin.amos.boot.module.jg.api.entity.JgRegistrationHistory;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistrationEq;
import com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.CompanyTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.SafetyProblemTypeEnum;
......@@ -354,23 +353,23 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
// 再插入新代办、数据待定
commonService.buildTaskModel(Collections.singletonList(modelDto));
// 新增人员履历消息表
LambdaQueryWrapper<JgMaintenanceContractEq> lambda = new QueryWrapper<JgMaintenanceContractEq>().lambda();
lambda.eq(JgMaintenanceContractEq::getEquipTransferId, contract.getSequenceNbr());
List<JgMaintenanceContractEq> jgMaintenanceContractEqList = jgMaintenanceContractEqService.getBaseMapper().selectList(lambda);
jgResumeInfoService.saveBatchResume(
jgMaintenanceContractEqList.stream()
.map(v -> JgResumeInfoDto.builder()
.applyNo(contract.getApplyNo())
.businessType(BusinessTypeEnum.JG_MAINTENANCE_RECORD.getName())
.businessId(String.valueOf(contract.getSequenceNbr()))
.equId(String.valueOf(v.getEquId()))
.approvalUnit(contract.getReceiveOrgName())
.approvalUnitCode(contract.getReceiveOrgCode())
.status("正常")
.routePath(taskV2Model.getRoutePath())
.build())
.collect(Collectors.toList())
);
//LambdaQueryWrapper<JgMaintenanceContractEq> lambda = new QueryWrapper<JgMaintenanceContractEq>().lambda();
//lambda.eq(JgMaintenanceContractEq::getEquipTransferId, contract.getSequenceNbr());
//List<JgMaintenanceContractEq> jgMaintenanceContractEqList = jgMaintenanceContractEqService.getBaseMapper().selectList(lambda);
//jgResumeInfoService.saveBatchResume(
// jgMaintenanceContractEqList.stream()
// .map(v -> JgResumeInfoDto.builder()
// .applyNo(contract.getApplyNo())
// .businessType(BusinessTypeEnum.JG_MAINTENANCE_RECORD.getName())
// .businessId(String.valueOf(contract.getSequenceNbr()))
// .equId(String.valueOf(v.getEquId()))
// .approvalUnit(contract.getReceiveOrgName())
// .approvalUnitCode(contract.getReceiveOrgCode())
// .status("正常")
// .routePath(taskV2Model.getRoutePath())
// .build())
// .collect(Collectors.toList())
//);
}
......@@ -676,9 +675,9 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
contract.setApplyDate(new Date());
contract.setStatus(taskCode);
contract.setNextTaskId(null);
updateTaskModel(contract, "0");
TaskV2Model taskV2Model = updateTaskModel(contract, "0");
// 添加设备维保信息
updateEquipMessage(contract.getSequenceNbr());
updateEquipMessage(contract.getSequenceNbr(), taskV2Model);
}
this.getBaseMapper().updateById(contract);
......@@ -692,7 +691,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
* @param id
*/
@SneakyThrows
private void updateEquipMessage(Long id) {
private void updateEquipMessage(Long id, TaskV2Model taskV2Model) {
JgMaintenanceContract jgMaintenanceContract = this.getBaseMapper().selectById(id);
LambdaQueryWrapper<JgMaintenanceContractEq> lambda = new QueryWrapper<JgMaintenanceContractEq>().lambda();
lambda.eq(JgMaintenanceContractEq::getEquipTransferId, id);
......@@ -717,7 +716,23 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
info.setRepairInform(ObjectUtils.isEmpty(jgMaintenanceContract.getMaintenanceContract()) ? null : jgMaintenanceContract.getMaintenanceContract());
maintenanceRecordInfoList.add(info);
});
jgResumeInfoService.saveBatchResume(
list.stream()
.map(v -> JgResumeInfoDto.builder()
.applyNo(jgMaintenanceContract.getApplyNo())
.businessType(BusinessTypeEnum.JG_MAINTENANCE_RECORD.getName())
.businessId(String.valueOf(jgMaintenanceContract.getSequenceNbr()))
.equId(String.valueOf(v.getEquId()))
.approvalUnit(jgMaintenanceContract.getReceiveOrgName())
.approvalUnitCode(jgMaintenanceContract.getReceiveOrgCode())
.status("正常")
.routePath(taskV2Model.getRoutePath())
.build())
.collect(Collectors.toList())
);
idxBizJgMaintenanceRecordInfoService.saveBatch(maintenanceRecordInfoList);
// 维保备案后更新安全追溯对应设备状态
emqKeeper.getMqttClient().publish(SafetyProblemTypeEnum.WBBA.getTopic(), JSON.toJSONBytes(maintenanceRecordInfoList), 2, false);
}
......@@ -873,6 +888,15 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
if (!CollectionUtils.isEmpty(equipmentLists)) {
List<String> list = equipmentLists.stream().filter(t -> t.getEquId() != null).map(JgMaintenanceContractEq::getEquId).collect(Collectors.toList());
maintenanceContractEqMapper.updateIdxBizJgRegisterInfo(list);
// 删除批量业务ID信息
List<String> equipTransferIds = equipmentLists.stream()
.map(JgMaintenanceContractEq::getEquipTransferId)
.filter(Objects::nonNull)
.collect(Collectors.toList());
if (!equipTransferIds.isEmpty()) {
jgResumeInfoService.deleteBatchByBusinessId(equipTransferIds);
}
jgResumeInfoService.deleteBatchByBusinessId(equipmentLists.stream().filter(t -> t.getEquipTransferId() != null).map(JgMaintenanceContractEq::getEquId).collect(Collectors.toList()));
}
}
// private void delRepeatUseEquipData(JgMaintenanceContract maintenanceContract) {
......
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.api.dto.JgResumeInfoDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgResumeInfo;
......@@ -19,7 +20,7 @@ import java.util.stream.Collectors;
* @date 2024-05-29
*/
@Service
public class JgResumeInfoServiceImpl extends BaseService<JgResumeInfoDto,JgResumeInfo,JgResumeInfoMapper> implements IJgResumeInfoService {
public class JgResumeInfoServiceImpl extends BaseService<JgResumeInfoDto, JgResumeInfo, JgResumeInfoMapper> implements IJgResumeInfoService {
/**
* 分页查询
*/
......@@ -31,7 +32,7 @@ public class JgResumeInfoServiceImpl extends BaseService<JgResumeInfoDto,JgResum
* 列表查询 示例
*/
public List<JgResumeInfoDto> queryForJgResumeInfoList() {
return this.queryForList("" , false);
return this.queryForList("", false);
}
public void saveBatchResume(List<JgResumeInfoDto> jgResumeInfoDtoList) {
......@@ -44,4 +45,20 @@ public class JgResumeInfoServiceImpl extends BaseService<JgResumeInfoDto,JgResum
.collect(Collectors.toList());
this.saveBatch(jgResumeInfoCollection);
}
/**
* 根据业务id进行删除
* @param businessId 业务id
*/
public void deleteByBusinessId(String businessId) {
this.baseMapper.delete(new LambdaQueryWrapper<JgResumeInfo>().eq(JgResumeInfo::getBusinessId, businessId));
}
/**
* 根据业务id进行删除
* @param idList 业务id
*/
public void deleteBatchByBusinessId(List<String> idList) {
this.baseMapper.deleteBatchByBusinessId(idList);
}
}
\ No newline at end of file
......@@ -305,6 +305,11 @@ public class JgTransferNoticeServiceImpl extends BaseService<JgTransferNoticeDto
}
for (Map<String, Object> objectMap : informationList) {
List<Map<String, Object>> temp = new ArrayList<>();
objectMap.put("equipProvinceName", objectMap.get("provinceName"));
objectMap.put("equipCityName", objectMap.get("cityName"));
objectMap.put("equipCountyName", objectMap.get("countyName"));
objectMap.put("equipStreetName", objectMap.get("streetName"));
objectMap.put("equipAddress", objectMap.get("address"));
temp.add(objectMap);
Map<String, Object> placeholders = jgInstallationNoticeService.fullFillTemplateObj(temp, BusinessTypeEnum.JG_ADVICE_REMOVAL.getName().substring(0, 2));
maps.add(placeholders);
......
......@@ -3,7 +3,9 @@ package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.boot.module.common.api.dto.FormValue;
import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationManageDto;
import com.yeejoin.amos.boot.module.jg.api.dto.UseFlagParamDto;
......@@ -15,6 +17,7 @@ import com.yeejoin.amos.boot.module.jg.api.mapper.*;
import com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationTransferService;
import com.yeejoin.amos.boot.module.jg.api.service.IJgUseRegistrationManageService;
import com.yeejoin.amos.boot.module.jg.api.vo.SortVo;
import com.yeejoin.amos.boot.module.jg.biz.feign.TzsServiceFeignClient;
import com.yeejoin.amos.boot.module.ymt.api.common.StringUtil;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgMaintenanceRecordInfo;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo;
......@@ -49,18 +52,19 @@ 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 org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Function;
import java.util.stream.Collectors;
import static com.alibaba.fastjson.JSON.parseArray;
import static com.yeejoin.amos.boot.module.jg.biz.service.impl.CommonServiceImpl.isValidCreditCode;
import static com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationServiceImpl.getAuditPassedDate;
/**
......@@ -120,6 +124,11 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
CommonMapper commonMapper;
@Autowired
private RedisTemplate<String, String> redisTemplate;
@Autowired
TzsServiceFeignClient tzsServiceFeignClient;
@Autowired
private JgCertificateChangeRecordMapper certificateChangeRecordMapper;
private static final long SCROLL_TIMEOUT = 180000;
private static final int SIZE = 1000;
......@@ -759,4 +768,32 @@ public class JgUseRegistrationManageServiceImpl extends BaseService<JgUseRegistr
jgUseRegistrationManageMapper.initUseRegistrationCodeIntoRedis(String.valueOf(LocalDate.now().getYear() % 100))
.forEach(resultMap -> redisTemplate.opsForValue().set(resultMap.get("prefix"), resultMap.get("code")));
}
public Object handleErrorDeviceCode(String applyNo) {
LambdaQueryWrapper<JgUseRegistrationManage> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(JgUseRegistrationManage::getApplyNo, applyNo);
JgUseRegistrationManage jgUseRegistrationManage = jgUseRegistrationManageMapper.selectOne(queryWrapper);
if (jgUseRegistrationManage != null) {
String ym = "";
try {
ym = Optional.of(DateUtils.dateFormat(jgUseRegistrationManage.getAuditPassDate(), DateUtils.DATE_PATTERN_MM)).orElse(DateUtils.dateFormat(new Date(), DateUtils.DATE_PATTERN_MM));
} catch (ParseException e) {
log.error("日期转换失败:", e);
}
ResponseModel<String> responseModel;
if (isValidCreditCode(jgUseRegistrationManage.getReceiveCompanyCode())) {
String equCode = Optional.ofNullable(jgUseRegistrationManage.getEquDefineCode()).orElse(jgUseRegistrationManage.getEquCategoryCode());
String registrationCode = equCode + jgUseRegistrationManage.getReceiveCompanyCode() + ym;
responseModel = tzsServiceFeignClient.deviceRegistrationCode(registrationCode);
jgUseRegistrationManage.setCertificateNo(responseModel.getResult());
jgUseRegistrationManageMapper.updateById(jgUseRegistrationManage);
LambdaUpdateWrapper<JgCertificateChangeRecord> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(JgCertificateChangeRecord::getApplyNo, applyNo);
updateWrapper.set(JgCertificateChangeRecord::getCertificateNo, responseModel.getResult());
certificateChangeRecordMapper.update(null, updateWrapper);
}
}
return "修复成功!";
}
}
\ No newline at end of file
......@@ -10,7 +10,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
......@@ -20,6 +19,7 @@ import com.yeejoin.amos.boot.biz.common.entity.TzsBaseEntity;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.biz.common.utils.SnowflakeIdUtil;
import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory;
import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
import com.yeejoin.amos.boot.module.jg.api.dto.*;
......@@ -59,6 +59,7 @@ import com.yeejoin.amos.feign.workflow.model.TaskResultDTO;
import io.seata.spring.annotation.GlobalTransactional;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.compress.utils.Lists;
import org.apache.commons.io.IOUtils;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;
......@@ -1810,9 +1811,23 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
if (!ObjectUtils.isEmpty(detail) && !StringUtils.isEmpty(detail.get("organizationCode")) && !StringUtils.isEmpty(detail.get("organizationName"))) {
String receiveOrgCode = (String) detail.get("organizationCode");
String receiveOrgName = (String) detail.get("organizationName");
List<LinkedHashMap> receiveUnitTree = commonServiceImpl.getReceiveUnitTree("register");
List<Map<String, Object>> receiveUnitList = Lists.newArrayList();
if (!receiveUnitTree.isEmpty() && !receiveUnitTree.get(0).isEmpty()) {
convertTreeToListMap(receiveUnitTree.get(0), receiveUnitList);
}
// 查询receiveUnitTree中符合receiveOrgCode的数据
Map<String, Object> resultMap = receiveUnitList.stream().filter(map -> receiveOrgCode.equals(map.get("companyCode"))).findFirst().orElse(null);
if (ValidationUtil.isEmpty(resultMap)) {
detail.put("receiveOrgCode", null);
} else {
String receiveOrgName = (String) resultMap.get("companyName");
detail.put("receiveOrgCode", receiveOrgCode + "_" + receiveOrgName);
}
}
// 监督管理信息
Map<String, Object> supervisionInfo = this.baseMapper.getSupervisionInfoDetail(record);
......@@ -1869,7 +1884,19 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
return detail;
}
String setDefaultRecord(JgUseRegistration jgUseRegistration, String record) {
private void convertTreeToListMap(LinkedHashMap receiveUnit, List<Map<String, Object>> resultList) {
resultList.add(receiveUnit);
if (receiveUnit.containsKey("children") && !ValidationUtil.isEmpty(receiveUnit.get("children"))) {
List<LinkedHashMap> children = (List<LinkedHashMap>) receiveUnit.get("children");
for (LinkedHashMap child : children) {
convertTreeToListMap(child, resultList);
}
}
}
private String setDefaultRecord(JgUseRegistration jgUseRegistration, String record) {
if (StringUtils.isEmpty(record)) {
JgUseRegistrationEq jgUseRegistrationEq = jgUseRegistrationEqService.getOne(new LambdaQueryWrapper<JgUseRegistrationEq>().eq(JgUseRegistrationEq::getEquipTransferId, jgUseRegistration.getSequenceNbr()));
record = jgUseRegistrationEq.getEquId();
......@@ -3124,6 +3151,15 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
// 历史设备 生成证书管理表记录 & 生成安装 维保等操作记录
this.historyEquGenManageRelated(map, jgUseRegistration, registerInfo, idxBizJgFactoryInfo);
jgResumeInfoService.createWithModel(JgResumeInfoDto.builder()
.applyNo(jgUseRegistration.getApplyNo())
.businessType(BusinessTypeEnum.JG_HISTORY_USAGE_REGISTRATION.getName())
.businessId(jgUseRegistration.getSequenceNbr() + "")
.equId(String.valueOf(map.get("equipId")))
.approvalUnit(jgUseRegistration.getReceiveOrgName())
.approvalUnitCode(jgUseRegistration.getReceiveOrgCode())
.status("正常")
.build());
}
return this.baseMapper.getDetailById(jgUseRegistration.getSequenceNbr());
} catch (BadRequest | LocalBadRequest e) {
......
......@@ -361,15 +361,6 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
equip.setEquId(String.valueOf(x.get("record")));
equip.setVehicleId(vehicleInformation.getSequenceNbr() + "");
equipList.add(equip);
jgResumeInfoService.createWithModel(JgResumeInfoDto.builder()
.applyNo(vehicleInformation.getApplyNo())
.businessType(BusinessTypeEnum.JG_VEHICLE_GAS_APPLICATION.getName())
.businessId(vehicleInformation.getSequenceNbr() + "")
.equId(String.valueOf(x.get("record")))
.approvalUnit(vehicleInformation.getReceiveOrgName())
.approvalUnitCode(vehicleInformation.getReceiveOrgCode())
.status("正常")
.build());
});
// 保存关联设备信息
jgVehicleInformationEqService.saveBatch(equipList);
......@@ -1485,6 +1476,13 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
// 4.es的EQU_STATE, USE_ORG_CODE、ORG_BRANCH_CODE、ORG_BRANCH_NAME、STATUS
this.rollBackForEquipEsInfo(record);
});
List<String> equipTransferIds = eqList.stream()
.map(JgVehicleInformationEq::getVehicleId)
.filter(Objects::nonNull)
.collect(Collectors.toList());
if (!equipTransferIds.isEmpty()) {
jgResumeInfoService.deleteBatchByBusinessId(equipTransferIds);
}
}
private void rollBackForEquipEsInfo(String record) {
......@@ -1934,6 +1932,8 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
equip.setEquId(String.valueOf(x.get("record")));
equip.setVehicleId(vehicleInformation.getSequenceNbr() + "");
equipList.add(equip);
//新增添加设备履历
if (StringUtils.isEmpty(vehicleInfoDto.getSequenceNbr())){
jgResumeInfoService.createWithModel(JgResumeInfoDto.builder()
.applyNo(vehicleInformation.getApplyNo())
.businessType(BusinessTypeEnum.JG_VEHICLE_GAS_APPLICATION.getName())
......@@ -1943,7 +1943,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
.approvalUnitCode(vehicleInformation.getReceiveOrgCode())
.status("正常")
.build());
}
// 查询注册信息
LambdaQueryWrapper<IdxBizJgRegisterInfo> queryRegisterWrapper = new QueryWrapper<IdxBizJgRegisterInfo>().lambda();
queryRegisterWrapper.eq(IdxBizJgRegisterInfo::getRecord, String.valueOf(x.get("record")));
......@@ -2156,15 +2156,6 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
equip.setEquId(String.valueOf(x.get("record")));
equip.setVehicleId(vehicleInformation.getSequenceNbr() + "");
equipList.add(equip);
jgResumeInfoService.createWithModel(JgResumeInfoDto.builder()
.applyNo(vehicleInformation.getApplyNo())
.businessType(BusinessTypeEnum.JG_VEHICLE_GAS_APPLICATION.getName())
.businessId(vehicleInformation.getSequenceNbr() + "")
.equId(String.valueOf(x.get("record")))
.approvalUnit(vehicleInformation.getReceiveOrgName())
.approvalUnitCode(vehicleInformation.getReceiveOrgCode())
.status("正常")
.build());
// 查询注册信息
LambdaQueryWrapper<IdxBizJgRegisterInfo> queryRegisterWrapper = new QueryWrapper<IdxBizJgRegisterInfo>().lambda();
......
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.google.common.collect.Lists;
import com.yeejoin.amos.boot.module.common.api.dao.ESEquipmentCategory;
import com.yeejoin.amos.boot.module.common.api.dto.ESEquipmentCategoryDto;
import com.yeejoin.amos.boot.module.jg.api.entity.SafetyProblemTracing;
import com.yeejoin.amos.boot.module.jg.api.enums.SafetyProblemStatusEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.SafetyProblemTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.mapper.CommonMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.SafetyProblemTracingMapper;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgOtherInfo;
import net.javacrumbs.shedlock.spring.annotation.SchedulerLock;
import org.eclipse.paho.client.mqttv3.MqttException;
......@@ -43,6 +47,9 @@ public class SafetyProblemTracingGenServiceImpl{
@Autowired
EmqKeeper emqKeeper;
@Autowired
private SafetyProblemTracingServiceImpl safetyProblemTracingService;
@Scheduled(cron = "0 0 1 * * ?")
@SchedulerLock(name = "executeSafetyProblemCheck", lockAtMostFor = "PT5H", lockAtLeastFor = "PT10M")
public void executeSafetyProblemCheck() {
......@@ -66,6 +73,39 @@ public class SafetyProblemTracingGenServiceImpl{
logger.info("维保超期检查结束");
}
public void update3MaintenanceCheck() {
logger.info("开始修正数据");
List<String> oldAllRecords = idxBizJgOtherInfoService.getBaseMapper()
.selectList(new LambdaQueryWrapper<IdxBizJgOtherInfo>()
.eq(IdxBizJgOtherInfo::getStatus, SafetyProblemStatusEnum.UNHANDLED.getCode()))
.stream()
.map(IdxBizJgOtherInfo::getRecord)
.collect(Collectors.toList());
logger.info("总的旧数据条数:{}",oldAllRecords.size());
List<Map<String, Object>> outOfMaintenanceRecords = commonMapper.queryOutOfMaintenanceRecord();
List<String> realRecordsMain = outOfMaintenanceRecords.stream().map(m -> m.get("RECORD").toString()).collect(Collectors.toList());
List<Map<String, Object>> outOfInspectionRecords = commonMapper.queryOutOfInspectionRecord();
List<String> realRecordsInsp = outOfInspectionRecords.stream().map(m -> m.get("RECORD").toString()).collect(Collectors.toList());
realRecordsMain.addAll(realRecordsInsp);
logger.info("正常数据条数:{}", realRecordsMain.size());
List<String> errorRecord = oldAllRecords.stream().filter(item -> !realRecordsMain.contains(item)).collect(Collectors.toList());
logger.info("异常数据条数---------------:{}",errorRecord.size());
safetyProblemTracingService.lambdaUpdate()
.set(SafetyProblemTracing::getProblemStatusCode, SafetyProblemStatusEnum.HANDLED.getCode())
.set(SafetyProblemTracing::getProblemStatus, SafetyProblemStatusEnum.HANDLED.getName())
.in(SafetyProblemTracing::getSourceId, errorRecord)
.eq(SafetyProblemTracing::getProblemTypeCode, SafetyProblemTypeEnum.WBCQ.getCode())
.eq(SafetyProblemTracing::getIsDelete,Boolean.FALSE)
.update();
idxBizJgOtherInfoService.lambdaUpdate().set(IdxBizJgOtherInfo::getStatus, null)
.in(IdxBizJgOtherInfo::getRecord, errorRecord).update();
Iterable<ESEquipmentCategoryDto> equipEsDtoIter = esEquipmentCategory.findAllById(errorRecord);
for (ESEquipmentCategoryDto equipEsDto : equipEsDtoIter) {
equipEsDto.setProblemStatus(null);
}
esEquipmentCategory.saveAll(equipEsDtoIter);
logger.info("修改正数据条数:{}",errorRecord.size());
}
private void updateEquipAndSendMessage(List<Map<String, Object>> mapList, SafetyProblemTypeEnum safetyProblemTypeEnum) {
List<String> records = mapList.stream().map(m -> m.get("RECORD").toString()).collect(Collectors.toList());
......@@ -80,10 +120,11 @@ public class SafetyProblemTracingGenServiceImpl{
esEquipmentCategoryDto.add(equipmentCategoryDto);
}
esEquipmentCategory.saveAll(esEquipmentCategoryDto);
JSONObject jsonObject = new JSONObject();
jsonObject.put(safetyProblemTypeEnum.getMsgKey(), mapList);
// JSONObject jsonObject = new JSONObject();
// jsonObject.put(safetyProblemTypeEnum.getMsgKey(), mapList);
JSONArray jsonArray = JSON.parseArray(JSON.toJSONString(mapList));
try {
emqKeeper.getMqttClient().publish(safetyProblemTypeEnum.getTopic(), jsonObject.toString().getBytes(StandardCharsets.UTF_8), 2, false);
emqKeeper.getMqttClient().publish(safetyProblemTypeEnum.getTopic(), jsonArray.toString().getBytes(StandardCharsets.UTF_8), 2, false);
} catch (MqttException e) {
logger.error("发送安全追溯问题设备信息消息失败---->{}", e.getMessage());
throw new RuntimeException(e);
......
package com.yeejoin.amos.boot.module.jg.biz.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.module.jg.api.dto.ShCarDto;
import com.yeejoin.amos.boot.module.jg.api.entity.ShCar;
import com.yeejoin.amos.boot.module.jg.api.entity.ShCarEqu;
import com.yeejoin.amos.boot.module.jg.api.mapper.ShCarEquMapper;
import com.yeejoin.amos.boot.module.jg.api.service.IShCarEquService;
import com.yeejoin.amos.boot.module.jg.api.vo.CarAndEquVo;
import com.yeejoin.amos.boot.module.jg.api.vo.ShCarEquVo;
import com.yeejoin.amos.boot.module.jg.biz.service.ICommonService;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import org.springframework.beans.factory.annotation.Autowired;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import java.util.List;
import java.util.stream.Collectors;
......@@ -21,10 +27,14 @@ import java.util.stream.Collectors;
* @date 2024-11-08
*/
@Service
public class ShCarEquServiceImpl extends BaseService<ShCarEqu,ShCarEqu,ShCarEquMapper> implements IShCarEquService {
public class ShCarEquServiceImpl extends BaseService<ShCarEqu, ShCarEqu, ShCarEquMapper> implements IShCarEquService {
@Autowired
ShCarServiceImpl shCarServiceImpl;
@Autowired
ICommonService commonService;
/**
* 分页查询
*/
......@@ -36,24 +46,40 @@ public class ShCarEquServiceImpl extends BaseService<ShCarEqu,ShCarEqu,ShCarEquM
* 列表查询 示例
*/
public List<ShCarEqu> queryForShCarEquList() {
return this.queryForList("" , false);
return this.queryForList("", false);
}
public CarAndEquVo queryByCarId(String carId){
//根据carId获取Car
LambdaQueryWrapper<ShCar> queryWrapper1= new LambdaQueryWrapper<>();
queryWrapper1.eq(ShCar::getSequenceNbr,carId);
public CarAndEquVo queryByCarId(String carId, ReginParams reginParams) {
// 根据carId获取Car
LambdaQueryWrapper<ShCar> queryWrapper1 = new LambdaQueryWrapper<>();
queryWrapper1.eq(ShCar::getSequenceNbr, carId);
ShCar shCar = shCarServiceImpl.getOne(queryWrapper1);
//根据carId获取设备列表
ShCarDto shCarDto = new ShCarDto();
BeanUtil.copyProperties(shCar, shCarDto);
// 补充信息
String companyType = reginParams.getCompany().getCompanyType();
AgencyUserModel userModel = reginParams.getUserModel();
shCarDto.setCompanyType(companyType);
shCarDto.setUseUnitName(reginParams.getCompany().getCompanyName());
shCarDto.setUseUnitCreditCode(reginParams.getCompany().getCompanyCode());
String[] code = reginParams.getCompany().getCompanyCode().split("_");
String useUnitCode = code.length > 1 ? code[1] : code[0];
if ("个人主体".equals(companyType)) {
shCarDto.setUseUnitAddress((String) commonService.getEnterpriseInfo(useUnitCode).get("address"));
} else {
shCarDto.setUseUnitAddress(reginParams.getCompany().getAddress());
}
shCarDto.setSafetyManagerId("个人主体".equals(companyType) ? userModel.getRealName() : null);
shCarDto.setPhone("个人主体".equals(companyType) ? userModel.getMobile() : null);
// 根据carId获取设备列表
LambdaQueryWrapper<ShCarEqu> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ShCarEqu::getCarId,carId);
queryWrapper.eq(ShCarEqu::getCarId, carId);
List<ShCarEqu> list = this.list(queryWrapper);
//将设备列表转换为前端可识别bean
// 将设备列表转换为前端可识别bean
List<ShCarEquVo> collect = list.stream().map(shCarEqu -> new ShCarEquVo(shCarEqu)).collect(Collectors.toList());
//封装返回VO
CarAndEquVo carAndEquVo = new CarAndEquVo(shCar, collect);
return carAndEquVo;
// 封装返回VO
return new CarAndEquVo(shCarDto, collect);
}
......
......@@ -79,4 +79,8 @@ public interface AQZSDPStatisticsMapper {
List<CountDto> selectByOrgAndProblemTypeForCy(@Param("orgCode") String orgCode, @Param("dto") DPFilterParamDto dpFilterParamDto);
Page<SafetyProblemTracingDto> queryForSafetyProblemTracingPage(Page<SafetyProblemTracingDto> page, SafetyProblemTracingDto problemModel);
CountDto selectByOrgAndProblemTypeForWb(@Param("orgCode") String orgCode, @Param("problemTypeCode") String problemTypeCode,
@Param("dto") DPFilterParamDto dpFilterParamDto, @Param("sourceTypeCode") String sourceTypeCode, @Param("equListCode") String equListCode);
}
......@@ -17,7 +17,6 @@ import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* Mapper 接口
......@@ -65,5 +64,5 @@ public interface AlertStatisticsMapper extends BaseMapper<AlertStatistics> {
List<AlertPaperInfoDto> getAlertPaperInfoList(@Param("regionCodes") List<String> regionCodes, @Param("isHistory") Boolean isHistory);
List<JSONObject> getUseUnitByCreditCode(@Param("useUnitCreditCode")Set<String> useUnitCreditCode);
List<JSONObject> getKeyMonitorUseUnitByCityCode(@Param("cityCode")String cityCode);
}
......@@ -109,11 +109,10 @@
tzs_safety_problem_tracing
WHERE
governing_body_org_code LIKE concat ( #{orgCode}, '%' )
AND problem_level IS NOT NULL
<if test="now != null and now != ''">
AND DATE_FORMAT(problem_time,'%Y-%m') &gt;= #{now}
</if>
<if test="sourceTypeCode !=null and sourceTypeCode !=''">
<if test="sourceTypeCode !=null and sourceTypeCode !='' and sourceTypeCode != 2">
and source_type_code = #{sourceTypeCode}
</if>
</select>
......@@ -193,7 +192,6 @@
WHERE
governing_body_org_code LIKE concat ( #{orgCode}, '%' )
AND DATE_FORMAT ( problem_time, '%Y' ) = #{time}
AND problem_level IS NOT NULL
GROUP BY
principal_unit_code
ORDER BY
......@@ -373,14 +371,13 @@
from tzs_safety_problem_tracing spt
<where>
spt.is_delete = false
AND spt.problem_level IS NOT NULL
<if test="problemModel.problemNum != null and problemModel.problemNum != ''">
and spt.problem_num = LIKE CONCAT('%', #{problemModel.problemNum}, '%')
</if>
<if test="problemModel.problemStatus != null and problemModel.problemStatus != ''">
and spt.problem_status = #{problemModel.problemStatus}
</if>
<if test="problemModel.sourceTypeCode != null and problemModel.sourceTypeCode != ''">
<if test="problemModel.sourceTypeCode != null and problemModel.sourceTypeCode != '' and problemModel.sourceTypeCode != 2">
and spt.source_type_code = #{problemModel.sourceTypeCode}
</if>
<if test="problemModel.problemLevelCode != null and problemModel.problemLevelCode != ''">
......@@ -422,6 +419,33 @@
</where>
order by spt.create_date desc
</select>
<select id="selectByOrgAndProblemTypeForWb" resultType="com.yeejoin.amos.boot.biz.common.dto.CountDto">
SELECT
COUNT(1) as longValue,
t.problem_type AS keyStr
FROM
(SELECT problem_type FROM
tzs_safety_problem_tracing
WHERE
governing_body_org_code LIKE concat ( #{orgCode}, '%' )
<if test="dto.beginDate !=null and dto.beginDate !=''">
and date_ge(CAST(problem_time as date),#{dto.beginDate})
</if>
<if test="dto.endDate !=null and dto.endDate !=''">
and date_le(CAST(problem_time as date),#{dto.endDate})
</if>
<if test="null != sourceTypeCode">
AND source_type_code = #{sourceTypeCode}
</if>
<if test="null != equListCode">
AND equip_list_code = #{equListCode}
</if>
<if test="null != problemTypeCode">
AND problem_type_code = #{problemTypeCode}
</if>
GROUP BY
principal_unit_code) t
</select>
</mapper>
......@@ -449,10 +449,16 @@
</select>
<select id="getUseUnitByCreditCode" resultType="com.alibaba.fastjson.JSONObject">
select sequence_nbr sequenceNbr, use_unit_code useUnitCode, use_unit useUnit from tz_base_enterprise_info where use_unit_code in
<foreach collection="useUnitCreditCode" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
<select id="getKeyMonitorUseUnitByCityCode" resultType="com.alibaba.fastjson.JSONObject">
SELECT
v.region_code,
v.use_unit_code useUnitCode,
(SELECT use_unit FROM tz_base_enterprise_info WHERE use_code = v.use_unit_code) useUnit
FROM
tz_base_enterprise_video v
WHERE
region_code LIKE CONCAT('%', #{cityCode}, '%')
GROUP BY
use_unit_code
</select>
</mapper>
......@@ -3,19 +3,26 @@
<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,
SELECT
t.sequence_nbr AS sequenceNbr,
t.business_type AS businessType,
t.apply_no AS applyNo,
t.rec_user_id AS recUserId,
t.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
t.approval_unit AS approvalUnit,
t.status,
t.route_path AS routePath
FROM
tzs_jg_resume_info t
JOIN (SELECT apply_no, MAX(rec_date) AS max_rec_date
FROM tzs_jg_resume_info
WHERE equ_id = #{record}
GROUP BY apply_no
) AS latest
ON t.apply_no = latest.apply_no AND t.rec_date = latest.max_rec_date
WHERE t.equ_id = #{record}
ORDER BY t.rec_date ASC
</select>
<select id="queryForSafetyProblemTracingList" resultType="java.util.Map">
......
......@@ -7,7 +7,7 @@
</select>
<select id="queryByUseCode" resultType="com.yeejoin.amos.boot.module.statistics.api.entity.TzBaseEnterpriseInfo">
select * from tz_base_enterprise_info where use_code = #{useCode}
select * from tz_base_enterprise_info where use_unit_code = #{useCode}
</select>
......
......@@ -925,6 +925,8 @@
<select id="countBizFinishedNumForDPListSGGZ" resultType="java.util.Map">
<if test="treeValue != null or dto.businessTypeCode == 'gz_az'">
SELECT
tjin.address,
tjin.install_start_date AS constructionDate,
tjin.sequence_nbr AS sequenceNbr,
'安装告知' AS businessType,
tjin.apply_no AS applyNo,
......@@ -973,6 +975,8 @@
</if>
<if test="treeValue != null or dto.businessTypeCode == 'gz_wx'">
SELECT
tjmn.address,
tjmn.plan_date AS constructionDate,
tjmn.sequence_nbr AS sequenceNbr,
'维修告知' AS businessType,
tjmn.apply_no AS applyNo,
......@@ -1021,6 +1025,8 @@
</if>
<if test="treeValue != null or dto.businessTypeCode == 'gz_gz'">
SELECT
tjrn.address,
tjrn.plan_date AS constructionDate,
tjrn.sequence_nbr AS sequenceNbr,
'改造告知' AS businessType,
tjrn.apply_no AS applyNo,
......@@ -1069,6 +1075,8 @@
</if>
<if test="treeValue != null or dto.businessTypeCode == 'gz_yz'">
SELECT
tn.address,
tn.plan_date AS constructionDate,
tn.sequence_nbr AS sequenceNbr,
'移装告知' AS businessType,
tn.apply_no AS applyNo,
......@@ -1118,28 +1126,34 @@
order by createDate desc
</select>
<select id="countBizFinishedNumForDPListSYDJ" resultType="java.util.Map">
WITH equipment_category AS (
SELECT code, name FROM tz_equipment_category
),
filtered_data AS (
<if test="treeValue != null or dto.businessTypeCode == 'sy_dj'">
SELECT
tjur.sequence_nbr AS sequenceNbr,
'使用登记' AS businessType,
tjur.apply_no AS applyNo,
(SELECT tec.name FROM tz_equipment_category tec WHERE tec.code = ri.EQU_LIST ) AS equList,
(SELECT tec.name FROM tz_equipment_category tec WHERE tec.code = ri.EQU_CATEGORY ) AS equCategory,
ec_equ_list.name AS equList,
ec_equ_category.name AS equCategory,
tjur.use_unit_name AS unitName,
tjur.receive_org_name AS receiveOrgName,
tjur.create_date AS createDate,
tjur.audit_pass_date AS handleDate,
CASE
WHEN tjur.status = '已完成' THEN
'已完成' ELSE'进行中'
WHEN tjur.status = '已完成' THEN '已完成'
ELSE '进行中'
END AS status
FROM
tzs_jg_use_registration tjur
FROM tzs_jg_use_registration tjur
LEFT JOIN tzs_jg_use_registration_eq tne ON tjur.sequence_nbr = tne.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info ri ON tne.equ_id = ri.RECORD
LEFT JOIN equipment_category ec_equ_list ON ec_equ_list.code = ri.EQU_LIST
LEFT JOIN equipment_category ec_equ_category ON ec_equ_category.code = ri.EQU_CATEGORY
WHERE
receive_company_org_code like CONCAT(#{orgCode}, '%')
and tjur.status != '已作废' and tjur.is_delete = 0
receive_company_org_code LIKE CONCAT(#{orgCode}, '%')
AND tjur.status != '已作废'
AND tjur.is_delete = 0
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
......@@ -1147,16 +1161,16 @@
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and tjur.use_unit_name like CONCAT('%', #{dto.companyName}, '%')
AND tjur.use_unit_name LIKE CONCAT('%', #{dto.companyName}, '%')
</if>
<if test="dto.superviseUnitName != null and dto.superviseUnitName != ''">
and tjur.receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
AND tjur.receive_org_name LIKE CONCAT('%', #{dto.superviseUnitName}, '%')
</if>
<if test="dto.equListCode != null and dto.equListCode != ''">
and ri.EQU_LIST = #{dto.equListCode}
AND ri.EQU_LIST = #{dto.equListCode}
</if>
<if test="dto.equCategoryCode != null and dto.equCategoryCode != ''">
and ri.EQU_CATEGORY = #{dto.equCategoryCode}
AND ri.EQU_CATEGORY = #{dto.equCategoryCode}
</if>
<if test="dto.status != null and dto.status != '' and dto.status != '6616'">
and tjur.status != '已完成'
......@@ -1166,30 +1180,31 @@
</if>
</if>
<if test="treeValue != null">
union all
UNION ALL
</if>
<if test="treeValue != null or dto.businessTypeCode == 'car_cyl_dj'">
SELECT
SELECT DISTINCT
tjvi.sequence_nbr AS sequenceNbr,
'车用气瓶登记' AS businessType,
tjvi.apply_no AS applyNo,
(SELECT tec.name FROM tz_equipment_category tec WHERE tec.code = ri.EQU_LIST ) AS equList,
(SELECT tec.name FROM tz_equipment_category tec WHERE tec.code = ri.EQU_CATEGORY ) AS equCategory,
ec_equ_list.name AS equList,
ec_equ_category.name AS equCategory,
tjvi.install_unit_name AS unitName,
tjvi.receive_org_name AS receiveOrgName,
tjvi.create_date AS createDate,
tjvi.audit_pass_date AS handleDate,
CASE
WHEN tjvi.status = '已完成' THEN
'已完成' ELSE'进行中'
WHEN tjvi.status = '已完成' THEN '已完成'
ELSE '进行中'
END AS status
FROM
tzs_jg_vehicle_information tjvi
FROM tzs_jg_vehicle_information tjvi
LEFT JOIN tzs_jg_vehicle_information_eq tjvie ON tjvi.sequence_nbr = tjvie.vehicle_id
LEFT JOIN idx_biz_jg_register_info ri ON tjvie.equ_id = ri.RECORD
LEFT JOIN equipment_category ec_equ_list ON ec_equ_list.code = ri.EQU_LIST
LEFT JOIN equipment_category ec_equ_category ON ec_equ_category.code = ri.EQU_CATEGORY
WHERE
tjvi.org_branch_code like CONCAT(#{orgCode}, '%')
and tjvi.status != '已作废'
tjvi.org_branch_code LIKE CONCAT(#{orgCode}, '%')
AND tjvi.status != '已作废'
<if test="dto.beginDate != null and dto.beginDate != ''">
and date_ge(CAST(audit_pass_date as date),#{dto.beginDate})
</if>
......@@ -1197,16 +1212,16 @@
and date_le(CAST(audit_pass_date as date),#{dto.endDate})
</if>
<if test="dto.companyName != null and dto.companyName != ''">
and tjvi.use_unit_name like CONCAT('%', #{dto.companyName}, '%')
AND tjvi.use_unit_name LIKE CONCAT('%', #{dto.companyName}, '%')
</if>
<if test="dto.superviseUnitName != null and dto.superviseUnitName != ''">
and tjvi.receive_org_name like CONCAT('%', #{dto.superviseUnitName}, '%')
AND tjvi.receive_org_name LIKE CONCAT('%', #{dto.superviseUnitName}, '%')
</if>
<if test="dto.equListCode != null and dto.equListCode != ''">
and ri.EQU_LIST = #{dto.equListCode}
AND ri.EQU_LIST = #{dto.equListCode}
</if>
<if test="dto.equCategoryCode != null and dto.equCategoryCode != ''">
and ri.EQU_CATEGORY = #{dto.equCategoryCode}
AND ri.EQU_CATEGORY = #{dto.equCategoryCode}
</if>
<if test="dto.status != null and dto.status != '' and dto.status != '6616'">
and tjvi.status != '已完成'
......@@ -1214,10 +1229,11 @@
<if test="dto.status != null and dto.status != '' and dto.status == '6616'">
and tjvi.status = '已完成'
</if>
GROUP BY tjvi.sequence_nbr
</if>
order by createDate desc
)
SELECT * FROM filtered_data ORDER BY createDate DESC
</select>
<select id="countBizFinishedNumForDPListBGDJ" resultType="java.util.Map">
<if test="treeValue != null or dto.businessTypeCode == 'dj_gz'">
SELECT
......
......@@ -427,7 +427,10 @@ public class AQZSDPStatisticsServiceImpl {
Map<String, Object> dataMap = new HashMap<>();
List<Object> xdata = new ArrayList<>();
List<Object> ydata = new ArrayList<>();
List<String> enumNameList = IssueTypeEnum.getEnumNameListByMainBody("3");
// 不需要统计资质超期和许可超期数据,2024-11-12日需求修改
List<String> enumNameList = IssueTypeEnum.getEnumNameListByMainBody("3").stream()
.filter(item -> !(item.contains("资质超期") || item.contains("许可超期")))
.collect(Collectors.toList());
String orgCode = stCommonService.getAndSetOrgCode(dpFilterParamDto.getCityCode());
if (orgCode != null) {
List<CountDto> countDtos = statisticsMapper.selectByOrgAndProblemType(orgCode, enumNameList, dpFilterParamDto, IssueMainBodyEnum.EQUIPMENT.getCode(), null);
......@@ -451,6 +454,9 @@ public class AQZSDPStatisticsServiceImpl {
if (orgCode != null) {
List<CountDto> countDtos = statisticsMapper.selectByOrgAndProblemType(orgCode, enumNameList, dpFilterParamDto, IssueMainBodyEnum.COMPANY.getCode(), null);
countDtos.forEach(t -> dataMap.put(t.getKeyStr(), t.getLongValue()));
// 企业维保合同过期单独查询(企业下有设备维保超期就算)
CountDto wbCountDto = statisticsMapper.selectByOrgAndProblemTypeForWb(orgCode, IssueTypeEnum.MAINTENANCE_OVERDUE_EQUMENT.getCode(), dpFilterParamDto, IssueMainBodyEnum.EQUIPMENT.getCode(), "3000");
dataMap.put(IssueTypeEnum.MAINTENANCE_RECORD_OVERDUE_COMPANY.getName(), wbCountDto == null ? 0 : wbCountDto.getLongValue());
}
for (int i = 0; i < enumNameList.size(); i++) {
Map<String, Object> map = new HashMap<>();
......@@ -467,7 +473,7 @@ public class AQZSDPStatisticsServiceImpl {
break;
case "维保备案超期":
map.put("key", "maintenanceFilingOverdueNumber");
map.put("label", "维保备案超期数(仅电梯)");
map.put("label", "维保合同备案超期数(仅电梯)");
map.put("value", dataMap.getOrDefault(enumNameList.get(i), "0"));
break;
default:
......
......@@ -16,6 +16,7 @@ import com.yeejoin.amos.feign.morphic.model.FormSceneModel;
import jdk.nashorn.api.scripting.ScriptObjectMirror;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
......@@ -32,6 +33,8 @@ import javax.script.Invocable;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import java.net.URI;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
......@@ -57,6 +60,9 @@ public class DPSubServiceImpl {
@Autowired
DPSubBizServiceImpl dpSubBizService;
@Value("${supervisionCode.prefix:https://sxtzsb.sxsei.com:19435/tzs?code=}")
private String supervisionCodePrefix;
public JSONObject commonQuery(String template, @RequestBody Map<String, Object> param) {
JSONObject result = new JSONObject();
String templateJson = DpSubUtils.getFileContent(template + ".json");
......@@ -519,7 +525,7 @@ public class DPSubServiceImpl {
e.printStackTrace();
}
}
String color = null;
String color = "green";
if (!ValidationUtil.isEmpty(problemTime)) {
try {
qrcode.put("text", DateUtil.formatDate(DateUtil.smartFormat(problemTime), "yyyy-MM-dd"));
......@@ -533,7 +539,12 @@ public class DPSubServiceImpl {
} else if ("异常".equals(problemStatus) || "未处理".equals(problemStatus)) {
color = "red";
}
qrcode.put("value", !ValidationUtil.isEmpty(result.get("SUPERVISORY_CODE")) ? "https://sxtzsb.sxsei.com:9435/tzs/?code=" + result.get("SUPERVISORY_CODE") : result.get("USE_ORG_CODE"));
// 处理隐患和企业详情码:改为固定图片。后期待定义二维码及页面内容后再改为二维码
if (!ValidationUtil.isEmpty(qrcode.getString("picUrl"))) {
JSONObject picUrls = qrcode.getJSONObject("picUrl");
qrcode.put("url", picUrls.getString(color));
}
qrcode.put("value", !ValidationUtil.isEmpty(result.get("SUPERVISORY_CODE")) ? supervisionCodePrefix + result.get("SUPERVISORY_CODE") : result.get("USE_ORG_CODE"));
qrcode.put("status", problemStatus);
qrcode.put("color", color);
return qrcode;
......@@ -597,13 +608,15 @@ public class DPSubServiceImpl {
log.info("附件数据:{}", value);
((JSONArray)value).stream().forEach(y -> {
JSONObject yObj = (JSONObject) y;
if(!ValidationUtil.isEmpty(yObj.getString("url"))) {
String[] str = yObj.getString("url").split("\\.");
if (ValidationUtil.isEmpty(str)){
if (ValidationUtil.isEmpty(str)) {
yObj.put("thumb", yObj.getString("url"));
} else {
MatinfoEnum iconUrl = MatinfoEnum.getIconUrl(str[1]);
yObj.put("thumb", ValidationUtil.isEmpty(iconUrl) ? yObj.getString("url") : iconUrl.getIcon());
}
}
});
attachmentUploadDatasObj.put("value", value);
String accept = visualParams.getString("accept");
......@@ -627,6 +640,21 @@ public class DPSubServiceImpl {
JSONObject lnglatSelect = (JSONObject) value;
jsonObject.put("value", (!ValidationUtil.isEmpty(lnglatSelect.getString("latitude")) && !ValidationUtil.isEmpty(lnglatSelect.getString("longitude")))
? String.format("[%s,%s]", lnglatSelect.getString("latitude"), lnglatSelect.getString("longitude")) : lnglatSelect.getString("address"));
}else if(ValidationUtil.isEmpty(value)){
jsonObject.put("value","");
}
} else if ("dateTime".equals(xObj.getString("componentKey"))) {
if (!ValidationUtil.isEmpty(value)) {
String f = visualParams.getString("format").replace("Y","y").replace("D","d");
SimpleDateFormat sdf = new SimpleDateFormat(f);
Date date = null;
try {
date = sdf.parse(ValidationUtil.validateString(value));
} catch (ParseException e) {
throw new RuntimeException(e);
}
jsonObject.put("value",sdf.format(date));
}
} else if ("checkbox".equals(xObj.getString("componentKey"))) {
ResponseModel checkboxResult = this.getApiResult(visualParams.getJSONObject("api"), null);
......
......@@ -115,6 +115,9 @@ public class EmergencyBizServiceImpl {
AlertCalledFormDto alertCalledFormVo = getAlertCalledFormDto(id);
Map<String, Object> objectMap = Bean.BeantoMap(alertCalledFormVo.getAlertCalledDto());
List<FormValue> dynamicFormAlert = alertCalledFormVo.getDynamicFormAlert();
HashMap<String, Object> datas = new HashMap<>();
HashMap<String, Object> qrcode = new HashMap<>();
ArrayList<Map<String, Object>> records = new ArrayList<>();
jsonData.forEach(f -> {
Object o = objectMap.get(f.getKey());
if (!ObjectUtils.isEmpty(o)) {
......@@ -127,7 +130,19 @@ public class EmergencyBizServiceImpl {
jsonData.addAll(dynamicFormAlert);
// 使用单位信息
// 获取根据警情获取电梯信息
Map<String, Object> map = this.selectByAlertId(id);
Map<String, Object> map = new HashMap<>();
try {
map = this.selectByAlertId(id);
}catch (Exception e){
datas.put("datas", records);
datas.put("title", "处置记录");
datas.put("renderType", "timeline");
keyinfoData.put("title", null);
keyinfoData.put("keyParams", jsonData);
keyinfoData.put("infoRecords", datas);
keyinfoData.put("qrcode", qrcode);
return keyinfoData;
}
// 根据设备id 获取使用单位信息
Map<String, Object> useUnitMap = alertStatisticsMapper.selectUseUnitByAlertId(String.valueOf(map.get("sequenceNbr")));
if (!ObjectUtils.isEmpty(useUnitMap)) {
......@@ -154,8 +169,6 @@ public class EmergencyBizServiceImpl {
LambdaQueryWrapper<RepairConsult> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(RepairConsult::getParentId, id).orderByDesc(RepairConsult::getRecDate);
List<RepairConsult> list = repairConsultMapper.selectList(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());
......@@ -164,7 +177,7 @@ public class EmergencyBizServiceImpl {
records.add(data);
});
// 96333码
HashMap<String, Object> qrcode = new HashMap<>();
if (!ObjectUtils.isEmpty(alertCalledFormVo.getAlertCalledDto())) {
qrcode.put("title", "96333码");
qrcode.put("value", alertCalledFormVo.getAlertCalledDto().getDeviceId());
......
......@@ -149,7 +149,9 @@ public class EnterpriseBizByTCMServiceImpl {
public TzBaseEnterpriseInfoDto getInfoByUseCode(String useCode) {
TzBaseEnterpriseInfo tzBaseEnterpriseInfo = enterpriseBizMapper.queryByUseCode(useCode);
if (ObjectUtils.isEmpty(tzBaseEnterpriseInfo)) {
return null;
}
TzBaseEnterpriseInfoDto tzBaseEnterpriseInfoDto = getDetail(tzBaseEnterpriseInfo);
if (!ObjectUtils.isEmpty(tzBaseEnterpriseInfo)){
LambdaQueryWrapper<TzsBaseInstitution> lambda = new QueryWrapper<TzsBaseInstitution>().lambda();
......
......@@ -1112,6 +1112,7 @@ public class JGDPStatisticsServiceImpl {
});
resultMap.put("xdata", xData);
resultMap.put("ydata", yData);
resultMap.put("unit", "天");
return resultMap;
}
......@@ -2443,6 +2444,7 @@ public class JGDPStatisticsServiceImpl {
LambdaQueryWrapper<SafetyProblemTracing> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(SafetyProblemTracing::getSourceId, record);
lambdaQueryWrapper.orderByDesc(SafetyProblemTracing::getRecDate);
lambdaQueryWrapper.eq(SafetyProblemTracing::getProblemStatusCode, SafetyProblemStatusEnum.UNHANDLED.getCode());
List<SafetyProblemTracing> safetyProblemTracings = safetyProblemTracingMapper.selectList(lambdaQueryWrapper);
if (!ObjectUtils.isEmpty(safetyProblemTracings)) {
objMap.put("problemStatus", ProblemStatusEnum.getNameByDesc.get(safetyProblemTracings.get(0).getProblemStatus()));
......
......@@ -353,6 +353,8 @@ public class JYJCDPStatisticsServiceImpl {
legendData.add(map);
}
result.put("legendData", legendData);
result.put("unit", "台套");
return result;
}
......@@ -493,6 +495,7 @@ public class JYJCDPStatisticsServiceImpl {
List<CountDto> countDtos = inspectionApplicationMapper.queryAppByEquListForDP(orgCode, dpFilterParamDto);
Map<String, List<CountDto>> groupByMap = countDtos.stream().collect(Collectors.groupingBy(CountDto::getLabel));
this.setYDataForInspectionEquipByEquList(result, groupByMap, equipmentCategoryDtos);
result.put("unit", "台套");
return result;
}
......
......@@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Sets;
import com.yeejoin.amos.boot.biz.common.dto.CountDto;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl;
......@@ -16,8 +15,6 @@ import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto;
import com.yeejoin.amos.boot.module.common.api.entity.AlertRescueStatistics;
import com.yeejoin.amos.boot.module.common.api.entity.AlertUseUnitStatistics;
import com.yeejoin.amos.boot.module.common.api.enums.AlertCallEnum;
import com.yeejoin.amos.boot.module.common.api.enums.BusinessTypeEnum;
import com.yeejoin.amos.boot.module.jyjc.api.enums.JYJCTypeEnum;
import com.yeejoin.amos.boot.module.statistics.api.dto.AlertUseUnitStatisticsDto;
import com.yeejoin.amos.boot.module.statistics.api.mapper.AlertRescueStatisticsMapper;
import com.yeejoin.amos.boot.module.statistics.api.mapper.AlertStatisticsMapper;
......@@ -39,12 +36,10 @@ import org.elasticsearch.client.core.CountRequest;
import org.elasticsearch.client.core.CountResponse;
import org.elasticsearch.index.query.BoolQueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.aggregations.AggregationBuilders;
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
import org.elasticsearch.search.aggregations.bucket.terms.TermsAggregationBuilder;
import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.foundation.utils.DateTimeUtil;
......@@ -276,6 +271,9 @@ public class YJDPStatisticsServiceImpl {
lambda.eq(AlertUseUnitStatistics::getStatisticsDate, date);
lambda.isNotNull(AlertUseUnitStatistics::getUseUnitCode);
List<AlertUseUnitStatistics> alertUseUnitStatistics = alertUseUnitStatisticsMapper.selectList(lambda);
alertUseUnitStatistics.sort(Comparator.comparing(
(AlertUseUnitStatistics a) -> a.getFaultNum() + a.getTrappedNum()
).reversed());
return Bean.toModels(alertUseUnitStatistics, AlertUseUnitStatisticsDto.class);
}
......@@ -772,41 +770,11 @@ public class YJDPStatisticsServiceImpl {
}
public List<JSONObject> getKeyPositionMonitor(DPFilterParamForDetailDto filterParamDto) {
String orgCode = stCommonService.getAndSetOrgCode(filterParamDto.getCityCode());
return getKeyPositionMonitorByES(orgCode, filterParamDto);
return getKeyPositionMonitorByES(filterParamDto);
}
private List<JSONObject> getKeyPositionMonitorByES(String orgCode, DPFilterParamForDetailDto filterParamDto) {
SearchRequest request = new SearchRequest();
request.indices("idx_biz_view_jg_all");
BoolQueryBuilder boolMust = QueryBuilders.boolQuery();
// 按照管辖机构区域信息模糊查询
boolMust.must(QueryBuilders.wildcardQuery("ORG_BRANCH_CODE.keyword", QueryParser.escape(orgCode) + "*"));
// 只统计已纳管设备
boolMust.must(QueryBuilders.termQuery("IS_INTO_MANAGEMENT", Boolean.TRUE));
// 根据设备种类查询重点监控单位
boolMust.must(QueryBuilders.termQuery("EQU_LIST_CODE", filterParamDto.getEquListCode()));
SearchSourceBuilder builder = new SearchSourceBuilder();
builder.query(boolMust);
request.source(builder);
List<JSONObject> list = null;
Set<String> useUnitCreditCodeSet = Sets.newHashSet();
try {
SearchResponse response = restHighLevelClient.search(request, RequestOptions.DEFAULT);
for (SearchHit hit : response.getHits().getHits()) {
JSONObject jsonObject = (JSONObject) JSONObject.toJSON(hit);
JSONObject source = jsonObject.getJSONObject("sourceAsMap");
useUnitCreditCodeSet.add(source.getString("USE_UNIT_CREDIT_CODE"));
}
if (!ValidationUtil.isEmpty(useUnitCreditCodeSet)) {
list = alertStatisticsMapper.getUseUnitByCreditCode(useUnitCreditCodeSet);
private List<JSONObject> getKeyPositionMonitorByES(DPFilterParamForDetailDto filterParamDto) {
return alertStatisticsMapper.getKeyMonitorUseUnitByCityCode(filterParamDto.getCityCode());
}
} catch (IOException e) {
throw new RuntimeException(e);
}
return list;
}
}
package com.yeejoin.amos.boot.module.statistcs.biz.service.impl.ZBGLImpl;
import cn.hutool.core.lang.UUID;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.dto.CountDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamDto;
import com.yeejoin.amos.boot.module.common.api.dto.DPFilterParamForDetailDto;
import com.yeejoin.amos.boot.module.statistcs.biz.service.IZBGLService;
import com.yeejoin.amos.boot.module.statistcs.biz.service.impl.StCommonServiceImpl;
import com.yeejoin.amos.boot.module.statistics.api.mapper.JGStatisticsMapper;
import com.yeejoin.amos.boot.module.statistics.api.mapper.ZBGLStatisticsMapper;
import com.yeejoin.amos.feign.systemctl.model.RegionModel;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@Component
public class YwblpjsxtjServiceImpl implements IZBGLService {
@Resource
private StCommonServiceImpl stCommonService;
@Resource
private JGStatisticsMapper jgStatisticsMapper;
@Override
public Map<String, Object> getChart(DPFilterParamForDetailDto dpFilterParamForDetailDto) {
List<RegionModel> regionModels = stCommonService.setRegionIfRootParent(dpFilterParamForDetailDto.getCityCode());
String orgCodeP = stCommonService.getAndSetOrgCode(dpFilterParamForDetailDto.getCityCode());
DPFilterParamDto dpFilterParamDto = new DPFilterParamDto();
//安装告知、维修告知、改造告知、移装告知
List<CountDto> noticCount = jgStatisticsMapper.queryNoticeAvgDayByReceiveCompany(dpFilterParamDto, orgCodeP);
//使用登记、车用气瓶使用登记
List<CountDto> useCount = jgStatisticsMapper.queryUseAvgDayByReceiveCompany(dpFilterParamDto, orgCodeP);
//更名变更登记、改造变更登记、移装变更登记、单位变更登记、气瓶单位变更登记
List<CountDto> changeCount = jgStatisticsMapper.queryChangeAvgDayByReceiveCompany(dpFilterParamDto, orgCodeP);
//启用停用
List<CountDto> disableCount = jgStatisticsMapper.queryDisableAvgDayByReceiveCompany(dpFilterParamDto, orgCodeP);
//注销报废
List<CountDto> cancelCount = jgStatisticsMapper.queryCancelAvgDayByReceiveCompany(dpFilterParamDto, orgCodeP);
Map<String,Object> returnMap = new HashMap<>();
List<Map<String,Object>> legendData = new ArrayList<>();
for(int i = 0;i<5; i++){
Map<String,Object> map = new HashMap<>();
if(i == 0){
map.put("dataKey","notic");
map.put("value","告知管理");
map.put("chartType","bar");
}else if(i == 1){
map.put("dataKey","use");
map.put("value","使用登记");
map.put("chartType","bar");
}else if(i == 2){
map.put("dataKey","change");
map.put("value","变更登记");
map.put("chartType","bar");
}else if(i == 3){
map.put("dataKey","disable");
map.put("value","停用启用");
map.put("chartType","bar");
}else{
map.put("dataKey","cancel");
map.put("value","注销报废");
map.put("chartType","bar");
}
legendData.add(map);
}
returnMap.put("legendData",legendData);
List xdata = new ArrayList();
List notic = new ArrayList();
List use = new ArrayList();
List change = new ArrayList();
List disable = new ArrayList();
List cancel = new ArrayList();
regionModels.forEach(r -> {
xdata.add(r.getRegionName());
String orgCode = stCommonService.getAndSetOrgCode(r.getRegionCode().toString());
notic.add(this.avgAndSumDealDate(noticCount.stream().filter(c -> c.getKeyStr().contains(orgCode)).collect(Collectors.toList())));
use.add(this.avgAndSumDealDate(useCount.stream().filter(c -> c.getKeyStr().contains(orgCode)).collect(Collectors.toList())));
change.add(this.avgAndSumDealDate(changeCount.stream().filter(c -> c.getKeyStr().contains(orgCode)).collect(Collectors.toList())));
disable.add(this.avgAndSumDealDate(disableCount.stream().filter(c -> c.getKeyStr().contains(orgCode)).collect(Collectors.toList())));
cancel.add(this.avgAndSumDealDate(cancelCount.stream().filter(c -> c.getKeyStr().contains(orgCode)).collect(Collectors.toList())));
});
returnMap.put("xdata",xdata);
returnMap.put("notic",notic);
returnMap.put("use",use);
returnMap.put("change",change);
returnMap.put("disable",disable);
returnMap.put("cancel",cancel);
return returnMap;
}
@Override
public Page<Map<String, Object>> getPage(Page page,DPFilterParamForDetailDto dpFilterParamForDetailDto) {
List<RegionModel> regionModels = stCommonService.setRegionIfRootParent(dpFilterParamForDetailDto.getCityCode());
return page;
}
@Override
public List<Map<String, String>> getTitle(DPFilterParamForDetailDto dpFilterParamForDetailDto) {
List<Map<String, String>> list = new ArrayList<>();
for(int i = 0; i < 6; i++){
Map<String,String> map = new HashMap<>();
if(i == 0){
map.put("dataIndex","regionName");
map.put("title","区域");
}else if(i == 1){
map.put("dataIndex","notic");
map.put("title","告知管理");
}else if(i == 2){
map.put("dataIndex","use");
map.put("title","使用登记");
}else if(i == 3){
map.put("dataIndex","change");
map.put("title","变更登记");
}else if(i == 4){
map.put("dataIndex","disable");
map.put("title","停用启用");
}else if(i == 5){
map.put("dataIndex","cancel");
map.put("title","注销报废");
}
list.add(map);
}
return list;
}
private String avgAndSumDealDate(List<CountDto> collect) {
BigDecimal sum = collect.stream().map(c -> new BigDecimal(c.getStrValue())).reduce(BigDecimal.ZERO, BigDecimal::add);
if(collect.isEmpty()){
return "0";
}
return sum.divide(BigDecimal.valueOf(collect.size()), 1, RoundingMode.HALF_UP).toPlainString();
}
}
......@@ -706,7 +706,7 @@ public class ZLDPStatisticsServiceImpl {
Map<String, Object> result = new HashMap<>();
List<Map<String, Object>> legendData = new ArrayList<>();
legendData.add(createLegend("设备总数", "equipTotal", "bar", "个"));
legendData.add(createLegend("纳管率", "claimRate", "line", "%"));
legendData.add(createLegend("赋码率", "claimRate", "line", "%"));
List<RegionModel> regionList = stCommonService.setRegionIfRootParentAndNoAccessIf3Level("610000");
// 获取区域名称并过滤
......@@ -793,9 +793,14 @@ public class ZLDPStatisticsServiceImpl {
BoolQueryBuilder boolMust = QueryBuilders.boolQuery();
// 按照管辖机构区域信息模糊查询
boolMust.must(QueryBuilders.wildcardQuery("ORG_BRANCH_CODE.keyword", QueryParser.escape(orgCode) + "*"));
// 设备类别精确查询气瓶
boolMust.must(QueryBuilders.termQuery("IS_INTO_MANAGEMENT", true));
boolMust.must(QueryBuilders.existsQuery("SUPERVISORY_CODE"));
boolMust.mustNot(QueryBuilders.termQuery("SUPERVISORY_CODE","null"));
String[] status = {"草稿","已拒领","待认领"};
boolMust.mustNot(QueryBuilders.termsQuery("STATUS",Arrays.asList(status)));
String[] equCategoryCode = {"2300"};
boolMust.mustNot(QueryBuilders.termsQuery("EQU_CATEGORY_CODE",Arrays.asList(equCategoryCode)));
String[] equListCode = {"8000"};
boolMust.mustNot(QueryBuilders.termsQuery("EQU_LIST_CODE",Arrays.asList(equListCode)));
if (StringUtils.isNotEmpty(paramDto.getTreeValue())) {
if ("2300".equals(paramDto.getTreeValue())){
boolMust.must(QueryBuilders.termQuery("EQU_CATEGORY_CODE", QueryParser.escape(paramDto.getTreeValue().toLowerCase())));
......
......@@ -78,8 +78,14 @@
"title": "{useUnit}",
"status": [],
"qrcode": {
"title": "企业二维码",
"problem": []
"title": "",
"problem": [],
"picUrl": {
"red": "/upload/tzs/dpscreen/images/安全守护-红.png",
"grey": "/upload/tzs/dpscreen/images/安全守护-灰.png",
"orange": "/upload/tzs/dpscreen/images/安全守护-橙.png",
"green": "/upload/tzs/dpscreen/images/安全守护-绿.png"
}
},
"keyParams": [
{ "key": "unitType", "label": "单位类型" },
......
......@@ -79,6 +79,10 @@
{
"fieldKey": "NAME_OF_PRESSURE_PARTS",
"dictionaryType": "GLBJMC"
},
{
"fieldKey": "INSPECT_TYPE",
"dictionaryType": "JYJC"
}
]
}
......
......@@ -47,6 +47,10 @@
{
"fieldKey": "INSPECT_CONCLUSION",
"dictionaryType": "JYJL"
},
{
"fieldKey": "INSPECT_TYPE",
"dictionaryType": "JYJC"
}
]
}
......
......@@ -47,6 +47,10 @@
{
"fieldKey": "INSPECT_CONCLUSION",
"dictionaryType": "JYJL"
},
{
"fieldKey": "INSPECT_TYPE",
"dictionaryType": "JYJC"
}
]
}
......
......@@ -47,6 +47,10 @@
{
"fieldKey": "INSPECT_CONCLUSION",
"dictionaryType": "JYJL"
},
{
"fieldKey": "INSPECT_TYPE",
"dictionaryType": "JYJC"
}
]
}
......
......@@ -47,6 +47,10 @@
{
"fieldKey": "INSPECT_CONCLUSION",
"dictionaryType": "JYJL"
},
{
"fieldKey": "INSPECT_TYPE",
"dictionaryType": "JYJC"
}
]
}
......
......@@ -47,6 +47,10 @@
{
"fieldKey": "INSPECT_CONCLUSION",
"dictionaryType": "JYJL"
},
{
"fieldKey": "INSPECT_TYPE",
"dictionaryType": "JYJC"
}
]
}
......
......@@ -47,6 +47,10 @@
{
"fieldKey": "INSPECT_CONCLUSION",
"dictionaryType": "JYJL"
},
{
"fieldKey": "INSPECT_TYPE",
"dictionaryType": "JYJC"
}
]
}
......
......@@ -47,6 +47,10 @@
{
"fieldKey": "INSPECT_CONCLUSION",
"dictionaryType": "JYJL"
},
{
"fieldKey": "INSPECT_TYPE",
"dictionaryType": "JYJC"
}
]
}
......
{
"name": "报检模板",
"tabs": [
{
"key": "keyinfo",
"displayName": "基本信息",
"renderType": "keyinfo",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/statistics/dp/biz-inspection/selectOneForBigScreen/{sequenceNbr}"
}
}
},
{
"key": "devtable",
"displayName": "报检设备",
"renderType": "table",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/statistics/dp/biz-inspection/selectOneForBigScreenEqu/{sequenceNbr}",
"params": {
"current": 1,
"size": 10
}
}
},
"visualParams": {
"rowKey": "SEQUENCE_NBR",
"columns": [
{"dataRenderingMode": "defaultText","dataIndex": "EQU_CATEGORY","width": 200,"align": "left","title": "设备类别","key": "1"},
{"dataRenderingMode": "defaultText","dataIndex": "EQU_DEFINE","width": 180,"align": "left","title": "设备品种","key": "2"},
{"dataRenderingMode": "defaultText","dataIndex": "PRODUCT_NAME","width": 250,"align": "left","title": "设备名称","key": "3"},
{"dataRenderingMode": "defaultText","dataIndex": "PRODUCE_UNIT_NAME","width": 150,"align": "left","title": "设备出厂编号","key": "4"},
{"dataRenderingMode": "defaultText","dataIndex": "USE_INNER_CODE","width": 200,"align": "left","title": "单位内部编号","key": "5"},
{"dataRenderingMode": "defaultText","dataIndex": "ADDRESS","width": 250,"align": "left","title": "设备地址","key": "6"},
{"dataRenderingMode": "defaultText","dataIndex": "EQU_CODE","width": 220,"align": "left","title": "设备代码","key": "7"},
{"dataRenderingMode": "defaultText","dataIndex": "SUPERVISORY_CODE","width": 150,"align": "left","title": "监管码","key": "8"},
{"dataRenderingMode": "actionDetailBtn","dataIndex": "action","width": 60,"align": "left","title": "操作","key": "9", "conf": { "title": "设备详情", "linkModelKey": "equip" }}
]
}
},
{
"key": "basic",
"displayName": "附件",
"renderType": "basic",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"POST",
"apiPath":"/statistics/dp/jy/inspectApplication/matui/{sequenceNbr}",
"body": {
"subs": [
{
"key": "bjmatinfo",
"displayName": "报检附件",
"renderType": "matui",
"columns": 3,
"datas": [
{ "key": "gzs", "label": "告知书(加盖受理单位公章)", "type": "file" },
{ "key": "cpzl", "label": "产品质量证明书", "type": "file" },
{ "key": "sgzxbg", "label": "施工自行检查报告", "type": "file" },
{ "key": "sght", "label": "施工合同或证明", "type": "file" },
{ "key": "sgfa", "label": "施工方案/施工设计文件", "type": "file" },
{ "key": "sgdwxk", "label": "施工单位许可证书", "type": "file" }
]
},
{
"key": "qtmatinfo",
"displayName": "其他附件",
"renderType": "matui",
"columns": 3,
"datas": [
{ "key": "qtfj", "label": "附件", "type": "file" },
]
}
]
}
}
}
}
],
"content": {
}
}
\ No newline at end of file
{
"name": "报检模板",
"tabs": [
{
"key": "keyinfo",
"displayName": "基本信息",
"renderType": "keyinfo",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/statistics/dp/biz-inspection/selectOneForBigScreen/{sequenceNbr}"
}
}
},
{
"key": "devtable",
"displayName": "报检设备",
"renderType": "table",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/statistics/dp/biz-inspection/selectOneForBigScreenEqu/{sequenceNbr}",
"params": {
"current": 1,
"size": 10
}
}
},
"visualParams": {
"rowKey": "SEQUENCE_NBR",
"columns": [
{"dataRenderingMode": "defaultText","dataIndex": "EQU_CATEGORY","width": 200,"align": "left","title": "设备类别","key": "1"},
{"dataRenderingMode": "defaultText","dataIndex": "EQU_DEFINE","width": 180,"align": "left","title": "设备品种","key": "2"},
{"dataRenderingMode": "defaultText","dataIndex": "PRODUCT_NAME","width": 250,"align": "left","title": "设备名称","key": "3"},
{"dataRenderingMode": "defaultText","dataIndex": "PRODUCE_UNIT_NAME","width": 150,"align": "left","title": "设备出厂编号","key": "4"},
{"dataRenderingMode": "defaultText","dataIndex": "USE_INNER_CODE","width": 200,"align": "left","title": "单位内部编号","key": "5"},
{"dataRenderingMode": "defaultText","dataIndex": "ADDRESS","width": 250,"align": "left","title": "设备地址","key": "6"},
{"dataRenderingMode": "defaultText","dataIndex": "EQU_CODE","width": 220,"align": "left","title": "设备代码","key": "7"},
{"dataRenderingMode": "defaultText","dataIndex": "SUPERVISORY_CODE","width": 150,"align": "left","title": "监管码","key": "8"},
{"dataRenderingMode": "actionDetailBtn","dataIndex": "action","width": 60,"align": "left","title": "操作","key": "9", "conf": { "title": "设备详情", "linkModelKey": "equip" }}
]
}
},
{
"key": "basic",
"displayName": "附件",
"renderType": "basic",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"POST",
"apiPath":"/statistics/dp/jy/inspectApplication/matui/{sequenceNbr}",
"body": {
"subs": [
{
"key": "bjmatinfo",
"displayName": "报检附件",
"renderType": "matui",
"columns": 3,
"datas": [
{ "key": "gzs", "label": "告知书(加盖受理单位公章)", "type": "file" },
{ "key": "cpzl", "label": "产品质量证明书", "type": "file" },
{ "key": "sgzxbg", "label": "施工自行检查报告", "type": "file" },
{ "key": "sght", "label": "施工合同或证明", "type": "file" },
{ "key": "sgfa", "label": "施工方案/施工设计文件", "type": "file" },
{ "key": "sgdwxk", "label": "施工单位许可证书", "type": "file" }
]
},
{
"key": "qtmatinfo",
"displayName": "其他附件",
"renderType": "matui",
"columns": 3,
"datas": [
{ "key": "qtfj", "label": "附件", "type": "file" },
]
}
]
}
}
}
}
],
"content": {
}
}
\ No newline at end of file
{
"name": "报检模板",
"tabs": [
{
"key": "keyinfo",
"displayName": "基本信息",
"renderType": "keyinfo",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/statistics/dp/biz-inspection/selectOneForBigScreen/{sequenceNbr}"
}
}
},
{
"key": "devtable",
"displayName": "报检设备",
"renderType": "table",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/statistics/dp/biz-inspection/selectOneForBigScreenEqu/{sequenceNbr}",
"params": {
"current": 1,
"size": 10
}
}
},
"visualParams": {
"rowKey": "SEQUENCE_NBR",
"columns": [
{"dataRenderingMode": "defaultText","dataIndex": "EQU_CATEGORY","width": 200,"align": "left","title": "设备类别","key": "1"},
{"dataRenderingMode": "defaultText","dataIndex": "EQU_DEFINE","width": 180,"align": "left","title": "设备品种","key": "2"},
{"dataRenderingMode": "defaultText","dataIndex": "PRODUCT_NAME","width": 250,"align": "left","title": "设备名称","key": "3"},
{"dataRenderingMode": "defaultText","dataIndex": "PRODUCE_UNIT_NAME","width": 150,"align": "left","title": "设备出厂编号","key": "4"},
{"dataRenderingMode": "defaultText","dataIndex": "USE_INNER_CODE","width": 200,"align": "left","title": "单位内部编号","key": "5"},
{"dataRenderingMode": "defaultText","dataIndex": "ADDRESS","width": 250,"align": "left","title": "设备地址","key": "6"},
{"dataRenderingMode": "defaultText","dataIndex": "EQU_CODE","width": 220,"align": "left","title": "设备代码","key": "7"},
{"dataRenderingMode": "defaultText","dataIndex": "SUPERVISORY_CODE","width": 150,"align": "left","title": "监管码","key": "8"},
{"dataRenderingMode": "actionDetailBtn","dataIndex": "action","width": 60,"align": "left","title": "操作","key": "9", "conf": { "title": "设备详情", "linkModelKey": "equip" }}
]
}
},
{
"key": "basic",
"displayName": "附件",
"renderType": "basic",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"POST",
"apiPath":"/statistics/dp/jy/inspectApplication/matui/{sequenceNbr}",
"body": {
"subs": [
{
"key": "bjmatinfo",
"displayName": "报检附件",
"renderType": "matui",
"columns": 3,
"datas": [
{ "key": "gzs", "label": "告知书(加盖受理单位公章)", "type": "file" },
{ "key": "cpzl", "label": "产品质量证明书", "type": "file" },
{ "key": "sgzxbg", "label": "施工自行检查报告", "type": "file" },
{ "key": "sght", "label": "施工合同或证明", "type": "file" },
{ "key": "sgfa", "label": "施工方案/施工设计文件", "type": "file" },
{ "key": "sgdwxk", "label": "施工单位许可证书", "type": "file" }
]
},
{
"key": "qtmatinfo",
"displayName": "其他附件",
"renderType": "matui",
"columns": 3,
"datas": [
{ "key": "qtfj", "label": "附件", "type": "file" },
]
}
]
}
}
}
}
],
"content": {
}
}
\ No newline at end of file
{
"name": "报检模板",
"tabs": [
{
"key": "keyinfo",
"displayName": "基本信息",
"renderType": "keyinfo",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/statistics/dp/biz-inspection/selectOneForBigScreen/{sequenceNbr}"
}
}
},
{
"key": "devtable",
"displayName": "报检设备",
"renderType": "table",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/statistics/dp/biz-inspection/selectOneForBigScreenEqu/{sequenceNbr}",
"params": {
"current": 1,
"size": 10
}
}
},
"visualParams": {
"rowKey": "SEQUENCE_NBR",
"columns": [
{"dataRenderingMode": "defaultText","dataIndex": "EQU_CATEGORY","width": 200,"align": "left","title": "设备类别","key": "1"},
{"dataRenderingMode": "defaultText","dataIndex": "EQU_DEFINE","width": 180,"align": "left","title": "设备品种","key": "2"},
{"dataRenderingMode": "defaultText","dataIndex": "PRODUCT_NAME","width": 250,"align": "left","title": "设备名称","key": "3"},
{"dataRenderingMode": "defaultText","dataIndex": "PRODUCE_UNIT_NAME","width": 150,"align": "left","title": "设备出厂编号","key": "4"},
{"dataRenderingMode": "defaultText","dataIndex": "USE_INNER_CODE","width": 200,"align": "left","title": "单位内部编号","key": "5"},
{"dataRenderingMode": "defaultText","dataIndex": "ADDRESS","width": 250,"align": "left","title": "设备地址","key": "6"},
{"dataRenderingMode": "defaultText","dataIndex": "EQU_CODE","width": 220,"align": "left","title": "设备代码","key": "7"},
{"dataRenderingMode": "defaultText","dataIndex": "SUPERVISORY_CODE","width": 150,"align": "left","title": "监管码","key": "8"},
{"dataRenderingMode": "actionDetailBtn","dataIndex": "action","width": 60,"align": "left","title": "操作","key": "9", "conf": { "title": "设备详情", "linkModelKey": "equip" }}
]
}
},
{
"key": "basic",
"displayName": "附件",
"renderType": "basic",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"POST",
"apiPath":"/statistics/dp/jy/inspectApplication/matui/{sequenceNbr}",
"body": {
"subs": [
{
"key": "bjmatinfo",
"displayName": "报检附件",
"renderType": "matui",
"columns": 3,
"datas": [
{ "key": "gzs", "label": "告知书(加盖受理单位公章)", "type": "file" },
{ "key": "cpzl", "label": "产品质量证明书", "type": "file" },
{ "key": "sgzxbg", "label": "施工自行检查报告", "type": "file" },
{ "key": "sght", "label": "施工合同或证明", "type": "file" },
{ "key": "sgfa", "label": "施工方案/施工设计文件", "type": "file" },
{ "key": "sgdwxk", "label": "施工单位许可证书", "type": "file" }
]
},
{
"key": "qtmatinfo",
"displayName": "其他附件",
"renderType": "matui",
"columns": 3,
"datas": [
{ "key": "qtfj", "label": "附件", "type": "file" },
]
}
]
}
}
}
}
],
"content": {
}
}
\ No newline at end of file
{
"name": "报检模板",
"tabs": [
{
"key": "keyinfo",
"displayName": "基本信息",
"renderType": "keyinfo",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/statistics/dp/biz-inspection/selectOneForBigScreen/{sequenceNbr}"
}
}
},
{
"key": "devtable",
"displayName": "报检设备",
"renderType": "table",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/statistics/dp/biz-inspection/selectOneForBigScreenEqu/{sequenceNbr}",
"params": {
"current": 1,
"size": 10
}
}
},
"visualParams": {
"rowKey": "SEQUENCE_NBR",
"columns": [
{"dataRenderingMode": "defaultText","dataIndex": "EQU_CATEGORY","width": 200,"align": "left","title": "设备类别","key": "1"},
{"dataRenderingMode": "defaultText","dataIndex": "EQU_DEFINE","width": 180,"align": "left","title": "设备品种","key": "2"},
{"dataRenderingMode": "defaultText","dataIndex": "PRODUCT_NAME","width": 250,"align": "left","title": "设备名称","key": "3"},
{"dataRenderingMode": "defaultText","dataIndex": "PRODUCE_UNIT_NAME","width": 150,"align": "left","title": "设备出厂编号","key": "4"},
{"dataRenderingMode": "defaultText","dataIndex": "USE_INNER_CODE","width": 200,"align": "left","title": "单位内部编号","key": "5"},
{"dataRenderingMode": "defaultText","dataIndex": "ADDRESS","width": 250,"align": "left","title": "设备地址","key": "6"},
{"dataRenderingMode": "defaultText","dataIndex": "EQU_CODE","width": 220,"align": "left","title": "设备代码","key": "7"},
{"dataRenderingMode": "defaultText","dataIndex": "SUPERVISORY_CODE","width": 150,"align": "left","title": "监管码","key": "8"},
{"dataRenderingMode": "actionDetailBtn","dataIndex": "action","width": 60,"align": "left","title": "操作","key": "9", "conf": { "title": "设备详情", "linkModelKey": "equip" }}
]
}
},
{
"key": "basic",
"displayName": "附件",
"renderType": "basic",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"POST",
"apiPath":"/statistics/dp/jy/inspectApplication/matui/{sequenceNbr}",
"body": {
"subs": [
{
"key": "bjmatinfo",
"displayName": "报检附件",
"renderType": "matui",
"columns": 3,
"datas": [
{ "key": "gzs", "label": "告知书(加盖受理单位公章)", "type": "file" },
{ "key": "cpzl", "label": "产品质量证明书", "type": "file" },
{ "key": "sgzxbg", "label": "施工自行检查报告", "type": "file" },
{ "key": "sght", "label": "施工合同或证明", "type": "file" },
{ "key": "sgfa", "label": "施工方案/施工设计文件", "type": "file" },
{ "key": "sgdwxk", "label": "施工单位许可证书", "type": "file" }
]
},
{
"key": "qtmatinfo",
"displayName": "其他附件",
"renderType": "matui",
"columns": 3,
"datas": [
{ "key": "qtfj", "label": "附件", "type": "file" },
]
}
]
}
}
}
}
],
"content": {
}
}
\ No newline at end of file
{
"name": "报检模板",
"tabs": [
{
"key": "keyinfo",
"displayName": "基本信息",
"renderType": "keyinfo",
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/statistics/dp/biz-inspection/selectOneForBigScreen/{sequenceNbr}"
}
}
},
{
"key": "devtable",
"displayName": "报检设备",
"renderType": "table",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"GET",
"apiPath":"/statistics/dp/biz-inspection/selectOneForBigScreenEqu/{sequenceNbr}",
"params": {
"current": 1,
"size": 10
}
}
},
"visualParams": {
"rowKey": "SEQUENCE_NBR",
"columns": [
{"dataRenderingMode": "defaultText","dataIndex": "EQU_CATEGORY","width": 200,"align": "left","title": "设备类别","key": "1"},
{"dataRenderingMode": "defaultText","dataIndex": "EQU_DEFINE","width": 180,"align": "left","title": "设备品种","key": "2"},
{"dataRenderingMode": "defaultText","dataIndex": "PRODUCT_NAME","width": 250,"align": "left","title": "设备名称","key": "3"},
{"dataRenderingMode": "defaultText","dataIndex": "PRODUCE_UNIT_NAME","width": 150,"align": "left","title": "设备出厂编号","key": "4"},
{"dataRenderingMode": "defaultText","dataIndex": "USE_INNER_CODE","width": 200,"align": "left","title": "单位内部编号","key": "5"},
{"dataRenderingMode": "defaultText","dataIndex": "ADDRESS","width": 250,"align": "left","title": "设备地址","key": "6"},
{"dataRenderingMode": "defaultText","dataIndex": "EQU_CODE","width": 220,"align": "left","title": "设备代码","key": "7"},
{"dataRenderingMode": "defaultText","dataIndex": "SUPERVISORY_CODE","width": 150,"align": "left","title": "监管码","key": "8"},
{"dataRenderingMode": "actionDetailBtn","dataIndex": "action","width": 60,"align": "left","title": "操作","key": "9", "conf": { "title": "设备详情", "linkModelKey": "equip" }}
]
}
},
{
"key": "basic",
"displayName": "附件",
"renderType": "basic",
"useAloneApi": true,
"dataConfig": {
"api": {
"httpMethod":"POST",
"apiPath":"/statistics/dp/jy/inspectApplication/matui/{sequenceNbr}",
"body": {
"subs": [
{
"key": "bjmatinfo",
"displayName": "报检附件",
"renderType": "matui",
"columns": 3,
"datas": [
{ "key": "gzs", "label": "告知书(加盖受理单位公章)", "type": "file" },
{ "key": "cpzl", "label": "产品质量证明书", "type": "file" },
{ "key": "sgzxbg", "label": "施工自行检查报告", "type": "file" },
{ "key": "sght", "label": "施工合同或证明", "type": "file" },
{ "key": "sgfa", "label": "施工方案/施工设计文件", "type": "file" },
{ "key": "sgdwxk", "label": "施工单位许可证书", "type": "file" }
]
},
{
"key": "dtmatinfo",
"displayName": "电梯专项要求",
"renderType": "matui",
"columns": 3,
"datas": [
{ "key": "xssy", "label": "型式试验证书", "type": "file" },
{ "key": "xsqts", "label": "限速器和渐进式安全钳的调试证书", "type": "file" },
{ "key": "tjsm", "label": "土建声明", "type": "file" }
]
},
{
"key": "qtmatinfo",
"displayName": "其他附件",
"renderType": "matui",
"columns": 3,
"datas": [
{ "key": "qtfj", "label": "附件", "type": "file" },
]
}
]
}
}
}
}
],
"content": {
}
}
\ No newline at end of file
......@@ -78,8 +78,14 @@
"keyinfo": {
"title": "{principalUnit}",
"qrcode": {
"title": "监管码",
"problem": []
"title": "",
"problem": [],
"picUrl": {
"red": "/upload/tzs/dpscreen/images/安全守护-红.png",
"grey": "/upload/tzs/dpscreen/images/安全守护-灰.png",
"orange": "/upload/tzs/dpscreen/images/安全守护-橙.png",
"green": "/upload/tzs/dpscreen/images/安全守护-绿.png"
}
},
"keyParams": [
{ "key": "sourceType", "label": "隐患主体类型" },
......
......@@ -62,7 +62,7 @@ public class DispatchTask extends BaseEntity {
* 响应单位id
*/
@TableField("response_org_id")
private Long responseOrgId;
private String responseOrgId;
/**
* 响应单位名称
......
......@@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.tcm.api.dto.EquEnterDto;
import com.yeejoin.amos.boot.module.tcm.api.dto.TzBaseEnterpriseInfoDto;
import com.yeejoin.amos.boot.module.tcm.api.entity.TzBaseEnterpriseInfo;
import com.yeejoin.amos.boot.module.tcm.api.vo.BaseEnterpriseVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......@@ -57,6 +56,4 @@ public interface TzBaseEnterpriseInfoMapper extends BaseMapper<TzBaseEnterpriseI
List<Map<String, Object>> getEquipType(@Param("type")String type);
Map<String, Object> getProblemInfoBySourceId(@Param("sourceId")String sourceId);
List<BaseEnterpriseVo> queryBaseEnterpriseInIds(@Param("ids") List<String> ids);
}
......@@ -51,6 +51,4 @@ public interface ITzBaseEnterpriseInfoService extends IService<TzBaseEnterpriseI
BaseUnitLicence getUnitLicenceMessage(String unitCode);
Map<String, Object> getInfoByUseCodeMap(String useCode);
void export(HttpServletResponse response, List<String> ids);
}
package com.yeejoin.amos.boot.module.tcm.api.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
/**
* 监管账号下的人员列表
*/
@Data
public class JGUserInfoVo {
@ExcelProperty(value = "资质状态", index = 0)
String permissionStatus;
@ExcelProperty(value = "区域", index = 1)
String fullAddress;
@ExcelProperty(value = "人员类型", index = 2)
String postName;
@ExcelProperty(value = "姓名", index = 3)
String name;
@ExcelProperty(value = "证件编号", index = 4)
String certificateNum;
@ExcelProperty(value = "所在单位", index = 5)
String useUnit;
}
......@@ -176,22 +176,4 @@
select * from tzs_safety_problem_tracing where source_id = #{sourceId} order by rec_date desc limit 1
</select>
<select id="queryBaseEnterpriseInIds" resultType="com.yeejoin.amos.boot.module.tcm.api.vo.BaseEnterpriseVo">
SELECT
*,
CONCAT(province,'/',city,'/',district) AS region,
CONCAT(street,'/',address) AS full_address
FROM
tz_base_enterprise_info
<where>
<if test='ids != null'>
and sequence_nbr in
<foreach collection="ids" item="id" open="(" close=")" separator=",">
#{id}
</foreach>
</if>
</where>
order by rec_date desc
</select>
</mapper>
......@@ -297,12 +297,4 @@ public class TzBaseEnterpriseInfoController extends BaseController {
public ResponseModel<BaseUnitLicence> getUnitLicenceMessage(@RequestParam("unitCode") String unitCode) {
return ResponseHelper.buildResponse(iTzBaseEnterpriseInfoService.getUnitLicenceMessage(unitCode));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/export")
@ApiOperation(httpMethod = "GET", value = "企业信息列表数据导出", notes = "企业信息列表数据导出")
public void baseEnterpriseExport(HttpServletResponse response, String ids) {
Assert.hasText(ids,"未选择导出数据");
iTzBaseEnterpriseInfoService.export(response, Arrays.asList(ids.split(",")));
}
}
......@@ -8,6 +8,7 @@ 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.controller.BaseController;
import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import com.yeejoin.amos.boot.biz.common.excel.ExcelUtil;
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.dto.UserPermissionDto;
......@@ -17,6 +18,7 @@ import com.yeejoin.amos.boot.module.tcm.api.dto.TzsEquipListDto;
import com.yeejoin.amos.boot.module.tcm.api.dto.TzsUserInfoDto;
import com.yeejoin.amos.boot.module.tcm.api.entity.TzsUserInfo;
import com.yeejoin.amos.boot.module.tcm.api.service.ITzsUserInfoService;
import com.yeejoin.amos.boot.module.tcm.api.vo.JGUserInfoVo;
import com.yeejoin.amos.boot.module.tcm.biz.service.impl.TzsUserInfoServiceImpl;
import com.yeejoin.amos.component.feign.utils.FeignUtil;
import com.yeejoin.amos.feign.privilege.Privilege;
......@@ -331,9 +333,22 @@ public class TzsUserInfoController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/export")
@ApiOperation(httpMethod = "GET", value = "人员列表列表数据导出", notes = "人员列表列表数据导出")
@ApiOperation(httpMethod = "GET", value = "人员管理列表数据导出", notes = "人员管理列表数据导出")
public void userInfoExport(HttpServletResponse response, String ids) {
Assert.hasText(ids,"未选择导出数据");
tzsUserInfoService.userInfoExport(response, Arrays.asList(ids.split(",")));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "POST", value = "导出指定类型的下的人--监管账号下的人员列表", notes = "导出指定类型的下的人--监管账号下的人员列表")
@PostMapping(value = "/jg/export")
public void jgUserInfoExport(HttpServletResponse response,
@RequestParam(required = false, defaultValue = "all") String type,
@RequestBody UserPermissionDto filter) {
filter.setOrgCode(getSelectedOrgInfo().getCompany().getOrgCode());
filter.setCityCode(getSelectedOrgInfo().getCompany().getCompanyCode());
Page<UserPermissionDto> userPermissionDtos = tzsUserInfoServiceImpl.getUserByPermission(1, Long.MAX_VALUE, type, filter);
List<JGUserInfoVo> exportData = JSON.parseArray(JSON.toJSONString(userPermissionDtos.getRecords()), JGUserInfoVo.class);
ExcelUtil.createTemplate(response, "人员列表数据", "人员列表", exportData, JGUserInfoVo.class, null, false);
}
}
......@@ -29,7 +29,6 @@ import com.yeejoin.amos.boot.module.tcm.api.enums.UnitTypeEnum;
import com.yeejoin.amos.boot.module.tcm.api.mapper.TzBaseEnterpriseInfoMapper;
import com.yeejoin.amos.boot.module.tcm.api.mapper.TzsUserInfoMapper;
import com.yeejoin.amos.boot.module.tcm.api.service.ITzBaseEnterpriseInfoService;
import com.yeejoin.amos.boot.module.tcm.api.vo.BaseEnterpriseVo;
import com.yeejoin.amos.boot.module.tcm.biz.utils.RedisUtil;
import com.yeejoin.amos.boot.module.tcm.flc.api.dto.RegUnitIcDto;
import com.yeejoin.amos.boot.module.tcm.flc.api.dto.RegUnitInfoDto;
......@@ -60,6 +59,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.exception.instance.TooManyRequests;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.text.ParseException;
import java.util.*;
......@@ -118,7 +118,6 @@ public class TzBaseEnterpriseInfoServiceImpl
private EquipmentCategoryServiceImpl equipmentCategoryService;
@Autowired
private TzsUserInfoServiceImpl userInfoService;
@Autowired
private RedissonClient redissonClient;
......@@ -967,18 +966,4 @@ public class TzBaseEnterpriseInfoServiceImpl
}
/**
* 企业信息列表数据导出
*
* @param response 响应
* @param ids 数据id
*/
@Override
public void export(HttpServletResponse response, List<String> ids) {
List<BaseEnterpriseVo> exportData = this.baseMapper.queryBaseEnterpriseInIds(ids);
ExcelUtil.createTemplate(response, "企业信息列表数据", "企业信息列表", exportData, BaseEnterpriseVo.class, null, false);
}
}
......@@ -958,7 +958,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
@Override
public void userInfoExport(HttpServletResponse response, List<String> ids) {
List<UserInfoVo> exportData = tzsUserInfoMapper.queryUserInfoInIds(ids);
ExcelUtil.createTemplate(response, "人员列表列表数据", "人员列表列表", exportData, UserInfoVo.class, null, false);
ExcelUtil.createTemplate(response, "人员列表数据", "人员列表", exportData, UserInfoVo.class, null, false);
}
......
......@@ -62,7 +62,7 @@ public class DispatchTask extends BaseEntity {
* 响应单位id
*/
@TableField("response_org_id")
private Long responseOrgId;
private String responseOrgId;
/**
* 响应单位名称
......
......@@ -674,7 +674,7 @@
GROUP BY
tafv.field_value
ORDER BY
longValue ASC
longValue DESC
LIMIT 5
</select>
<select id="getInstantAlertPage" resultType="java.util.Map">
......
......@@ -88,7 +88,11 @@
resultType="com.yeejoin.amos.boot.module.ymt.api.dto.TzBaseEnterpriseInfoDto">
SELECT
*,
CONCAT(province,'/',city,'/',district) AS region,
TRIM(TRAILING '/' FROM CONCAT(
CASE WHEN COALESCE(province, '') <![CDATA[<>]]> '' THEN CONCAT(province, '/') ELSE '' END,
CASE WHEN COALESCE(city, '') <![CDATA[<>]]> '' THEN CONCAT(city, '/') ELSE '' END,
CASE WHEN COALESCE(district, '') <![CDATA[<>]]> '' THEN CONCAT(district, '/') ELSE '' END
)) AS region,
<if test=" tzBaseEnterpriseInfoDto.unitType.indexOf('使用单位')!=-1">
(SELECT cdd.name from amos_tzs_biz.cb_data_dictionary cdd WHERE cdd.code = industry_supervisor and cdd.type = 'HYZGBM') AS industrySupervisorName,
</if>
......
......@@ -2142,6 +2142,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
meBuilder.must(QueryBuilders.matchPhraseQuery("SEQUENCE_NBR", "*" + test + "*"));
boolMust.must(meBuilder);
}
if (!ObjectUtils.isEmpty(map.getString("ORG_BRANCH_CODE"))) {
BoolQueryBuilder meBuilder = QueryBuilders.boolQuery();
String test = QueryParser.escape(map.getString("ORG_BRANCH_CODE"));
meBuilder.must(QueryBuilders.matchPhraseQuery("ORG_BRANCH_CODE", "*" + test + "*"));
boolMust.must(meBuilder);
}
if (!ObjectUtils.isEmpty(map.getString("USE_UNIT_NAME"))) {
BoolQueryBuilder query = QueryBuilders.boolQuery();
String test = QueryParser.escape(map.getString("USE_UNIT_NAME"));
......
......@@ -72,7 +72,7 @@ public class GenerateCodeServiceImpl implements IGenerateCodeService {
*/
@Override
public String createDeviceRegistrationCode(String key) {
return (key.length() == 16) ? generateSequence(key, SEQUENCE_TYPE_DR, LOCK_KEY_DR) : "生成码规则不对!";
return generateSequence(key, SEQUENCE_TYPE_DR, LOCK_KEY_DR);
}
/**
......
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