Commit 23c0761d authored by tianbo's avatar tianbo

Merge branch 'develop_tzs_register' of…

Merge branch 'develop_tzs_register' of http://36.40.66.175:5000/moa/amos-boot-biz into develop_tzs_register # Conflicts: # amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/ICommonService.java
parents 90cc48b4 fbac7206
package com.yeejoin.amos.boot.module.jg.api.converter;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import java.util.HashMap;
import java.util.Map;
public class ChargingMediumConverter implements Converter<String> {
private static final Map<String, String> EXCEL_TO_JAVA_MAP = new HashMap<>();
private static final Map<String, String> JAVA_TO_EXCEL_MAP = new HashMap<>();
static {
EXCEL_TO_JAVA_MAP.put("液化天然气", "LIQUEFIED_NATURAL_GAS");
EXCEL_TO_JAVA_MAP.put("液化石油气", "LIQUEFIED_PETROLEUM_GAS");
EXCEL_TO_JAVA_MAP.put("压缩天然气", "COMPRESSED_NATURAL_GAS");
JAVA_TO_EXCEL_MAP.put("LIQUEFIED_NATURAL_GAS", "液化天然气");
JAVA_TO_EXCEL_MAP.put("LIQUEFIED_PETROLEUM_GAS", "液化石油气");
JAVA_TO_EXCEL_MAP.put("COMPRESSED_NATURAL_GAS", "压缩天然气");
}
@Override
public Class<?> supportJavaTypeKey() {
return String.class;
}
@Override
public CellDataTypeEnum supportExcelTypeKey() {
return CellDataTypeEnum.STRING;
}
@Override
public String convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty,
GlobalConfiguration globalConfiguration) {
return EXCEL_TO_JAVA_MAP.getOrDefault(cellData.getStringValue(), "COMPRESSED_NATURAL_GAS");
}
@Override
public CellData convertToExcelData(String o, ExcelContentProperty excelContentProperty,
GlobalConfiguration globalConfiguration) {
return new CellData(JAVA_TO_EXCEL_MAP.getOrDefault(o, "压缩天然气"));
}
}
package com.yeejoin.amos.boot.module.jg.api.converter;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
public class EquCodeTypeConverter implements Converter<String> {
private static final String HAVE = "有";
private static final String NOT = "无";
@Override
public Class<?> supportJavaTypeKey() {
// 实体类中对象属性类型
return String.class;
}
@Override
public CellDataTypeEnum supportExcelTypeKey() {
return CellDataTypeEnum.STRING;
}
@Override
public String convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty,
GlobalConfiguration globalConfiguration) {
// 从Cell中读取数据
String cellValue = cellData.getStringValue();
// 判断Excel中的值,将其转换为预期的数值
if (HAVE.equals(cellValue)) {
return "1";
} else if (NOT.equals(cellValue)) {
return "2";
}
return null;
}
@Override
public CellData convertToExcelData(String o, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
// 判断实体类中获取的值,转换为Excel预期的值,并封装为CellData对象
if (o == null) {
return new CellData("");
} else if (o.equals("1")) {
return new CellData(HAVE);
} else if (o.equals("2")) {
return new CellData(NOT);
}
return new CellData("");
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.jg.api.converter;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
public class ImportedConverter implements Converter<String> {
private static final String WHETHER = "是";
private static final String NOT = "否";
@Override
public Class<?> supportJavaTypeKey() {
return String.class;
}
@Override
public CellDataTypeEnum supportExcelTypeKey() {
// Excel中对应的CellData属性类型
return CellDataTypeEnum.STRING;
}
@Override
public String convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty,
GlobalConfiguration globalConfiguration) {
// 从Cell中读取数据
String cellValue = cellData.getStringValue();
// 判断Excel中的值,将其转换为预期的数值
if (WHETHER.equals(cellValue)) {
return "1";
} else if (NOT.equals(cellValue)) {
return "0";
}
return null;
}
@Override
public CellData convertToExcelData(String o, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
// 判断实体类中获取的值,转换为Excel预期的值,并封装为CellData对象
if (o == null) {
return new CellData("");
} else if (o.equals("1")) {
return new CellData(WHETHER);
} else if (o.equals("0")) {
return new CellData(NOT);
}
return new CellData("");
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.jg.api.converter;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
public class NondestructConverter implements Converter<String> {
private static final String CI_FEN = "磁粉";
private static final String SHE_XIAN = "射线";
private static final String CHAO_SENG = "超声";
private static final String SHEN_TOU = "渗透";
@Override
public Class<?> supportJavaTypeKey() {
// 实体类中对象属性类型
return String.class;
}
@Override
public CellDataTypeEnum supportExcelTypeKey() {
// Excel中对应的CellData属性类型
return CellDataTypeEnum.STRING;
}
@Override
public String convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty,
GlobalConfiguration globalConfiguration) {
// 从Cell中读取数据
String cellValue = cellData.getStringValue();
// 判断Excel中的值,将其转换为预期的数值
if (CI_FEN.equals(cellValue)) {
return "5988";
} else if (SHE_XIAN.equals(cellValue)) {
return "5986";
} else if (CHAO_SENG.equals(cellValue)) {
return "5987";
}
return "5989";
}
@Override
public CellData convertToExcelData(String o, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
// 判断实体类中获取的值,转换为Excel预期的值,并封装为CellData对象
if (o == null) {
return new CellData("");
} else if (o.equals("5988")) {
return new CellData(CI_FEN);
} else if (o.equals("5986")) {
return new CellData(SHE_XIAN);
} else if (o.equals("5987")) {
return new CellData(CHAO_SENG);
}
return new CellData(SHEN_TOU);
}
}
\ No newline at end of file
package com.yeejoin.amos.boot.module.jg.api.converter;
import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
public class VehicleCylinderConverter implements Converter<String> {
private static final String WHETHER = "是";
private static final String NOT = "否";
@Override
public Class<?> supportJavaTypeKey() {
// 实体类中对象属性类型
return String.class;
}
@Override
public CellDataTypeEnum supportExcelTypeKey() {
// Excel中对应的CellData属性类型
return CellDataTypeEnum.STRING;
}
@Override
public String convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty,
GlobalConfiguration globalConfiguration) {
// 从Cell中读取数据
String cellValue = cellData.getStringValue();
// 判断Excel中的值,将其转换为预期的数值
if (WHETHER.equals(cellValue)) {
return "0";
} else if (NOT.equals(cellValue)) {
return "1";
}
return null;
}
@Override
public CellData convertToExcelData(String o, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
// 判断实体类中获取的值,转换为Excel预期的值,并封装为CellData对象
if (o == null) {
return new CellData("");
} else if (o.equals("0")) {
return new CellData(WHETHER);
} else if (o.equals("1")) {
return new CellData(NOT);
}
return new CellData("");
}
}
\ No newline at end of file
......@@ -47,6 +47,9 @@ public class JgChangeRegistrationNameDto extends BaseDto {
@ApiModelProperty(value = "终审通过时间")
private Date auditPassDate;
@ApiModelProperty(value = "申请日期,接收查询参数")
private String applicationDate;
@ApiModelProperty(value = "备注")
private String remark;
......
......@@ -83,6 +83,9 @@ public class JgChangeRegistrationTransferDto extends BaseDto {
@ApiModelProperty (value = "使用登记编号")
private String useRegistrationCode;
@ApiModelProperty(value = "96333识别码")
private String code96333;
@ApiModelProperty (value = "流程实例id")
private String instanceId;
......@@ -122,6 +125,16 @@ public class JgChangeRegistrationTransferDto extends BaseDto {
private String dataType;
private String unitCode;
@ApiModelProperty(value = "申请日期,接收查询参数")
private String applicationDate;
@ApiModelProperty("设备品种")
private String equDefine;
@ApiModelProperty(value = "设备种类")
private String equList;
@ApiModelProperty (value = "下一节点可执行人")
private String nextExecuteUserIds;
......
package com.yeejoin.amos.boot.module.jg.api.dto;
import com.baomidou.mybatisplus.annotation.TableField;
import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
......@@ -52,6 +51,33 @@ public class JgEnableDisableDto extends BaseDto {
@ApiModelProperty(value = "创建时间")
private Date createDate;
@ApiModelProperty(value = "申请日期,接收查询参数")
private String applicationDate;
@ApiModelProperty("设备品种")
private String equDefine;
@ApiModelProperty(value = "设备种类")
private String equList;
@ApiModelProperty(value = "设备类别")
private String equCategory;
@ApiModelProperty(value = "设备代码")
private String equCode;
@ApiModelProperty(value = "使用登记证编号")
private String useRegistrationCode;
@ApiModelProperty(value = "96333识别码")
private String code96333;
@ApiModelProperty(value = "设备地址")
private String address;
@ApiModelProperty(value = "监管码")
private String supervisoryCode;
@ApiModelProperty(value = "创建人")
private String createUserName;
......
......@@ -126,13 +126,13 @@ public class JgInstallationNoticeDto extends BaseDto {
@ApiModelProperty(value = "流程建议")
private String processAdvice;
@ApiModelProperty(value = "撤销原由")
@ApiModelProperty(value = "作废原因")
private String cancelReason;
@ApiModelProperty(value = "撤销说明")
@ApiModelProperty(value = "撤销说明-未使用")
private String cancelRemark;
@ApiModelProperty(value = "撤销处理截止日期")
@ApiModelProperty(value = "撤销日期-未使用")
private Date cancelHandleDeadline;
@ApiModelProperty(value = "撤销流水号")
......@@ -299,4 +299,13 @@ public class JgInstallationNoticeDto extends BaseDto {
@ApiModelProperty(value = "设备类别")
private String equipCategory;
@ApiModelProperty(value = "作废人员id")
private String cancelUserId;
@ApiModelProperty(value = "作废日期")
private Date cancelDate;
}
......@@ -109,12 +109,23 @@ public class JgScrapCancelDto extends BaseDto {
@ApiModelProperty(value = "转办后执行人的Id逗号分割")
private String transferToUserIds;
@ApiModelProperty(value = "设备代号")
private String equList;
@ApiModelProperty("设备品种")
private String equDefine;
@ApiModelProperty(value = "设备种类")
private String equList;
@ApiModelProperty(value = "设备类别")
private String equCategoryDesc;
private String equCategory;
@ApiModelProperty(value = "设备代码")
private String equCode;
@ApiModelProperty(value = "使用登记证编号")
private String useRegistrationCode;
@ApiModelProperty(value = "96333识别码")
private String code96333;
@ApiModelProperty(value = "设备名称")
private String productName;
......@@ -125,4 +136,7 @@ public class JgScrapCancelDto extends BaseDto {
@ApiModelProperty (value = "其他附件")
private String otherAccessories;
@ApiModelProperty(value = "申请日期,接收查询参数")
private String applicationDate;
}
......@@ -134,4 +134,17 @@ public class JgUseRegistrationDto extends BaseDto {
@ApiModelProperty(value = "接收单位")
private String receiveCompanyCode;
@ApiModelProperty(value = "作废人员id")
private String cancelUserId;
@ApiModelProperty(value = "作废原因")
private String cancelReason;
@ApiModelProperty(value = "作废日期")
private Date cancelDate;
}
......@@ -5,21 +5,20 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import java.util.List;
/**
*
*
* @author system_generator
* @date 2024-03-18
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="JgVehicleInformationDto", description="")
@ApiModel(value = "JgVehicleInformationDto", description = "")
public class JgVehicleInformationDto extends BaseDto {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "设备监管码")
......@@ -228,4 +227,15 @@ public class JgVehicleInformationDto extends BaseDto {
@ApiModelProperty(value = "电话")
private String phone;
@ApiModelProperty(value = "作废日期")
private Date cancelDate;
@ApiModelProperty(value = "作废人员id")
private String cancelUserId;
@ApiModelProperty(value = "作废原因")
private String cancelReason;
}
......@@ -225,7 +225,7 @@ public class JgInstallationNotice extends BaseEntity {
private String processAdvice;
/**
* 撤销原由
* 作废原因
*/
@TableField("cancel_reason")
private String cancelReason;
......@@ -459,4 +459,16 @@ public class JgInstallationNotice extends BaseEntity {
*/
@TableField("receive_company_org_code")
private String receiveCompanyOrgCode;
/**
* 作废日期
*/
@TableField("cancel_date")
private Date cancelDate;
/**
* 作废人员id
*/
@TableField("cancel_user_id")
private String cancelUserId;
}
......@@ -210,4 +210,23 @@ public class JgUseRegistration extends BaseEntity {
*/
@TableField("receive_company_org_code")
private String receiveCompanyOrgCode;
/**
* 作废日期
*/
@TableField("cancel_date")
private Date cancelDate;
/**
* 作废人员id
*/
@TableField("cancel_user_id")
private String cancelUserId;
/**
* 作废原因
*/
@TableField("cancel_reason")
private String cancelReason;
}
......@@ -408,4 +408,23 @@ public class JgVehicleInformation extends BaseEntity {
@TableField(value = "phone")
private String phone;
/**
* 作废日期
*/
@TableField("cancel_date")
private Date cancelDate;
/**
* 作废人员id
*/
@TableField("cancel_user_id")
private String cancelUserId;
/**
* 作废原因
*/
@TableField("cancel_reason")
private String cancelReason;
}
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationNameDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationName;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jg.api.vo.SortVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......@@ -23,5 +24,10 @@ public interface JgChangeRegistrationNameMapper extends BaseMapper<JgChangeRegis
void deleteHistoryInfoById(@Param("code") String code);
Page<Map<String, Object>> getListPage(@Param("page") Page<Map<String, Object>> page, @Param("dto") JgChangeRegistrationNameDto dto, @Param("roleIds") List<String> roleIds, @Param("companyCode") String companyCode, @Param("currentUserId") String exeUserId);
Page<Map<String, Object>> getListPage(@Param("page") Page<Map<String, Object>> page,
@Param("sort") SortVo sortMap,
@Param("dto") JgChangeRegistrationNameDto dto,
@Param("roleIds") List<String> roleIds,
@Param("companyCode") String companyCode,
@Param("currentUserId") String exeUserId);
}
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.api.dto.JgChangeRegistrationTransferDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgChangeRegistrationTransfer;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jg.api.vo.SortVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
......@@ -20,7 +21,11 @@ public interface JgChangeRegistrationTransferMapper extends BaseMapper<JgChangeR
void updatePromoter(@Param ("id")Long id);
Page<Map<String, Object>> getListPage(@Param("page")Page<Map<String, Object>> page, @Param("dto") JgChangeRegistrationTransferDto dto , @Param("type") String type, @Param("currentUserId")String currentUserId);
Page<Map<String, Object>> getListPage(@Param("page")Page<Map<String, Object>> page,
@Param("sort") SortVo sortMap,
@Param("dto") JgChangeRegistrationTransferDto dto ,
@Param("type") String type,
@Param("currentUserId")String currentUserId);
@Select("select name from tz_equipment_category where code=#{code}")
String getEquiplistNameByEquiplist(String code);
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.api.dto.JgEnableDisableDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgEnableDisable;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jg.api.vo.SortVo;
import org.apache.ibatis.annotations.Param;
import java.util.Map;
......@@ -17,6 +18,7 @@ import java.util.Map;
public interface JgEnableDisableMapper extends BaseMapper<JgEnableDisable> {
Page<Map<String, Object>> pageList(@Param("page") Page<Map<String, Object>> page,
@Param("sort") SortVo sortMap,
@Param("dto") JgEnableDisableDto dto,
@Param("type") String type,
@Param("userId") String userId);
......
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.module.jg.api.dto.JgScrapCancelDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgScrapCancel;
import com.yeejoin.amos.boot.module.jg.api.vo.SortVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......@@ -18,6 +19,7 @@ import java.util.Map;
public interface JgScrapCancelMapper extends BaseMapper<JgScrapCancel> {
Page<Map<String, Object>> getListPage(@Param("page") Page<Map<String, Object>> page,
@Param("sort") SortVo sortMap,
@Param("dto") JgScrapCancelDto dto,
@Param("roleIds") List<String> roleIds,
@Param("orgCode") String orgCode,
......
......@@ -28,7 +28,7 @@ public interface IJgChangeRegistrationTransferService extends IService<JgChangeR
Map<String, Map<String, Object>> getTransferDetail(String sequenceNbr);
Page<Map<String, Object>> queryListForPage(Page<Map<String, Object>> page, JgChangeRegistrationTransferDto params, String companyTypeCode, String companyType);
Page<Map<String, Object>> queryListForPage(Page<Map<String, Object>> page,String sort, JgChangeRegistrationTransferDto params, String companyTypeCode, String companyType);
void flowExecute(Long sequenceNbr, String instanceId, String operate, String comment, String nextTaskId);
......
......@@ -76,4 +76,12 @@ public interface IJgInstallationNoticeService extends IService<JgInstallationNot
* @return
*/
Map<String,Object> getCompanyType();
/**
* 作废申请
* @param sequenceNbr 业务唯一标识
* @param cancelReason 作废原因
* @return JgInstallationNoticeDto
*/
JgInstallationNotice cancelApplication(Long sequenceNbr, String cancelReason);
}
......@@ -199,7 +199,7 @@ public class JgVehicleInformationVo implements Serializable {
private String currentUserId;
private List<Map<String, Object>> equipmentLists;
private List<? extends Map> equipmentLists;
@ApiModelProperty(value = "主键ID")
protected Long sequenceNbr;
......
......@@ -115,7 +115,7 @@
where
a.sequence_nbr = b.equip_transfer_id
and b.equ_id = #{record}
and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '一级受理已驳回' and a.status <![CDATA[ <> ]]> '使用单位已撤回')
and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '一级受理已驳回' and a.status <![CDATA[ <> ]]> '使用单位已撤回' and a.status <![CDATA[ <> ]]> '已作废')
UNION
select
count(1) as inUseNumber
......@@ -175,7 +175,7 @@
where
a.sequence_nbr = b.equip_transfer_id
and b.equ_id = #{record}
and (a.notice_status <![CDATA[ <> ]]> '6614' and a.notice_status <![CDATA[ <> ]]> '6615' and a.notice_status <![CDATA[ <> ]]> '6610' )
and (a.notice_status <![CDATA[ <> ]]> '6614' and a.notice_status <![CDATA[ <> ]]> '6615' and a.notice_status <![CDATA[ <> ]]> '6610' and a.notice_status <![CDATA[ <> ]]> '6617')
UNION
select
count(1) as inUseNumber
......@@ -661,6 +661,7 @@
n.sequence_nbr = ne.equip_transfer_id
and n.status != '使用单位待提交'
and n.status != '使用单位已撤回'
and n.status != '已作废'
and (n.manage_type is null or n.manage_type = '' or n.manage_type = 'set')
<if test="param.beginDate != null">
and date_ge(CAST(n.reg_date as date), #{param.beginDate})
......
......@@ -43,11 +43,17 @@
<if test="dto.auditStatus != null and dto.auditStatus != ''">
and ur.audit_status = #{dto.auditStatus}
</if>
<if test="dto.useUnitName != null and dto.useUnitName != ''">
and ur.use_unit_name = #{dto.useUnitName}
</if>
<if test="dto.newUseUnitName != null and dto.newUseUnitName != ''">
and ur.new_use_unit_name = #{dto.newUseUnitName}
</if>
<if test="dto.applyNo != null and dto.applyNo != ''">
and ur.apply_no like concat('%',#{dto.applyNo},'%')
</if>
<if test="dto.createDate != null">
AND ur.create_date >= #{dto.createDate}
<if test="dto.applicationDate != null">
AND ur.create_date like concat('%',DATE_FORMAT(#{dto.applicationDate},'%Y-%m-%d'),'%')
</if>
<if test="dto.receiveOrgCode != null and dto.receiveOrgCode != ''">
AND ur.receive_org_code = #{dto.receiveOrgCode}
......@@ -65,7 +71,11 @@
and (ur.use_unit_credit_code = #{dto.useUnitCreditCode} or ur.transfer_to_user_ids LIKE concat ('%', #{currentUserId}, '%'))
</if>
</where>
order by ur.rec_date desc
order by
<if test="sort != null">
ur.${sort.field} ${sort.sortType},
</if>
ur.rec_date desc
</select>
<delete id="deleteHistoryInfoById">
......
......@@ -8,11 +8,10 @@
</update>
<select id="getListPage" resultType="java.util.Map">
select * from
(select crt.sequence_nbr as sequenceNbr,
select
crt.sequence_nbr as sequenceNbr,
crt.audit_status as auditStatus,
crt.reg_date as regDate,
crt.use_unit_name as useUnitName,
crt.status,
crt.receive_org_name as receiveOrgName,
crt.apply_no as applyNo,
......@@ -23,18 +22,24 @@
crt.use_registration_code as useRegistrationCode,
crt.next_execute_user_ids as nextExecuteUserIds,
crt.create_user_id as createUserId,
crt.full_address as allAddress,
crt.next_task_id as nextTaskId,
use.USE_UNIT_NAME as useUnitName,
(SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY) as equCategory,
jri.PRODUCT_NAME as productName,
jri.EQU_CODE as equCode,
use.USE_INNER_CODE as innerCode,
crteq.equ_id as equipId
crteq.equ_id as equipId,
oi.SUPERVISORY_CODE AS supervisoryCode,
oi.CODE96333 as code96333,
concat(use."PROVINCE_NAME", '', use."CITY_NAME", '', use."COUNTY_NAME", '', use."STREET_NAME") as allAddress,
use."ADDRESS" as detailedAddress,
(SELECT name from tz_equipment_category WHERE code = jri.EQU_LIST) AS equList,
(SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY) as equCategory,
(SELECT name from tz_equipment_category where code = jri.EQU_DEFINE) as equDefine
from tzs_jg_change_registration_transfer crt
LEFT JOIN tzs_jg_change_registration_transfer_eq crteq on crt.sequence_nbr = crteq.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info jri on crteq.equ_id = jri.RECORD
LEFT JOIN idx_biz_jg_use_info use on crteq.equ_id = use.RECORD
LEFT JOIN idx_biz_jg_other_info oi ON oi.RECORD = crteq.equ_id
<where>
and crt.is_delete = 0
<if test="dto.equCategory != null and dto.equCategory != ''">
......@@ -43,76 +48,49 @@
<if test="dto.auditStatus != null and dto.auditStatus != ''">
and crt.audit_status like concat('%', #{dto.auditStatus},'%')
</if>
<if test="dto.applicationDate != null and dto.applicationDate != ''">
and crt.reg_date like concat('%',DATE_FORMAT(#{dto.applicationDate},'%Y-%m-%d'),'%')
</if>
<if test="dto.equCode != null and dto.equCode != ''">
and jri.EQU_CODE like concat('%',#{dto.equCode},'%')
</if>
<if test="dto.useUnitCreditCode != null and dto.useUnitCreditCode != ''">
and crt.use_unit_credit_code = #{dto.useUnitCreditCode}
</if>
<if test="dto.receiveOrgCode != null and dto.receiveOrgCode != ''">
and crt.receive_company_code = #{dto.receiveOrgCode}
<if test="dto.equList != null and dto.equList != ''">
AND jri."EQU_LIST" = #{dto.equList}
</if>
<if test="type == 'supervision'">
AND crt.receive_company_code = #{dto.unitCode}
AND crt.instance_id <![CDATA[<>]]> ''
<if test="dto.equCategory != null and dto.equCategory != ''">
AND jri."equ_category" = #{dto.equCategory}
</if>
<if test="type == 'company'">
AND crt.use_unit_credit_code = #{dto.unitCode}
<if test="dto.equDefine != null and dto.equDefine != ''">
AND jri."EQU_DEFINE" = #{dto.equDefine}
</if>
<if test="dto.applyNo != null and dto.applyNo != ''">
and crt.apply_no like concat('%',#{dto.applyNo},'%')
<if test="dto.equCode != null and dto.equCode != ''">
AND jri."EQU_CODE" like concat('%',#{dto.equCode},'%')
</if>
<if test="dto.productName != null and dto.productName != ''">
and jri.PRODUCT_NAME like concat('%',#{dto.productName},'%')
<if test="dto.useRegistrationCode != null and dto.useRegistrationCode != ''">
AND crt.use_registration_code like concat('%',#{dto.useRegistrationCode},'%')
</if>
</where>
union
select crt.sequence_nbr as sequenceNbr,
crt.audit_status as auditStatus,
crt.reg_date as regDate,
crt.use_unit_name as useUnitName,
crt.status,
crt.receive_org_name as receiveOrgName,
crt.apply_no as applyNo,
crt.next_executor_ids AS nextExecutorIds,
crt.promoter,
crt.rec_date as recDate,
crt.instance_id as instanceId,
crt.use_registration_code as useRegistrationCode,
crt.next_execute_user_ids as nextExecuteUserIds,
crt.create_user_id as createUserId,
crt.full_address as allAddress,
crt.next_task_id as nextTaskId,
use.USE_UNIT_NAME as useUnitName,
(SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY) as equCategory,
jri.PRODUCT_NAME as productName,
jri.EQU_CODE as equCode,
use.USE_INNER_CODE as innerCode,
crteq.equ_id as equipId
from tzs_jg_change_registration_transfer crt
LEFT JOIN tzs_jg_change_registration_transfer_eq crteq on crt.sequence_nbr = crteq.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info jri on crteq.equ_id = jri.RECORD
LEFT JOIN idx_biz_jg_use_info use on crteq.equ_id = use.RECORD
<where>
and crt.is_delete = 0
AND crt.transfer_to_user_ids like concat('%',#{currentUserId},'%')
<if test="dto.equCategory != null and dto.equCategory != ''">
and jri.EQU_CATEGORY = #{dto.equCategory}
<if test="dto.code96333 != null and dto.code96333 != ''">
AND oi.CODE96333 like concat('%',#{dto.code96333},'%')
</if>
<if test="dto.auditStatus != null and dto.auditStatus != ''">
and crt.audit_status = concat('%',#{dto.auditStatus},'%')
<if test="dto.supervisoryCode != null and dto.supervisoryCode != ''">
AND oi.SUPERVISORY_CODE like concat('%',#{dto.supervisoryCode},'%')
</if>
<if test="dto.equCode != null and dto.equCode != ''">
and jri.EQU_CODE like concat('%',#{dto.equCode},'%')
</if>
<if test="dto.useUnitCreditCode != null and dto.useUnitCreditCode != ''">
and crt.use_unit_credit_code = #{dto.useUnitCreditCode}
<if test="dto.allAddress != null and dto.allAddress != ''">
AND (
use."PROVINCE_NAME" LIKE CONCAT('%', #{dto.allAddress}, '%')
OR use."CITY_NAME" LIKE CONCAT('%', #{dto.allAddress}, '%')
OR use."COUNTY_NAME" LIKE CONCAT('%', #{dto.allAddress}, '%')
OR use."STREET_NAME" LIKE CONCAT('%', #{dto.allAddress}, '%')
)
</if>
<if test="dto.receiveOrgCode != null and dto.receiveOrgCode != ''">
and crt.receive_company_code = #{dto.receiveOrgCode}
and (crt.receive_company_code = #{dto.receiveOrgCode} or crt.transfer_to_user_ids like concat('%',#{currentUserId},'%'))
</if>
<if test="type == 'supervision'">
AND crt.receive_company_code = #{dto.unitCode}
AND (crt.receive_company_code = #{dto.unitCode} or crt.transfer_to_user_ids like concat('%',#{currentUserId},'%'))
AND crt.instance_id <![CDATA[<>]]> ''
</if>
<if test="type == 'company'">
......@@ -124,8 +102,12 @@
<if test="dto.productName != null and dto.productName != ''">
and jri.PRODUCT_NAME like concat('%',#{dto.productName},'%')
</if>
</where>)
order by recDate desc
</where>
order by
<if test="sort != null">
crt.${sort.field} ${sort.sortType},
</if>
recDate desc
</select>
</mapper>
......@@ -4,24 +4,23 @@
<select id="pageList" resultType="java.util.Map">
SELECT
CASE
when jed.apply_type = 'SB_TY' then '设备停用'
else '设备启用' end as applyType,
jed.sequence_nbr as sequenceNbr,
jed.apply_no as applyNo,
date_format(jed.apply_date, '%Y-%m-%d') as applyDate,
CASE
when
jed.apply_type = 'SB_TY' then '停用'
else '启用' end as applyType,
date_format(jed.apply_date, '%Y-%m-%d') as applyDate,
date_format(jed.audit_pass_date, '%Y-%m-%d') as auditPassDate,
jri.USE_ORG_CODE as useOrgCode,
(SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY) as equCategory,
(SELECT name from tz_equipment_category where code = jri.EQU_DEFINE) as equDefine,
jri.PRODUCT_NAME as productName,
jri.EQU_CODE AS equCode,
jri.USE_ORG_CODE AS useRegistrationCode,
use.USE_UNIT_NAME as useUnitName,
jed.receive_org_name as receiveOrgName,
concat(use."PROVINCE_NAME", '', use."CITY_NAME", '', use."COUNTY_NAME", '', use."STREET_NAME", '',
use."ADDRESS") as address,
concat(use."PROVINCE_NAME", '', use."CITY_NAME", '', use."COUNTY_NAME", '', use."STREET_NAME") as address,
use."ADDRESS" as detailedAddress,
use."USE_INNER_CODE" as useInnerCode,
jed.audit_status as auditStatus,
date_format(jed.audit_pass_date, '%Y-%m-%d') as auditPassDate,
jed.instance_id as instanceId,
jed.execute_sequence as executeSequence,
jed.next_executor_ids as nextExecutorIds,
......@@ -29,12 +28,16 @@
jed.next_execute_user_ids as nextExecuteUserIds,
jed.create_user_id as createUserId,
jed.next_task_id as nextTaskId,
(select SUPERVISORY_CODE from idx_biz_jg_other_info oi where jri.RECORD = oi.RECORD) as supervisoryCode
oi.SUPERVISORY_CODE AS supervisoryCode,
oi.CODE96333 as code96333,
(SELECT name from tz_equipment_category WHERE code = jri.EQU_LIST) AS equList,
(SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY) as equCategory,
(SELECT name from tz_equipment_category where code = jri.EQU_DEFINE) as equDefine
FROM tzs_jg_enable_disable jed
LEFT JOIN tzs_jg_enable_disable_eq jede on jed.sequence_nbr = jede.enable_disable_apply_id
LEFT JOIN idx_biz_jg_register_info jri on jede.equ_id = jri.RECORD
LEFT JOIN idx_biz_jg_use_info use on jri.RECORD = use.RECORD
LEFT JOIN idx_biz_jg_other_info oi ON oi.RECORD = jede.equ_id
<where>
jed.is_delete = 0
<if test="dto.applyNo != null and dto.applyNo != '' ">
......@@ -56,8 +59,44 @@
<if test="dto.applyType != null and dto.applyType != ''">
and jed.apply_type = #{dto.applyType}
</if>
<if test="dto.applicationDate != null and dto.applicationDate != ''">
and jed.apply_date like concat('%',DATE_FORMAT(#{dto.applicationDate},'%Y-%m-%d'),'%')
</if>
<if test="dto.equList != null and dto.equList != ''">
AND jri."EQU_LIST" = #{dto.equList}
</if>
<if test="dto.equCategory != null and dto.equCategory != ''">
AND jri."equ_category" = #{dto.equCategory}
</if>
<if test="dto.equDefine != null and dto.equDefine != ''">
AND jri."EQU_DEFINE" = #{dto.equDefine}
</if>
<if test="dto.equCode != null and dto.equCode != ''">
AND jri."EQU_CODE" like concat('%',#{dto.equCode},'%')
</if>
<if test="dto.useRegistrationCode != null and dto.useRegistrationCode != ''">
AND jri."USE_ORG_CODE" like concat('%',#{dto.useRegistrationCode},'%')
</if>
<if test="dto.code96333 != null and dto.code96333 != ''">
AND oi.CODE96333 like concat('%',#{dto.code96333},'%')
</if>
<if test="dto.supervisoryCode != null and dto.supervisoryCode != ''">
AND oi.SUPERVISORY_CODE like concat('%',#{dto.supervisoryCode},'%')
</if>
<if test="dto.address != null and dto.address != ''">
AND (
use."PROVINCE_NAME" LIKE CONCAT('%', #{dto.address}, '%')
OR use."CITY_NAME" LIKE CONCAT('%', #{dto.address}, '%')
OR use."COUNTY_NAME" LIKE CONCAT('%', #{dto.address}, '%')
OR use."STREET_NAME" LIKE CONCAT('%', #{dto.address}, '%')
)
</if>
</where>
order by jed.rec_date desc
order by
<if test="sort != null">
jed.${sort.field} ${sort.sortType},
</if>
jed.rec_date desc
</select>
<select id="getDetail" resultType="java.util.Map">
SELECT jed.sequence_nbr as sequenceNbr,
......
......@@ -34,7 +34,8 @@
(select name from tz_equipment_category ec WHERE ec.code = ri.EQU_DEFINE) AS equDefine,
(SELECT name from tz_equipment_category where code = ri.EQU_LIST) AS equListName,
concat(ibjui."PROVINCE_NAME", '', ibjui."CITY_NAME", '', ibjui."COUNTY_NAME", '', ibjui."STREET_NAME") as equAddress,
ibjui."ADDRESS" as detailedAddress
ibjui."ADDRESS" as detailedAddress,
isn.cancel_reason as cancelReason
FROM tzs_jg_installation_notice isn
LEFT JOIN tzs_jg_installation_notice_eq insEq on insEq.equip_transfer_id = isn.sequence_nbr
LEFT JOIN idx_biz_jg_use_info ibjui on insEq.equ_id = ibjui.RECORD
......@@ -192,7 +193,7 @@
tzs_jg_installation_notice_eq b
where
a.sequence_nbr = b.equip_transfer_id
and (a.notice_status <![CDATA[ <> ]]> '6614' and a.notice_status <![CDATA[ <> ]]> '6615' and a.notice_status <![CDATA[ <> ]]>'6610')
and (a.notice_status <![CDATA[ <> ]]> '6614' and a.notice_status <![CDATA[ <> ]]> '6615' and a.notice_status <![CDATA[ <> ]]>'6610' and a.notice_status <![CDATA[ <> ]]>'6617')
GROUP BY a.install_unit_credit_code
</select>
</mapper>
......@@ -71,6 +71,7 @@
ri.EQU_CODE AS equCode,
(SELECT name from tz_equipment_category ec WHERE ec.code = ri.EQU_LIST) AS equListName,
(select name from tz_equipment_category ec WHERE ec.code = ri.EQU_DEFINE) AS equDefineName,
(select name from tz_equipment_category ec WHERE ec.code = ri.EQU_CATEGORY) AS equCategoryName,
concat(ibjui."PROVINCE_NAME", '', ibjui."CITY_NAME", '', ibjui."COUNTY_NAME", '', ibjui."STREET_NAME") as fullAddress,
ibjui."ADDRESS" as detailedAddress,
ibjoi.SUPERVISORY_CODE as supervisoryCode,
......
......@@ -10,69 +10,113 @@
<select id="getListPage" resultType="java.util.Map">
select ur.sequence_nbr as sequenceNbr,
ur.instance_id as instanceId,
ur.create_user_id as createUserId,
ur.audit_status as auditStatus,
DATE_FORMAT(ur.rec_date,'%Y-%m-%d') as recDate,
DATE_FORMAT(ur.create_date,'%Y-%m-%d') as createDate,
ur.receive_org_code as receiveOrgCode,
ur.receive_org_name as receiveOrgName,
ur.receive_company_code as receiveCompanyCode,
ur.cancel_certificate as cancelCertificate,
ur.cancel_type as cancelType,
ur.apply_no as applyNo,
ur.status,
ur.remark,
ur.instance_status as instanceStatus,
ur.promoter,
ur.next_execute_user_ids as nextExecuteUserIds,
ur.supervisory_code as supervisoryCode,
ur.next_task_id as nextTaskId,
ifnull(ur.next_execute_ids,'') as nextExecuteIds,
DATE_FORMAT(ur.audit_pass_date,'%Y-%m-%d') as auditPassDate,
select tjsc.sequence_nbr as sequenceNbr,
tjsc.instance_id as instanceId,
tjsc.create_user_id as createUserId,
tjsc.audit_status as auditStatus,
DATE_FORMAT(tjsc.rec_date,'%Y-%m-%d') as recDate,
DATE_FORMAT(tjsc.create_date,'%Y-%m-%d') as createDate,
tjsc.receive_org_code as receiveOrgCode,
tjsc.receive_org_name as receiveOrgName,
tjsc.receive_company_code as receiveCompanyCode,
tjsc.cancel_certificate as cancelCertificate,
tjsc.cancel_type as cancelType,
tjsc.apply_no as applyNo,
tjsc.status,
tjsc.remark,
tjsc.instance_status as instanceStatus,
tjsc.promoter,
tjsc.next_execute_user_ids as nextExecuteUserIds,
tjsc.supervisory_code as supervisoryCode,
tjsc.next_task_id as nextTaskId,
ifnull(tjsc.next_execute_ids,'') as nextExecuteIds,
DATE_FORMAT(tjsc.audit_pass_date,'%Y-%m-%d') as auditPassDate,
use.USE_UNIT_CREDIT_CODE as useUnitCreditCode,
ur.use_unit_name as useUnitName,
ur.use_unit_code as useUnitCode,
(SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY) as equCategory,
jri.EQU_DEFINE as equDefine,
tjsc.use_unit_name as useUnitName,
tjsc.use_unit_code as useUnitCode,
jri.USE_ORG_CODE AS useRegistrationCode,
jri.PRODUCT_NAME as productName,
jri.EQU_CODE as equCode,
use.USE_INNER_CODE as innerCode,
use.ADDRESS as address,
CONCAT(use.PROVINCE_NAME,'', use.CITY_NAME, '', use.COUNTY_NAME, '', use.street_name, use.ADDRESS, '') AS place,
oi.SUPERVISORY_CODE AS supervisoryCode,
oi.CODE96333 as code96333,
(SELECT name from tz_equipment_category WHERE code = jri.EQU_LIST) AS equList,
(SELECT name from tz_equipment_category where code = jri.EQU_CATEGORY) as equCategory,
(SELECT name from tz_equipment_category where code = jri.EQU_DEFINE) as equDefine,
CONCAT(use.PROVINCE_NAME,'', use.CITY_NAME, '', use.COUNTY_NAME, '', use.street_name) AS place,
use."ADDRESS" as detailedAddress,
re.equ_id as equipId
from tzs_jg_scrap_cancel ur
LEFT JOIN tzs_jg_scrap_cancel_eq re on ur.sequence_nbr = re.equip_transfer_id
from tzs_jg_scrap_cancel tjsc
LEFT JOIN tzs_jg_scrap_cancel_eq re on tjsc.sequence_nbr = re.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info jri on re.equ_id = jri.RECORD
LEFT JOIN idx_biz_jg_use_info use on re.equ_id = use.RECORD
LEFT JOIN idx_biz_jg_other_info oi ON oi.RECORD = re.equ_id
<where>
and ur.is_delete = 0
and tjsc.is_delete = 0
<if test="dto.auditStatus != null and dto.auditStatus != ''">
and ur.audit_status = #{dto.auditStatus}
and tjsc.audit_status = #{dto.auditStatus}
</if>
<if test="dto.applyNo != null and dto.applyNo != ''">
and ur.apply_no like concat('%',#{dto.applyNo},'%')
and tjsc.apply_no like concat('%',#{dto.applyNo},'%')
</if>
<if test="dto.cancelType != null and dto.cancelType != ''">
and ur.cancel_type = #{dto.cancelType}
and tjsc.cancel_type = #{dto.cancelType}
</if>
<if test="dto.receiveCompanyCode != null and dto.receiveCompanyCode != ''">
and tjsc.receive_company_code = #{dto.receiveCompanyCode}
</if>
<if test="dto.applicationDate != null and dto.applicationDate != ''">
and tjsc.create_date like concat('%',DATE_FORMAT(#{dto.applicationDate},'%Y-%m-%d'),'%')
</if>
<if test="dto.equList != null and dto.equList != ''">
AND jri."EQU_LIST" = #{dto.equList}
</if>
<if test="dto.equCategory != null and dto.equCategory != ''">
AND jri."equ_category" = #{dto.equCategory}
</if>
<if test="dto.equDefine != null and dto.equDefine != ''">
AND jri."EQU_DEFINE" = #{dto.equDefine}
</if>
<if test="dto.equCode != null and dto.equCode != ''">
AND jri."EQU_CODE" like concat('%',#{dto.equCode},'%')
</if>
<if test="dto.useRegistrationCode != null and dto.useRegistrationCode != ''">
AND jri."USE_ORG_CODE" like concat('%',#{dto.useRegistrationCode},'%')
</if>
<if test="dto.code96333 != null and dto.code96333 != ''">
AND oi.CODE96333 like concat('%',#{dto.code96333},'%')
</if>
<if test="dto.supervisoryCode != null and dto.supervisoryCode != ''">
AND oi.SUPERVISORY_CODE like concat('%',#{dto.supervisoryCode},'%')
</if>
<if test="dto.fullAddress != null and dto.fullAddress != ''">
AND (
use."PROVINCE_NAME" LIKE CONCAT('%', #{dto.fullAddress}, '%')
OR use."CITY_NAME" LIKE CONCAT('%', #{dto.fullAddress}, '%')
OR use."COUNTY_NAME" LIKE CONCAT('%', #{dto.fullAddress}, '%')
OR use."STREET_NAME" LIKE CONCAT('%', #{dto.fullAddress}, '%')
)
</if>
<if test="roleIds != null and dto.type == 'supervision'">
<foreach collection='roleIds' item='role' open='and (' close=')' separator='or'>
ur.instance_status like concat('%',#{role},'%')
or ur.create_user_id = #{dto.createUserId}
tjsc.instance_status like concat('%',#{role},'%')
or tjsc.create_user_id = #{dto.createUserId}
</foreach>
</if>
<if test="dto.type == 'supervision'">
and ( ur.receive_org_code = #{orgCode} or ur.transfer_to_user_ids like concat('%',#{currentUserId},'%'))
AND ur.instance_id <![CDATA[<>]]> ''
and ( tjsc.receive_org_code = #{orgCode} or tjsc.transfer_to_user_ids like concat('%',#{currentUserId},'%'))
AND tjsc.instance_id <![CDATA[<>]]> ''
</if>
<if test="dto.type == 'company' ">
and (ur.use_unit_code = #{orgCode} or ur.transfer_to_user_ids like concat('%',#{currentUserId},'%'))
and (tjsc.use_unit_code = #{orgCode} or tjsc.transfer_to_user_ids like concat('%',#{currentUserId},'%'))
</if>
</where>
order by ur.rec_date desc
order by
<if test="sort != null">
tjsc.${sort.field} ${sort.sortType},
</if>
tjsc.rec_date desc
</select>
<select id="getDetail" resultType="java.util.Map">
SELECT jri.EQU_CODE as equCode,
......
......@@ -39,7 +39,8 @@
GROUP_CONCAT(DISTINCT re.equ_id) AS equipId,
concat(use."PROVINCE_NAME", '', use."CITY_NAME", '', use."COUNTY_NAME", '', use."STREET_NAME") as fullAddress,
use."ADDRESS" as detailedAddress,
ibjsi.ORG_BRANCH_NAME as orgBranchName
ibjsi.ORG_BRANCH_NAME as orgBranchName,
ur.cancel_reason as cancelReason
from tzs_jg_use_registration ur
LEFT JOIN tzs_jg_use_registration_eq re on ur.sequence_nbr = re.equip_transfer_id
LEFT JOIN idx_biz_jg_register_info jri on re.equ_id = jri.RECORD
......@@ -548,7 +549,7 @@
<if test="jsonObject.record != null and jsonObject.record != ''" >
and ui."RECORD" = #{jsonObject.record}
</if>
and not exists(SELECT 1 FROM tzs_jg_vehicle_information v, tzs_jg_vehicle_information_eq ve WHERE v.sequence_nbr = ve.vehicle_id AND ve.equ_id = ui."RECORD" and v.status !='使用单位待提交' and v.status !='一级受理已驳回' and v.status !='使用单位已撤回' )
and not exists(SELECT 1 FROM tzs_jg_vehicle_information v, tzs_jg_vehicle_information_eq ve WHERE v.sequence_nbr = ve.vehicle_id AND ve.equ_id = ui."RECORD" and v.status !='使用单位待提交' and v.status !='一级受理已驳回' and v.status !='使用单位已撤回' and v.status !='已作废' )
ORDER BY ui.REC_DATE DESC
</select>
......@@ -571,6 +572,6 @@
tzs_jg_use_registration_eq b
where
a.sequence_nbr = b.equip_transfer_id
and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '一级受理已驳回' and a.status <![CDATA[ <> ]]> '使用单位已撤回')
and (a.status <![CDATA[ <> ]]> '使用单位待提交' and a.status <![CDATA[ <> ]]> '一级受理已驳回' and a.status <![CDATA[ <> ]]> '使用单位已撤回' and a.status <![CDATA[ <> ]]> '已作废')
</select>
</mapper>
......@@ -197,6 +197,7 @@
and v.status !='使用单位待提交'
and v.status !='一级受理已驳回'
and v.status !='使用单位已撤回'
and v.status !='已作废'
and v.sequence_nbr !=#{vehicleId}
and ve.equ_id in
<foreach collection="records" item="record" open="(" close=")" separator=",">
......
......@@ -8,12 +8,20 @@ import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -131,9 +139,50 @@ public class IdxBizJqEquipmentRegisterController extends BaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/equipCanUsedByVessel/page")
@ApiOperation(httpMethod = "GET", value = "车用气瓶设备列表查询", notes = "车用气瓶设备列表查询")
@ApiOperation(httpMethod = "GET", value = "查询车用气瓶可进行选择的设备列表", notes = "查询车用气瓶可进行选择的设备列表")
public ResponseModel<Page<JSONObject>>queryEquipCanUsedByVesselPage(@RequestParam Map<String, Object> queryMap) {
JSONObject jsonObject = new JSONObject(queryMap);
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.queryEquipCanUsedByVesselPage(jsonObject));
}
/**
* 压力容器设备批量导入
*/
@PostMapping("/importPressureVesselData")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "压力容器设备批量导入")
public ResponseModel<String> importPressureVesselData(@RequestParam(value = "file") MultipartFile file,
@RequestParam Map<String, Object> paramMap) {
HashMap<String, Object> colorMap = new HashMap<>();
colorMap.put("EQU_LIST_CODE", "2000");
colorMap.put("EQU_LIST", "压力容器");
colorMap.put("EQU_CATEGORY", "气瓶");
colorMap.put("EQU_CATEGORY_CODE", "2300");
colorMap.put("EQU_DEFINE", "特种气瓶(内装填料气瓶、纤维缠绕气瓶、低温绝热气瓶)");
colorMap.put("EQU_DEFINE_CODE", "23T0");
return ResponseHelper.buildResponse(idxBizJgRegisterInfoService.importPressureVesselData(file, colorMap));
}
/**
* 压力容器设备模版下载
*/
@GetMapping("/pressureVesselTemplate")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "压力容器设备模版下载")
public void pressureVesselTemplate(HttpServletResponse response) throws Exception {
response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("压力容器设备导入模版.xlsx", "UTF-8"));
response.setContentType("application/vnd.ms-excel");
Resource resource = new ClassPathResource("templates/pressureVesselTemplate.xlsx");
try (OutputStream outputStream = response.getOutputStream();
InputStream inputStream = resource.getInputStream()) {
byte[] bytes = new byte[1024 * 1024];
int len;
while ((len = inputStream.read(bytes)) != -1) {
outputStream.write(bytes, 0, len);
}
} catch (IOException e) {
throw new Exception("系统异常");
}
}
}
......@@ -104,6 +104,7 @@ public class JgChangeRegistrationNameController extends BaseController {
@ApiOperation(httpMethod = "POST", value = "列表全部数据查询", notes = "列表全部数据查询")
@PostMapping(value = "/getList")
public ResponseModel<Page<Map<String, Object>>> getList(JgChangeRegistrationNameDto dto,
@RequestParam(value = "sort",required = false) String sort,
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size) {
Page<Map<String, Object>> page = new Page<>(current, size);
......@@ -114,7 +115,7 @@ public class JgChangeRegistrationNameController extends BaseController {
} else {
dto.setType(COMPANY_TYPE_SUPERVISION);
}
return ResponseHelper.buildResponse(jgChangeRegistrationNameService.getList(dto, page, dto.getRoleIds(),reginParams.getCompany().getCompanyCode()));
return ResponseHelper.buildResponse(jgChangeRegistrationNameService.getList(dto,sort, page, dto.getRoleIds(),reginParams.getCompany().getCompanyCode()));
}
......
......@@ -142,8 +142,9 @@ public class JgChangeRegistrationTransferController extends BaseController {
@GetMapping(value = "/page")
@ApiOperation(httpMethod = "GET",value = "移装变更登记登记分页查询", notes = "移装变更登记登记分页查询")
public ResponseModel<Page<Map<String, Object>>> queryForPage(@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size,
JgChangeRegistrationTransferDto params) {
@RequestParam(value = "size") int size,
@RequestParam(value = "sort",required = false) String sort,
JgChangeRegistrationTransferDto params) {
Page<Map<String, Object>> page = new Page<>(current, size);
ReginParams reginParams = getSelectedOrgInfo();
String companyTypeCode = "";
......@@ -153,7 +154,7 @@ public class JgChangeRegistrationTransferController extends BaseController {
companyTypeCode = COMPANY_TYPE_SUPERVISION;
}
params.setUnitCode(reginParams.getCompany().getCompanyCode());
return ResponseHelper.buildResponse(jgChangeRegistrationTransferService.queryListForPage(page,params, companyTypeCode, reginParams.getCompany().getCompanyType()));
return ResponseHelper.buildResponse(jgChangeRegistrationTransferService.queryListForPage(page,sort,params, companyTypeCode, reginParams.getCompany().getCompanyType()));
}
/**
......
......@@ -53,11 +53,12 @@ public class JgEnableDisableController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "使用登记设备关系表分页查询", notes = "使用登记设备关系表分页查询")
public ResponseModel<Page<Map<String, Object>>> page(@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size,
@RequestParam(value = "sort",required = false) String sort,
JgEnableDisableDto dto) {
Page<Map<String, Object>> page = new Page<>();
page.setCurrent(current);
page.setSize(size);
return ResponseHelper.buildResponse(jgEnableDisableServiceImpl.pageList(page, dto));
return ResponseHelper.buildResponse(jgEnableDisableServiceImpl.pageList(page,sort, dto));
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
......
......@@ -79,7 +79,7 @@ public class JgInstallationNoticeController extends BaseController {
installationInfo.setProxyStatementAttachmentList((List<Map<String, Object>>) o);
installationInfo.setInstallContractAttachmentList((List<Map<String, Object>>) o1);
installationInfo.setOtherAccessoriesList((List<Map<String, Object>>) o2);
return ResponseHelper.buildResponse(iJgInstallationNoticeService.updateInstallationNotice(submitType,installationInfo, op));
return ResponseHelper.buildResponse(iJgInstallationNoticeService.updateInstallationNotice(submitType, installationInfo, op));
}
/**
......@@ -144,8 +144,8 @@ public class JgInstallationNoticeController extends BaseController {
@RequestParam(value = "size", defaultValue = "20") int size,
@ApiParam(value = "类型:enterprise-企业端、supervision-监管端", required = true)
@RequestParam(value = "type", defaultValue = "enterprise") String type,
@ApiParam(value = "排序字段",required = false)
@RequestParam(value = "sort",required = false) String sort,
@ApiParam(value = "排序字段", required = false)
@RequestParam(value = "sort", required = false) String sort,
@RequestBody(required = false) JgInstallationNoticeDto model
) {
Page<JgInstallationNotice> page = new Page<>(current, size);
......@@ -163,4 +163,14 @@ public class JgInstallationNoticeController extends BaseController {
public void generateReport(HttpServletResponse response, @RequestParam("sequenceNbr") Long sequenceNbr) {
iJgInstallationNoticeService.generateInstallationNoticeReport(sequenceNbr, response);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "PUT", value = "安装告知单个作废", notes = "安装告知单个作废")
@PutMapping(value = "/cancel/application")
public ResponseModel<JgInstallationNotice> cancelApplication(@RequestBody JgInstallationNoticeDto jgInstallationNoticeDto) {
JgInstallationNotice result = iJgInstallationNoticeService.cancelApplication(jgInstallationNoticeDto.getSequenceNbr(), jgInstallationNoticeDto.getCancelReason());
return ResponseHelper.buildResponse(result);
}
}
......@@ -109,11 +109,12 @@ public class JgScrapCancelController extends BaseController {
@ApiOperation(httpMethod = "POST", value = "列表全部数据查询", notes = "列表全部数据查询")
@PostMapping(value = "/getList")
public ResponseModel<Page<Map<String, Object>>> getList(JgScrapCancelDto dto,
@RequestParam(value = "sort",required = false) String sort,
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size) {
Page<Map<String, Object>> page = new Page<>(current, size);
dto.setType(String.valueOf(iJgInstallationNoticeService.getCompanyType().get("companyLevel")));
return ResponseHelper.buildResponse(jgScrapCancelService.getList(dto, page, dto.getRoleIds()));
return ResponseHelper.buildResponse(jgScrapCancelService.getList(dto,sort, page, dto.getRoleIds()));
}
......
......@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.jg.api.dto.JgUseRegistrationDto;
import com.yeejoin.amos.boot.module.jg.api.entity.JgUseRegistration;
import com.yeejoin.amos.boot.module.jg.biz.service.impl.JgUseRegistrationServiceImpl;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.component.feign.utils.FeignUtil;
......@@ -54,8 +55,8 @@ public class JgUseRegistrationController extends BaseController {
String.valueOf(map.get("instanceId")),
String.valueOf(map.get("operate")),
String.valueOf(map.get("comment")),
String.valueOf(map.getOrDefault("carNumber","")),
String.valueOf(map.getOrDefault("manageType","")),
String.valueOf(map.getOrDefault("carNumber", "")),
String.valueOf(map.getOrDefault("manageType", "")),
String.valueOf(map.get("nextTaskId")));
return ResponseHelper.buildResponse("ok");
}
......@@ -66,7 +67,7 @@ public class JgUseRegistrationController extends BaseController {
@ApiOperation(httpMethod = "POST", value = "撤回", notes = "撤回")
public ResponseModel<Object> withdraw(@RequestBody JSONObject map) {
jgUseRegistrationServiceImpl.withdraw(String.valueOf(map.get("instanceId")), String.valueOf(map.get("nextTaskId")),
String.valueOf(map.getOrDefault("manageType","")));
String.valueOf(map.getOrDefault("manageType", "")));
return ResponseHelper.buildResponse("ok");
}
......@@ -93,7 +94,7 @@ public class JgUseRegistrationController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "列表全部数据查询", notes = "列表全部数据查询")
@GetMapping(value = "/getList")
public ResponseModel<Page<Map<String, Object>>> getList(JgUseRegistrationDto dto,
@ApiParam(value = "排序字段",required = false) @RequestParam(value = "sort",required = false) String sort,
@ApiParam(value = "排序字段", required = false) @RequestParam(value = "sort", required = false) String sort,
@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size) {
Page<Map<String, Object>> page = new Page<>(current, size);
......@@ -105,8 +106,8 @@ public class JgUseRegistrationController extends BaseController {
} else {
dto.setDataType(BaseController.COMPANY_TYPE_SUPERVISION);
}
Page<Map<String, Object>> list = jgUseRegistrationServiceImpl.getList(dto,sort, page, dto.getRoleIds());
list.getRecords().forEach(x-> x.put("companyType",info.getCompany().getCompanyType()));
Page<Map<String, Object>> list = jgUseRegistrationServiceImpl.getList(dto, sort, page, dto.getRoleIds());
list.getRecords().forEach(x -> x.put("companyType", info.getCompany().getCompanyType()));
return ResponseHelper.buildResponse(list);
}
......@@ -219,4 +220,12 @@ public class JgUseRegistrationController extends BaseController {
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "PUT", value = "使用登记单条作废", notes = "使用登记单条作废")
@PutMapping(value = "/cancel/application")
public ResponseModel<JgUseRegistration> cancelApplication(@RequestBody JgUseRegistrationDto jgUseRegistration) {
JgUseRegistration result = jgUseRegistrationServiceImpl.cancelApplication(jgUseRegistration.getSequenceNbr(), jgUseRegistration.getCancelReason());
return ResponseHelper.buildResponse(result);
}
}
......@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.controller;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.module.jg.api.entity.JgVehicleInformation;
import com.yeejoin.amos.boot.module.jg.api.vo.JgVehicleInformationVo;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
......@@ -182,4 +183,12 @@ public class JgVehicleInformationController extends BaseController {
@RequestParam(value = "printType", defaultValue = "0") String printType) {
jgVehicleInformationServiceImpl.exportVehicleUseRegistrationCertificate(sequenceNbr, response, printType);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "PUT", value = "车用气瓶使用登记单条作废", notes = "车用气瓶使用登记单条作废")
@PutMapping(value = "/cancel/application")
public ResponseModel<JgVehicleInformation> cancelApplication(@RequestBody JgVehicleInformationDto vehicleInformationDto) {
JgVehicleInformation result = jgVehicleInformationServiceImpl.cancelApplication(vehicleInformationDto.getSequenceNbr(), vehicleInformationDto.getCancelReason());
return ResponseHelper.buildResponse(result);
}
}
......@@ -13,8 +13,13 @@ import javax.servlet.http.HttpServletResponse;
public class ClearThreadLocalInterceptor implements HandlerInterceptor {
@Override
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler,
ModelAndView modelAndView) {
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler){
FlowingEquipRedisContext.clean();
return true;
}
@Override
public void afterCompletion(HttpServletRequest request, HttpServletResponse response,Object handler, Exception ex) {
// 清除ThreadLocal变量
FlowingEquipRedisContext.clean();
}
......
......@@ -15,4 +15,11 @@ public interface ICmWorkflowService {
ProcessTaskDTO rollBack(String processInstanceId);
ProcessTaskDTO assign(FlowTaskVo taskVo);
/**
* 终止流程
* @param processInstanceId 流程实例id
* @return ProcessInstanceDTO
*/
ProcessInstanceDTO stopProcess(String processInstanceId);
}
......@@ -2,6 +2,7 @@ package com.yeejoin.amos.boot.module.jg.biz.service;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.yeejoin.amos.boot.biz.common.bo.CompanyBo;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
......@@ -136,7 +137,7 @@ public interface ICommonService {
* @param currentDocumentId 业务id
* @return Object
*/
Object queryHistoryDataObj(Long currentDocumentId);
JSONArray queryHistoryDataObj(Long currentDocumentId);
/**
* 统计指定设备流程中的引用次数(12个流程中,非待提交、非已撤回、非已驳回)
......@@ -185,6 +186,8 @@ public interface ICommonService {
*/
CompanyBo getOneCompany(String companyCode);
Integer checkFactoryNumUniquenessForVehicleCylinder(String factoryNum,String sequenceNbr);
/**
* 更新单位类型缓存
*
......
package com.yeejoin.amos.boot.module.jg.biz.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgConstructionInfo;
/**
......@@ -8,7 +9,7 @@ import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgConstructionInfo;
* @author system_generator
* @date 2023-08-17
*/
public interface IIdxBizJgConstructionInfoService {
public interface IIdxBizJgConstructionInfoService extends IService<IdxBizJgConstructionInfo> {
boolean saveOrUpdateData(IdxBizJgConstructionInfo constructionInfo);
......
......@@ -5,8 +5,8 @@ import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel;
import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
import java.util.List;
import java.util.Map;
......@@ -35,4 +35,6 @@ public interface IIdxBizJgRegisterInfoService {
Page<JSONObject> queryForUnitEquipmentPage(JSONObject jsonObject);
Page<JSONObject> queryEquipCanUsedByVesselPage(JSONObject jsonObject);
String importPressureVesselData(MultipartFile file, Map<String, Object> paramMap);
}
package com.yeejoin.amos.boot.module.jg.biz.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgUseInfo;
import java.util.List;
......@@ -11,11 +12,13 @@ import java.util.List;
* @author system_generator
* @date 2023-08-16
*/
public interface IIdxBizJgUseInfoService {
public interface IIdxBizJgUseInfoService extends IService<IdxBizJgUseInfo> {
boolean saveOrUpdateData(IdxBizJgUseInfo useInfo);
IdxBizJgUseInfo getOneData(String record);
List<IdxBizJgUseInfo> getUseInfoListByEquIds(List<String> equIds);
boolean saveBatch(List<IdxBizJgUseInfo> useInfoList);
}
......@@ -7,10 +7,7 @@ import com.yeejoin.amos.boot.module.jg.biz.service.ICmWorkflowService;
import com.yeejoin.amos.component.feign.config.InnerInvokException;
import com.yeejoin.amos.component.feign.utils.FeignUtil;
import com.yeejoin.amos.feign.workflow.Workflow;
import com.yeejoin.amos.feign.workflow.model.ActWorkflowBatchDTO;
import com.yeejoin.amos.feign.workflow.model.FlowTaskVo;
import com.yeejoin.amos.feign.workflow.model.ProcessTaskDTO;
import com.yeejoin.amos.feign.workflow.model.TaskResultDTO;
import com.yeejoin.amos.feign.workflow.model.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.exception.BaseException;
......@@ -122,4 +119,23 @@ public class CmWorkflowServiceImpl implements ICmWorkflowService {
}
return processTaskDTO;
}
@Override
public ProcessInstanceDTO stopProcess(String processInstanceId) {
ProcessInstanceDTO processTaskDTO = new ProcessInstanceDTO();
try {
log.info("开始请求工作流终止流程接口:/stopProcess/{processInstanceId},请求参数:{}", processInstanceId);
processTaskDTO = Workflow.taskV2Client.stopProcess(processInstanceId).getResult();
} catch (InnerInvokException e) {
//拦截无审核人异常信息
String devMessage = getErrorMessage(e);
log.error(devMessage);
throw new LocalBadRequest(devMessage);
} catch (Exception e) {
log.error("调用工作流终止流程任接口失败", e);
throw new RuntimeException("调用工作流终止流程任接口失败");
}
return processTaskDTO;
}
}
......@@ -6,6 +6,7 @@ import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.IoUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.aspose.words.SaveFormat;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
......@@ -73,6 +74,7 @@ import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
......@@ -1058,6 +1060,7 @@ public class CommonServiceImpl implements ICommonService {
}
@Override
@Transactional(rollbackFor = Exception.class)
public Object transfer(Map<String, Object> map) {
if (ObjectUtils.isEmpty(map.get("nextTaskId")) || map.get("nextTaskId") == null) {
throw new BadRequest("nextTaskId不能为空");
......@@ -1646,11 +1649,11 @@ public class CommonServiceImpl implements ICommonService {
}
@Override
public Object queryHistoryDataObj(Long currentDocumentId) {
public JSONArray queryHistoryDataObj(Long currentDocumentId) {
LambdaQueryWrapper<JgRegistrationHistory> lambda = new QueryWrapper<JgRegistrationHistory>().lambda();
lambda.eq(JgRegistrationHistory::getCurrentDocumentId, currentDocumentId);
JgRegistrationHistory jgRegistrationHistory = jgRegistrationHistoryService.getBaseMapper().selectOne(lambda);
return jgRegistrationHistory != null ? JSON.parse(jgRegistrationHistory.getChangeData()) : null;
return jgRegistrationHistory != null ? JSON.parseArray(jgRegistrationHistory.getChangeData()) : new JSONArray();
}
@Override
......@@ -1766,6 +1769,11 @@ public class CommonServiceImpl implements ICommonService {
return companyBo == null ? new CompanyBo() : companyBo;
}
@Override
public Integer checkFactoryNumUniquenessForVehicleCylinder(String factoryNum, String sequenceNbr) {
return commonMapper.checkFactoryNumUniquenessForVehicleCylinder(factoryNum, sequenceNbr);
}
/**
* 根据设备列表代码选择对应的 PDF 模板
*
......
......@@ -34,4 +34,9 @@ public class IdxBizJgUseInfoServiceImpl extends BaseService<IdxBizJgUseInfoDto,I
queryWrapper.lambda().in(IdxBizJgUseInfo::getRecord, equIds);
return list(queryWrapper);
}
@Override
public boolean saveBatch(List<IdxBizJgUseInfo> useInfoList) {
return super.saveBatch(useInfoList);
}
}
\ No newline at end of file
......@@ -17,6 +17,7 @@ import com.yeejoin.amos.boot.module.jg.api.enums.BusinessTypeEnum;
import com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum;
import com.yeejoin.amos.boot.module.jg.api.mapper.*;
import com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationNameService;
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.jg.biz.service.ICmWorkflowService;
import com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService;
......@@ -459,7 +460,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
ids.forEach(id-> commonService.deleteTaskModel(id + ""));
}
@Transactional(rollbackFor = Exception.class)
public void revocation(String instanceId, String taskId) {
String lockKey = CommonServiceImpl.buildJgExecuteLockKey(instanceId);
RLock lock = redissonClient.getLock(lockKey);
......@@ -530,7 +531,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
}
}
@Transactional(rollbackFor = Exception.class)
public void flowExecute(Long id, String instanceId, String operate, String comment, String nextTaskId) {
String lockKey = CommonServiceImpl.buildJgExecuteLockKey(instanceId);
RLock lock = redissonClient.getLock(lockKey);
......@@ -781,7 +782,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
}
public Page<Map<String, Object>> getList(JgChangeRegistrationNameDto dto, Page<Map<String, Object>> page, List<String> roleIds, String companyCode) {
public Page<Map<String, Object>> getList(JgChangeRegistrationNameDto dto,String sort, Page<Map<String, Object>> page, List<String> roleIds, String companyCode) {
if (org.apache.commons.lang3.StringUtils.isNotBlank(dto.getReceiveOrgCode())) {
String[] receiveOrgIdList = dto.getReceiveOrgCode().split("_");
if (receiveOrgIdList.length > 1) {
......@@ -789,6 +790,7 @@ public class JgChangeRegistrationNameServiceImpl extends BaseService<JgChangeReg
dto.setReceiveCompanyCode(receiveOrgIdList[0]);
}
}
return this.baseMapper.getListPage(page, dto, roleIds, companyCode, RequestContext.getExeUserId());
SortVo sortMap = commonService.sortFieldConversion(sort);
return this.baseMapper.getListPage(page,sortMap, dto, roleIds, companyCode, RequestContext.getExeUserId());
}
}
\ No newline at end of file
......@@ -134,7 +134,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
return listPage;
}
@Transactional
@Transactional(rollbackFor = Exception.class)
public List<Map<String, Object>> save(JSONObject map) {
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
UseInfo useInfo = new UseInfo();
......@@ -396,6 +396,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
.build();
}
@Transactional(rollbackFor = Exception.class)
public void flowExecute(Long id, String instanceId, String operate, String comment, String nextTaskId) {
String lockKey = CommonServiceImpl.buildJgExecuteLockKey(instanceId);
RLock lock = redissonClient.getLock(lockKey);
......@@ -438,6 +439,7 @@ public class JgChangeRegistrationReformServiceImpl extends BaseService<JgChangeR
}
@Transactional(rollbackFor = Exception.class)
public void withdraw(String instanceId, String nextTaskId) {
String lockKey = CommonServiceImpl.buildJgExecuteLockKey(instanceId);
RLock lock = redissonClient.getLock(lockKey);
......
......@@ -22,6 +22,7 @@ import com.yeejoin.amos.boot.module.jg.api.mapper.*;
import com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationTransferEqService;
import com.yeejoin.amos.boot.module.jg.api.service.IJgChangeRegistrationTransferService;
import com.yeejoin.amos.boot.module.jg.api.service.IJgRegistrationHistoryService;
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.jg.biz.service.ICmWorkflowService;
import com.yeejoin.amos.boot.module.jg.biz.service.ICommonService;
......@@ -51,6 +52,7 @@ import org.redisson.api.RedissonClient;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext;
......@@ -138,6 +140,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
* @param map
* @return
*/
@Transactional(rollbackFor = Exception.class)
public List<JgChangeRegistrationTransferDto> createTransfer(String submitType, JSONObject map, ReginParams reginParams) {
Map<String, Object> tableData = (Map<String, Object>) map.get(TABLE_PAGE_ID);
......@@ -393,6 +396,7 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
* @param operate
* @param comment
*/
@Transactional(rollbackFor = Exception.class)
public void flowExecute(Long id, String instanceId, String operate, String comment, String nextTaskId) {
String lockKey = CommonServiceImpl.buildJgExecuteLockKey(instanceId);
RLock lock = redissonClient.getLock(lockKey);
......@@ -441,6 +445,8 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
*
* @param instanceId
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void revocation(String instanceId, String nextTaskId) {
String lockKey = CommonServiceImpl.buildJgExecuteLockKey(instanceId);
RLock lock = redissonClient.getLock(lockKey);
......@@ -632,8 +638,9 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
* @return
*/
@Override
public Page<Map<String, Object>> queryListForPage(Page<Map<String, Object>> page, JgChangeRegistrationTransferDto params, String companyTypeCode, String companyType) {
Page<Map<String, Object>> listPage = this.baseMapper.getListPage(page, params, companyTypeCode, RequestContext.getExeUserId());
public Page<Map<String, Object>> queryListForPage(Page<Map<String, Object>> page,String sort, JgChangeRegistrationTransferDto params, String companyTypeCode, String companyType) {
SortVo sortMap = commonService.sortFieldConversion(sort);
Page<Map<String, Object>> listPage = this.baseMapper.getListPage(page,sortMap, params, companyTypeCode, RequestContext.getExeUserId());
listPage.getRecords().forEach(x-> x.put("companyType",companyType));
return listPage;
}
......
......@@ -758,6 +758,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
}
}
@Transactional(rollbackFor = Exception.class)
public void cancel(JgChangeRegistrationUnitDto noticeDto) {
String lockKey = CommonServiceImpl.buildJgExecuteLockKey(noticeDto.getInstanceId());
RLock lock = redissonClient.getLock(lockKey);
......
......@@ -17,6 +17,7 @@ import com.yeejoin.amos.boot.module.jg.api.mapper.JgEnableDisableEqMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgEnableDisableMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgMaintainNoticeMapper;
import com.yeejoin.amos.boot.module.jg.api.service.IJgEnableDisableService;
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.jg.biz.service.ICmWorkflowService;
import com.yeejoin.amos.boot.module.jg.biz.service.IIdxBizJgRegisterInfoService;
......@@ -363,7 +364,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
public Page<Map<String, Object>> pageList(Page<Map<String, Object>> page, JgEnableDisableDto dto) {
public Page<Map<String, Object>> pageList(Page<Map<String, Object>> page,String sort, JgEnableDisableDto dto) {
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
if ("company".equals(reginParams.getCompany().getLevel())) {
dto.setUseUnitCreditCode(reginParams.getCompany().getCompanyCode());
......@@ -372,7 +373,8 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
}
String level = reginParams.getCompany().getLevel();
String userId = reginParams.getUserModel().getUserId();
return this.baseMapper.pageList(page, dto, level,userId);
SortVo sortMap = commonService.sortFieldConversion(sort);
return this.baseMapper.pageList(page,sortMap, dto, level,userId);
}
......@@ -422,6 +424,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
@Autowired
RegistrationInfoMapper tzsJgRegistrationInfoMapper;
@Transactional(rollbackFor = Exception.class)
public void flowExecute(Long id, String instanceId, String operate, String comment, String nextTaskId) {
String lockKey = CommonServiceImpl.buildJgExecuteLockKey(instanceId);
RLock lock = redissonClient.getLock(lockKey);
......@@ -593,6 +596,7 @@ public class JgEnableDisableServiceImpl extends BaseService<JgEnableDisableDto,
}
@Transactional(rollbackFor = Exception.class)
public void withdraw(String instanceId, String nextTaskId) {
String lockKey = CommonServiceImpl.buildJgExecuteLockKey(instanceId);
RLock lock = redissonClient.getLock(lockKey);
......
......@@ -384,6 +384,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
* @param jgEquipTransferDto 设备信息
* @param op 通过或驳回
*/
@Transactional(rollbackFor = Exception.class)
public void accept(JgEquipTransferDto jgEquipTransferDto, String op) {
String instanceId = jgEquipTransferDto.getInstanceId();
String nextTaskId = jgEquipTransferDto.getNextTaskId();
......@@ -492,6 +493,7 @@ public class JgEquipTransferServiceImpl extends BaseService<JgEquipTransferDto,
*
* @param equipTransferInfo 设备移交信息
*/
@Transactional(rollbackFor = Exception.class)
public void cancel(JgEquipTransferDto equipTransferInfo) {
String instanceId = equipTransferInfo.getInstanceId();
String nextTaskId = equipTransferInfo.getNextTaskId();
......
......@@ -690,6 +690,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
}
}
@Transactional(rollbackFor = Exception.class)
public void cancel(JgMaintainNoticeDto noticeDto) {
String instanceId = noticeDto.getInstanceId();
String nextTaskId = noticeDto.getNextTaskId();
......@@ -739,7 +740,7 @@ public class JgMaintainNoticeServiceImpl extends BaseService<JgMaintainNoticeDto
.build();
}
@Transactional
@Transactional(rollbackFor = Exception.class)
public void accept(JgMaintainNoticeDto dto, String op, String opinion) {
String instanceId = dto.getInstanceId();
String nextTaskId = dto.getNextTaskId();
......
......@@ -145,9 +145,9 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
}
} else {
// 完成的显示历史表的数据
JSONArray objects = (JSONArray) commonService.queryHistoryDataObj(dto.getSequenceNbr());
JSONArray objects = commonService.queryHistoryDataObj(dto.getSequenceNbr());
// 兼容老数据
if (objects == null) {
if (objects.isEmpty()) {
List<Map<String, Object>> list = maintenanceContractMapper.selectEquipList(sequenceNbr);
if (!ObjectUtils.isEmpty(list)) {
vo.setEquipmentLists(list);
......@@ -171,6 +171,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
return maintenanceContractMapper.updateBySequenceNbr(dto);
}
@Transactional(rollbackFor = Exception.class)
public void flowExecute(Long id, String instanceId, String operate, String comment, Boolean update, String nextTaskId) {
String lockKey = CommonServiceImpl.buildJgExecuteLockKey(instanceId);
RLock lock = redissonClient.getLock(lockKey);
......@@ -292,7 +293,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
/**
* 维保合同撤回
*/
@Transactional
@Transactional(rollbackFor = Exception.class)
public void revocation(String instanceId, String _nextTaskId) {
String lockKey = CommonServiceImpl.buildJgExecuteLockKey(instanceId);
RLock lock = redissonClient.getLock(lockKey);
......
......@@ -690,6 +690,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
* @param dto 改造信息
* @param op 通过或驳回
*/
@Transactional(rollbackFor = Exception.class)
public void accept(JgReformNoticeDto dto, String op) {
String instanceId = dto.getInstanceId();
String nextTaskId = dto.getNextTaskId();
......
......@@ -19,6 +19,7 @@ import com.yeejoin.amos.boot.module.jg.api.enums.WorkFlowStatusEnum;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgScrapCancelEqMapper;
import com.yeejoin.amos.boot.module.jg.api.mapper.JgScrapCancelMapper;
import com.yeejoin.amos.boot.module.jg.api.service.IJgScrapCancelService;
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.jg.biz.service.IIdxBizJgRegisterInfoService;
import com.yeejoin.amos.boot.module.jg.flc.api.fegin.WorkFlowFeignService;
......@@ -109,12 +110,13 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
return "1".equals(type) ? BusinessTypeEnum.JG_EQUIPMENT_CANCEL : BusinessTypeEnum.JG_EQUIPMENT_MOVE;
}
public Page<Map<String, Object>> getList(JgScrapCancelDto dto, Page<Map<String, Object>> page, List<String> roleIds) {
public Page<Map<String, Object>> getList(JgScrapCancelDto dto,String sort, Page<Map<String, Object>> page, List<String> roleIds) {
ReginParams reginParams = this.getSelectedOrgInfo();
String orgCode = reginParams.getCompany().getCompanyCode();
dto.setCreateUserId(reginParams.getUserModel().getUserId());
String currentUserId = reginParams.getUserModel().getUserId();
Page<Map<String, Object>> listPage = this.baseMapper.getListPage(page, dto, roleIds, orgCode, currentUserId);
SortVo sortMap = commonService.sortFieldConversion(sort);
Page<Map<String, Object>> listPage = this.baseMapper.getListPage(page,sortMap, dto, roleIds, orgCode, currentUserId);
listPage.getRecords().forEach(item -> {
if (item.containsKey("auditStatus") && Objects.nonNull(item.get("auditStatus"))) {
item.put("auditStatusDesc", item.get("auditStatus").toString());
......@@ -571,7 +573,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
@Transactional
@Transactional(rollbackFor = Exception.class)
public void revocation(String instanceId, String nextTaskId) {
String lockKey = CommonServiceImpl.buildJgExecuteLockKey(instanceId);
RLock lock = redissonClient.getLock(lockKey);
......@@ -636,7 +638,7 @@ public class JgScrapCancelServiceImpl extends BaseService<JgScrapCancelDto, JgSc
}
}
@Transactional
@Transactional(rollbackFor = Exception.class)
public void flowExecute(String equList, Long id, String instanceId, String operate, String comment, String nextTaskId) {
String lockKey = CommonServiceImpl.buildJgExecuteLockKey(instanceId);
RLock lock = redissonClient.getLock(lockKey);
......
......@@ -13,7 +13,10 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.tcm.api.dto.*;
import com.yeejoin.amos.boot.module.tcm.api.entity.*;
import com.yeejoin.amos.boot.module.tcm.api.enums.*;
import com.yeejoin.amos.boot.module.tcm.api.enums.EquipmentClassifityEnum;
import com.yeejoin.amos.boot.module.tcm.api.enums.PersonManageRoleEnum;
import com.yeejoin.amos.boot.module.tcm.api.enums.TwoStipulateGroupEnum;
import com.yeejoin.amos.boot.module.tcm.api.enums.UnitTypeEnum;
import com.yeejoin.amos.boot.module.tcm.api.mapper.TzsBaseIndividualityMapper;
import com.yeejoin.amos.boot.module.tcm.api.mapper.TzsUserEquipMapper;
import com.yeejoin.amos.boot.module.tcm.api.mapper.TzsUserInfoMapper;
......@@ -46,46 +49,35 @@ import java.util.stream.Collectors;
@Slf4j
public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserInfo, TzsUserInfoMapper> implements ITzsUserInfoService {
@Autowired
private TzsUserInfoMapper tzsUserInfoMapper;
@Autowired
private TzsUserEquipMapper tzsUserEquipMapper;
@Autowired
private TzsUserEquipServiceImpl tzsUserEquipService;
// 企业人员角色
private final String USER_ROLE = "QYRYJS";
// 企业人员用户组
private final String ROLE_GROUP = "QYRYYHZ";
// 两个规定用户组-对应企业人员的人员类型前缀
private final String QYRYGW = "QYRYGW";
// 两个规定用户组-对应企业人员的人员类型前缀
private final String QYRYGW_NAME = "企业人员类型";
// 平台用户锁定状态
private final String UNLOCK = "UNLOCK";
private final String LOCK = "LOCK";
@Autowired
DataDictionaryServiceImpl iDataDictionaryService;
@Autowired
private RedisUtils redisUtils;
@Autowired
TzBaseEnterpriseInfoServiceImpl baseEnterpriseInfoService;
@Autowired
TzsBaseIndividualityServiceImpl individualityService;
@Autowired
TzsBaseIndividualityMapper individualityMapper;
//企业人员角色
private final String USER_ROLE = "QYRYJS";
//企业人员用户组
private final String ROLE_GROUP = "QYRYYHZ";
//两个规定用户组-对应企业人员的人员类型前缀
private final String QYRYGW = "QYRYGW";
//两个规定用户组-对应企业人员的人员类型前缀
private final String QYRYGW_NAME = "企业人员类型";
//平台用户锁定状态
private final String UNLOCK = "UNLOCK";
private final String LOCK = "LOCK";
@Autowired
AmosRequestContext amosRequestContext;
@Autowired
private TzsUserInfoMapper tzsUserInfoMapper;
@Autowired
private TzsUserEquipMapper tzsUserEquipMapper;
@Autowired
private TzsUserEquipServiceImpl tzsUserEquipService;
@Autowired
private RedisUtils redisUtils;
@Autowired
private TzsUserQualificationsServiceImpl tzsUserQualificationsService;
......@@ -107,15 +99,32 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
return tzsUserInfoDtoPage;
}
// 判断字符串是否为合法的 JSON 格式
public boolean isJSONValid(String test) {
try {
JSON.parseArray(test);
return true;
} catch (Exception ex) {
return false;
}
}
public String setPostName(String postKey) {
JSONArray dictIds = JSON.parseArray(postKey);
// 兼容前端只传一个值,并且非json类型的情况
JSONArray dictIds = new JSONArray();
if (this.isJSONValid(postKey)) {
dictIds = JSON.parseArray(postKey);
} else {
dictIds.add(postKey);
}
if (dictIds == null || dictIds.isEmpty()) {
return "";
}
LambdaQueryWrapper<DataDictionary> lambda = new QueryWrapper<DataDictionary>().lambda();
lambda.in(DataDictionary::getSequenceNbr, dictIds);
List<DataDictionary> dataDictionaries = iDataDictionaryService.getByTypeAndDesc(QYRYGW, QYRYGW_NAME);
List<DataDictionary> postDataList = dataDictionaries.stream().filter(d -> dictIds.stream().anyMatch(id -> id.toString().equals(d.getSequenceNbr().toString()))).collect(Collectors.toList());
JSONArray finalDictIds = dictIds;
List<DataDictionary> postDataList = dataDictionaries.stream().filter(d -> finalDictIds.stream().anyMatch(id -> id.toString().equals(d.getSequenceNbr().toString()))).collect(Collectors.toList());
return postDataList.stream().map(DataDictionary::getName).collect(Collectors.joining(","));
}
......@@ -175,9 +184,9 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
List<TzsUserInfo> tzsUserInfos = tzsUserInfoMapper.selectList(lambda);
for (TzsUserInfo userInfo : tzsUserInfos) {
tzsUserEquipMapper.delete(new QueryWrapper<TzsUserEquip>().eq("user_seq", userInfo.getSequenceNbr()));
if(!ObjectUtils.isEmpty(userInfo.getAmosUserId())){
if (!ObjectUtils.isEmpty(userInfo.getAmosUserId())) {
Privilege.agencyUserClient.multDeleteUser(userInfo.getAmosUserId());
deleteGroupAndPersonRelation(userInfo.getPostName(),userInfo.getAmosUserId());
deleteGroupAndPersonRelation(userInfo.getPostName(), userInfo.getAmosUserId());
}
}
}
......@@ -187,7 +196,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
public void deleteGroupAndPersonRelation(String postName, String amosUserId) {
String[] split = postName.split(",");
for (String s : split) {
if(!ObjectUtils.isEmpty(TwoStipulateGroupEnum.getId.get(s))){
if (!ObjectUtils.isEmpty(TwoStipulateGroupEnum.getId.get(s))) {
Privilege.groupUserClient.deleteGroupUser(TwoStipulateGroupEnum.getId.get(s), amosUserId);
}
}
......@@ -270,18 +279,18 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
}
});
//添加人员管理角色
// 添加人员管理角色
String post = tzsUserInfo.getPost();
if(post.contains(PersonManageRoleEnum.code.getId().toString())){
if (post.contains(PersonManageRoleEnum.code.getId().toString())) {
String companyType = tzsUserInfoMapper.selectCompanyTypeById(companySeq);
if(companyType.contains(PersonManageRoleEnum.jyjc.getName())){
if (companyType.contains(PersonManageRoleEnum.jyjc.getName())) {
roleIds.add(PersonManageRoleEnum.jyjc.getId());
}
if(companyType.contains(PersonManageRoleEnum.use.getName())){
if (companyType.contains(PersonManageRoleEnum.use.getName())) {
roleIds.add(PersonManageRoleEnum.use.getId());
}
if(companyType.contains(PersonManageRoleEnum.agw.getName())){
if (companyType.contains(PersonManageRoleEnum.agw.getName())) {
roleIds.add(PersonManageRoleEnum.agw.getId());
}
}
......@@ -299,7 +308,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
tzsUserInfo.setAmosUserId(userResult.getResult().getUserId());
tzsUserInfo.setAmosUserName(userResult.getResult().getUserName());
tzsUserInfo.setLockStatus(status);
//绑定企业整改用户组
// 绑定企业整改用户组
List<String> userIds = new ArrayList<>();
userIds.add(userResult.getResult().getUserId());
DataDictionary roleGroup = iDataDictionaryService
......@@ -307,7 +316,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
if (!ObjectUtils.isEmpty(roleGroup) && roleGroup.getExtend() != null) {
Privilege.groupUserClient.create(Long.valueOf(roleGroup.getExtend()), userIds);
}
//绑定两个规定用户组
// 绑定两个规定用户组
post = post.replace("[", "").replace("]", "").replace("\"", "");
for (String code : post.split(",")) {
DataDictionary groupId = iDataDictionaryService
......@@ -406,10 +415,10 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
if (companyType.contains("充装单位") || companyType.contains("安装改造维修单位") || companyType.contains("制造单位") || companyType.contains("设计单位")) {
productCompany = true;
}
if (companyType.contains("安装改造维修单位")){
if (companyType.contains("安装改造维修单位")) {
installCompany = true;
}
if (companyType.contains("检验检测机构")){
if (companyType.contains("检验检测机构")) {
inspectionCompany = true;
}
}
......@@ -467,7 +476,7 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
@Override
public List<TzsUserInfo> getSafetyList(String companyCode) {
return tzsUserInfoMapper.selectList(new QueryWrapper<TzsUserInfo>().eq("unit_code", companyCode).eq("is_delete",false).like("post", 6549));
return tzsUserInfoMapper.selectList(new QueryWrapper<TzsUserInfo>().eq("unit_code", companyCode).eq("is_delete", false).like("post", 6549));
}
@Override
......
......@@ -65,4 +65,11 @@ public class ConstructionInfo extends AbstractEquipBaseEntity {
private String uscDate;
/**
* 告知业务id-告知作废时使用
*/
@TableField(value = "\"NOTICE_ID\"")
private String noticeId;
}
......@@ -74,4 +74,12 @@ public class IdxBizJgConstructionInfo extends TzsBaseEntity {
@TableField(exist = false)
private String supervisoryCode;
/**
* 告知业务id-告知作废时使用
*/
@TableField(value = "\"NOTICE_ID\"")
private String noticeId;
}
......@@ -65,4 +65,23 @@ public enum FlowStatusEnum {
return name;
}
public static FlowStatusEnum getEumByCode(int code) {
for (FlowStatusEnum statusEnum : FlowStatusEnum.values()) {
if (statusEnum.getCode() == code) {
return statusEnum;
}
}
return null;
}
public static FlowStatusEnum getEumByName(String name) {
for (FlowStatusEnum statusEnum : FlowStatusEnum.values()) {
if (statusEnum.getName().equals(name)) {
return statusEnum;
}
}
return null;
}
}
\ No newline at end of file
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