Browse Source

fix: 特种设备管理添加数据权限;页面添加单位字段

zhongwei
liwen 7 months ago
parent
commit
d347fa6f9d
  1. 6
      hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/SpecialDeviceEntity.java
  2. 6
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/SpecialDeviceInspectionMapper.java
  3. 4
      hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/SpecialDeviceMapper.java

6
hzims-service-api/safeproduct-api/src/main/java/com/hnac/hzims/safeproduct/entity/SpecialDeviceEntity.java

@ -7,6 +7,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity; import org.springblade.core.mp.base.BaseEntity;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import java.util.Date; import java.util.Date;
@ -20,6 +21,11 @@ import java.util.Date;
@ApiModel(value = "特种设备实体类") @ApiModel(value = "特种设备实体类")
public class SpecialDeviceEntity extends BaseEntity { public class SpecialDeviceEntity extends BaseEntity {
@NotNull
@Size(max = 50, message = "设备所属机构字段长度不能超过50")
@ApiModelProperty("设备所属机构")
private String unit;
@Size(max = 50, message = "设备名称长度不能超过50") @Size(max = 50, message = "设备名称长度不能超过50")
@ApiModelProperty("设备名称") @ApiModelProperty("设备名称")
private String name; private String name;

6
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/SpecialDeviceInspectionMapper.java

@ -1,9 +1,10 @@
package com.hnac.hzims.safeproduct.mapper; package com.hnac.hzims.safeproduct.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hnac.hzims.safeproduct.entity.SpecialDeviceInspectionEntity; import com.hnac.hzims.safeproduct.entity.SpecialDeviceInspectionEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springblade.core.datascope.annotation.UserDataAuth;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -15,7 +16,7 @@ import java.util.Map;
* @date 2024-01-22 * @date 2024-01-22
*/ */
@Mapper @Mapper
public interface SpecialDeviceInspectionMapper extends BaseMapper<SpecialDeviceInspectionEntity> { public interface SpecialDeviceInspectionMapper extends UserDataScopeBaseMapper<SpecialDeviceInspectionEntity> {
/** /**
* 设备检验记录分页 * 设备检验记录分页
@ -23,6 +24,7 @@ public interface SpecialDeviceInspectionMapper extends BaseMapper<SpecialDeviceI
* @param page 分页类 * @param page 分页类
* @return 设备检验记录数据 * @return 设备检验记录数据
*/ */
@UserDataAuth
IPage<SpecialDeviceInspectionEntity> getInspectionPage(IPage<SpecialDeviceInspectionEntity> page, Map<String, Object> param); IPage<SpecialDeviceInspectionEntity> getInspectionPage(IPage<SpecialDeviceInspectionEntity> page, Map<String, Object> param);
/** /**

4
hzims-service/safeproduct/src/main/java/com/hnac/hzims/safeproduct/mapper/SpecialDeviceMapper.java

@ -1,8 +1,8 @@
package com.hnac.hzims.safeproduct.mapper; package com.hnac.hzims.safeproduct.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hnac.hzims.safeproduct.entity.SpecialDeviceEntity; import com.hnac.hzims.safeproduct.entity.SpecialDeviceEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springblade.core.datascope.mapper.UserDataScopeBaseMapper;
/** /**
* 特种设备Mapper类 * 特种设备Mapper类
@ -11,6 +11,6 @@ import org.apache.ibatis.annotations.Mapper;
* @date 2024-01-12 * @date 2024-01-12
*/ */
@Mapper @Mapper
public interface SpecialDeviceMapper extends BaseMapper<SpecialDeviceEntity> { public interface SpecialDeviceMapper extends UserDataScopeBaseMapper<SpecialDeviceEntity> {
} }

Loading…
Cancel
Save