Pārlūkot izejas kodu

信息牌基础类添加

xuxiaofei 2 gadi atpakaļ
vecāks
revīzija
aa1b2b9df0

+ 63 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/mapper/XxpClassifyDetailedMapper.java

@@ -0,0 +1,63 @@
+package com.zd.laboratory.mapper;
+
+import com.zd.laboratory.domain.XxpClassifyDetail;
+
+import java.util.List;
+
+/**
+ * 信息牌类目详情 Mapper接口
+ *
+ * @author zd
+ * @date 2023-03-22
+ */
+public interface XxpClassifyDetailedMapper
+{
+    /**
+     * 查询
+     *
+     * @param id 主键
+     * @return 信息牌类目
+     */
+    public XxpClassifyDetail selectXxpClassifyDetailedById(Long id);
+
+    /**
+     * 查询列表
+     *
+     * @param classifyDetailed 信息牌类目详情
+     * @return 集合
+     */
+    public List<XxpClassifyDetail> selectXxpClassifyDetailedList(XxpClassifyDetail classifyDetailed);
+
+
+    /**
+     * 新增信息牌类目详情
+     *
+     * @param classifyDetailed 信息牌类目详情
+     * @return 结果
+     */
+    public int insertXxpClassifyDetailed(XxpClassifyDetail classifyDetailed);
+
+    /**
+     * 修改
+     *
+     * @param classifyDetailed 信息牌类目详情
+     * @return 结果
+     */
+    public int updateXxpClassifyDetailed(XxpClassifyDetail classifyDetailed);
+
+    /**
+     * 删除
+     *
+     * @param id 主键
+     * @return 结果
+     */
+    public int deleteXxpClassifyDetailedById(Long id);
+
+    /**
+     * 批量删除
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteXxpClassifyDetailedByIds(Long[] ids);
+}

+ 62 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/mapper/XxpClassifyMapper.java

@@ -0,0 +1,62 @@
+package com.zd.laboratory.mapper;
+
+import com.zd.laboratory.domain.XxpClassify;
+import java.util.List;
+
+/**
+ * 信息牌类目 Mapper接口
+ *
+ * @author zd
+ * @date 2023-03-22
+ */
+public interface XxpClassifyMapper
+{
+    /**
+     * 查询
+     *
+     * @param id 主键
+     * @return 信息牌类目
+     */
+    public XxpClassify selectXxpClassifyById(Long id);
+
+    /**
+     * 查询列表
+     *
+     * @param xxpClassify 信息牌类目
+     * @return 白名单集合
+     */
+    public List<XxpClassify> selectXxpClassifyList(XxpClassify xxpClassify);
+
+
+    /**
+     * 新增信息牌类目
+     *
+     * @param xxpClassify 信息牌类目
+     * @return 结果
+     */
+    public int insertXxpClassify(XxpClassify xxpClassify);
+
+    /**
+     * 修改
+     *
+     * @param xxpClassify 信息牌类目
+     * @return 结果
+     */
+    public int updateXxpClassify(XxpClassify xxpClassify);
+
+    /**
+     * 删除
+     *
+     * @param id 主键
+     * @return 结果
+     */
+    public int deleteXxpClassifyById(Long id);
+
+    /**
+     * 批量删除
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteXxpClassifyByIds(Long[] ids);
+}

+ 63 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/mapper/XxpDutyMapper.java

@@ -0,0 +1,63 @@
+package com.zd.laboratory.mapper;
+
+import com.zd.laboratory.domain.XxpDuty;
+
+import java.util.List;
+
+/**
+ * 值班信息 Mapper接口
+ *
+ * @author xxf
+ * @date 2023-03-22
+ */
+public interface XxpDutyMapper
+{
+    /**
+     * 查询
+     *
+     * @param id 主键
+     * @return 值班信息
+     */
+    public XxpDuty selectXxpDutyById(Long id);
+
+    /**
+     * 查询列表
+     *
+     * @param xxpDuty 值班信息
+     * @return 白名单集合
+     */
+    public List<XxpDuty> selectXxpDutyList(XxpDuty xxpDuty);
+
+
+    /**
+     * 新增值班信息
+     *
+     * @param xxpDuty 值班信息
+     * @return 结果
+     */
+    public int insertXxpDuty(XxpDuty xxpDuty);
+
+    /**
+     * 修改
+     *
+     * @param xxpDuty 值班信息
+     * @return 结果
+     */
+    public int updateXxpDuty(XxpDuty xxpDuty);
+
+    /**
+     * 删除
+     *
+     * @param id 主键
+     * @return 结果
+     */
+    public int deleteXxpDutyById(Long id);
+
+    /**
+     * 批量删除
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteXxpDutyByIds(Long[] ids);
+}

+ 64 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/mapper/XxpInspectionMapper.java

@@ -0,0 +1,64 @@
+package com.zd.laboratory.mapper;
+
+import com.zd.laboratory.domain.XxpClassify;
+import com.zd.laboratory.domain.XxpInspection;
+
+import java.util.List;
+
+/**
+ * 巡查信息 Mapper接口
+ *
+ * @author xxf
+ * @date 2023-03-22
+ */
+public interface XxpInspectionMapper
+{
+    /**
+     * 查询
+     *
+     * @param id 主键
+     * @return 巡查信息
+     */
+    public XxpInspection selectXxpInspectionById(Long id);
+
+    /**
+     * 查询列表
+     *
+     * @param xxpInspection 巡查信息
+     * @return 白名单集合
+     */
+    public List<XxpInspection> selectXxpInspectionList(XxpInspection xxpInspection);
+
+
+    /**
+     * 新增巡查信息
+     *
+     * @param xxpInspection 巡查信息
+     * @return 结果
+     */
+    public int insertXxpInspection(XxpInspection xxpInspection);
+
+    /**
+     * 修改
+     *
+     * @param xxpInspection 巡查信息
+     * @return 结果
+     */
+    public int updateXxpInspection(XxpInspection xxpInspection);
+
+    /**
+     * 删除
+     *
+     * @param id 主键
+     * @return 结果
+     */
+    public int deleteXxpInspectionById(Long id);
+
+    /**
+     * 批量删除
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteXxpInspectionByIds(Long[] ids);
+}

+ 95 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/XxpCardInfoServiceImpl.java

@@ -0,0 +1,95 @@
+package com.zd.laboratory.service.impl;
+
+import com.zd.common.core.security.TokenService;
+import com.zd.laboratory.domain.XxpCardInfo;
+import com.zd.laboratory.domain.XxpInspection;
+import com.zd.laboratory.mapper.XxpInspectionMapper;
+import com.zd.laboratory.service.IXxpCardInfoService;
+import com.zd.laboratory.service.IXxpInspectionService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 巡查Service业务层处理
+ *
+ * @author zd
+ * @date 2022-01-26
+ */
+@Service
+public class XxpCardInfoServiceImpl implements IXxpCardInfoService
+{
+    @Autowired
+    private IXxpCardInfoService xxpCardInfoService;
+
+    @Autowired
+    private TokenService tokenService;
+
+
+    /**
+     * 查询电子信息牌
+     *
+     * @param id 电子信息牌主键
+     * @return 电子信息牌
+     */
+    @Override
+    public XxpCardInfo selectXxpCardInfoById(Long id) {
+        return xxpCardInfoService.selectXxpCardInfoById(id);
+    }
+
+    /**
+     * 查询电子信息牌列表
+     *
+     * @param xxpCardInfo 电子信息牌
+     * @return 电子信息牌集合
+     */
+    @Override
+    public List<XxpCardInfo> selectXxpCardInfoList(XxpCardInfo xxpCardInfo) {
+        return xxpCardInfoService.selectXxpCardInfoList(xxpCardInfo);
+    }
+
+    /**
+     * 新增电子信息牌
+     *
+     * @param xxpCardInfo 电子信息牌
+     * @return 结果
+     */
+    @Override
+    public int insertXxpCardInfo(XxpCardInfo xxpCardInfo) {
+        return xxpCardInfoService.insertXxpCardInfo(xxpCardInfo);
+    }
+
+    /**
+     * 修改电子信息牌
+     *
+     * @param xxpCardInfo 电子信息牌
+     * @return 结果
+     */
+    @Override
+    public int updateXxpCardInfo(XxpCardInfo xxpCardInfo) {
+        return xxpCardInfoService.updateXxpCardInfo(xxpCardInfo);
+    }
+
+    /**
+     * 批量删除电子信息牌
+     *
+     * @param ids 需要删除的电子信息牌主键集合
+     * @return 结果
+     */
+    @Override
+    public int deleteXxpCardInfoByIds(Long[] ids) {
+        return xxpCardInfoService.deleteXxpCardInfoByIds(ids);
+    }
+
+    /**
+     * 删除电子信息牌信息
+     *
+     * @param id 电子信息牌主键
+     * @return 结果
+     */
+    @Override
+    public int deleteXxpCardInfoById(Long id) {
+        return xxpCardInfoService.deleteXxpCardInfoById(id);
+    }
+}

+ 102 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/XxpClassifyDetailedServiceImpl.java

@@ -0,0 +1,102 @@
+package com.zd.laboratory.service.impl;
+
+import com.zd.common.core.security.TokenService;
+import com.zd.laboratory.domain.XxpClassifyDetail;
+import com.zd.laboratory.mapper.XxpClassifyDetailedMapper;
+import com.zd.laboratory.service.IXxpClassifyDetailedService;
+import com.zd.model.entity.SysUser;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 安全信息类目详情Service业务层处理
+ *
+ * @author zd
+ * @date 2022-01-26
+ */
+@Service
+public class XxpClassifyDetailedServiceImpl implements IXxpClassifyDetailedService
+{
+    @Autowired
+    private XxpClassifyDetailedMapper classifyDetailedMapper;
+
+    @Autowired
+    private TokenService tokenService;
+
+
+    /**
+     * 查询安全信息类目详情
+     *
+     * @param id 安全信息类目详情主键
+     * @return 安全信息类目详情
+     */
+    @Override
+    public XxpClassifyDetail selectXxpClassifyDetailedById(Long id) {
+        return classifyDetailedMapper.selectXxpClassifyDetailedById(id);
+    }
+
+    /**
+     * 查询安全信息类目详情列表
+     *
+     * @param classifyDetailed 安全信息类目详情
+     * @return 安全信息类目详情集合
+     */
+    @Override
+    public List<XxpClassifyDetail> selectXxpClassifyDetailedList(XxpClassifyDetail classifyDetailed) {
+        return classifyDetailedMapper.selectXxpClassifyDetailedList(classifyDetailed);
+    }
+
+    /**
+     * 新增安全信息类目详情
+     *
+     * @param classifyDetailed 安全信息类目详情
+     * @return 结果
+     */
+    @Override
+    public int insertXxpClassifyDetailed(XxpClassifyDetail classifyDetailed) {
+        SysUser sysUser = tokenService.getLoginUser().getSysUser();
+        classifyDetailed.setCreateBy(sysUser.getNickName());
+        classifyDetailed.setCreateTime(new Date());
+        classifyDetailed.setUserId(sysUser.getUserId());
+        return classifyDetailedMapper.insertXxpClassifyDetailed(classifyDetailed);
+    }
+
+    /**
+     * 修改安全信息类目详情
+     *
+     * @param classifyDetailed 安全信息类目详情
+     * @return 结果
+     */
+    @Override
+    public int updateXxpClassifyDetailed(XxpClassifyDetail classifyDetailed) {
+        SysUser sysUser = tokenService.getLoginUser().getSysUser();
+        classifyDetailed.setUpdateBy(sysUser.getNickName());
+        classifyDetailed.setUpdateTime(new Date());
+        return classifyDetailedMapper.updateXxpClassifyDetailed(classifyDetailed);
+    }
+
+    /**
+     * 批量删除安全信息类目详情
+     *
+     * @param ids 需要删除的安全信息类目详情主键集合
+     * @return 结果
+     */
+    @Override
+    public int deleteXxpClassifyDetailedByIds(Long[] ids) {
+        return classifyDetailedMapper.deleteXxpClassifyDetailedByIds(ids);
+    }
+
+    /**
+     * 删除安全信息类目详情信息
+     *
+     * @param id 安全信息类目详情主键
+     * @return 结果
+     */
+    @Override
+    public int deleteXxpClassifyDetailedById(Long id) {
+        return classifyDetailedMapper.deleteXxpClassifyDetailedById(id);
+    }
+}

+ 139 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/XxpClassifyServiceImpl.java

@@ -0,0 +1,139 @@
+package com.zd.laboratory.service.impl;
+
+import com.zd.common.core.annotation.DataScope;
+import com.zd.common.core.exception.NoRollException;
+import com.zd.common.core.exception.ServiceException;
+import com.zd.common.core.security.TokenService;
+import com.zd.laboratory.domain.LabWhiteJoinSublist;
+import com.zd.laboratory.domain.LabWhitelist;
+import com.zd.laboratory.domain.XxpClassify;
+import com.zd.laboratory.domain.XxpClassifyDetail;
+import com.zd.laboratory.domain.vo.LabWhitelistVO;
+import com.zd.laboratory.mapper.LabWhiteJoinSublistMapper;
+import com.zd.laboratory.mapper.LabWhitelistMapper;
+import com.zd.laboratory.mapper.XxpClassifyDetailedMapper;
+import com.zd.laboratory.mapper.XxpClassifyMapper;
+import com.zd.laboratory.service.ILabWhitelistService;
+import com.zd.laboratory.service.IXxpClassifyService;
+import com.zd.model.domain.per.PerPrefix;
+import com.zd.model.entity.SysUser;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+import java.util.Optional;
+
+/**
+ * 信息牌类目Service业务层处理
+ *
+ * @author zd
+ * @date 2022-01-26
+ */
+@Service
+public class XxpClassifyServiceImpl implements IXxpClassifyService
+{
+    @Autowired
+    private XxpClassifyMapper xxpClassifyMapper;
+    @Autowired
+    private XxpClassifyDetailedMapper detailedMapper;
+    @Autowired
+    private TokenService tokenService;
+
+
+    /**
+     * 查询信息牌类目
+     *
+     * @param id 信息牌类目主键
+     * @return 信息牌类目
+     */
+    @Override
+    public XxpClassify selectXxpClassifyById(Long id) {
+        return xxpClassifyMapper.selectXxpClassifyById(id);
+    }
+
+    /**
+     * 查询信息牌类目列表
+     *
+     * @param xxpClassify 信息牌类目
+     * @return 信息牌类目集合
+     */
+    @Override
+    public List<XxpClassify> selectXxpClassifyList(XxpClassify xxpClassify) {
+        return xxpClassifyMapper.selectXxpClassifyList(xxpClassify);
+    }
+
+    /**
+     * 新增信息牌类目
+     *
+     * @param xxpClassify 信息牌类目
+     * @return 结果
+     */
+    @Override
+    public int insertXxpClassify(XxpClassify xxpClassify) {
+        SysUser sysUser = tokenService.getLoginUser().getSysUser();
+        xxpClassify.setCreateBy(sysUser.getNickName());
+        xxpClassify.setUserId(sysUser.getUserId());
+        xxpClassify.setCreateTime(new Date());
+        return xxpClassifyMapper.insertXxpClassify(xxpClassify);
+    }
+
+    /**
+     * 修改信息牌类目
+     *
+     * @param xxpClassify 信息牌类目
+     * @return 结果
+     */
+    @Override
+    public int updateXxpClassify(XxpClassify xxpClassify) {
+        SysUser sysUser = tokenService.getLoginUser().getSysUser();
+        xxpClassify.setUpdateBy(sysUser.getNickName());
+        xxpClassify.setUpdateTime(new Date());
+        return xxpClassifyMapper.updateXxpClassify(xxpClassify);
+    }
+
+    /**
+     * 批量删除信息牌类目
+     *
+     * @param ids 需要删除的信息牌类目主键集合
+     * @return 结果
+     */
+    @Override
+    public int deleteXxpClassifyByIds(Long[] ids) {
+        for (int i=0;i<ids.length;i++){
+            if(delCheck(ids[i]).size()>0){
+                XxpClassify classify =xxpClassifyMapper.selectXxpClassifyById(ids[i]);
+                throw new ServiceException(classify.getClassifyName()+",类目下存在子项!");
+            }
+        }
+        return xxpClassifyMapper.deleteXxpClassifyByIds(ids);
+    }
+
+    /**
+     * 删除信息牌类目信息
+     *
+     * @param id 信息牌类目主键
+     * @return 结果
+     */
+    @Override
+    public int deleteXxpClassifyById(Long id) {
+        if(delCheck(id).size()>0){
+            throw new ServiceException("该类目下存在子项!");
+        }
+        return xxpClassifyMapper.deleteXxpClassifyById(id);
+    }
+
+    /***
+     * 查看该类目下是否有子类
+     * @param classifyId
+     * @return
+     */
+    public List<XxpClassifyDetail> delCheck(Long classifyId){
+        XxpClassifyDetail detail = new XxpClassifyDetail();
+        detail.setInfoClassifyId(classifyId);
+        List<XxpClassifyDetail> list = detailedMapper.selectXxpClassifyDetailedList(detail);
+        return list;
+    }
+}

+ 96 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/XxpDutyServiceImpl.java

@@ -0,0 +1,96 @@
+package com.zd.laboratory.service.impl;
+
+import com.zd.common.core.security.TokenService;
+import com.zd.laboratory.domain.XxpDuty;
+import com.zd.laboratory.domain.XxpInspection;
+import com.zd.laboratory.mapper.XxpDutyMapper;
+import com.zd.laboratory.mapper.XxpInspectionMapper;
+import com.zd.laboratory.service.IXxpDutyService;
+import com.zd.laboratory.service.IXxpInspectionService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 值班Service业务层处理
+ *
+ * @author zd
+ * @date 2022-01-26
+ */
+@Service
+public class XxpDutyServiceImpl implements IXxpDutyService
+{
+    @Autowired
+    private XxpDutyMapper xxpDutyMapper;
+
+    @Autowired
+    private TokenService tokenService;
+
+
+    /**
+     * 查询值班
+     *
+     * @param id 值班主键
+     * @return 值班
+     */
+    @Override
+    public XxpDuty selectXxpDutyById(Long id) {
+        return xxpDutyMapper.selectXxpDutyById(id);
+    }
+
+    /**
+     * 查询值班列表
+     *
+     * @param xxpDuty 值班
+     * @return 值班集合
+     */
+    @Override
+    public List<XxpDuty> selectXxpDutyList(XxpDuty xxpDuty) {
+        return xxpDutyMapper.selectXxpDutyList(xxpDuty);
+    }
+
+    /**
+     * 新增值班
+     *
+     * @param xxpDuty 值班
+     * @return 结果
+     */
+    @Override
+    public int insertXxpDuty(XxpDuty xxpDuty) {
+        return xxpDutyMapper.insertXxpDuty(xxpDuty);
+    }
+
+    /**
+     * 修改值班
+     *
+     * @param xxpDuty 值班
+     * @return 结果
+     */
+    @Override
+    public int updateXxpDuty(XxpDuty xxpDuty) {
+        return xxpDutyMapper.updateXxpDuty(xxpDuty);
+    }
+
+    /**
+     * 批量删除值班
+     *
+     * @param ids 需要删除的值班主键集合
+     * @return 结果
+     */
+    @Override
+    public int deleteXxpDutyByIds(Long[] ids) {
+        return xxpDutyMapper.deleteXxpDutyByIds(ids);
+    }
+
+    /**
+     * 删除值班信息
+     *
+     * @param id 值班主键
+     * @return 结果
+     */
+    @Override
+    public int deleteXxpDutyById(Long id) {
+        return xxpDutyMapper.deleteXxpDutyById(id);
+    }
+}

+ 97 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/XxpInspectionServiceImpl.java

@@ -0,0 +1,97 @@
+package com.zd.laboratory.service.impl;
+
+import com.zd.common.core.security.TokenService;
+import com.zd.laboratory.domain.XxpClassify;
+import com.zd.laboratory.domain.XxpInspection;
+import com.zd.laboratory.mapper.XxpClassifyMapper;
+import com.zd.laboratory.mapper.XxpInspectionMapper;
+import com.zd.laboratory.service.IXxpClassifyService;
+import com.zd.laboratory.service.IXxpInspectionService;
+import com.zd.model.entity.SysUser;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 巡查Service业务层处理
+ *
+ * @author zd
+ * @date 2022-01-26
+ */
+@Service
+public class XxpInspectionServiceImpl implements IXxpInspectionService
+{
+    @Autowired
+    private XxpInspectionMapper xxpInspectionMapper;
+
+    @Autowired
+    private TokenService tokenService;
+
+
+    /**
+     * 查询巡查
+     *
+     * @param id 巡查主键
+     * @return 巡查
+     */
+    @Override
+    public XxpInspection selectXxpInspectionById(Long id) {
+        return xxpInspectionMapper.selectXxpInspectionById(id);
+    }
+
+    /**
+     * 查询巡查列表
+     *
+     * @param xxpInspection 巡查
+     * @return 巡查集合
+     */
+    @Override
+    public List<XxpInspection> selectXxpInspectionList(XxpInspection xxpInspection) {
+        return xxpInspectionMapper.selectXxpInspectionList(xxpInspection);
+    }
+
+    /**
+     * 新增巡查
+     *
+     * @param xxpInspection 巡查
+     * @return 结果
+     */
+    @Override
+    public int insertXxpInspection(XxpInspection xxpInspection) {
+        return xxpInspectionMapper.insertXxpInspection(xxpInspection);
+    }
+
+    /**
+     * 修改巡查
+     *
+     * @param xxpInspection 巡查
+     * @return 结果
+     */
+    @Override
+    public int updateXxpInspection(XxpInspection xxpInspection) {
+        return xxpInspectionMapper.updateXxpInspection(xxpInspection);
+    }
+
+    /**
+     * 批量删除巡查
+     *
+     * @param ids 需要删除的巡查主键集合
+     * @return 结果
+     */
+    @Override
+    public int deleteXxpInspectionByIds(Long[] ids) {
+        return xxpInspectionMapper.deleteXxpInspectionByIds(ids);
+    }
+
+    /**
+     * 删除巡查信息
+     *
+     * @param id 巡查主键
+     * @return 结果
+     */
+    @Override
+    public int deleteXxpInspectionById(Long id) {
+        return xxpInspectionMapper.deleteXxpInspectionById(id);
+    }
+}