Commit 08ef459e authored by LiuLin's avatar LiuLin

Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register

parents 6034c5a6 6dd2219a
package com.yeejoin.amos.boot.module.jg.api.enums;
/**
* 业务类型枚举
*/
public enum BusinessTypeEnum {
EQUIPMENT_MANAGEMENT(101,"设备管理"),
INSTALLATION_NOTIFICATION(102,"安装告知"),
INSPECTION_DETECTION(103,"检验检测"),
MAINTENANCE_RECORD(104,"维保备案"),
USAGE_REGISTRATION(105,"使用登记"),
EQUIPMENT_HANDOVER(106,"设备移交"),
MODIFICATION_NOTIFICATION(107,"改造告知"),
MAINTENANCE_NOTIFICATION(108,"维修告知"),
ADVICE_REMOVAL(109,"移装告知"),
CHANGE_REGISTRATION(110,"变更登记"),
ELEVATOR_STOP(111,"电梯停运"),
ELEVATOR_ACTIVATION(112,"电梯启用"),
ELEVATOR_DEREGISTRATION(113,"电梯注销");
private final int code;
private final String name;
BusinessTypeEnum(int code, String name) {
this.code = code;
this.name = name;
}
public static String getNameByType(Long code) {
String name = null;
for (BusinessTypeEnum enumOne : BusinessTypeEnum.values()) {
if (enumOne.getCode() == code) {
name = enumOne.getName();
break;
}
}
return name;
}
public int getCode() {
return code;
}
public String getName() {
return name;
}
}
package com.yeejoin.amos.boot.module.jg.api.enums;
/**
* 办理状态枚举
*/
public enum FlowStatusEnum {
/**
* 待提交
*/
TO_BE_SUBMITTED(6610, "待提交"),
/**
* 已提交
*/
SUBMITTED(6611, "已提交"),
/**
* 待受理
*/
TO_BE_PROCESSED(6612, "待受理"),
/**
* 已办理
*/
HAVE_PROCESSED(6613, "已办理"),
/**
* 已驳回
*/
REJECTED(6614, "已驳回");
private final int code;
private final String name;
FlowStatusEnum(int code, String name) {
this.code = code;
this.name = name;
}
public static String getNameByType(Long code) {
String name = null;
for (FlowStatusEnum enumOne : FlowStatusEnum.values()) {
if (enumOne.getCode() == code) {
name = enumOne.getName();
break;
}
}
return name;
}
public int getCode() {
return code;
}
public String getName() {
return name;
}
}
package com.yeejoin.amos.boot.module.jg.api.enums;
/**
* 维保备案使用单位枚举
*/
public enum MaintenanceEnum {
SHIYONG(0,"使用单位"),
WEIBAO(1,"维保单位"),
JIANGUAN(2,"监管单位");
private Integer code;
private String msg;
MaintenanceEnum(Integer code, String msg) {
this.code = code;
this.msg = msg;
}
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
}
...@@ -11,73 +11,74 @@ import java.util.Date; ...@@ -11,73 +11,74 @@ import java.util.Date;
import java.util.List; import java.util.List;
/** /**
*
*
* @author system_generator * @author system_generator
* @date 2023-12-13 * @date 2023-12-13
*/ */
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode (callSuper = true)
@ApiModel(value="JyjcOpeningApplicationDto", description="") @ApiModel (value = "JyjcOpeningApplicationDto", description = "")
public class JyjcOpeningApplicationDto extends BaseDto { public class JyjcOpeningApplicationDto extends BaseDto {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "单位编码") @ApiModelProperty (value = "单位编码")
private String unitCode; private String unitCode;
@ApiModelProperty(value = "检测区域编码") @ApiModelProperty (value = "检测区域编码")
private String detectionRegion; private String detectionRegion;
@ApiModelProperty(value = "检测区域名称(冗余)") @ApiModelProperty (value = "检测区域名称(冗余)")
private String detectionRegionName; private String detectionRegionName;
@ApiModelProperty(value = "申请单号") @ApiModelProperty (value = "申请单号")
private String applicationSeq; private String applicationSeq;
@ApiModelProperty(value = "检验结果方式") @ApiModelProperty (value = "检验结果方式")
private String resultType; private String resultType;
@ApiModelProperty(value = "有效期至") @ApiModelProperty (value = "有效期至")
private Date expiryDate; private Date expiryDate;
@ApiModelProperty(value = "受理日期(接收日期)") @ApiModelProperty (value = "受理日期(接收日期)")
private Date acceptDate; private Date acceptDate;
@ApiModelProperty(value = "状态") @ApiModelProperty (value = "状态")
private String status; private String status;
@ApiModelProperty(value = "备注") @ApiModelProperty (value = "备注")
private String remark; private String remark;
@ApiModelProperty(value = "申请时间") @ApiModelProperty (value = "申请时间")
private String applyTime; private String applyTime;
@ApiModelProperty(value = "企业资质信息") @ApiModelProperty (value = "工作流执行角色")
private String workflowRole;
@ApiModelProperty (value = "工作流实例ID")
private String workflowProstanceId;
/* ---------------- -------------- */
@ApiModelProperty (value = "企业资质信息")
List<TzBaseUnitLicenceDto> baseUnitLicences; List<TzBaseUnitLicenceDto> baseUnitLicences;
@ApiModelProperty(value = "检验人员信息") @ApiModelProperty (value = "检验人员信息")
List<TzsUserInfoDto> userInfos; List<TzsUserInfoDto> userInfos;
/* ---------------- -------------- */ @ApiModelProperty (value = "使用单位联系人")
@ApiModelProperty(value = "使用单位联系人")
private String useContact; private String useContact;
@ApiModelProperty(value = "联系人联系电话") @ApiModelProperty (value = "联系人联系电话")
private String contactPhone; private String contactPhone;
@ApiModelProperty (value = "行业主管部门")
@ApiModelProperty(value = "行业主管部门")
private String industrySupervisor; private String industrySupervisor;
@ApiModelProperty(value = "单位地理坐标经度") @ApiModelProperty (value = "单位地理坐标经度")
private String longitude; private String longitude;
@ApiModelProperty(value = "单位地理坐标纬度") @ApiModelProperty (value = "单位地理坐标纬度")
private String latitude; private String latitude;
@ApiModelProperty("企业营业执照") @ApiModelProperty ("企业营业执照")
private String unitBusinessLicense ; private String unitBusinessLicense;
} }
...@@ -83,5 +83,14 @@ public class JyjcOpeningApplication extends BaseEntity { ...@@ -83,5 +83,14 @@ public class JyjcOpeningApplication extends BaseEntity {
*/ */
@TableField(value = "rec_date", fill = FieldFill.INSERT) @TableField(value = "rec_date", fill = FieldFill.INSERT)
protected Date applyTime; protected Date applyTime;
/**
* 工作流执行角色
*/
@TableField(value = "workflow_role")
private String workflowRole;
/**
* 工作流实例ID
*/
@TableField(value = "workflow_prostance_id")
private String workflowProstanceId;
} }
...@@ -21,6 +21,12 @@ ...@@ -21,6 +21,12 @@
<artifactId>amos-boot-module-common-biz</artifactId> <artifactId>amos-boot-module-common-biz</artifactId>
<version>${amos-biz-boot.version}</version> <version>${amos-biz-boot.version}</version>
</dependency> </dependency>
<dependency>
<groupId>com.yeejoin</groupId>
<artifactId>amos-feign-workflow</artifactId>
<version>1.8.5</version>
<scope>compile</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
......
...@@ -12,15 +12,21 @@ import com.yeejoin.amos.boot.module.tcm.api.dto.TzBaseEnterpriseInfoDto; ...@@ -12,15 +12,21 @@ import com.yeejoin.amos.boot.module.tcm.api.dto.TzBaseEnterpriseInfoDto;
import com.yeejoin.amos.boot.module.tcm.api.dto.TzBaseUnitLicenceDto; import com.yeejoin.amos.boot.module.tcm.api.dto.TzBaseUnitLicenceDto;
import com.yeejoin.amos.boot.module.tcm.api.dto.TzsUserInfoDto; import com.yeejoin.amos.boot.module.tcm.api.dto.TzsUserInfoDto;
import com.yeejoin.amos.boot.module.tcm.api.enums.LicenceTypeEnum; import com.yeejoin.amos.boot.module.tcm.api.enums.LicenceTypeEnum;
import com.yeejoin.amos.feign.workflow.Workflow;
import com.yeejoin.amos.feign.workflow.model.ActWorkflowStartDTO;
import com.yeejoin.amos.feign.workflow.model.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.typroject.tyboot.core.foundation.utils.ValidationUtil; import org.typroject.tyboot.core.foundation.utils.ValidationUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService; import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 服务实现类 * 服务实现类
...@@ -39,6 +45,26 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -39,6 +45,26 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
@Resource(type = JyjcBaseMapper.class) @Resource(type = JyjcBaseMapper.class)
private JyjcBaseMapper baseMapper; private JyjcBaseMapper baseMapper;
@Value("${process-definition-key}")
private String processDefinitionKey;
public JyjcOpeningApplicationDto save(JyjcOpeningApplicationDto model) {
// 开启工作流 startProcess
JyjcOpeningApplicationDto dto = this.createWithModel(model);
return dto;
}
private String startProcess(HashMap<String, Object> dtoMap) throws Exception {
ActWorkflowStartDTO dto = new ActWorkflowStartDTO();
dto.setProcessDefinitionKey(processDefinitionKey);
dto.setBusinessKey("1");
dto.setVariables(dtoMap);
AjaxResult ajaxResult = Workflow.taskClient.startByVariable(dto);
String instanceId = ((Map) ajaxResult.get("data")).get("id").toString();
return instanceId;
}
/** /**
* 分页查询 * 分页查询
*/ */
......
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