Преглед на файлове

Merge branch 'dev' of http://192.168.1.43:3000/v2/zd-parents into dev

chaiyunlong преди 2 години
родител
ревизия
1c8334ed0a
променени са 32 файла, в които са добавени 3613 реда и са изтрити 1 реда
  1. 23 0
      zd-model/src/main/java/com/zd/model/domain/per/PerPrefix.java
  2. 133 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabXxpCardInfoController.java
  3. 146 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabXxpClassifyController.java
  4. 133 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabXxpClassifyDetailedController.java
  5. 154 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabXxpDutyController.java
  6. 135 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabXxpInspectionController.java
  7. 232 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/domain/XxpCardInfo.java
  8. 147 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/domain/XxpClassify.java
  9. 141 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/domain/XxpClassifyDetail.java
  10. 192 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/domain/XxpDuty.java
  11. 156 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/domain/XxpInspection.java
  12. 63 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/mapper/XxpCardInfoMapper.java
  13. 63 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/mapper/XxpClassifyDetailedMapper.java
  14. 62 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/mapper/XxpClassifyMapper.java
  15. 79 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/mapper/XxpDutyMapper.java
  16. 64 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/mapper/XxpInspectionMapper.java
  17. 66 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/IXxpCardInfoService.java
  18. 66 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/IXxpClassifyDetailedService.java
  19. 68 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/IXxpClassifyService.java
  20. 82 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/IXxpDutyService.java
  21. 66 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/IXxpInspectionService.java
  22. 1 1
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabMessageContentServiceImpl.java
  23. 109 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/XxpCardInfoServiceImpl.java
  24. 102 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/XxpClassifyDetailedServiceImpl.java
  25. 139 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/XxpClassifyServiceImpl.java
  26. 156 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/XxpDutyServiceImpl.java
  27. 111 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/XxpInspectionServiceImpl.java
  28. 151 0
      zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/XxpCardInfoMapper.xml
  29. 132 0
      zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/XxpClassifyDetailMapper.xml
  30. 138 0
      zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/XxpClassifyMapper.xml
  31. 171 0
      zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/XxpDutyMapper.xml
  32. 132 0
      zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/XxpInspectionMapper.xml

+ 23 - 0
zd-model/src/main/java/com/zd/model/domain/per/PerPrefix.java

@@ -803,4 +803,27 @@ public class PerPrefix {
      * 海康授权日志
      */
     public static final String HAIKANG_USERLOG= "haikang:userLog:";
+
+    /**
+     * 电子信息牌安全类目
+     */
+    public static final String LABORATORY_CLASSIFY = "laboratory:classify:";
+
+    /**
+     * 电子信息牌安全类目详情
+     */
+    public static final String LABORATORY_CLASSIFY_DET = "laboratory:classifyDet:";
+
+    /**
+     * 电子信息牌巡查
+     */
+    public static final String LABORATORY_XXP_INSPECTION = "laboratory:xxpIns:";
+    /**
+     * 电子信息牌值班
+     */
+    public static final String LABORATORY_DUTY = "laboratory:duty:";
+    /**
+     * 电子信息牌信息
+     */
+    public static final String LABORATORY_CARDINFO = "laboratory:cardInfo:";
 }

+ 133 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabXxpCardInfoController.java

@@ -0,0 +1,133 @@
+package com.zd.laboratory.controller;
+
+import com.zd.common.core.annotation.Log;
+import com.zd.common.core.annotation.PreAuthorize;
+import com.zd.common.core.log.BusinessType;
+import com.zd.common.core.security.TokenService;
+import com.zd.common.core.utils.ExcelUtil;
+import com.zd.common.core.web.controller.BaseController;
+import com.zd.laboratory.domain.LabWhitelist;
+import com.zd.laboratory.domain.XxpCardInfo;
+import com.zd.laboratory.service.IXxpCardInfoService;
+import com.zd.model.domain.ResultData;
+import com.zd.model.domain.per.PerFun;
+import com.zd.model.domain.per.PerPrefix;
+import com.zd.model.page.TableDataInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * 电子信息牌Controller
+ *
+ * @author xxf
+ * @date 2023-03-22
+ */
+@RestController
+@Api(tags = "【电子信息牌】")
+@RequestMapping("/XxpCardInfo")
+public class LabXxpCardInfoController extends BaseController
+{
+    @Autowired
+    private IXxpCardInfoService xxpCardInfoService;
+
+    @Autowired
+    private TokenService tokenService;
+
+    /**
+     * 查询电子信息牌列表
+     */
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CARDINFO + PerFun.LIST)
+    @GetMapping("/list")
+    @ApiOperation(value = "查询电子信息牌列表")
+    public TableDataInfo<XxpCardInfo> list(XxpCardInfo xxpCardInfo)
+    {
+        startPage();
+        List<XxpCardInfo> list = xxpCardInfoService.selectXxpCardInfoList(xxpCardInfo);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出电子信息牌列表
+     */
+    @ApiOperation(value = "导出电子信息牌列表")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CARDINFO + PerFun.EXPORT)
+    @Log(title = "电子信息牌", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, XxpCardInfo xxpCardInfo) throws IOException
+    {
+        List<XxpCardInfo> list = xxpCardInfoService.selectXxpCardInfoList(xxpCardInfo);
+        ExcelUtil<XxpCardInfo> util = new ExcelUtil<XxpCardInfo>(XxpCardInfo.class);
+        util.exportExcel(response, list, "电子信息牌数据");
+    }
+
+    /**
+     * 获取电子信息牌详细
+     */
+    @ApiOperation(value = "获取电子信息牌详细")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CARDINFO + PerFun.QUERY)
+    @GetMapping(value = "/{id}")
+    public ResultData<XxpCardInfo> getInfo(@PathVariable("id") Long id)
+    {
+        return ResultData.success(xxpCardInfoService.selectXxpCardInfoById(id));
+    }
+
+
+    /**
+     * 新增电子信息牌
+     */
+    @ApiOperation(value = "新增电子信息牌")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CARDINFO + PerFun.ADD)
+    @Log(title = "电子信息牌", businessType = BusinessType.INSERT)
+    @PostMapping
+    public ResultData add(@RequestBody XxpCardInfo xxpCardInfo)
+    {
+        return ResultData.result(xxpCardInfoService.insertXxpCardInfo(xxpCardInfo));
+    }
+
+
+
+    /**
+     * 修改电子信息牌
+     */
+    @ApiOperation(value = "修改电子信息牌")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CARDINFO + PerFun.EDIT)
+    @Log(title = "电子信息牌", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public ResultData edit(@RequestBody XxpCardInfo xxpCardInfo)
+    {
+        return  ResultData.result(xxpCardInfoService.updateXxpCardInfo(xxpCardInfo));
+    }
+
+    /**
+     * 删除电子信息牌
+     */
+    @ApiOperation(value = "删除电子信息牌")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CARDINFO + PerFun.REMOVE)
+    @Log(title = "电子信息牌", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public ResultData remove(@PathVariable Long[] ids)
+    {
+        return ResultData.result(xxpCardInfoService.deleteXxpCardInfoByIds(ids));
+    }
+
+    /**
+     * 根据id删除
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "根据id删除电子信息牌")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CARDINFO + PerFun.REMOVE)
+    @Log(title = "电子信息牌", businessType = BusinessType.DELETE)
+    @PostMapping("/{id}")
+    public ResultData remove(@PathVariable Long id)
+    {
+        return ResultData.result(xxpCardInfoService.deleteXxpCardInfoById(id));
+    }
+
+}

+ 146 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabXxpClassifyController.java

@@ -0,0 +1,146 @@
+package com.zd.laboratory.controller;
+
+import com.zd.common.core.annotation.Log;
+import com.zd.common.core.annotation.PreAuthorize;
+import com.zd.common.core.exception.NoRollException;
+import com.zd.common.core.log.BusinessType;
+import com.zd.common.core.security.TokenService;
+import com.zd.common.core.utils.ExcelUtil;
+import com.zd.common.core.web.controller.BaseController;
+import com.zd.laboratory.domain.LabWhiteJoinSublist;
+import com.zd.laboratory.domain.LabWhitelist;
+import com.zd.laboratory.domain.XxpClassify;
+import com.zd.laboratory.domain.vo.LabSubjectVO;
+import com.zd.laboratory.domain.vo.LabWhitelistVO;
+import com.zd.laboratory.service.ILabWhiteJoinSublistService;
+import com.zd.laboratory.service.ILabWhitelistService;
+import com.zd.laboratory.service.IXxpClassifyService;
+import com.zd.laboratory.service.impl.HaiKangDoorService;
+import com.zd.model.constant.HttpStatus;
+import com.zd.model.domain.ResultData;
+import com.zd.model.domain.per.PerFun;
+import com.zd.model.domain.per.PerPrefix;
+import com.zd.model.entity.SysUser;
+import com.zd.model.page.TableDataInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 信息牌类目Controller
+ *
+ * @author xxf
+ * @date 2023-03-22
+ */
+@RestController
+@Api(tags = "【信息牌类目】")
+@RequestMapping("/XxpClassify")
+public class LabXxpClassifyController extends BaseController
+{
+    @Autowired
+    private IXxpClassifyService xxpClassifyService;
+
+    @Autowired
+    private TokenService tokenService;
+
+    /**
+     * 查询信息牌类目列表
+     */
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CLASSIFY + PerFun.LIST)
+    @GetMapping("/list")
+    @ApiOperation(value = "查询信息牌类目列表")
+    public TableDataInfo<XxpClassify> list(XxpClassify xxpClassify)
+    {
+        // 排序规则获取
+        String sort=  "s".equals(xxpClassify.getRemark())?"sort":"create_time";
+        startPage(sort,"descending");
+        List<XxpClassify> list = xxpClassifyService.selectXxpClassifyList(xxpClassify);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出信息牌类目列表
+     */
+    @ApiOperation(value = "导出信息牌类目列表")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CLASSIFY + PerFun.EXPORT)
+    @Log(title = "信息牌类目", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, XxpClassify xxpClassify) throws IOException
+    {
+        List<XxpClassify> list = xxpClassifyService.selectXxpClassifyList(xxpClassify);
+        ExcelUtil<XxpClassify> util = new ExcelUtil<XxpClassify>(XxpClassify.class);
+        util.exportExcel(response, list, "信息牌类目数据");
+    }
+
+    /**
+     * 获取信息牌类目详细
+     */
+    @ApiOperation(value = "获取信息牌类目详细")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CLASSIFY + PerFun.QUERY)
+    @GetMapping(value = "/{id}")
+    public ResultData<XxpClassify> getInfo(@PathVariable("id") Long id)
+    {
+        return ResultData.success(xxpClassifyService.selectXxpClassifyById(id));
+    }
+
+
+    /**
+     * 新增信息牌类目
+     */
+    @ApiOperation(value = "新增信息牌类目")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CLASSIFY + PerFun.ADD)
+    @Log(title = "信息牌类目", businessType = BusinessType.INSERT)
+    @PostMapping
+    public ResultData add(@RequestBody XxpClassify xxpClassify)
+    {
+        return ResultData.result(xxpClassifyService.insertXxpClassify(xxpClassify));
+    }
+
+
+
+    /**
+     * 修改信息牌类目
+     */
+    @ApiOperation(value = "修改信息牌类目")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CLASSIFY + PerFun.EDIT)
+    @Log(title = "信息牌类目", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public ResultData edit(@RequestBody XxpClassify xxpClassify)
+    {
+        return  ResultData.result(xxpClassifyService.updateXxpClassify(xxpClassify));
+    }
+
+    /**
+     * 删除信息牌类目
+     */
+    @ApiOperation(value = "删除信息牌类目")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CLASSIFY + PerFun.REMOVE)
+    @Log(title = "信息牌类目", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public ResultData remove(@PathVariable Long[] ids)
+    {
+        return ResultData.result(xxpClassifyService.deleteXxpClassifyByIds(ids));
+    }
+
+    /**
+     * 根据id删除
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "根据id删除信息牌类目")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CLASSIFY + PerFun.REMOVE)
+    @Log(title = "信息牌类目", businessType = BusinessType.DELETE)
+    @PostMapping("/{id}")
+    public ResultData remove(@PathVariable Long id)
+    {
+        return ResultData.result(xxpClassifyService.deleteXxpClassifyById(id));
+    }
+
+}

+ 133 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabXxpClassifyDetailedController.java

@@ -0,0 +1,133 @@
+package com.zd.laboratory.controller;
+
+import com.zd.common.core.annotation.Log;
+import com.zd.common.core.annotation.PreAuthorize;
+import com.zd.common.core.log.BusinessType;
+import com.zd.common.core.security.TokenService;
+import com.zd.common.core.utils.ExcelUtil;
+import com.zd.common.core.web.controller.BaseController;
+import com.zd.laboratory.domain.LabWhitelist;
+import com.zd.laboratory.domain.XxpClassifyDetail;
+import com.zd.laboratory.service.IXxpClassifyDetailedService;
+import com.zd.model.domain.ResultData;
+import com.zd.model.domain.per.PerFun;
+import com.zd.model.domain.per.PerPrefix;
+import com.zd.model.page.TableDataInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * 安全信息类目详情Controller
+ *
+ * @author xxf
+ * @date 2023-03-22
+ */
+@RestController
+@Api(tags = "【安全信息类目详情】")
+@RequestMapping("/XxpClassifyDet")
+public class LabXxpClassifyDetailedController extends BaseController
+{
+    @Autowired
+    private IXxpClassifyDetailedService classifyDetailedService;
+
+    @Autowired
+    private TokenService tokenService;
+
+    /**
+     * 查询安全信息类目详情列表
+     */
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CLASSIFY_DET + PerFun.LIST)
+    @GetMapping("/list")
+    @ApiOperation(value = "查询安全信息类目详情列表")
+    public TableDataInfo<XxpClassifyDetail> list(XxpClassifyDetail classifyDetailed)
+    {
+        startPage();
+        List<XxpClassifyDetail> list = classifyDetailedService.selectXxpClassifyDetailedList(classifyDetailed);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出安全信息类目详情列表
+     */
+    @ApiOperation(value = "导出安全信息类目详情列表")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CLASSIFY_DET + PerFun.EXPORT)
+    @Log(title = "安全信息类目详情", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, XxpClassifyDetail classifyDetailed) throws IOException
+    {
+        List<XxpClassifyDetail> list = classifyDetailedService.selectXxpClassifyDetailedList(classifyDetailed);
+        ExcelUtil<XxpClassifyDetail> util = new ExcelUtil<XxpClassifyDetail>(XxpClassifyDetail.class);
+        util.exportExcel(response, list, "安全信息类目详情数据");
+    }
+
+    /**
+     * 获取安全信息类目详情详细信息
+     */
+    @ApiOperation(value = "获取安全信息类目详情详细信息")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CLASSIFY_DET + PerFun.QUERY)
+    @GetMapping(value = "/{id}")
+    public ResultData<XxpClassifyDetail> getInfo(@PathVariable("id") Long id)
+    {
+        return ResultData.success(classifyDetailedService.selectXxpClassifyDetailedById(id));
+    }
+
+
+    /**
+     * 新增安全信息类目详情
+     */
+    @ApiOperation(value = "新增安全信息类目详情")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CLASSIFY_DET + PerFun.ADD)
+    @Log(title = "安全信息类目详情", businessType = BusinessType.INSERT)
+    @PostMapping
+    public ResultData add(@RequestBody XxpClassifyDetail classifyDetailed)
+    {
+        return ResultData.result(classifyDetailedService.insertXxpClassifyDetailed(classifyDetailed));
+    }
+
+
+
+    /**
+     * 修改安全信息类目详情
+     */
+    @ApiOperation(value = "修改安全信息类目详情")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CLASSIFY_DET + PerFun.EDIT)
+    @Log(title = "安全信息类目详情", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public ResultData edit(@RequestBody XxpClassifyDetail classifyDetailed)
+    {
+        return  ResultData.result(classifyDetailedService.updateXxpClassifyDetailed(classifyDetailed));
+    }
+
+    /**
+     * 删除安全信息类目详情
+     */
+    @ApiOperation(value = "删除安全信息类目详情")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CLASSIFY_DET + PerFun.REMOVE)
+    @Log(title = "安全信息类目详情", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public ResultData remove(@PathVariable Long[] ids)
+    {
+        return ResultData.result(classifyDetailedService.deleteXxpClassifyDetailedByIds(ids));
+    }
+
+    /**
+     * 根据id删除关联关系
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "根据id删除安全信息类目详情关联关系")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_CLASSIFY_DET + PerFun.REMOVE)
+    @Log(title = "安全信息类目详情", businessType = BusinessType.DELETE)
+    @PostMapping("/{id}")
+    public ResultData remove(@PathVariable Long id)
+    {
+        return ResultData.result(classifyDetailedService.deleteXxpClassifyDetailedById(id));
+    }
+
+}

+ 154 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabXxpDutyController.java

@@ -0,0 +1,154 @@
+package com.zd.laboratory.controller;
+
+import com.zd.common.core.annotation.Log;
+import com.zd.common.core.annotation.PreAuthorize;
+import com.zd.common.core.log.BusinessType;
+import com.zd.common.core.security.TokenService;
+import com.zd.common.core.utils.ExcelUtil;
+import com.zd.common.core.web.controller.BaseController;
+import com.zd.laboratory.domain.LabWhitelist;
+import com.zd.laboratory.domain.XxpDuty;
+import com.zd.laboratory.domain.XxpInspection;
+import com.zd.laboratory.domain.vo.XxpDutyVO;
+import com.zd.laboratory.service.IXxpDutyService;
+import com.zd.laboratory.service.IXxpInspectionService;
+import com.zd.model.domain.ResultData;
+import com.zd.model.domain.per.PerFun;
+import com.zd.model.domain.per.PerPrefix;
+import com.zd.model.page.TableDataInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * 值班Controller
+ *
+ * @author xxf
+ * @date 2023-03-22
+ */
+@RestController
+@Api(tags = "【值班】")
+@RequestMapping("/XxpDuty")
+public class LabXxpDutyController extends BaseController
+{
+    @Autowired
+    private IXxpDutyService xxpDutyService;
+
+    @Autowired
+    private TokenService tokenService;
+
+    /**
+     * 查询值班列表
+     */
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_DUTY + PerFun.LIST)
+    @GetMapping("/list")
+    @ApiOperation(value = "查询值班列表")
+    public TableDataInfo<XxpDuty> list(XxpDuty xxpDuty)
+    {
+        startPage();
+        List<XxpDuty> list = xxpDutyService.selectXxpDutyList(xxpDuty);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询值班列表(按实时间查询)
+     */
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_DUTY + PerFun.LIST)
+    @GetMapping("/listYmd")
+    @ApiOperation(value = "查询值班列表")
+    public TableDataInfo<XxpDutyVO> listGroup(XxpDuty xxpDuty)
+    {
+        //startPage();
+        List<XxpDutyVO> list = xxpDutyService.selectDutyYmdById(xxpDuty);
+        for (XxpDutyVO duty:list) {
+            XxpDutyVO vo= xxpDutyService.selectSubAndUserSum(duty.getDutyTime());
+            duty.setSubSum(vo.getSubSum());
+            duty.setUserSum(vo.getSubSum());
+        }
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出值班列表
+     */
+    @ApiOperation(value = "导出值班列表")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_DUTY + PerFun.EXPORT)
+    @Log(title = "值班", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, XxpDuty xxpDuty) throws IOException
+    {
+        List<XxpDuty> list = xxpDutyService.selectXxpDutyList(xxpDuty);
+        ExcelUtil<XxpDuty> util = new ExcelUtil<XxpDuty>(XxpDuty.class);
+        util.exportExcel(response, list, "值班数据");
+    }
+
+    /**
+     * 获取值班详细
+     */
+    @ApiOperation(value = "获取值班详细")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_DUTY + PerFun.QUERY)
+    @GetMapping(value = "/{id}")
+    public ResultData<XxpDuty> getInfo(@PathVariable("id") Long id)
+    {
+        return ResultData.success(xxpDutyService.selectXxpDutyById(id));
+    }
+
+
+    /**
+     * 新增值班
+     */
+    @ApiOperation(value = "新增值班")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_DUTY + PerFun.ADD)
+    @Log(title = "值班", businessType = BusinessType.INSERT)
+    @PostMapping
+    public ResultData add(@RequestBody XxpDutyVO xxpDutyVO)
+    {
+        return ResultData.result(xxpDutyService.insertXxpDuty(xxpDutyVO));
+    }
+
+
+
+    /**
+     * 修改值班
+     */
+    @ApiOperation(value = "修改值班")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_DUTY + PerFun.EDIT)
+    @Log(title = "值班", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public ResultData edit(@RequestBody XxpDuty xxpDuty)
+    {
+        return  ResultData.result(xxpDutyService.updateXxpDuty(xxpDuty));
+    }
+
+    /**
+     * 删除值班
+     */
+    @ApiOperation(value = "删除值班")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_DUTY + PerFun.REMOVE)
+    @Log(title = "值班", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public ResultData remove(@PathVariable Long[] ids)
+    {
+        return ResultData.result(xxpDutyService.deleteXxpDutyByIds(ids));
+    }
+
+    /**
+     * 根据id删除
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "根据id删除值班")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_DUTY + PerFun.REMOVE)
+    @Log(title = "值班", businessType = BusinessType.DELETE)
+    @PostMapping("/{id}")
+    public ResultData remove(@PathVariable Long id)
+    {
+        return ResultData.result(xxpDutyService.deleteXxpDutyById(id));
+    }
+
+}

+ 135 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabXxpInspectionController.java

@@ -0,0 +1,135 @@
+package com.zd.laboratory.controller;
+
+import com.zd.common.core.annotation.Log;
+import com.zd.common.core.annotation.PreAuthorize;
+import com.zd.common.core.log.BusinessType;
+import com.zd.common.core.security.TokenService;
+import com.zd.common.core.utils.ExcelUtil;
+import com.zd.common.core.web.controller.BaseController;
+import com.zd.laboratory.domain.LabWhitelist;
+import com.zd.laboratory.domain.XxpClassify;
+import com.zd.laboratory.domain.XxpInspection;
+import com.zd.laboratory.service.IXxpClassifyService;
+import com.zd.laboratory.service.IXxpInspectionService;
+import com.zd.model.domain.ResultData;
+import com.zd.model.domain.per.PerFun;
+import com.zd.model.domain.per.PerPrefix;
+import com.zd.model.page.TableDataInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * 巡查Controller
+ *
+ * @author xxf
+ * @date 2023-03-22
+ */
+@RestController
+@Api(tags = "【巡查】")
+@RequestMapping("/XxpInspection")
+public class LabXxpInspectionController extends BaseController
+{
+    @Autowired
+    private IXxpInspectionService xxpInspectionService;
+
+    @Autowired
+    private TokenService tokenService;
+
+    /**
+     * 查询巡查列表
+     */
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_XXP_INSPECTION + PerFun.LIST)
+    @GetMapping("/list")
+    @ApiOperation(value = "查询巡查列表")
+    public TableDataInfo<XxpInspection> list(XxpInspection xxpInspection)
+    {
+        startPage();
+        List<XxpInspection> list = xxpInspectionService.selectXxpInspectionList(xxpInspection);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出巡查列表
+     */
+    @ApiOperation(value = "导出巡查列表")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_XXP_INSPECTION + PerFun.EXPORT)
+    @Log(title = "巡查", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, XxpInspection xxpInspection) throws IOException
+    {
+        List<XxpInspection> list = xxpInspectionService.selectXxpInspectionList(xxpInspection);
+        ExcelUtil<XxpInspection> util = new ExcelUtil<XxpInspection>(XxpInspection.class);
+        util.exportExcel(response, list, "巡查数据");
+    }
+
+    /**
+     * 获取巡查详细
+     */
+    @ApiOperation(value = "获取巡查详细")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_XXP_INSPECTION + PerFun.QUERY)
+    @GetMapping(value = "/{id}")
+    public ResultData<XxpInspection> getInfo(@PathVariable("id") Long id)
+    {
+        return ResultData.success(xxpInspectionService.selectXxpInspectionById(id));
+    }
+
+
+    /**
+     * 新增巡查
+     */
+    @ApiOperation(value = "新增巡查")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_XXP_INSPECTION + PerFun.ADD)
+    @Log(title = "巡查", businessType = BusinessType.INSERT)
+    @PostMapping
+    public ResultData add(@RequestBody XxpInspection xxpInspection)
+    {
+        return ResultData.result(xxpInspectionService.insertXxpInspection(xxpInspection));
+    }
+
+
+
+    /**
+     * 修改巡查
+     */
+    @ApiOperation(value = "修改巡查")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_XXP_INSPECTION + PerFun.EDIT)
+    @Log(title = "巡查", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public ResultData edit(@RequestBody XxpInspection xxpInspection)
+    {
+        return  ResultData.result(xxpInspectionService.updateXxpInspection(xxpInspection));
+    }
+
+    /**
+     * 删除巡查
+     */
+    @ApiOperation(value = "删除巡查")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_XXP_INSPECTION + PerFun.REMOVE)
+    @Log(title = "巡查", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public ResultData remove(@PathVariable Long[] ids)
+    {
+        return ResultData.result(xxpInspectionService.deleteXxpInspectionByIds(ids));
+    }
+
+    /**
+     * 根据id删除
+     * @param id
+     * @return
+     */
+    @ApiOperation(value = "根据id删除巡查")
+    @PreAuthorize(hasPermi = PerPrefix.LABORATORY_XXP_INSPECTION + PerFun.REMOVE)
+    @Log(title = "巡查", businessType = BusinessType.DELETE)
+    @PostMapping("/{id}")
+    public ResultData remove(@PathVariable Long id)
+    {
+        return ResultData.result(xxpInspectionService.deleteXxpInspectionById(id));
+    }
+
+}

+ 232 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/domain/XxpCardInfo.java

@@ -0,0 +1,232 @@
+package com.zd.laboratory.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.zd.model.annotation.Excel;
+import com.zd.model.entity.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+import java.util.Date;
+
+/**
+ * 电子信息牌表 对象 xxp_card_info
+ *
+ * @author xxf
+ * @date 2023-03-22
+ */
+@ApiModel("巡查信息")
+@Data
+@Accessors(chain = true)
+@ToString(callSuper = true)
+public class XxpCardInfo extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 设备名称
+     */
+    @Excel(name = " 设备名称")
+    @ApiModelProperty(value = "人员id")
+    private String cardName;
+
+    /**
+     * 设备编号
+     */
+    @Excel(name = "设备编号")
+    @ApiModelProperty(value = "设备编号")
+    private String cardNum;
+
+
+    /**
+     * 学院
+     */
+    @Excel(name = "学院")
+    @ApiModelProperty(value = "学院")
+    private String college;
+
+    /**
+     * 学院Id
+     */
+    @Excel(name = "学院Id")
+    @ApiModelProperty(value = "学院Id")
+    private Long collegeId;
+
+    /**
+     * 位置
+     */
+    @Excel(name = "位置")
+    @ApiModelProperty(value = "位置")
+    private String location;
+
+    /**
+     * 设备状态 1离线 2在线
+     */
+    @Excel(name = "设备状态")
+    @ApiModelProperty(value = "设备状态")
+    private Integer operate;
+
+    /**
+     * 实验室id
+     */
+    @Excel(name = "实验室id ")
+    @ApiModelProperty(value = "实验室id ")
+    private Long subjectId;
+
+    /**
+     * 实验室名称
+     */
+    @Excel(name = "实验室名称")
+    @ApiModelProperty(value = "实验室名称")
+    private String subjectName;
+
+    /**
+     * 部门id
+     */
+    @Excel(name = "部门id")
+    @ApiModelProperty(value = "部门id")
+    private Long deptId;
+
+    /**
+     * 部门名称
+     */
+    @Excel(name = "部门名称")
+    @ApiModelProperty(value = "部门名称")
+    private String deptName;
+
+    /**
+     * 是否启用门锁 1启用 2禁用
+     */
+    @Excel(name = "是否启用门锁")
+    @ApiModelProperty(value = "是否启用门锁")
+    private String isStart;
+
+    /**
+     * 创建人id
+     */
+    @Excel(name = " 创建人id")
+    @ApiModelProperty(value = " 创建人id")
+    private Long userId;
+
+    /**
+     * 创建人
+     */
+    @Excel(name = " 创建人")
+    @ApiModelProperty(value = " 创建人")
+    private String createBy;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    /**
+     * 修改人
+     */
+    @Excel(name = " 修改人")
+    @ApiModelProperty(value = "修改人")
+    private String updateBy;
+
+    /**
+     * 修改时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "修改时间")
+    private Date updateTime;
+
+    /***
+     * 开始时间
+     */
+    private String beginTime;
+
+    /***
+     * 结束时间
+     */
+    private String endTime;
+
+    @Override
+    public Long getUserId() {
+        return userId;
+    }
+
+    @Override
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    @Override
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    @Override
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    @Override
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    @Override
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+
+    @Override
+    public String getUpdateBy() {
+        return updateBy;
+    }
+
+    @Override
+    public void setUpdateBy(String updateBy) {
+        this.updateBy = updateBy;
+    }
+
+    @Override
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    @Override
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    @Override
+    public Long getDeptId() {
+        return deptId;
+    }
+
+    @Override
+    public void setDeptId(Long deptId) {
+        this.deptId = deptId;
+    }
+
+    @Override
+    public String getDeptName() {
+        return deptName;
+    }
+
+    @Override
+    public void setDeptName(String deptName) {
+        this.deptName = deptName;
+    }
+
+    public Long getSubjectId() {
+        return subjectId;
+    }
+
+    public void setSubjectId(Long subjectId) {
+        this.subjectId = subjectId;
+    }
+}

+ 147 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/domain/XxpClassify.java

@@ -0,0 +1,147 @@
+package com.zd.laboratory.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.zd.model.annotation.Excel;
+import com.zd.model.entity.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+import org.hibernate.validator.constraints.Length;
+
+import java.util.Date;
+
+/**
+ * 安全信息类目对象 xxp_classify
+ *
+ * @author xxf
+ * @date 2023-03-22
+ */
+@ApiModel("安全信息类目")
+@Data
+@Accessors(chain = true)
+@ToString(callSuper = true)
+public class XxpClassify extends  BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 类目名称 */
+    @Excel(name = "类目名称")
+    @Length(message = "用户名长度不能超过50")
+    @ApiModelProperty(value = "类目名称")
+    private String classifyName;
+
+    /** 类目类型 1文字 2图片 */
+    @Excel(name = "类目类型")
+    @ApiModelProperty(value = "类目名称")
+    private Integer classifyType;
+
+
+    /** 排序 */
+    @Excel(name = "排序")
+    @ApiModelProperty(value = "排序")
+    private Integer sort;
+
+
+    /** 是否特殊类目 1否 2 是   */
+    @Excel(name = "是否特殊类目")
+    @ApiModelProperty(value = "是否特殊类目")
+    private Integer isSpecial;
+
+
+    /** 是否展示 1展示 2不展示   */
+    @Excel(name = "是否展示")
+    @ApiModelProperty(value = "是否展示")
+    private Integer isShow;
+
+    /** 类目颜色   */
+    @Excel(name = "类目颜色 ")
+    @ApiModelProperty(value = "类目颜色 ")
+    private String showColour;
+
+
+    /** 用户id */
+    @Excel(name = "用户id")
+    @ApiModelProperty(value = "用户id")
+    private Long userId;
+
+    /** 创建人 */
+    @Excel(name = "创建人")
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    /** 修改人 */
+    @Excel(name = "修改人")
+    @ApiModelProperty(value = "修改人")
+    private String updateBy;
+
+    /**
+     * 修改时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "修改时间")
+    private Date updateTime;
+
+    /***
+     * 开始时间
+     */
+    private String beginTime;
+
+    /***
+     * 结束时间
+     */
+    private String endTime;
+
+    @Override
+    public Long getUserId() {
+        return userId;
+    }
+    @Override
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+    @Override
+    public String getCreateBy() {
+        return createBy;
+    }
+    @Override
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+    @Override
+    public Date getCreateTime() {
+        return createTime;
+    }
+    @Override
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+    @Override
+    public String getUpdateBy() {
+        return updateBy;
+    }
+    @Override
+    public void setUpdateBy(String updateBy) {
+        this.updateBy = updateBy;
+    }
+    @Override
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+    @Override
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+}

+ 141 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/domain/XxpClassifyDetail.java

@@ -0,0 +1,141 @@
+package com.zd.laboratory.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.zd.model.annotation.Excel;
+import com.zd.model.entity.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+import org.hibernate.validator.constraints.Length;
+
+import java.util.Date;
+
+/**
+ * 安全信息类目详情 对象 xxp_classify_detailed
+ *
+ * @author xxf
+ * @date 2023-03-22
+ */
+@ApiModel("安全信息类目详情")
+@Data
+@Accessors(chain = true)
+@ToString(callSuper = true)
+public class XxpClassifyDetail extends  BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键 */
+    private Long id;
+
+    /** 类目表主键 */
+    @Excel(name = "类目表主键")
+    @Length(message = "长度不能超过20")
+    @ApiModelProperty(value = "类目表主键")
+    private Long infoClassifyId;
+
+    /** 信息名称  */
+    @Excel(name = "信息名称 ")
+    @ApiModelProperty(value = "信息名称 ")
+    private String infoName;
+
+
+    /** 类型 1文字 2图片*/
+    @Excel(name = "类型")
+    @ApiModelProperty(value = "类型 1文字 2图片")
+    private Integer infoType;
+
+    /** 内容 */
+    @Excel(name = "内容")
+    @ApiModelProperty(value = "内容")
+    private String infoContent;
+
+    /** 排序 */
+    @Excel(name = "排序 ")
+    @ApiModelProperty(value = "排序 ")
+    private Integer sort;
+
+
+
+    /** 用户id */
+    @Excel(name = "用户id")
+    @ApiModelProperty(value = "用户id")
+    private Long userId;
+
+    /** 创建人 */
+    @Excel(name = "创建人")
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    /** 修改人 */
+    @Excel(name = "修改人")
+    @ApiModelProperty(value = "修改人")
+    private String updateBy;
+
+    /**
+     * 修改时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "修改时间")
+    private Date updateTime;
+
+    /***
+     * 开始时间
+     */
+    private String beginTime;
+
+    /***
+     * 结束时间
+     */
+    private String endTime;
+
+    @Override
+    public Long getUserId() {
+        return userId;
+    }
+    @Override
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+    @Override
+    public String getCreateBy() {
+        return createBy;
+    }
+    @Override
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+    @Override
+    public Date getCreateTime() {
+        return createTime;
+    }
+    @Override
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+    @Override
+    public String getUpdateBy() {
+        return updateBy;
+    }
+    @Override
+    public void setUpdateBy(String updateBy) {
+        this.updateBy = updateBy;
+    }
+    @Override
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+    @Override
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+}

+ 192 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/domain/XxpDuty.java

@@ -0,0 +1,192 @@
+package com.zd.laboratory.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.zd.model.annotation.Excel;
+import com.zd.model.entity.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+import org.hibernate.validator.constraints.Length;
+
+import java.util.Date;
+
+/**
+ * 值班表 对象 xxp_inspection
+ *
+ * @author xxf
+ * @date 2023-03-22
+ */
+@ApiModel("巡查信息")
+@Data
+@Accessors(chain = true)
+@ToString(callSuper = true)
+public class XxpDuty extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 人员id
+     */
+    @Excel(name = "人员id")
+    @Length(message = "人员id长度不能超过20")
+    @ApiModelProperty(value = "人员id")
+    private Long userId;
+
+    /**
+     * 人员姓名
+     */
+    @Excel(name = "人员姓名")
+    @ApiModelProperty(value = "人员姓名")
+    private String userName;
+
+    /**
+     * 人员电话
+     */
+    @Excel(name = "人员电话")
+    @ApiModelProperty(value = "人员电话")
+    private String userPhone;
+
+    /**
+     * 头像
+     */
+    @Excel(name = "头像")
+    @ApiModelProperty(value = "头像")
+    private String userImg;
+
+    /**
+     * 人员类型 11老师 22学生
+     */
+    @Excel(name = "人员类型")
+    @ApiModelProperty(value = "人员类型")
+    private String userType;
+
+    /**
+     * 实验室id
+     */
+    @Excel(name = "实验室id")
+    @ApiModelProperty(value = "实验室id")
+    private Long subjectId;
+
+    /**
+     * 实验室名称
+     */
+    @Excel(name = "实验室名称")
+    @ApiModelProperty(value = "实验室名称")
+    private String subjectName;
+
+    /**
+     * 部门id
+     */
+    @Excel(name = "部门id ")
+    @ApiModelProperty(value = "部门id ")
+    private Long deptId;
+
+    /**
+     * 部门名称
+     */
+    @Excel(name = "部门名称 ")
+    @ApiModelProperty(value = "部门名称 ")
+    private String deptName;
+
+    /**
+     * 学院
+     */
+    @Excel(name = "学院")
+    @ApiModelProperty(value = "学院 ")
+    private String college;
+
+    /**
+     * 值班时间
+     */
+    @Excel(name = "值班时间")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @ApiModelProperty(value = "值班时间")
+    private Date dutyTime;
+
+    /**
+     * 创建人id
+     */
+    @Excel(name = "创建人id")
+    @ApiModelProperty(value = "创建人id")
+    private Long createById;
+
+    /**
+     * 创建人
+     */
+    @Excel(name = "创建人")
+    @ApiModelProperty(value = "创建人")
+    private String createBy;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    /***
+     * 开始时间
+     */
+    private String beginTime;
+
+    /***
+     * 结束时间
+     */
+    private String endTime;
+
+    @Override
+    public Long getUserId() {
+        return userId;
+    }
+
+    @Override
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    @Override
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    @Override
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    @Override
+    public Long getDeptId() {
+        return deptId;
+    }
+
+    @Override
+    public void setDeptId(Long deptId) {
+        this.deptId = deptId;
+    }
+
+    @Override
+    public String getDeptName() {
+        return deptName;
+    }
+
+    @Override
+    public void setDeptName(String deptName) {
+        this.deptName = deptName;
+    }
+
+    @Override
+    public String getCreateBy() {
+        return createBy;
+    }
+
+    @Override
+    public void setCreateBy(String createBy) {
+        this.createBy = createBy;
+    }
+}

+ 156 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/domain/XxpInspection.java

@@ -0,0 +1,156 @@
+package com.zd.laboratory.domain;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.zd.model.annotation.Excel;
+import com.zd.model.entity.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+import org.hibernate.validator.constraints.Length;
+
+import java.util.Date;
+
+/**
+ * 巡查表 对象 xxp_inspection
+ *
+ * @author xxf
+ * @date 2023-03-22
+ */
+@ApiModel("巡查信息")
+@Data
+@Accessors(chain = true)
+@ToString(callSuper = true)
+public class XxpInspection extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 人员id
+     */
+    @Excel(name = "人员id")
+    @Length(message = "人员id长度不能超过20")
+    @ApiModelProperty(value = "人员id")
+    private Long userId;
+
+    /**
+     * 人员姓名
+     */
+    @Excel(name = "人员姓名")
+    @ApiModelProperty(value = "人员姓名")
+    private String userName;
+
+
+    /**
+     * 实验室id
+     */
+    @Excel(name = "实验室id")
+    @ApiModelProperty(value = "实验室id")
+    private Integer subjectId;
+
+    /**
+     * 实验室名称
+     */
+    @Excel(name = "实验室名称")
+    @ApiModelProperty(value = "实验室名称")
+    private String subjectName;
+
+    /**
+     * 签到时间
+     */
+    @Excel(name = "签到时间 ")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "签到时间 ")
+    private Date signIn;
+
+    /**
+     * 签退时间
+     */
+    @Excel(name = "签退时间 ")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "签退时间 ")
+    private Date signOut;
+
+    /**
+     * 部门id
+     */
+    @Excel(name = "部门id ")
+    @ApiModelProperty(value = "部门id ")
+    private Long deptId;
+
+    /**
+     * 部门名称
+     */
+    @Excel(name = "部门名称 ")
+    @ApiModelProperty(value = "部门名称 ")
+    private String deptName;
+
+    /**
+     * 停留时间
+     */
+    @Excel(name = "停留时间 ")
+    @ApiModelProperty(value = "停留时间 ")
+    private String residenceTime;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @ApiModelProperty(value = "创建时间")
+    private Date createTime;
+
+    /***
+     * 开始时间
+     */
+    private String beginTime;
+
+    /***
+     * 结束时间
+     */
+    private String endTime;
+
+    @Override
+    public Long getUserId() {
+        return userId;
+    }
+
+    @Override
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    @Override
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    @Override
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    @Override
+    public Long getDeptId() {
+        return deptId;
+    }
+
+    @Override
+    public void setDeptId(Long deptId) {
+        this.deptId = deptId;
+    }
+
+    @Override
+    public String getDeptName() {
+        return deptName;
+    }
+
+    @Override
+    public void setDeptName(String deptName) {
+        this.deptName = deptName;
+    }
+}

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

@@ -0,0 +1,63 @@
+package com.zd.laboratory.mapper;
+
+import com.zd.laboratory.domain.XxpCardInfo;
+
+import java.util.List;
+
+/**
+ * 巡查信息 Mapper接口
+ *
+ * @author xxf
+ * @date 2023-03-22
+ */
+public interface XxpCardInfoMapper
+{
+    /**
+     * 查询
+     *
+     * @param id 主键
+     * @return 巡查信息
+     */
+    public XxpCardInfo selectXxpCardInfoById(Long id);
+
+    /**
+     * 查询列表
+     *
+     * @param xxpCardInfo 巡查信息
+     * @return 白名单集合
+     */
+    public List<XxpCardInfo> selectXxpCardInfoList(XxpCardInfo xxpCardInfo);
+
+
+    /**
+     * 新增巡查信息
+     *
+     * @param xxpCardInfo 巡查信息
+     * @return 结果
+     */
+    public int insertXxpCardInfo(XxpCardInfo xxpCardInfo);
+
+    /**
+     * 修改
+     *
+     * @param xxpCardInfo 巡查信息
+     * @return 结果
+     */
+    public int updateXxpCardInfo(XxpCardInfo xxpCardInfo);
+
+    /**
+     * 删除
+     *
+     * @param id 主键
+     * @return 结果
+     */
+    public int deleteXxpCardInfoById(Long id);
+
+    /**
+     * 批量删除
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteXxpCardInfoByIds(Long[] ids);
+}

+ 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);
+}

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

@@ -0,0 +1,79 @@
+package com.zd.laboratory.mapper;
+
+import com.zd.laboratory.domain.XxpDuty;
+import com.zd.laboratory.domain.vo.XxpDutyVO;
+
+import java.util.Date;
+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);
+
+    /***
+     * 根据时间段查询有数据的时间列表
+     * @param xxpDuty
+     * @return
+     */
+    public List<XxpDutyVO> selectDutyYmdById(XxpDuty xxpDuty);
+
+    /***
+     * 查询某个具体时间下的实验室和人员总数
+     * @param dutyTime
+     * @return
+     */
+    public XxpDutyVO selectSubAndUserSum(Date dutyTime);
+}

+ 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);
+}

+ 66 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/IXxpCardInfoService.java

@@ -0,0 +1,66 @@
+package com.zd.laboratory.service;
+
+import com.zd.laboratory.domain.XxpCardInfo;
+
+import java.util.List;
+
+/**
+ * 电子信息牌 Service接口
+ *
+ * @author xxf
+ * @date 2023-03-22
+ */
+public interface IXxpCardInfoService
+{
+    /**
+     * 查询电子信息牌
+     *
+     * @param id 电子信息牌主键
+     * @return 电子信息牌
+     */
+    public XxpCardInfo selectXxpCardInfoById(Long id);
+
+    /**
+     * 查询电子信息牌列表
+     *
+     * @param xxpCardInfo 电子信息牌
+     * @return 电子信息牌集合
+     */
+    public List<XxpCardInfo> selectXxpCardInfoList(XxpCardInfo xxpCardInfo);
+
+
+
+    /**
+     * 新增电子信息牌
+     *
+     * @param xxpCardInfo 电子信息牌
+     * @return 结果
+     */
+    public int insertXxpCardInfo(XxpCardInfo xxpCardInfo);
+
+
+
+    /**
+     * 修改电子信息牌
+     *
+     * @param xxpCardInfo 电子信息牌
+     * @return 结果
+     */
+    public int updateXxpCardInfo(XxpCardInfo xxpCardInfo);
+
+    /**
+     * 批量删除电子信息牌
+     *
+     * @param ids 需要删除的电子信息牌主键集合
+     * @return 结果
+     */
+    public int deleteXxpCardInfoByIds(Long[] ids);
+
+    /**
+     * 删除电子信息牌信息
+     *
+     * @param id 电子信息牌主键
+     * @return 结果
+     */
+    public int deleteXxpCardInfoById(Long id);
+}

+ 66 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/IXxpClassifyDetailedService.java

@@ -0,0 +1,66 @@
+package com.zd.laboratory.service;
+
+import com.zd.laboratory.domain.XxpClassifyDetail;
+
+import java.util.List;
+
+/**
+ * 安全信息类目详情Service接口
+ *
+ * @author zd
+ * @date 2022-01-26
+ */
+public interface IXxpClassifyDetailedService
+{
+    /**
+     * 查询安全信息类目详情
+     *
+     * @param id 安全信息类目详情主键
+     * @return 安全信息类目详情
+     */
+    public XxpClassifyDetail selectXxpClassifyDetailedById(Long id);
+
+    /**
+     * 查询安全信息类目详情列表
+     *
+     * @param classifyDetail 安全信息类目详情
+     * @return 安全信息类目详情集合
+     */
+    public List<XxpClassifyDetail> selectXxpClassifyDetailedList(XxpClassifyDetail classifyDetail);
+
+
+
+    /**
+     * 新增安全信息类目详情
+     *
+     * @param classifyDetail 安全信息类目详情
+     * @return 结果
+     */
+    public int insertXxpClassifyDetailed(XxpClassifyDetail classifyDetail);
+
+
+
+    /**
+     * 修改安全信息类目详情
+     *
+     * @param classifyDetail 安全信息类目详情
+     * @return 结果
+     */
+    public int updateXxpClassifyDetailed(XxpClassifyDetail classifyDetail);
+
+    /**
+     * 批量删除安全信息类目详情
+     *
+     * @param ids 需要删除的安全信息类目详情主键集合
+     * @return 结果
+     */
+    public int deleteXxpClassifyDetailedByIds(Long[] ids);
+
+    /**
+     * 删除安全信息类目详情信息
+     *
+     * @param id 安全信息类目详情主键
+     * @return 结果
+     */
+    public int deleteXxpClassifyDetailedById(Long id);
+}

+ 68 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/IXxpClassifyService.java

@@ -0,0 +1,68 @@
+package com.zd.laboratory.service;
+
+import com.zd.laboratory.domain.LabWhitelist;
+import com.zd.laboratory.domain.XxpClassify;
+import com.zd.laboratory.domain.vo.LabWhitelistVO;
+
+import java.util.List;
+
+/**
+ * 信息牌类目Service接口
+ *
+ * @author zd
+ * @date 2022-01-26
+ */
+public interface IXxpClassifyService
+{
+    /**
+     * 查询信息牌类目
+     *
+     * @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 ids 需要删除的信息牌类目主键集合
+     * @return 结果
+     */
+    public int deleteXxpClassifyByIds(Long[] ids);
+
+    /**
+     * 删除信息牌类目信息
+     *
+     * @param id 信息牌类目主键
+     * @return 结果
+     */
+    public int deleteXxpClassifyById(Long id);
+}

+ 82 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/IXxpDutyService.java

@@ -0,0 +1,82 @@
+package com.zd.laboratory.service;
+
+import com.zd.laboratory.domain.XxpDuty;
+import com.zd.laboratory.domain.vo.XxpDutyVO;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 值班 Service接口
+ *
+ * @author zd
+ * @date 2022-01-26
+ */
+public interface IXxpDutyService
+{
+    /**
+     * 查询值班
+     *
+     * @param id 值班主键
+     * @return 值班
+     */
+    public XxpDuty selectXxpDutyById(Long id);
+
+    /**
+     * 查询值班列表
+     *
+     * @param xxpDuty 值班
+     * @return 值班集合
+     */
+    public List<XxpDuty> selectXxpDutyList(XxpDuty xxpDuty);
+
+
+
+    /**
+     * 新增值班
+     *
+     * @param xxpDutyVO 值班
+     * @return 结果
+     */
+    public int insertXxpDuty(XxpDutyVO xxpDutyVO);
+
+
+
+    /**
+     * 修改值班
+     *
+     * @param xxpDuty 值班
+     * @return 结果
+     */
+    public int updateXxpDuty(XxpDuty xxpDuty);
+
+    /**
+     * 批量删除值班
+     *
+     * @param ids 需要删除的值班主键集合
+     * @return 结果
+     */
+    public int deleteXxpDutyByIds(Long[] ids);
+
+    /**
+     * 删除值班信息
+     *
+     * @param id 值班主键
+     * @return 结果
+     */
+    public int deleteXxpDutyById(Long id);
+
+    /***
+     * 根据时间段查询有数据的时间列表
+     * @param xxpDuty
+     * @return
+     */
+    public List<XxpDutyVO> selectDutyYmdById(XxpDuty xxpDuty);
+
+    /***
+     * 查询某个具体时间下的实验室和人员总数
+     * @param dutyTime
+     * @return
+     */
+    public XxpDutyVO selectSubAndUserSum(Date dutyTime);
+}

+ 66 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/IXxpInspectionService.java

@@ -0,0 +1,66 @@
+package com.zd.laboratory.service;
+
+import com.zd.laboratory.domain.XxpInspection;
+
+import java.util.List;
+
+/**
+ * 巡查 Service接口
+ *
+ * @author zd
+ * @date 2022-01-26
+ */
+public interface IXxpInspectionService
+{
+    /**
+     * 查询巡查
+     *
+     * @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 ids 需要删除的巡查主键集合
+     * @return 结果
+     */
+    public int deleteXxpInspectionByIds(Long[] ids);
+
+    /**
+     * 删除巡查信息
+     *
+     * @param id 巡查主键
+     * @return 结果
+     */
+    public int deleteXxpInspectionById(Long id);
+}

+ 1 - 1
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabMessageContentServiceImpl.java

@@ -241,7 +241,7 @@ public class LabMessageContentServiceImpl implements ILabMessageContentService {
             if (strings != null) {
                 AlarmEntrty alarmEntrty = new AlarmEntrty();
                 List<String> alarms = Arrays.asList(labRiskPlanLevel.getAlarmType().split(","));
-                if (alarms.contains(smsType) && alarms.contains(smsType)) {
+                if (alarms.contains(callType) && alarms.contains(smsType)) {
                     alarmEntrty = new AlarmEntrty(Routes.NoticePush, strings, format);
                 }else if(alarms.contains(callType)){
                     alarmEntrty = new AlarmEntrty(Routes.NoticePush, strings, SendTypes.Call.toString(),format);

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

@@ -0,0 +1,109 @@
+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.XxpCardInfoMapper;
+import com.zd.laboratory.mapper.XxpInspectionMapper;
+import com.zd.laboratory.service.IXxpCardInfoService;
+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.Date;
+import java.util.List;
+
+/**
+ * 巡查Service业务层处理
+ *
+ * @author zd
+ * @date 2022-01-26
+ */
+@Service
+public class XxpCardInfoServiceImpl implements IXxpCardInfoService
+{
+    @Autowired
+    private XxpCardInfoMapper xxpCardInfoMapper;
+
+    @Autowired
+    private TokenService tokenService;
+
+
+    /**
+     * 查询电子信息牌
+     *
+     * @param id 电子信息牌主键
+     * @return 电子信息牌
+     */
+    @Override
+    public XxpCardInfo selectXxpCardInfoById(Long id) {
+        return xxpCardInfoMapper.selectXxpCardInfoById(id);
+    }
+
+    /**
+     * 查询电子信息牌列表
+     *
+     * @param xxpCardInfo 电子信息牌
+     * @return 电子信息牌集合
+     */
+    @Override
+    public List<XxpCardInfo> selectXxpCardInfoList(XxpCardInfo xxpCardInfo) {
+        return xxpCardInfoMapper.selectXxpCardInfoList(xxpCardInfo);
+    }
+
+    /**
+     * 新增电子信息牌
+     *
+     * @param xxpCardInfo 电子信息牌
+     * @return 结果
+     */
+    @Override
+    public int insertXxpCardInfo(XxpCardInfo xxpCardInfo) {
+        SysUser sysUser = tokenService.getLoginUser().getSysUser();
+        xxpCardInfo.setCreateBy(sysUser.getNickName());
+        xxpCardInfo.setCreateTime(new Date());
+        xxpCardInfo.setUserId(sysUser.getUserId());
+        xxpCardInfo.setDeptId(sysUser.getDept().getDeptId());
+        xxpCardInfo.setDeptName(sysUser.getDept().getDeptName());
+        return xxpCardInfoMapper.insertXxpCardInfo(xxpCardInfo);
+    }
+
+    /**
+     * 修改电子信息牌
+     *
+     * @param xxpCardInfo 电子信息牌
+     * @return 结果
+     */
+    @Override
+    public int updateXxpCardInfo(XxpCardInfo xxpCardInfo) {
+        SysUser sysUser = tokenService.getLoginUser().getSysUser();
+        xxpCardInfo.setUpdateBy(sysUser.getNickName());
+        xxpCardInfo.setUpdateTime(new Date());
+        return xxpCardInfoMapper.updateXxpCardInfo(xxpCardInfo);
+    }
+
+    /**
+     * 批量删除电子信息牌
+     *
+     * @param ids 需要删除的电子信息牌主键集合
+     * @return 结果
+     */
+    @Override
+    public int deleteXxpCardInfoByIds(Long[] ids) {
+
+        return xxpCardInfoMapper.deleteXxpCardInfoByIds(ids);
+    }
+
+    /**
+     * 删除电子信息牌信息
+     *
+     * @param id 电子信息牌主键
+     * @return 结果
+     */
+    @Override
+    public int deleteXxpCardInfoById(Long id) {
+
+        return xxpCardInfoMapper.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;
+    }
+}

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

@@ -0,0 +1,156 @@
+package com.zd.laboratory.service.impl;
+
+import com.zd.common.core.exception.ServiceException;
+import com.zd.common.core.security.TokenService;
+import com.zd.common.core.utils.DateUtils;
+import com.zd.common.core.utils.StringUtils;
+import com.zd.laboratory.domain.XxpDuty;
+import com.zd.laboratory.domain.XxpInspection;
+import com.zd.laboratory.domain.vo.XxpDutyVO;
+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 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.Date;
+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 xxpDutyVO 值班
+     * @return 结果
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public int insertXxpDuty(XxpDutyVO xxpDutyVO) {
+        if(StringUtils.isNull(xxpDutyVO.getDateList()) ){
+            throw new ServiceException("值班时间为空");
+        }else if(StringUtils.isNull(xxpDutyVO.getSubjectList())){
+            throw new ServiceException("值班实验室为空");
+        }else if(StringUtils.isNull(xxpDutyVO.getSysUserList())){
+            throw new ServiceException("值班人员为空");
+        }
+
+        SysUser sysUser = tokenService.getLoginUser().getSysUser();
+        for (int i=0;i<xxpDutyVO.getDateList().size();i++){
+            for (int o=0;o<xxpDutyVO.getSubjectList().size();o++){
+                for (int p=0;p<xxpDutyVO.getSysUserList().size();p++){
+                    //数据封装
+                    xxpDutyVO.setUserName(xxpDutyVO.getSysUserList().get(p).getNickName())
+                            .setUserPhone(xxpDutyVO.getSysUserList().get(p).getPhonenumber())
+                            .setUserImg(xxpDutyVO.getSysUserList().get(p).getAvatar())
+                            .setUserType(xxpDutyVO.getSysUserList().get(p).getUserType())
+                            .setSubjectId(xxpDutyVO.getSubjectList().get(o).getId())
+                            .setSubjectName(xxpDutyVO.getSubjectList().get(o).getName())
+                            .setDutyTime(DateUtils.dateTime(DateUtils.YYYY_MM_DD,xxpDutyVO.getDateList().get(i)))
+                            .setCreateById(sysUser.getUserId()).setCreateBy(sysUser.getNickName());
+                    xxpDutyVO.setUserId(xxpDutyVO.getSysUserList().get(p).getUserId());
+                    xxpDutyVO.setCreateTime(new Date());
+                    xxpDutyVO.setDeptId(sysUser.getDept().getDeptId());
+                    xxpDutyVO.setDeptName(sysUser.getDept().getDeptName());
+                    xxpDutyMapper.insertXxpDuty(xxpDutyVO);
+                }
+            }
+        }
+        return 1;
+    }
+
+    /**
+     * 修改值班
+     *
+     * @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);
+    }
+
+    /***
+     * 根据时间段查询有数据的时间列表
+     * @param xxpDuty
+     * @return
+     */
+    @Override
+    public List<XxpDutyVO> selectDutyYmdById(XxpDuty xxpDuty) {
+        if(StringUtils.isNull(xxpDuty.getBeginTime()) || StringUtils.isNull(xxpDuty.getEndTime())){
+            throw new ServiceException("必须指定开始时间和结束时间");
+        }
+        return xxpDutyMapper.selectDutyYmdById(xxpDuty);
+    }
+
+    /***
+     * 查询某个具体时间下的实验室和人员总数
+     * @param dutyTime
+     * @return
+     */
+    @Override
+    public XxpDutyVO selectSubAndUserSum(Date dutyTime) {
+        return xxpDutyMapper.selectSubAndUserSum(dutyTime);
+    }
+}

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

@@ -0,0 +1,111 @@
+package com.zd.laboratory.service.impl;
+
+import com.zd.common.core.security.TokenService;
+import com.zd.common.core.utils.StringUtils;
+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) {
+        List<XxpInspection> list = xxpInspectionMapper.selectXxpInspectionList(xxpInspection);
+        String timeStr=null;
+        for (XxpInspection ins:list) {
+            if(StringUtils.isNotEmpty(ins.getResidenceTime())){
+                String[] time =  ins.getResidenceTime().split(":");
+                for (int i=0; i<time.length;i++){
+                    timeStr=time[0]+"时";
+                    timeStr+=time[1]+"分";
+                    timeStr+=time[2]+"秒";
+                    ins.setResidenceTime(timeStr);
+                }
+            }
+        }
+        return list;
+    }
+
+    /**
+     * 新增巡查
+     *
+     * @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);
+    }
+}

+ 151 - 0
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/XxpCardInfoMapper.xml

@@ -0,0 +1,151 @@
+<?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="com.zd.laboratory.mapper.XxpCardInfoMapper">
+
+    <resultMap type="com.zd.laboratory.domain.XxpCardInfo" id="XxpCardInfoResult">
+        <result property="id" column="id"/>
+        <result property="cardName" column="card_name"/>
+        <result property="cardNum" column="card_num"/>
+        <result property="college" column="college"/>
+        <result property="collegeId" column="college_id"/>
+        <result property="location" column="location"/>
+        <result property="operate" column="operate"/>
+        <result property="subjectId" column="subject_id"/>
+        <result property="subjectName" column="subject_name"/>
+        <result property="deptId" column="dept_id"/>
+        <result property="deptName" column="dept_name"/>
+        <result property="isStart" column="is_start"/>
+        <result property="userId" column="user_id"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+    <sql id="selectXxpCardInfo">
+        select id,
+               card_name,
+               card_num,
+               college,
+               college_id
+               location,
+               operate,
+               subject_id,
+               subject_name,
+               dept_id,
+               dept_name,
+               is_start,
+               user_id,
+               create_by,
+               create_time,
+               update_by,
+               update_time
+        from xxp_card_info t
+    </sql>
+
+    <select id="selectXxpCardInfoList" parameterType="com.zd.laboratory.domain.XxpCardInfo"
+            resultMap="XxpCardInfoResult">
+        <include refid="selectXxpCardInfo"/>
+        <where>
+            <if test="cardName != null and cardName != null">and t.card_name = #{cardName}</if>
+            <if test="cardNum != null and cardNum != ''">and t.card_num = #{cardNum}</if>
+            <if test="college != null and college != null">and t.college = #{college}</if>
+            <if test="collegeId != null">and t.college_id = #{collegeId}</if>
+            <if test="location != null and location != '' ">and t.location = #{location}</if>
+            <if test="operate != null ">and t.operate = #{operate}</if>
+            <if test="subjectId != null ">and t.subject_id = #{subjectId}</if>
+            <if test="subjectName != null ">and t.subject_name = #{subjectName}</if>
+            <if test="deptId != null ">and t.dept_id = #{deptId}</if>
+            <if test="deptName != null ">and t.dept_name = #{deptName}</if>
+            <if test="isStart != null ">and t.is_start = #{isStart}</if>
+            <if test="userId != null ">and t.user_id = #{userId}</if>
+            <if test="createBy != null ">and t.create_by = #{createBy}</if>
+            <if test="createTime != null ">and t.create_time = #{createTime}</if>
+            <if test="updateBy != null ">and t.update_by = #{updateBy}</if>
+            <if test="updateTime != null">and t.update_time =#{updateTime}</if>
+        </where>
+    </select>
+
+    <select id="selectXxpCardInfoById" resultMap="XxpCardInfoResult">
+        <include refid="selectXxpCardInfo"/>
+        where t.id = #{id}
+    </select>
+
+    <insert id="insertXxpCardInfo" parameterType="com.zd.laboratory.domain.XxpCardInfo">
+        insert into xxp_card_info
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="cardName != null">card_name,</if>
+            <if test="cardNum != null">card_num,</if>
+            <if test="college != null">college,</if>
+            <if test="collegeId != null">college_id,</if>
+            <if test="location != null">location,</if>
+            <if test="operate != null">operate,</if>
+            <if test="subjectId != null">subject_id,</if>
+            <if test="subjectName != null">subject_name,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="deptName != null">dept_name,</if>
+            <if test="isStart != null">is_start,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="cardName != null">#{cardName},</if>
+            <if test="cardNum != null">#{cardNum},</if>
+            <if test="college != null">#{college},</if>
+            <if test="collegeId != null">#{collegeId},</if>
+            <if test="location != null">#{location},</if>
+            <if test="operate != null">#{operate},</if>
+            <if test="subjectId != null">#{subjectId},</if>
+            <if test="subjectName != null">#{subjectName},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="deptName != null">#{deptName},</if>
+            <if test="isStart != null">#{isStart},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateXxpCardInfo" parameterType="com.zd.laboratory.domain.XxpCardInfo">
+        update xxp_card_info
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="cardNum != null">card_name = #{cardNum},</if>
+            <if test="cardNum != null">card_num = #{cardNum},</if>
+            <if test="college != null">college = #{college},</if>
+            <if test="collegeId != null">college_id = #{collegeId},</if>
+            <if test="location != null">location = #{location},</if>
+            <if test="operate != null">operate = #{operate},</if>
+            <if test="subjectId != null">subject_id = #{subjectId},</if>
+            <if test="subjectName != null">subject_name = #{subjectName},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="deptName != null">dept_name = #{deptName},</if>
+            <if test="isStart != null">is_start = #{isStart},</if>
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteXxpCardInfoById">
+        delete
+        from xxp_card_info
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteXxpCardInfoByIds">
+        delete from xxp_card_info where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 132 - 0
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/XxpClassifyDetailMapper.xml

@@ -0,0 +1,132 @@
+<?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="com.zd.laboratory.mapper.XxpClassifyDetailedMapper">
+
+    <resultMap type="com.zd.laboratory.domain.XxpClassifyDetail" id="XxpClassifyDetailedResult">
+        <result property="id" column="id"/>
+        <result property="infoClassifyId" column="info_classify_id"/>
+        <result property="infoName" column="info_name"/>
+        <result property="infoType" column="info_type"/>
+        <result property="infoContent" column="info_content"/>
+        <result property="sort" column="sort"/>
+        <result property="userId" column="user_id"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+    <sql id="selectXxpClassifyDetailed">
+        select id,
+               info_classify_id,
+               info_name,
+               info_type,
+               info_content,
+               sort,
+               user_id,
+               create_by,
+               create_time,
+               update_by,
+               update_time
+        from xxp_classify_detail t
+    </sql>
+
+    <select id="selectXxpClassifyDetailedList" parameterType="com.zd.laboratory.domain.XxpClassifyDetail"
+            resultMap="XxpClassifyDetailedResult">
+        <include refid="selectXxpClassifyDetailed"/>
+        <where>
+            <if test="infoClassifyId != null ">and t.info_classify_id = #{infoClassifyId}</if>
+            <if test="infoName != null  and infoName != ''">and t.info_name = #{infoName}</if>
+            <if test="infoType != null ">and t.info_type = #{infoType}</if>
+            <if test="infoContent != null ">and t.info_content = #{infoContent}</if>
+            <if test="sort != null ">and t.sort = #{sort}</if>
+            <if test="userId != null ">and t.user_id = #{userId}</if>
+            <if test="createBy != null ">and t.create_by = #{createBy}</if>
+            <if test="searchValue != null and searchValue != ''">
+                and
+                (t.classify_name like concat('%', #{classifyName}, '%') )
+            </if>
+            <if test="beginTime != null ">
+                and t.create_time &gt;= str_to_date(#{beginTime}, '%Y-%m-%d')
+            </if>
+            <if test="endTime != null ">
+                and t.create_time &lt;= str_to_date(#{endTime}, '%Y-%m-%d')
+            </if>
+        </where>
+    </select>
+
+    <select id="selectXxpClassifyDetailedById" resultMap="XxpClassifyDetailedResult">
+        <include refid="selectXxpClassifyDetailed"/>
+        where t.id = #{id}
+    </select>
+
+    <insert id="insertXxpClassifyDetailed" parameterType="com.zd.laboratory.domain.XxpClassifyDetail">
+        insert into xxp_classify_detail
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+
+            <if test="infoClassifyId != null">info_classify_id,</if>
+
+            <if test="infoName != null">info_name,</if>
+
+            <if test="infoType != null">info_type,</if>
+
+            <if test="infoContent != null">info_content,</if>
+
+            <if test="sort != null">sort,</if>
+
+            <if test="userId != null">user_id,</if>
+
+            <if test="createBy != null">create_by,</if>
+
+            <if test="createTime != null">create_time,</if>
+
+            <if test="updateBy != null">update_by,</if>
+
+            <if test="updateTime != null">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="infoClassifyId != null">#{infoClassifyId},</if>
+            <if test="infoName != null">#{infoName},</if>
+            <if test="infoType != null">#{infoType},</if>
+            <if test="infoContent != null">#{infoContent},</if>
+            <if test="sort != null">#{sort},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateXxpClassifyDetailed" parameterType="com.zd.laboratory.domain.XxpClassifyDetail">
+        update xxp_classify_detail
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="infoClassifyId != null">info_classify_id = #{infoClassifyId},</if>
+            <if test="infoName != null">info_name = #{infoName},</if>
+            <if test="infoType != null">info_type = #{infoType},</if>
+            <if test="infoContent != null">info_content = #{infoContent},</if>
+            <if test="sort != null">sort = #{sort},</if>
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteXxpClassifyDetailedById">
+        delete
+        from xxp_classify_detail
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteXxpClassifyDetailedByIds">
+        delete from xxp_classify_detail where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 138 - 0
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/XxpClassifyMapper.xml

@@ -0,0 +1,138 @@
+<?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="com.zd.laboratory.mapper.XxpClassifyMapper">
+
+    <resultMap type="com.zd.laboratory.domain.XxpClassify" id="XxpClassifyResult">
+        <result property="id" column="id"/>
+        <result property="classifyName" column="classify_name"/>
+        <result property="classifyType" column="classify_type"/>
+        <result property="sort" column="sort"/>
+        <result property="isSpecial" column="is_special"/>
+        <result property="isShow" column="is_show"/>
+        <result property="showColour" column="show_colour"/>
+        <result property="userId" column="user_id"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+    <sql id="selectXxpClassify">
+        select id,
+               classify_name,
+               classify_type,
+               sort,
+               is_special,
+               is_show,
+               show_colour,
+               user_id,
+               create_by,
+               create_time,
+               update_by,
+               update_time
+        from xxp_classify t
+    </sql>
+
+    <select id="selectXxpClassifyList" parameterType="com.zd.laboratory.domain.XxpClassify"
+            resultMap="XxpClassifyResult">
+        <include refid="selectXxpClassify"/>
+        <where>
+            <if test="classifyName != null and classifyName != ''">and t.classify_name = #{classifyName}</if>
+            <if test="classifyType != null  ">and t.classify_type = #{classifyType}</if>
+            <if test="isSpecial != null ">and t.is_special = #{isSpecial}</if>
+            <if test="isShow != null ">and t.is_show = #{isShow}</if>
+            <if test="showColour != null  and showColour != ''">and t.show_colour =#{showColour}</if>
+            <if test="userId != null ">and t.user_id = #{userId}</if>
+            <if test="createBy != null ">and t.create_by = #{createBy}</if>
+            <if test="searchValue != null and searchValue != ''">
+                and
+                (t.classify_name like concat('%', #{classifyName}, '%') )
+            </if>
+            <if test="beginTime != null ">
+                and t.create_time &gt;= str_to_date(#{beginTime}, '%Y-%m-%d')
+            </if>
+            <if test="endTime != null ">
+                and t.create_time &lt;= str_to_date(#{endTime}, '%Y-%m-%d')
+            </if>
+        </where>
+    </select>
+
+    <select id="selectXxpClassifyById" resultMap="XxpClassifyResult">
+        <include refid="selectXxpClassify"/>
+        where t.id = #{id}
+    </select>
+
+    <insert id="insertXxpClassify" parameterType="com.zd.laboratory.domain.XxpClassify">
+        insert into xxp_classify
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+
+            <if test="classifyName != null">classify_name,</if>
+
+            <if test="classifyType != null">classify_type,</if>
+
+            <if test="sort != null">sort,</if>
+
+            <if test="isSpecial != null">is_special,</if>
+
+            <if test="isShow != null">is_show,</if>
+
+            <if test="showColour != null">show_colour,</if>
+
+            <if test="userId != null">user_id,</if>
+
+            <if test="createBy != null">create_by,</if>
+
+            <if test="createTime != null">create_time,</if>
+
+            <if test="updateBy != null">update_by,</if>
+
+            <if test="updateTime != null">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="classifyName != null">#{classifyName},</if>
+            <if test="classifyType != null">#{classifyType},</if>
+            <if test="sort != null">#{sort},</if>
+            <if test="isSpecial != null">#{isSpecial},</if>
+            <if test="isShow != null">#{isShow},</if>
+            <if test="showColour != null">#{showColour},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateXxpClassify" parameterType="com.zd.laboratory.domain.XxpClassify">
+        update xxp_classify
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="classifyName != null">classify_name = #{classifyName},</if>
+            <if test="classifyType != null">classify_type = #{classifyType},</if>
+            <if test="sort != null">sort = #{sort},</if>
+            <if test="isSpecial != null">is_special = #{isSpecial},</if>
+            <if test="isShow != null">is_show = #{isShow},</if>
+            <if test="showColour != null">show_colour = #{showColour},</if>
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteXxpClassifyById">
+        delete
+        from xxp_classify
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteXxpClassifyByIds">
+        delete from xxp_classify where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 171 - 0
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/XxpDutyMapper.xml

@@ -0,0 +1,171 @@
+<?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="com.zd.laboratory.mapper.XxpDutyMapper">
+
+    <resultMap type="com.zd.laboratory.domain.XxpDuty" id="XxpDutyResult">
+        <result property="id" column="id"/>
+        <result property="userId" column="user_id"/>
+        <result property="userName" column="user_name"/>
+        <result property="userPhone" column="user_phone"/>
+        <result property="userImg" column="user_img"/>
+        <result property="userType" column="user_type"/>
+        <result property="subjectId" column="subject_id"/>
+        <result property="subjectName" column="subject_name"/>
+        <result property="deptId" column="dept_id"/>
+        <result property="deptName" column="dept_name"/>
+        <result property="college" column="college"/>
+        <result property="dutyTime" column="duty_time"/>
+        <result property="createById" column="create_by_id"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+    </resultMap>
+
+    <sql id="selectXxpDuty">
+        select id,
+               user_id,
+               user_name,
+               user_phone,
+               user_img,
+               user_type,
+               subject_id,
+               subject_name,
+               dept_id,
+               dept_name,
+               college,
+               duty_time,
+               create_by_id,
+               create_by,
+               create_time
+        from xxp_duty t
+    </sql>
+
+    <select id="selectXxpDutyList" parameterType="com.zd.laboratory.domain.XxpDuty"
+            resultMap="XxpDutyResult">
+        <include refid="selectXxpDuty"/>
+        <where>
+            <if test="userId != null ">and t.user_id = #{userId}</if>
+            <if test="userName != null and userName != ''">and t.user_name = #{userName}</if>
+            <if test="userPhone != null ">and t.user_phone = #{userPhone}</if>
+            <if test="userImg != null ">and t.user_img = #{userImg}</if>
+            <if test="userType != null ">and t.user_type = #{userType}</if>
+            <if test="subjectId != null ">and t.subject_id = #{subjectId}</if>
+            <if test="subjectName != null and subjectName != '' ">and t.subject_name = #{subjectName}</if>
+            <if test="deptId != null ">and t.dept_id = #{deptId}</if>
+            <if test="deptName != null ">and t.dept_name = #{deptName}</if>
+            <if test="college != null ">and t.college = #{college}</if>
+            <if test="dutyTime != null  ">and t.duty_time =#{dutyTime}</if>
+            <if test="createById != null  ">and t.create_by_id =#{createById}</if>
+            <if test="createBy != null  ">and t.create_by =#{createBy}</if>
+            <if test="beginTime != null ">
+                and t.duty_time &gt;= str_to_date(#{beginTime}, '%Y-%m-%d')
+            </if>
+            <if test="endTime != null ">
+                and t.duty_time &lt;= str_to_date(#{endTime}, '%Y-%m-%d')
+            </if>
+        </where>
+    </select>
+
+    <select id="selectXxpDutyById" resultMap="XxpDutyResult">
+        <include refid="selectXxpDuty"/>
+        where t.id = #{id}
+    </select>
+
+    <insert id="insertXxpDuty" parameterType="com.zd.laboratory.domain.XxpDuty">
+        insert into xxp_duty
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="userId != null">user_id,</if>
+            <if test="userName != null">user_name,</if>
+            <if test="userPhone != null">user_phone,</if>
+            <if test="userImg != null">user_img,</if>
+            <if test="userType != null">user_type,</if>
+            <if test="subjectId != null">subject_id,</if>
+            <if test="subjectName != null">subject_name,</if>
+            <if test="deptId != null">dept_id,</if>
+            <if test="deptName != null">dept_name,</if>
+            <if test="college != null">college,</if>
+            <if test="dutyTime != null">duty_time,</if>
+            <if test="createById != null">create_by_id,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="userId != null">#{userId},</if>
+            <if test="userName != null">#{userName},</if>
+            <if test="userPhone != null">#{userPhone},</if>
+            <if test="userImg != null">#{userImg},</if>
+            <if test="userType != null">#{userType},</if>
+            <if test="subjectId != null">#{subjectId},</if>
+            <if test="subjectName != null">#{subjectName},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="deptName != null">#{deptName},</if>
+            <if test="college != null">#{college},</if>
+            <if test="dutyTime != null">#{dutyTime},</if>
+            <if test="createById != null">#{createById},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateXxpDuty" parameterType="com.zd.laboratory.domain.XxpDuty">
+        update xxp_duty
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="userName != null">user_name = #{userName},</if>
+            <if test="userPhone != null">user_phone = #{userPhone},</if>
+            <if test="userImg != null">user_img = #{userImg},</if>
+            <if test="userType != null">user_type = #{userType},</if>
+            <if test="subjectId != null">subject_id = #{subjectId},</if>
+            <if test="subjectName != null">subject_name = #{subjectName},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="deptName != null">dept_name = #{deptName},</if>
+            <if test="college != null">college = #{college},</if>
+            <if test="dutyTime != null">duty_time = #{dutyTime},</if>
+            <if test="createById != null">create_by_id = #{createById},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteXxpDutyById">
+        delete
+        from xxp_duty
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteXxpDutyByIds">
+        delete from xxp_duty where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+
+    <select id="selectDutyYmdById" parameterType="com.zd.laboratory.domain.XxpDuty" resultType="com.zd.laboratory.domain.vo.XxpDutyVO">
+        select t1.duty_time
+        from (
+                 select t.duty_time
+                 from xxp_duty t
+                 where t.duty_time &gt;= str_to_date(#{beginTime}, '%Y-%m-%d')
+                   and t.duty_time &lt;= str_to_date(#{endTime}, '%Y-%m-%d')
+                 GROUP BY t.duty_time
+             ) t1
+    </select>
+
+    <select id="selectSubAndUserSum" resultType="com.zd.laboratory.domain.vo.XxpDutyVO" parameterType="java.util.Date">
+        select sum(subSum) subSum, sum(userSum) userSum
+        from (
+                 select count(1) subSum, 0 userSum
+                 from (
+                          select count(1) from xxp_duty d where d.duty_time = #{dutyTime} GROUP BY d.subject_id
+                      ) s
+                 UNION ALL
+                 select 0 subSum, count(1) userSum
+                 from (
+                          select count(1) from xxp_duty d where d.duty_time = #{dutyTime} GROUP BY d.user_id
+                      ) u
+             ) t
+    </select>
+
+</mapper>

+ 132 - 0
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/XxpInspectionMapper.xml

@@ -0,0 +1,132 @@
+<?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="com.zd.laboratory.mapper.XxpInspectionMapper">
+
+    <resultMap type="com.zd.laboratory.domain.XxpInspection" id="XxpInspectionResult">
+        <result property="id" column="id"/>
+        <result property="userId" column="user_id"/>
+        <result property="userName" column="user_name"/>
+        <result property="subjectId" column="subject_id"/>
+        <result property="subjectName" column="subject_name"/>
+        <result property="signIn" column="sign_in"/>
+        <result property="signOut" column="sign_out"/>
+        <result property="deptId" column="dept_id"/>
+        <result property="deptName" column="dept_name"/>
+        <result property="residenceTime" column="residence_time"/>
+        <result property="createTime" column="create_time"/>
+    </resultMap>
+
+    <sql id="selectXxpInspection">
+        select id,
+               user_id,
+               user_name,
+               subject_id,
+               subject_name,
+               sign_in,
+               sign_out,
+               dept_id,
+               dept_name,
+               timediff(sign_out,sign_in) residence_time,
+               create_time
+        from xxp_inspection t
+    </sql>
+
+    <select id="selectXxpInspectionList" parameterType="com.zd.laboratory.domain.XxpInspection"
+            resultMap="XxpInspectionResult">
+        <include refid="selectXxpInspection"/>
+        <where>
+            <if test="userId != null ">and t.user_id = #{userId}</if>
+            <if test="userName != null and userName != ''">and t.user_name = #{userName}</if>
+            <if test="subjectId != null ">and t.subject_id = #{subjectId}</if>
+            <if test="subjectName != null and subjectName != '' ">and t.subject_name = #{subjectName}</if>
+            <if test="signIn != null ">and t.sign_in = #{signIn}</if>
+            <if test="signOut != null ">and t.sign_out = #{signOut}</if>
+            <if test="deptId != null ">and t.dept_id = #{deptId}</if>
+            <if test="deptName != null ">and t.dept_name = #{deptName}</if>
+            <if test="residenceTime != null  and residenceTime != ''">and t.residence_time =#{residenceTime}</if>
+
+            <if test="beginTime != null ">
+                and t.residence_time &gt;= str_to_date(#{beginTime}, '%Y-%m-%d')
+            </if>
+            <if test="endTime != null ">
+                and t.residence_time &lt;= str_to_date(#{endTime}, '%Y-%m-%d')
+            </if>
+        </where>
+    </select>
+
+    <select id="selectXxpInspectionById" resultMap="XxpInspectionResult">
+        <include refid="selectXxpInspection"/>
+        where t.id = #{id}
+    </select>
+
+    <insert id="insertXxpInspection" parameterType="com.zd.laboratory.domain.XxpInspection">
+        insert into xxp_inspection
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+
+            <if test="userId != null">user_id,</if>
+
+            <if test="userName != null">user_name,</if>
+
+            <if test="subjectId != null">subject_id,</if>
+
+            <if test="subjectName != null">subject_name,</if>
+
+            <if test="signIn != null">sign_in,</if>
+
+            <if test="signOut != null">sign_out,</if>
+
+            <if test="deptId != null">dept_id,</if>
+
+            <if test="deptName != null">dept_name,</if>
+
+            <if test="residenceTime != null">residence_time,</if>
+
+            <if test="createTime != null">create_time,</if>
+
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="userId != null">#{userId},</if>
+            <if test="userName != null">#{userName},</if>
+            <if test="subjectId != null">#{subjectId},</if>
+            <if test="subjectName != null">#{subjectName},</if>
+            <if test="signIn != null">#{signIn},</if>
+            <if test="signOut != null">#{signOut},</if>
+            <if test="deptId != null">#{deptId},</if>
+            <if test="deptName != null">#{deptName},</if>
+            <if test="residenceTime != null">#{residenceTime},</if>
+            <if test="createTime != null">#{createTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateXxpInspection" parameterType="com.zd.laboratory.domain.XxpInspection">
+        update xxp_inspection
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="userName != null">user_name = #{userName},</if>
+            <if test="subjectId != null">subject_id = #{subjectId},</if>
+            <if test="subjectName != null">subject_name = #{subjectName},</if>
+            <if test="signIn != null">sign_in = #{signIn},</if>
+            <if test="signOut != null">sign_out = #{signOut},</if>
+            <if test="deptId != null">dept_id = #{deptId},</if>
+            <if test="deptName != null">dept_name = #{deptName},</if>
+            <if test="residenceTime != null">residence_time = #{residenceTime},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteXxpInspectionById">
+        delete
+        from xxp_inspection
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteXxpInspectionByIds">
+        delete from xxp_inspection where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>