Browse Source

Merge remote-tracking branch 'origin/master'

zhongwei
yang_shj 9 months ago
parent
commit
a192b2a1f1
  1. 5
      hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/emParam/entity/ParamBackupsEntity.java
  2. 11
      hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/entity/OperMaintenanceLibraryEntity.java
  3. 2
      hzims-service/equipment/src/main/java/com/hnac/hzims/emParam/controller/ParamBackupsDetailController.java
  4. 4
      hzims-service/equipment/src/main/resources/db/2.0.0.sql.1
  5. 12
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/IOperMaintenanceLibraryService.java
  6. 22
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceLibraryServiceImpl.java

5
hzims-service-api/equipment-api/src/main/java/com/hnac/hzims/emParam/entity/ParamBackupsEntity.java

@ -35,6 +35,11 @@ public class ParamBackupsEntity extends TenantEntity implements Serializable {
@NotBlank(message = "设备编号不能为空",groups = {Create.class})
private String emCode;
@ApiModelProperty("设备名称")
@QueryField(condition = SqlCondition.LIKE)
@NotBlank(message = "设备名称不能为空",groups = {Create.class})
private String emName;
@ApiModelProperty("是否延迟发布")
@QueryField(condition = SqlCondition.EQUAL)
private Boolean delay;

11
hzims-service-api/hzims-operational-api/src/main/java/com/hnac/hzims/operational/maintenance/entity/OperMaintenanceLibraryEntity.java

@ -8,6 +8,8 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.support.QueryField;
import org.springblade.core.mp.support.SqlCondition;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springframework.format.annotation.DateTimeFormat;
@ -31,11 +33,13 @@ public class OperMaintenanceLibraryEntity extends TenantEntity {
* 库编码
*/
@ApiModelProperty(value = "库编码,后台自动生成")
@QueryField(condition = SqlCondition.LIKE)
private String libraryCode;
/**
* 设备编码
*/
@ApiModelProperty(value = "设备编码,多个按,分隔")
@QueryField(condition = SqlCondition.EQUAL)
private String emCode;
@ApiModelProperty(value = "维护模式 01=人员 02=值班")
@ -54,12 +58,14 @@ public class OperMaintenanceLibraryEntity extends TenantEntity {
* 维护类型 01=定期试验 02=定期保养 03=定期操作 04=其他
*/
@ApiModelProperty(value = "维护类型 01=定期试验 02=定期保养 03=定期操作 04=其他")
@QueryField(condition = SqlCondition.EQUAL)
private String typeCode;
/**
* 流程key
*/
@ApiModelProperty(value = "流程key")
@QueryField(condition = SqlCondition.EQUAL)
private String procDefId;
/**
* 周期(单位:小时)
@ -102,6 +108,7 @@ public class OperMaintenanceLibraryEntity extends TenantEntity {
* 执行人员多个人员之间用英文逗号分隔
*/
@ApiModelProperty(value = "执行人员,多个人员之间用英文逗号分隔,并且字符串首尾都必须有一个英文逗号")
@QueryField(condition = SqlCondition.LIKE)
private String disposers;
@ApiModelProperty(value = "生成计划时间,仅在后台业务使用")
@ -121,4 +128,8 @@ public class OperMaintenanceLibraryEntity extends TenantEntity {
@JsonSerialize(nullsUsing = NullSerializer.class)
private Long messageTemplateId;
@ApiModelProperty("创建机构")
@QueryField(condition = SqlCondition.LIKE)
private Long createDept;
}

2
hzims-service/equipment/src/main/java/com/hnac/hzims/emParam/controller/ParamBackupsDetailController.java

@ -26,7 +26,7 @@ public class ParamBackupsDetailController extends BladeController {
private final IParamBackupsDetailService paramBackupsDetailService;
@GetMapping("/getBackupsParamTree")
@ApiOperation("")
@ApiOperation("获取备份参数树形结构")
@ApiOperationSupport(order = 1)
public R<List<ParamBackupsDetailTreeVO>> getBackupsParamTree(@RequestParam @ApiParam("备份ID") Long backupsId) {
return R.data(paramBackupsDetailService.getBackupsParamTree(backupsId));

4
hzims-service/equipment/src/main/resources/db/2.0.0.sql.1

@ -24,4 +24,6 @@ CREATE TABLE `hzims_em_video_banding` (
-- 参数分组还原添加字段
alter table `HZIMS_PARAM_BACKUPS_DETAIL` add column `model_classify_id` BIGINT(20) COMMENT '参数分组';
alter table `HZIMS_PARAM_BACKUPS_DETAIL` add column `model_classify_name` BIGINT(20) COMMENT '参数分组名称';
alter table `HZIMS_PARAM_BACKUPS_DETAIL` modify column `model_classify_name` varchar(100) NULL COMMENT '参数分组名称';
alter table `HZIMS_PARAM_BACKUPS_DETAIL` modify column `model_classify_name` varchar(100) NULL COMMENT '参数分组名称';
alter table `HZIMS_PARAM_BACKUPS` add column `em_name` varchar(100) COMMENT '设备名称';
update HZIMS_PARAM_BACKUPS pb,HZIMS_EM_INFO ei set pb.EM_NAME = ei.`NAME` WHERE pb.EM_CODE = ei.NUMBER;

12
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/IOperMaintenanceLibraryService.java

@ -1,6 +1,8 @@
package com.hnac.hzims.operational.maintenance.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.common.support.constants.Order;
import com.hnac.hzims.operational.maintenance.dto.OperMaintenanceLibraryDTO;
import com.hnac.hzims.operational.maintenance.entity.OperMaintenanceLibraryEntity;
import com.hnac.hzims.operational.maintenance.vo.OperMaintenanceLibraryVO;
@ -8,6 +10,8 @@ import org.springblade.core.mp.base.BaseService;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import java.util.HashMap;
/**
* 服务类
*
@ -28,4 +32,12 @@ public interface IOperMaintenanceLibraryService extends BaseService<OperMaintena
*/
R generatePlan(String ids);
default LambdaQueryWrapper<OperMaintenanceLibraryEntity> getQueryWrapper(OperMaintenanceLibraryEntity req) {
HashMap<String, Order> sort = new HashMap<String, Order>() {{
put("create_time", Order.DESC);
}};
LambdaQueryWrapper<OperMaintenanceLibraryEntity> queryWrapper = com.hnac.hzims.common.support.utils.Condition.getQueryWrapper(req,OperMaintenanceLibraryEntity.class,sort);
return queryWrapper;
}
}

22
hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/service/impl/OperMaintenanceLibraryServiceImpl.java

@ -3,6 +3,7 @@ package com.hnac.hzims.operational.maintenance.service.impl;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.common.support.constants.Order;
import com.hnac.hzims.operational.maintenance.dto.OperMaintenanceLibraryDTO;
import com.hnac.hzims.operational.maintenance.entity.OperMaintenanceLibraryEntity;
import com.hnac.hzims.operational.maintenance.mapper.OperMaintenanceLibraryMapper;
@ -27,6 +28,7 @@ import org.springframework.stereotype.Service;
import java.time.YearMonth;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@ -61,25 +63,7 @@ public class OperMaintenanceLibraryServiceImpl extends BaseServiceImpl<OperMaint
@Override
public R<IPage<OperMaintenanceLibraryVO>> list(OperMaintenanceLibraryDTO req, Query query) {
Wrapper<OperMaintenanceLibraryEntity> queryWrapper = new LambdaQueryWrapper<OperMaintenanceLibraryEntity>() {{
orderByDesc(OperMaintenanceLibraryEntity::getCreateTime);
if (StringUtils.isNotBlank(req.getLibraryCode())) {
like(OperMaintenanceLibraryEntity::getLibraryCode, req.getLibraryCode());
}
if (StringUtils.isNotBlank(req.getEmCode())) {
like(OperMaintenanceLibraryEntity::getEmCode, req.getEmCode());
}
if (StringUtils.isNotBlank(req.getTypeCode())) {
eq(OperMaintenanceLibraryEntity::getTypeCode, req.getTypeCode());
}
if (StringUtils.isNotBlank(req.getProcDefId())) {
eq(OperMaintenanceLibraryEntity::getProcDefId, req.getProcDefId());
}
if (StringUtils.isNotBlank(req.getDisposers())) {
like(OperMaintenanceLibraryEntity::getDisposers, "," + req.getDisposers() + ",");
}
}};
IPage pages = super.page(Condition.getPage(query), queryWrapper);
IPage pages = super.page(Condition.getPage(query), this.getQueryWrapper(BeanUtil.copy(req, OperMaintenanceLibraryEntity.class)));
pages.setRecords(OperMaintenanceLibraryWrapper.build().listVO(pages.getRecords()));
return R.data(pages);
}

Loading…
Cancel
Save