parent
0ef80c4dcb
commit
20848903c6
18 changed files with 1312 additions and 453 deletions
@ -0,0 +1,93 @@ |
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package org.springblade.file.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.mp.base.BaseEntity; |
||||
import org.springframework.format.annotation.DateTimeFormat; |
||||
|
||||
import java.time.LocalDateTime; |
||||
|
||||
/** |
||||
* 仪器检定管理实体类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2022-07-22 |
||||
*/ |
||||
@Data |
||||
@TableName("t_equip_verification_log") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
@ApiModel(value = "EquipVerification对象", description = "仪器检定管理") |
||||
public class EquipVerificationLog extends BaseEntity { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
/** |
||||
* 租户ID |
||||
*/ |
||||
@ApiModelProperty(value = "租户ID") |
||||
private String tenantId; |
||||
/** |
||||
* 设备id |
||||
*/ |
||||
private String instrumentId; |
||||
/** |
||||
* 设备名称 |
||||
*/ |
||||
@ApiModelProperty(value = "设备名称") |
||||
private String equipName; |
||||
/** |
||||
* 规格型号 |
||||
*/ |
||||
@ApiModelProperty(value = "规格型号") |
||||
private String equipModel; |
||||
/** |
||||
* 生产厂家或品牌 |
||||
*/ |
||||
@ApiModelProperty(value = "生产厂家或品牌") |
||||
private String manufacturerOrBrand; |
||||
/** |
||||
* 启用时间 |
||||
*/ |
||||
@ApiModelProperty(value = "启用时间") |
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
private LocalDateTime enableTime; |
||||
/** |
||||
* 上次检定时间 |
||||
*/ |
||||
@ApiModelProperty(value = "上次检定时间") |
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
private LocalDateTime lastVerificationTime; |
||||
/** |
||||
* 检定周期(天) |
||||
*/ |
||||
@ApiModelProperty(value = "检定周期(天)(业务字典 equip_verification_cycle)") |
||||
private Integer cycle; |
||||
/** |
||||
* 检定次数 |
||||
*/ |
||||
@ApiModelProperty(value = "检定次数") |
||||
private Integer total; |
||||
|
||||
} |
||||
@ -0,0 +1,56 @@ |
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package org.springblade.file.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import io.swagger.annotations.Api; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.file.entity.EquipVerificationLog; |
||||
import org.springblade.file.service.IEquipVerificationLogService; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
/** |
||||
* 仪器检定管理 控制器 |
||||
* |
||||
* @author BladeX |
||||
* @since 2022-07-22 |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/equipVerificationLog") |
||||
@Api(value = "仪器检定记录", tags = "仪器检定记录") |
||||
public class EquipVerificationLogController extends BladeController { |
||||
|
||||
private final IEquipVerificationLogService equipVerificationLogService; |
||||
|
||||
@GetMapping("/list") |
||||
public R<IPage> list(EquipVerificationLog equipVerificationLog, Query query) { |
||||
LambdaQueryWrapper<EquipVerificationLog> wrapper = new LambdaQueryWrapper<>(); |
||||
if (equipVerificationLog.getEquipName() != null && !"".equals(equipVerificationLog.getEquipName())) { |
||||
wrapper.like(EquipVerificationLog::getEquipName,equipVerificationLog.getEquipName()).or() |
||||
.like(EquipVerificationLog::getEquipModel,equipVerificationLog.getEquipName()).or() |
||||
.like(EquipVerificationLog::getManufacturerOrBrand,equipVerificationLog.getEquipName()); |
||||
} |
||||
wrapper.orderByDesc(EquipVerificationLog::getCreateTime); |
||||
return R.data(equipVerificationLogService.page(Condition.getPage(query), wrapper)); |
||||
} |
||||
} |
||||
@ -0,0 +1,36 @@ |
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package org.springblade.file.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.file.entity.EquipVerification; |
||||
import org.springblade.file.entity.EquipVerificationLog; |
||||
import org.springblade.file.vo.EquipVerificationVO; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 仪器检定管理 Mapper 接口 |
||||
* |
||||
* @author BladeX |
||||
* @since 2022-07-22 |
||||
*/ |
||||
public interface EquipVerificationLogMapper extends BaseMapper<EquipVerificationLog> { |
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,25 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="org.springblade.file.mapper.EquipVerificationLogMapper"> |
||||
|
||||
<!-- 通用查询映射结果 --> |
||||
<resultMap id="equipVerificationResultMap" type="org.springblade.file.entity.EquipVerificationLog"> |
||||
<result column="id" property="id"/> |
||||
<result column="create_user" property="createUser"/> |
||||
<result column="create_dept" property="createDept"/> |
||||
<result column="create_time" property="createTime"/> |
||||
<result column="update_user" property="updateUser"/> |
||||
<result column="update_time" property="updateTime"/> |
||||
<result column="is_deleted" property="isDeleted"/> |
||||
<result column="status" property="status"/> |
||||
<result column="equip_name" property="equipName"/> |
||||
<result column="equip_model" property="equipModel"/> |
||||
<result column="manufacturer_or_brand" property="manufacturerOrBrand"/> |
||||
<result column="enable_time" property="enableTime"/> |
||||
<result column="last_verification_time" property="lastVerificationTime"/> |
||||
<result column="cycle" property="cycle"/> |
||||
<result column="total" property="total"/> |
||||
</resultMap> |
||||
|
||||
|
||||
</mapper> |
||||
@ -0,0 +1,34 @@ |
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package org.springblade.file.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
import org.springblade.file.entity.EquipVerification; |
||||
import org.springblade.file.entity.EquipVerificationLog; |
||||
import org.springblade.file.vo.EquipVerificationVO; |
||||
|
||||
/** |
||||
* 仪器检定管理 服务类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2022-07-22 |
||||
*/ |
||||
public interface IEquipVerificationLogService extends BaseService<EquipVerificationLog> { |
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,50 @@ |
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package org.springblade.file.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.StringUtil; |
||||
import org.springblade.file.entity.EquipVerification; |
||||
import org.springblade.file.entity.EquipVerificationLog; |
||||
import org.springblade.file.enums.EquipVerificationEnum; |
||||
import org.springblade.file.mapper.EquipVerificationLogMapper; |
||||
import org.springblade.file.mapper.EquipVerificationMapper; |
||||
import org.springblade.file.service.IEquipVerificationLogService; |
||||
import org.springblade.file.service.IEquipVerificationService; |
||||
import org.springblade.file.vo.EquipVerificationVO; |
||||
import org.springblade.system.user.entity.User; |
||||
import org.springblade.system.user.feign.IUserClient; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.time.LocalDateTime; |
||||
import java.util.List; |
||||
import java.util.Optional; |
||||
|
||||
/** |
||||
* 仪器检定管理 服务实现类 |
||||
* |
||||
* @author BladeX |
||||
* @since 2022-07-22 |
||||
*/ |
||||
@Service |
||||
public class EquipVerificationLogServiceImpl extends BaseServiceImpl<EquipVerificationLogMapper, EquipVerificationLog> implements IEquipVerificationLogService { |
||||
|
||||
|
||||
} |
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue