Browse Source

修复:操作票逻辑判断修复

zhongwei
ty 4 months ago
parent
commit
5d8e614d48
  1. 8
      hzims-service-api/ticket-api/src/main/java/com/hnac/hzims/ticket/standardTicket/entity/StandardTicketInfoEntity.java
  2. 4
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/standardTicket/service/impl/OperationTicketServiceImpl.java
  3. 1
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java
  4. 7
      hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/vo/operation/StandardTicketInfoVo.java
  5. 4
      hzims-service/ticket/src/main/resources/db/3.0.0.sql

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

@ -178,4 +178,12 @@ public class StandardTicketInfoEntity extends TenantEntity implements Serializab
@ApiModelProperty("图片附件")
private String picture;
// @ApiModelProperty("设备编号")
// @QueryField(condition = SqlCondition.EQUAL)
// private String emCode ;
//
// @ApiModelProperty("设备名称")
// @QueryField(condition = SqlCondition.LIKE)
// private String emName;
}

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

@ -156,6 +156,7 @@ public class OperationTicketServiceImpl implements OperationTicketService , Star
standardTicketInfoVo.setCode(code);
//3. 保存操作对象
StandardTicketInfoEntity standardTicketInfo = getStandardTicketInfoEntity(standardTicketInfoVo);
standardTicketInfo.setStatus(1);
boolean save = standardTicketInfoService.save(standardTicketInfo);
if (!save) {
throw new ServiceException("Save failed");
@ -382,6 +383,9 @@ public class OperationTicketServiceImpl implements OperationTicketService , Star
log.error("安全措施为空哦");
return new ArrayList<>();
}
measureEntityList= measureEntityList.stream().map(s->{
s.setStatus(1);
return s;}).collect(Collectors.toList());
boolean save = standardTicketMeasureService.saveBatch(measureEntityList);
if (!save) {
throw new ServiceException("Save failed");

1
hzims-service/ticket/src/main/java/com/hnac/hzims/ticket/twoTicket/service/impl/TicketProcessServiceImpl.java

@ -790,6 +790,7 @@ public class TicketProcessServiceImpl implements TicketProcessService, StartProc
measure.setCreateDept(workTicketInfoEntity.getCreateDept());
measure.setCreateUser(workTicketInfoEntity.getCreateUser());
measure.setExecutor(AuthUtil.getUserId());
measure.setStatus(1);
return measure;
}).collect(Collectors.toList());
boolean savedBatch = workTicketSafetyMeasureService.saveBatch(measureEntityList);

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

@ -36,6 +36,7 @@ public class StandardTicketInfoVo extends TenantEntity {
@ApiModelProperty("编号")
private String code;
@ApiModelProperty("发令人")
private Long issueOrderPerson;
@ -167,4 +168,10 @@ public class StandardTicketInfoVo extends TenantEntity {
@ApiModelProperty("图片附件")
private String picture;
//
// @ApiModelProperty("设备编号")
// private String emCode ;
// @ApiModelProperty("设备名称")
// private String emName;
}

4
hzims-service/ticket/src/main/resources/db/3.0.0.sql

@ -7,3 +7,7 @@ ALTER TABLE `hzims_standard_ticket_info`
ADD COLUMN `is_normal` tinyint(2) NULL DEFAULT 1 ;
ALTER TABLE `hzims_work_ticket_info`
ADD COLUMN `is_normal` tinyint(2) NULL DEFAULT 1 ;
ALTER TABLE `hzims_standard_ticket_info`
ADD COLUMN `em_code` varchar(255) NULL COMMENT '设备编号' ,
ADD COLUMN `em_name` varchar(255) NULL COMMENT '设备名称' ;
Loading…
Cancel
Save