Browse Source

update: 操作票添加作废逻辑

zhongwei
liwen 1 year ago
parent
commit
ca21f0d811
  1. 6
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/constants/TicketConstants.java
  2. 41
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/standardTicket/entity/StandardTicketInfoEntity.java
  3. 15
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java
  4. 48
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/operation/StandardTicketInfoVo.java

6
hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/constants/TicketConstants.java

@ -25,6 +25,12 @@ public interface TicketConstants {
String LICENSOR_ROLE = "licensor";
/**
* 操作票监护人确认结果
*/
String OPERATION_TICKET_APPROVED = "approved";
String OPERATION_TICKET_REJECTED = "rejected";
/**
* 工作票安措新增类型
**/
String DUTY_PATTERN = "1";

41
hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/standardTicket/entity/StandardTicketInfoEntity.java

@ -1,5 +1,6 @@
package com.hnac.hzims.ticket.standardTicket.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
@ -106,7 +107,6 @@ public class StandardTicketInfoEntity extends TenantEntity implements Serializab
@ApiModelProperty("是否评价")
private Integer isEvaluate;
/**
* AA/AAA/AAAA由建站时建站人填写必须系统验证唯一性
* 站点标识-两票编码
@ -114,65 +114,30 @@ public class StandardTicketInfoEntity extends TenantEntity implements Serializab
@ApiModelProperty("站点标识-两票编码")
private String signage;
/**
* 编号原站点ID
*/
@ApiModelProperty("编号(原站点ID)")
private String signageCode;
/**
* 流程状态'
*/
@ApiModelProperty("流程状态")
private Integer flowStatus;
/**
* 流程描述
*/
@ApiModelProperty("流程描述")
private String flowDescription;
/**
* 下一个审批人
*/
@ApiModelProperty("下一个审批人")
private String nextStepOperator;
/**
* 用户Id
*/
@ApiModelProperty("用户Id")
private String flowUserId;
/**
* 当前任务名
*/
@ApiModelProperty("当前任务名")
private String flowTaskName;
/**
* 当前任务名
*/
@ApiModelProperty("当前任务名")
private String flowTaskId;
/**
* 项目
*/
@ApiModelProperty("项目")
private String projectName;
/**
*
*/
@ApiModelProperty("分组")
private String classGroupName;
@ -182,7 +147,6 @@ public class StandardTicketInfoEntity extends TenantEntity implements Serializab
@ApiModelProperty("更新人名称")
private String updateUserName;
@ApiModelProperty("发令人名称")
private String issueOrderPersonName;
@ -195,4 +159,7 @@ public class StandardTicketInfoEntity extends TenantEntity implements Serializab
@ApiModelProperty("许可人名称")
private String guardianName;
@TableField(exist = false)
@ApiModelProperty("监护人确认结果:approved-确认,rejected-作废")
private String verifyResult;
}

15
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java

@ -303,11 +303,16 @@ public class OperationTicketServiceImpl implements OperationTicketService {
String taskId = response.getTaskId();
log.info("StringUtils.isBlank(taskId) = " + StringUtils.isBlank(taskId));
if (StringUtils.isBlank(taskId)) {
newStandardTicketInfoEntity.setFlowDescription("结束");
newStandardTicketInfoEntity.setFlowTaskId(" ");
newStandardTicketInfoEntity.setFlowTaskName("结束");
newStandardTicketInfoEntity.setNextStepOperator(" ");
newStandardTicketInfoEntity.setFlowStatus(999);
if (newStandardTicketInfoEntity.equals(TicketConstants.OPERATION_TICKET_APPROVED)) {
newStandardTicketInfoEntity.setFlowDescription("结束");
newStandardTicketInfoEntity.setFlowTaskId(" ");
newStandardTicketInfoEntity.setFlowTaskName("结束");
newStandardTicketInfoEntity.setNextStepOperator(" ");
newStandardTicketInfoEntity.setFlowStatus(999);
} else {
newStandardTicketInfoEntity.setFlowDescription("作废");
newStandardTicketInfoEntity.setFlowTaskName("作废");
}
} else {
//如果response.getHandleType() 是0使用户
newStandardTicketInfoEntity.setFlowUserId(response.getUserId());

48
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/operation/StandardTicketInfoVo.java

@ -3,6 +3,7 @@ package com.hnac.hzims.ticket.twoTicket.vo.operation;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springframework.format.annotation.DateTimeFormat;
@ -17,22 +18,19 @@ import java.util.List;
* @Date 2023/6/6 15:39
*/
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class StandardTicketInfoVo extends TenantEntity {
@ApiModelProperty("票据类型")
private String ticketType;
@ApiModelProperty("单位")
private String company;
@ApiModelProperty("工作流ID")
private String processInstanceId;
@ApiModelProperty("编号")
private String code;
@ -97,7 +95,6 @@ public class StandardTicketInfoVo extends TenantEntity {
@ApiModelProperty("是否评价")
private Integer isEvaluate;
/**
* AA/AAA/AAAA由建站时建站人填写必须系统验证唯一性
* 站点标识-两票编码
@ -105,70 +102,33 @@ public class StandardTicketInfoVo extends TenantEntity {
@ApiModelProperty("站点标识-两票编码")
private String signage;
/**
* 项目
*/
@ApiModelProperty("项目")
private String projectName;
/**
*
*/
@ApiModelProperty("分组")
private String classGroupName;
/**
* 编号原站点ID
*/
@ApiModelProperty("编号(原站点ID)")
private String signageCode;
/**
* 流程状态'
*/
@ApiModelProperty("流程状态")
private Integer flowStatus;
/**
* 流程描述
*/
@ApiModelProperty("流程描述")
private String flowDescription;
/**
* 下一个审批人
*/
@ApiModelProperty("下一个审批人")
private String nextStepOperator;
/**
* 用户Id
*/
@ApiModelProperty("用户Id")
private String flowUserId;
/**
* 当前任务名
*/
@ApiModelProperty("当前任务名")
private String flowTaskName;
/**
* 当前任务名
*/
@ApiModelProperty("当前任务名")
private String flowTaskId;
@ApiModelProperty("创建人名称")
private String createUserName;
@ -190,8 +150,6 @@ public class StandardTicketInfoVo extends TenantEntity {
@ApiModelProperty("许可人名称")
private String guardianName;
/**
* 安全措施
*/
@ApiModelProperty("安全措施")
private List<StandardTicketMeasureVo> standardTicketMeasureVos;
}

Loading…
Cancel
Save