feat:期间核查-创建计划

This commit is contained in:
FCL
2026-03-06 17:26:31 +08:00
parent 835b3cab83
commit eb99a9ed44
22 changed files with 373 additions and 137 deletions

View File

@@ -0,0 +1,16 @@
package com.zt.plat.module.qms.resource.device.common;
public class DeviceConstant {
//业务类型
public static final String DAILY_CHECK_TYPE = "dailyCheck"; //点检
public static final String MAINTAIN_TYPE = "maintain"; //维护
public static final String CALIBRATION_TYPE = "calibration"; //检定校准
public static final String PERIOD_TYPE = "period"; //期间核查
//频率类型
public static final String FREQUENCY_TYPE_YEAR = "year";
public static final String FREQUENCY_TYPE_MONTH = "month";
public static final String FREQUENCY_TYPE_DAY = "day";
}

View File

@@ -1,10 +1,8 @@
package com.zt.plat.module.qms.resource.device.controller.admin;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceConfigBusinessRulePageReqVO;
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceConfigBusinessRuleRespVO;
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceConfigBusinessRuleSaveReqVO;
import com.zt.plat.module.qms.resource.device.dal.mapper.DeviceConfigBusinessRuleMapper;
import org.springframework.web.bind.annotation.*;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
@@ -55,11 +53,9 @@ public class DeviceConfigBusinessRuleController extends AbstractFileUploadContro
}
@Resource private DeviceConfigBusinessRuleService deviceConfigBusinessRuleService;
@Resource private DeviceConfigBusinessRuleMapper deviceConfigBusinessRuleMapper;
@PostMapping("/create")
@Operation(summary = "创建设备-业务配置")
@PreAuthorize("@ss.hasPermission('qms:device-config-business-rule:create')")
public CommonResult<DeviceConfigBusinessRuleRespVO> createDeviceConfigBusinessRule(@Valid @RequestBody DeviceConfigBusinessRuleSaveReqVO createReqVO) {
return success(deviceConfigBusinessRuleService.createDeviceConfigBusinessRule(createReqVO));
}
@@ -77,7 +73,6 @@ public class DeviceConfigBusinessRuleController extends AbstractFileUploadContro
@PutMapping("/update")
@Operation(summary = "更新设备-业务配置")
@PreAuthorize("@ss.hasPermission('qms:device-config-business-rule:update')")
public CommonResult<Boolean> updateDeviceConfigBusinessRule(@Valid @RequestBody DeviceConfigBusinessRuleSaveReqVO updateReqVO) {
deviceConfigBusinessRuleService.updateDeviceConfigBusinessRule(updateReqVO);
return success(true);
@@ -86,7 +81,6 @@ public class DeviceConfigBusinessRuleController extends AbstractFileUploadContro
@DeleteMapping("/delete")
@Operation(summary = "删除设备-业务配置")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('qms:device-config-business-rule:delete')")
public CommonResult<Boolean> deleteDeviceConfigBusinessRule(@RequestParam("id") Long id) {
deviceConfigBusinessRuleService.deleteDeviceConfigBusinessRule(id);
return success(true);
@@ -104,7 +98,6 @@ public class DeviceConfigBusinessRuleController extends AbstractFileUploadContro
@GetMapping("/get")
@Operation(summary = "获得设备-业务配置")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('qms:device-config-business-rule:query')")
public CommonResult<DeviceConfigBusinessRuleRespVO> getDeviceConfigBusinessRule(@RequestParam("id") Long id) {
DeviceConfigBusinessRuleDO deviceConfigBusinessRule = deviceConfigBusinessRuleService.getDeviceConfigBusinessRule(id);
return success(BeanUtils.toBean(deviceConfigBusinessRule, DeviceConfigBusinessRuleRespVO.class));
@@ -112,7 +105,6 @@ public class DeviceConfigBusinessRuleController extends AbstractFileUploadContro
@GetMapping("/page")
@Operation(summary = "获得设备-业务配置分页")
@PreAuthorize("@ss.hasPermission('qms:device-config-business-rule:query')")
public CommonResult<PageResult<DeviceConfigBusinessRuleRespVO>> getDeviceConfigBusinessRulePage(@Valid DeviceConfigBusinessRulePageReqVO pageReqVO) {
PageResult<DeviceConfigBusinessRuleDO> pageResult = deviceConfigBusinessRuleService.getDeviceConfigBusinessRulePage(pageReqVO);
return success(BeanUtils.toBean(pageResult, DeviceConfigBusinessRuleRespVO.class));
@@ -122,13 +114,11 @@ public class DeviceConfigBusinessRuleController extends AbstractFileUploadContro
@Operation(summary = "导出设备-业务配置 Excel")
@PreAuthorize("@ss.hasPermission('qms:device-config-business-rule:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportDeviceConfigBusinessRuleExcel(@Valid DeviceConfigBusinessRulePageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
public void exportDeviceConfigBusinessRuleExcel(@Valid DeviceConfigBusinessRulePageReqVO pageReqVO, HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<DeviceConfigBusinessRuleDO> list = deviceConfigBusinessRuleService.getDeviceConfigBusinessRulePage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "设备-业务配置.xls", "数据", DeviceConfigBusinessRuleRespVO.class,
BeanUtils.toBean(list, DeviceConfigBusinessRuleRespVO.class));
ExcelUtils.write(response, "设备-业务配置.xls", "数据", DeviceConfigBusinessRuleRespVO.class, BeanUtils.toBean(list, DeviceConfigBusinessRuleRespVO.class));
}
}

View File

@@ -17,6 +17,7 @@ import com.zt.plat.module.qms.resource.device.controller.vo.DeviceInfomationPage
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceInfomationRespVO;
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceInfomationSaveReqVO;
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceInfomationWithProductVO;
import com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceInfoWithBizConfigVO;
import com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceInfomationDO;
import com.zt.plat.module.qms.resource.device.service.DeviceInfomationService;
import com.zt.plat.module.qms.resource.device.service.DeviceProductService;
@@ -32,6 +33,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
@@ -180,4 +182,15 @@ public class DeviceInfomationController extends AbstractFileUploadController imp
BeanUtils.toBean(list, DeviceInfomationRespVO.class));
}
@GetMapping("/test")
@Operation(summary = "获得设备-设备信息分页")
public CommonResult<List<DeviceInfoWithBizConfigVO>> test() {
JSONObject params = new JSONObject();
Long deviceId = 2010903332962000897L;
params.put("businessType", "dailyCheck");
params.put("deviceId", deviceId);
List<DeviceInfoWithBizConfigVO> list = deviceInfomationService.getListNeedByRule(params);
return success(list);
}
}

View File

@@ -57,14 +57,12 @@ public class DevicePeriodCheckController extends AbstractFileUploadController im
@PostMapping("/create")
@Operation(summary = "创建设备-期间核查")
@PreAuthorize("@ss.hasPermission('qms:device-period-check:create')")
public CommonResult<DevicePeriodCheckRespVO> createDevicePeriodCheck(@Valid @RequestBody DevicePeriodCheckSaveReqVO createReqVO) {
return success(devicePeriodCheckService.createDevicePeriodCheck(createReqVO));
}
@PutMapping("/update")
@Operation(summary = "更新设备-期间核查")
@PreAuthorize("@ss.hasPermission('qms:device-period-check:update')")
public CommonResult<Boolean> updateDevicePeriodCheck(@Valid @RequestBody DevicePeriodCheckSaveReqVO updateReqVO) {
devicePeriodCheckService.updateDevicePeriodCheck(updateReqVO);
return success(true);
@@ -73,7 +71,6 @@ public class DevicePeriodCheckController extends AbstractFileUploadController im
@DeleteMapping("/delete")
@Operation(summary = "删除设备-期间核查")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('qms:device-period-check:delete')")
public CommonResult<Boolean> deleteDevicePeriodCheck(@RequestParam("id") Long id) {
devicePeriodCheckService.deleteDevicePeriodCheck(id);
return success(true);
@@ -91,7 +88,6 @@ public class DevicePeriodCheckController extends AbstractFileUploadController im
@GetMapping("/get")
@Operation(summary = "获得设备-期间核查")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('qms:device-period-check:query')")
public CommonResult<DevicePeriodCheckRespVO> getDevicePeriodCheck(@RequestParam("id") Long id) {
DevicePeriodCheckDO devicePeriodCheck = devicePeriodCheckService.getDevicePeriodCheck(id);
return success(BeanUtils.toBean(devicePeriodCheck, DevicePeriodCheckRespVO.class));
@@ -99,7 +95,6 @@ public class DevicePeriodCheckController extends AbstractFileUploadController im
@GetMapping("/page")
@Operation(summary = "获得设备-期间核查分页")
@PreAuthorize("@ss.hasPermission('qms:device-period-check:query')")
public CommonResult<PageResult<DevicePeriodCheckRespVO>> getDevicePeriodCheckPage(@Valid DevicePeriodCheckPageReqVO pageReqVO) {
PageResult<DevicePeriodCheckDO> pageResult = devicePeriodCheckService.getDevicePeriodCheckPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, DevicePeriodCheckRespVO.class));
@@ -109,13 +104,11 @@ public class DevicePeriodCheckController extends AbstractFileUploadController im
@Operation(summary = "导出设备-期间核查 Excel")
@PreAuthorize("@ss.hasPermission('qms:device-period-check:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportDevicePeriodCheckExcel(@Valid DevicePeriodCheckPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
public void exportDevicePeriodCheckExcel(@Valid DevicePeriodCheckPageReqVO pageReqVO, HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<DevicePeriodCheckDO> list = devicePeriodCheckService.getDevicePeriodCheckPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "设备-期间核查.xls", "数据", DevicePeriodCheckRespVO.class,
BeanUtils.toBean(list, DevicePeriodCheckRespVO.class));
ExcelUtils.write(response, "设备-期间核查.xls", "数据", DevicePeriodCheckRespVO.class, BeanUtils.toBean(list, DevicePeriodCheckRespVO.class));
}
}

View File

@@ -57,14 +57,12 @@ public class DevicePeriodCheckPlanController extends AbstractFileUploadControlle
@PostMapping("/create")
@Operation(summary = "创建设备-期间核查计划")
@PreAuthorize("@ss.hasPermission('qms:device-period-check-plan:create')")
public CommonResult<DevicePeriodCheckPlanRespVO> createDevicePeriodCheckPlan(@Valid @RequestBody DevicePeriodCheckPlanSaveReqVO createReqVO) {
return success(devicePeriodCheckPlanService.createDevicePeriodCheckPlan(createReqVO));
public CommonResult<DevicePeriodCheckPlanRespVO> createDevicePeriodCheckPlan(String checkYear) {
return success(devicePeriodCheckPlanService.createPlan(checkYear));
}
@PutMapping("/update")
@Operation(summary = "更新设备-期间核查计划")
@PreAuthorize("@ss.hasPermission('qms:device-period-check-plan:update')")
public CommonResult<Boolean> updateDevicePeriodCheckPlan(@Valid @RequestBody DevicePeriodCheckPlanSaveReqVO updateReqVO) {
devicePeriodCheckPlanService.updateDevicePeriodCheckPlan(updateReqVO);
return success(true);
@@ -73,7 +71,6 @@ public class DevicePeriodCheckPlanController extends AbstractFileUploadControlle
@DeleteMapping("/delete")
@Operation(summary = "删除设备-期间核查计划")
@Parameter(name = "id", description = "编号", required = true)
@PreAuthorize("@ss.hasPermission('qms:device-period-check-plan:delete')")
public CommonResult<Boolean> deleteDevicePeriodCheckPlan(@RequestParam("id") Long id) {
devicePeriodCheckPlanService.deleteDevicePeriodCheckPlan(id);
return success(true);
@@ -91,7 +88,6 @@ public class DevicePeriodCheckPlanController extends AbstractFileUploadControlle
@GetMapping("/get")
@Operation(summary = "获得设备-期间核查计划")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('qms:device-period-check-plan:query')")
public CommonResult<DevicePeriodCheckPlanRespVO> getDevicePeriodCheckPlan(@RequestParam("id") Long id) {
DevicePeriodCheckPlanDO devicePeriodCheckPlan = devicePeriodCheckPlanService.getDevicePeriodCheckPlan(id);
return success(BeanUtils.toBean(devicePeriodCheckPlan, DevicePeriodCheckPlanRespVO.class));
@@ -99,7 +95,6 @@ public class DevicePeriodCheckPlanController extends AbstractFileUploadControlle
@GetMapping("/page")
@Operation(summary = "获得设备-期间核查计划分页")
@PreAuthorize("@ss.hasPermission('qms:device-period-check-plan:query')")
public CommonResult<PageResult<DevicePeriodCheckPlanRespVO>> getDevicePeriodCheckPlanPage(@Valid DevicePeriodCheckPlanPageReqVO pageReqVO) {
PageResult<DevicePeriodCheckPlanDO> pageResult = devicePeriodCheckPlanService.getDevicePeriodCheckPlanPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, DevicePeriodCheckPlanRespVO.class));
@@ -109,13 +104,11 @@ public class DevicePeriodCheckPlanController extends AbstractFileUploadControlle
@Operation(summary = "导出设备-期间核查计划 Excel")
@PreAuthorize("@ss.hasPermission('qms:device-period-check-plan:export')")
@ApiAccessLog(operateType = EXPORT)
public void exportDevicePeriodCheckPlanExcel(@Valid DevicePeriodCheckPlanPageReqVO pageReqVO,
HttpServletResponse response) throws IOException {
public void exportDevicePeriodCheckPlanExcel(@Valid DevicePeriodCheckPlanPageReqVO pageReqVO, HttpServletResponse response) throws IOException {
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
List<DevicePeriodCheckPlanDO> list = devicePeriodCheckPlanService.getDevicePeriodCheckPlanPage(pageReqVO).getList();
// 导出 Excel
ExcelUtils.write(response, "设备-期间核查计划.xls", "数据", DevicePeriodCheckPlanRespVO.class,
BeanUtils.toBean(list, DevicePeriodCheckPlanRespVO.class));
ExcelUtils.write(response, "设备-期间核查计划.xls", "数据", DevicePeriodCheckPlanRespVO.class, BeanUtils.toBean(list, DevicePeriodCheckPlanRespVO.class));
}
}

View File

@@ -1,5 +1,7 @@
package com.zt.plat.module.qms.resource.device.controller.admin;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.zt.plat.framework.apilog.core.annotation.ApiAccessLog;
import com.zt.plat.framework.business.annotation.FileUploadController;
import com.zt.plat.framework.business.controller.AbstractFileUploadController;
@@ -15,8 +17,10 @@ import com.zt.plat.module.qms.core.constant.DataTypeConstant;
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceProductPageReqVO;
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceProductRespVO;
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceProductSaveReqVO;
import com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceConfigBusinessRuleDO;
import com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceProductDO;
import com.zt.plat.module.qms.resource.device.controller.vo.*;
import com.zt.plat.module.qms.resource.device.service.DeviceConfigBusinessRuleService;
import com.zt.plat.module.qms.resource.device.service.DeviceProductService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
@@ -30,6 +34,8 @@ import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
import static com.zt.plat.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
import static com.zt.plat.framework.common.pojo.CommonResult.success;
@@ -49,8 +55,8 @@ public class DeviceProductController extends AbstractFileUploadController implem
}
}
@Resource
private DeviceProductService deviceProductService;
@Resource private DeviceProductService deviceProductService;
@Resource private DeviceConfigBusinessRuleService deviceConfigBusinessRuleService;
@PostMapping("/saveData")
@Operation(summary = "保存数据")
@@ -78,6 +84,35 @@ public class DeviceProductController extends AbstractFileUploadController implem
return success(BeanUtils.toBean(list, DeviceProductRespVO.class));
}
@GetMapping("/getProductTreeDataWithRuleStatus")
@Operation(summary = "获取分类和产品树_含规则配置状态")
public CommonResult<JSONArray> getProductTreeDataWithRuleStatus() {
List<DeviceProductDO> list = deviceProductService.getTreeData("");
JSONArray jsonArray = new JSONArray();
for (DeviceProductDO item : list) {
jsonArray.add(item);
}
List<Long> productIdList = list.stream().filter(item -> item.getNodeType().equals(DataTypeConstant.DATA_TYPE_DATA)).map(DeviceProductDO::getId).toList();
List<DeviceConfigBusinessRuleDO> ruleList = deviceConfigBusinessRuleService.getByProductIdListAndBusinessDomain(productIdList, "");
for(DeviceProductDO product: list){
Long id = product.getId();
JSONObject jsonObject = jsonArray.getJSONObject(jsonArray.indexOf(product));
for(DeviceConfigBusinessRuleDO rule: ruleList){
Long productId = rule.getProductId();
if(!Objects.equals(productId, id))
continue;
String businessDomain = rule.getBusinessDomain();
String key = businessDomain + "_on";
jsonObject.put(key, "1");
}
jsonArray.set(jsonArray.indexOf(product), jsonObject);
}
return success(jsonArray);
}
@PostMapping("/create")
@Operation(summary = "创建设备-设备大类")
@PreAuthorize("@ss.hasPermission('resource:device-product:create')")

View File

@@ -2,47 +2,52 @@ package com.zt.plat.module.qms.resource.device.dal.dataobject;
import com.zt.plat.module.qms.core.aspect.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Data
public class DeviceInfoWithBizConfigVO extends DeviceInfomationDO{
@Schema(description = "规则id")
private String ruleId;
@Schema(description = "业务规则")
private DeviceConfigBusinessRuleDO rule;
@Schema(description = "业务领域:点检|检定校准|期间核查|等")
@Dict(dicCode = "device_business_domain")
private String businessDomain;
@Schema(description = "是否需要")
private Integer needFlag;
@Schema(description = "子业务类型")
private String subDomainType;
@Schema(description = "频次类型")
private String frequencyType;
@Schema(description = "频次")
private String frequency;
@Schema(description = "频次说明")
private String frequencyRemark;
@Schema(description = "报表模板")
private String reportTemplateKey;
@Schema(description = "表单组件")
private String formComponent;
@Schema(description = "处理方法")
private String processMethod;
@Schema(description = "处理人")
private String processUser;
@Schema(description = "标准/规范")
private String standard;
@Schema(description = "检定/校准类型")
private String calibrationCheckType;
// @Schema(description = "规则id")
// private Long ruleId;
//
// @Schema(description = "业务领域:点检|检定校准|期间核查|等")
// @Dict(dicCode = "device_business_domain")
// private String businessDomain;
//
// @Schema(description = "是否需要")
// private String requireFlag;
//
// @Schema(description = "子业务类型")
// private String subDomainType;
//
// @Schema(description = "频次类型")
// private String frequencyType;
//
// @Schema(description = "频次")
// private String frequency;
//
// @Schema(description = "频次说明")
// private String frequencyRemark;
//
// @Schema(description = "报表模板")
// private String reportTemplateKey;
//
// @Schema(description = "表单组件")
// private String formComponent;
//
// @Schema(description = "处理方法")
// private String treatmentMethod;
//
// @Schema(description = "处理人")
// private String treatmentUser;
//
// @Schema(description = "标准/规范")
// private String standard;
//
// @Schema(description = "检定/校准类型")
// private String calibrationCheckType;
}

View File

@@ -1,15 +1,20 @@
package com.zt.plat.module.qms.resource.device.dal.mapper;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
import com.zt.plat.module.qms.core.aspect.annotation.QmsPermission;
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceInfomationPageReqVO;
import com.zt.plat.module.qms.resource.device.controller.vo.DeviceInfomationWithProductVO;
import com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceConfigBusinessRuleDO;
import com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceInfoWithBizConfigVO;
import com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceInfomationDO;
import com.zt.plat.module.qms.resource.device.dal.dataobject.DeviceProductDO;
import io.swagger.v3.oas.annotations.media.Schema;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -30,6 +35,22 @@ public interface DeviceInfomationMapper extends BaseMapperX<DeviceInfomationDO>
Page<DeviceInfomationWithProductVO> selectPage(IPage<?> page, @Param("param") DeviceInfomationPageReqVO param);
//查询需要“某个业务类型”的设备列表
List<DeviceInfoWithBizConfigVO> getListNeedByRule(@Param("param") Map<String, Object> param);
default List<DeviceInfoWithBizConfigVO> getListNeedByRule(JSONObject param){
String businessType = param.getString("businessType");
Long deviceId = param.getLong("deviceId");
List deptIdList = param.getJSONArray("deptIdList");
MPJLambdaWrapperX<DeviceInfomationDO> wrapper = new MPJLambdaWrapperX<DeviceInfomationDO>();
wrapper.leftJoin(DeviceProductDO.class, DeviceProductDO::getId, DeviceInfomationDO::getProductId)
.leftJoin(DeviceProductDO.class, DeviceProductDO::getId, DeviceInfomationDO::getProductId)
.selectAssociation(DeviceConfigBusinessRuleDO.class, DeviceInfoWithBizConfigVO::getRule)
.leftJoin(DeviceConfigBusinessRuleDO.class, DeviceConfigBusinessRuleDO::getProductId, DeviceInfomationDO::getProductId)
.selectAll(DeviceInfomationDO.class);
wrapper.eqIfPresent(DeviceInfomationDO::getId, deviceId)
.inIfPresent(DeviceInfomationDO::getDeptId, deptIdList)
.eq(DeviceConfigBusinessRuleDO::getBusinessDomain, businessType)
.eq(DeviceConfigBusinessRuleDO::getRequireFlag, "1");
return selectJoinList(DeviceInfoWithBizConfigVO.class, wrapper);
}
}

View File

@@ -1,12 +1,17 @@
package com.zt.plat.module.qms.resource.device.dal.mapper;
import com.alibaba.fastjson.JSONObject;
import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.zt.plat.framework.mybatis.core.mapper.BaseMapperX;
import com.zt.plat.framework.mybatis.core.query.MPJLambdaWrapperX;
import com.zt.plat.module.qms.resource.device.dal.dataobject.DevicePeriodCheckDO;
import com.zt.plat.module.qms.resource.device.controller.vo.DevicePeriodCheckPageReqVO;
import com.zt.plat.module.qms.resource.device.dal.dataobject.DevicePeriodCheckPlanDO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* 设备-期间核查 Mapper
*
@@ -43,4 +48,9 @@ public interface DevicePeriodCheckMapper extends BaseMapperX<DevicePeriodCheckDO
.orderByDesc(DevicePeriodCheckDO::getId));
}
/*
* 查询指定设备的最新数据
* */
List<DevicePeriodCheckDO> getLastDataCheckList(JSONObject param);
}

View File

@@ -21,7 +21,7 @@ public interface DeviceConfigBusinessRuleService {
CommonResult<DeviceConfigBusinessRuleDO> getRuleByDeviceIdAndType(Long deviceId, String type);
List<DeviceConfigBusinessRuleDO> getByProductIdListAndBusinessDomain(List<String> productIdList, String businessDomain);
List<DeviceConfigBusinessRuleDO> getByProductIdListAndBusinessDomain(List<Long> productIdList, String businessDomain);
/**
* 创建设备-业务配置

Some files were not shown because too many files have changed in this diff Show More