瀏覽代碼

Merge remote-tracking branch 'origin/dev' into dev

donggaosheng 2 年之前
父節點
當前提交
2fa1c7208f
共有 31 個文件被更改,包括 308 次插入26 次删除
  1. 1 1
      ArcFace64.dat
  2. 14 0
      zd-api/zd-laboratory-api/src/main/java/com/zd/laboratory/api/entity/LabSubjectControllerVO.java
  3. 6 3
      zd-modules/zd-algorithm/src/main/java/com/zd/alg/rfid/mapper/HardwareRfidMapper.java
  4. 9 4
      zd-modules/zd-algorithm/src/main/java/com/zd/alg/rfid/service/impl/HardwareRfidServiceImpl.java
  5. 13 0
      zd-modules/zd-algorithm/src/main/resources/mapper/rfid/HardwareRfidMapper.xml
  6. 23 3
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabPhotoInspectionController.java
  7. 20 1
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabSecuritySubjectmaterialController.java
  8. 5 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabSubjectController.java
  9. 1 1
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabXxpCardInfoController.java
  10. 1 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabXxpClassifyDetailedController.java
  11. 13 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/domain/LabSubject.java
  12. 12 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/domain/XxpCardInfo.java
  13. 11 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/domain/vo/LabOnlineSubVO.java
  14. 12 2
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/domain/vo/LabSecurityMaterialDataVO.java
  15. 12 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/domain/vo/LabSecuritySubjectmaterialVO.java
  16. 7 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/mapper/LabSubjectMapper.java
  17. 7 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/ILabSubjectService.java
  18. 17 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabSecuritySubjectmaterialServiceImpl.java
  19. 11 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabSubjectServiceImpl.java
  20. 3 0
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabTimedExhaustServiceImpl.java
  21. 7 2
      zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/XxpCardInfoServiceImpl.java
  22. 2 1
      zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/LabBigViewMapper.xml
  23. 1 2
      zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/LabControlMapper.xml
  24. 7 0
      zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/LabSecurityApplyMapper.xml
  25. 65 2
      zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/LabSubjectMapper.xml
  26. 3 0
      zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/LabTimedExhaustMapper.xml
  27. 0 1
      zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/LabViolationMapper.xml
  28. 22 1
      zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/XxpCardInfoMapper.xml
  29. 1 0
      zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/XxpClassifyDetailMapper.xml
  30. 1 1
      zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/XxpClassifyMapper.xml
  31. 1 1
      zd-modules/zd-modules-system/src/main/resources/mapper/system/SysUserMapper.xml

File diff suppressed because it is too large
+ 1 - 1
ArcFace64.dat


+ 14 - 0
zd-api/zd-laboratory-api/src/main/java/com/zd/laboratory/api/entity/LabSubjectControllerVO.java

@@ -69,6 +69,12 @@ public class LabSubjectControllerVO extends LabSubjectEntity {
 
 
     @ApiModelProperty("实验室详情")
     @ApiModelProperty("实验室详情")
     private String details;
     private String details;
+
+    /***
+     * 关联的硬件 1海康 2电子信息牌
+     */
+    private Integer hardwareType;
+
     /**
     /**
      * 实验室类型ID
      * 实验室类型ID
      */
      */
@@ -439,4 +445,12 @@ public class LabSubjectControllerVO extends LabSubjectEntity {
     public void setDetails(String details) {
     public void setDetails(String details) {
         this.details = details;
         this.details = details;
     }
     }
+
+    public Integer getHardwareType() {
+        return hardwareType;
+    }
+
+    public void setHardwareType(Integer hardwareType) {
+        this.hardwareType = hardwareType;
+    }
 }
 }

+ 6 - 3
zd-modules/zd-algorithm/src/main/java/com/zd/alg/rfid/mapper/HardwareRfidMapper.java

@@ -1,19 +1,22 @@
 package com.zd.alg.rfid.mapper;
 package com.zd.alg.rfid.mapper;
 
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.zd.algorithm.api.rfid.domain.entity.HardwareRfid;
 import com.zd.algorithm.api.rfid.domain.entity.HardwareRfid;
+import com.zd.algorithm.api.rfid.domain.vo.HardwareRfidVo;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
 
 
 import java.util.List;
 import java.util.List;
 
 
 /**
 /**
-  * @创建人 hzw
-  * @描述
-  * @创建时间  2022/11/15
+ * @创建人 hzw
+ * @描述
+ * @创建时间 2022/11/15
  */
  */
 @Mapper
 @Mapper
 public interface HardwareRfidMapper extends BaseMapper<HardwareRfid> {
 public interface HardwareRfidMapper extends BaseMapper<HardwareRfid> {
     int batchInsert(@Param("list") List<HardwareRfid> list);
     int batchInsert(@Param("list") List<HardwareRfid> list);
 
 
+    Page<HardwareRfid> selectRfidInfo(@Param("page") Page<HardwareRfid> page, @Param("hardwareRfidVo") HardwareRfidVo hardwareRfidVo);
 }
 }

+ 9 - 4
zd-modules/zd-algorithm/src/main/java/com/zd/alg/rfid/service/impl/HardwareRfidServiceImpl.java

@@ -84,14 +84,19 @@ public class HardwareRfidServiceImpl extends ServiceImpl<HardwareRfidMapper, Har
 
 
     @Override
     @Override
     public Page<HardwareRfid> search(Page<HardwareRfid> page, HardwareRfidVo hardwareRfidVo) {
     public Page<HardwareRfid> search(Page<HardwareRfid> page, HardwareRfidVo hardwareRfidVo) {
+        Page<HardwareRfid> hardwareRfidPage;
         if (StringUtils.isNotBlank(hardwareRfidVo.getSearchValue())) {
         if (StringUtils.isNotBlank(hardwareRfidVo.getSearchValue())) {
-            return baseMapper.selectPage(page, new LambdaQueryWrapper<HardwareRfid>().like(HardwareRfid::getHardwareNum, hardwareRfidVo.getSearchValue()).or().like(HardwareRfid::getDeptName, hardwareRfidVo.getSearchValue()).orderByDesc(HardwareRfid::getCreateTime));
+            hardwareRfidPage = baseMapper.selectRfidInfo(page, hardwareRfidVo);
+        } else {
+            HardwareRfid hardwareRfid = new HardwareRfid();
+            BeanUtils.copyProperties(hardwareRfidVo, hardwareRfid);
+            hardwareRfidPage = baseMapper.selectPage(page, new LambdaQueryWrapper<HardwareRfid>().setEntity(hardwareRfid).orderByDesc(HardwareRfid::getCreateTime));
         }
         }
-        HardwareRfid hardwareRfid = new HardwareRfid();
-        BeanUtils.copyProperties(hardwareRfidVo, hardwareRfid);
-        Page<HardwareRfid> hardwareRfidPage = baseMapper.selectPage(page, new LambdaQueryWrapper<HardwareRfid>().setEntity(hardwareRfid).orderByDesc(HardwareRfid::getCreateTime));
         List<HardwareRfid> records = hardwareRfidPage.getRecords();
         List<HardwareRfid> records = hardwareRfidPage.getRecords();
         try {
         try {
+            if (records.size() == 0) {
+                return hardwareRfidPage;
+            }
             StringBuffer sb = new StringBuffer();
             StringBuffer sb = new StringBuffer();
             for (HardwareRfid record : records) {
             for (HardwareRfid record : records) {
                 if (sb.indexOf(String.valueOf(record.getSubjectId())) < 0) {
                 if (sb.indexOf(String.valueOf(record.getSubjectId())) < 0) {

+ 13 - 0
zd-modules/zd-algorithm/src/main/resources/mapper/rfid/HardwareRfidMapper.xml

@@ -53,4 +53,17 @@
              #{item.updateTime,jdbcType=TIMESTAMP}, #{item.remark,jdbcType=VARCHAR})
              #{item.updateTime,jdbcType=TIMESTAMP}, #{item.remark,jdbcType=VARCHAR})
         </foreach>
         </foreach>
     </insert>
     </insert>
+
+    <select id="selectRfidInfo" resultType="com.zd.algorithm.api.rfid.domain.entity.HardwareRfid">
+        SELECT rfid.*
+        FROM `hardware_rfid` rfid
+        LEFT JOIN lab_subject ls ON rfid.subject_id = ls.id
+        <where>
+            <if test="hardwareRfidVo.searchValue != null">
+                rfid.hardware_num LIKE CONCAT('%',#{hardwareRfidVo.searchValue},'%') or
+                ls.`name` LIKE CONCAT('%',#{hardwareRfidVo.searchValue},'%')
+            </if>
+        </where>
+        ORDER BY rfid.create_time DESC
+    </select>
 </mapper>
 </mapper>

+ 23 - 3
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabPhotoInspectionController.java

@@ -3,9 +3,7 @@ package com.zd.laboratory.controller;
 import com.zd.common.core.annotation.Log;
 import com.zd.common.core.annotation.Log;
 import com.zd.common.core.annotation.PreAuthorize;
 import com.zd.common.core.annotation.PreAuthorize;
 import com.zd.common.core.log.BusinessType;
 import com.zd.common.core.log.BusinessType;
-import com.zd.common.core.utils.DictUtils;
-import com.zd.common.core.utils.ExcelUtil;
-import com.zd.common.core.utils.SecurityUtils;
+import com.zd.common.core.utils.*;
 import com.zd.common.core.web.controller.BaseController;
 import com.zd.common.core.web.controller.BaseController;
 import com.zd.laboratory.domain.LabPhotoInspection;
 import com.zd.laboratory.domain.LabPhotoInspection;
 import com.zd.laboratory.domain.LabSubject;
 import com.zd.laboratory.domain.LabSubject;
@@ -46,6 +44,9 @@ public class LabPhotoInspectionController extends BaseController {
     @Autowired
     @Autowired
     private ILabSubjectService subjectService;
     private ILabSubjectService subjectService;
 
 
+    @Autowired
+    private FileConfigUtils fileConfigUtils;
+
     /**
     /**
      * 查询拍照检查附件列表
      * 查询拍照检查附件列表
      */
      */
@@ -110,7 +111,26 @@ public class LabPhotoInspectionController extends BaseController {
         return ResultData.success(labPhotoInspectionService.selectLabPhotoInspectionById(id));
         return ResultData.success(labPhotoInspectionService.selectLabPhotoInspectionById(id));
     }
     }
 
 
+    @GetMapping(value = "/detial/{id}")
+    public TableDataInfo getDetail(@PathVariable("id") Long id) {
+        LabPhotoInspection photoInspection = labPhotoInspectionService.selectLabPhotoInspectionById(id);
+        List<Map<String,String>> allList = new ArrayList <>();
+        imgList(allList,photoInspection.getSubUrl(),"实验室照片");
+        imgList(allList,photoInspection.getGarbageUrl(),"垃圾桶清理后照片");
+        imgList(allList,photoInspection.getDangerousUrl(),"使用危险设备照片");
+        imgList(allList,photoInspection.getSourceRiskUrl(),"危险源设备使用登记本照片");
+        return getDataTable(allList);
+    }
+
 
 
+    public void imgList(List<Map<String,String>> allList,String imgUrl,String imgName){
+        if(StringUtils.isNotNull(imgUrl) && !"".equals(imgUrl)){
+            Map<String,String> imgMap = new HashMap <>();
+            imgMap.put("imgName", imgName);
+            imgMap.put("imgUrl", fileConfigUtils.getFileDomainAdmin()+imgUrl);
+            allList.add(imgMap);
+        }
+    }
 
 
     /**
     /**
      * 获取离开实验室拍照附件列表
      * 获取离开实验室拍照附件列表

+ 20 - 1
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabSecuritySubjectmaterialController.java

@@ -4,6 +4,9 @@ import java.util.*;
 import java.io.IOException;
 import java.io.IOException;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
 
 
+import com.zd.common.core.utils.StringUtils;
+import com.zd.laboratory.domain.XxpCardInfo;
+import com.zd.laboratory.service.IXxpCardInfoService;
 import com.zd.model.domain.per.PerFun;
 import com.zd.model.domain.per.PerFun;
 import com.zd.model.domain.per.PerPrefix;
 import com.zd.model.domain.per.PerPrefix;
 import com.zd.model.domain.ResultData;
 import com.zd.model.domain.ResultData;
@@ -54,6 +57,9 @@ public class LabSecuritySubjectmaterialController extends BaseController
     private ILabSecurityMaterialDataService labSecurityMaterialDataService;
     private ILabSecurityMaterialDataService labSecurityMaterialDataService;
 
 
     @Autowired
     @Autowired
+    private IXxpCardInfoService xxpCardInfoService;
+
+    @Autowired
     private TokenService tokenService;
     private TokenService tokenService;
 
 
     /**
     /**
@@ -147,17 +153,30 @@ public class LabSecuritySubjectmaterialController extends BaseController
      * @return
      * @return
      */
      */
     @GetMapping("/listData")
     @GetMapping("/listData")
-    public ResultData  listData() {
+    public ResultData  listData(LabSecurityMaterialDataVO materialDataVO) {
         Map<String,Object> map = new HashMap<String,Object>();
         Map<String,Object> map = new HashMap<String,Object>();
          List<LabSecurityMaterialDataVO> listTeacher= labSecurityMaterialDataService.selectTemplateTeacherList();
          List<LabSecurityMaterialDataVO> listTeacher= labSecurityMaterialDataService.selectTemplateTeacherList();
          List<LabSecurityMaterialDataVO> listStudent= labSecurityMaterialDataService.selectTemplateStudentList();
          List<LabSecurityMaterialDataVO> listStudent= labSecurityMaterialDataService.selectTemplateStudentList();
 
 
+         //查询实验室下的电子信息牌
+        XxpCardInfo cardInfo = new XxpCardInfo();;
+        if(StringUtils.isNotNull(materialDataVO.getSubjectId())){
+            cardInfo.setSubjectId(materialDataVO.getSubjectId());
+            List<XxpCardInfo> cardInfoList = xxpCardInfoService.selectXxpCardInfoList(cardInfo);
+            if(cardInfoList.size()>0){
+                cardInfo = cardInfoList.get(0);
+            }
+        }
+
+
+
         /* //教职工模板
         /* //教职工模板
         List<LabSecuritySubjectmaterialVO> listTeacher=  labSecuritySubjectmaterialService.selectTeacherList();
         List<LabSecuritySubjectmaterialVO> listTeacher=  labSecuritySubjectmaterialService.selectTeacherList();
         //学生模板
         //学生模板
         List<LabSecuritySubjectmaterialVO> listStudent=  labSecuritySubjectmaterialService.selectStudentList();*/
         List<LabSecuritySubjectmaterialVO> listStudent=  labSecuritySubjectmaterialService.selectStudentList();*/
         map.put("listTeacher",listTeacher);
         map.put("listTeacher",listTeacher);
         map.put("listStudent",listStudent);
         map.put("listStudent",listStudent);
+        map.put("cardInfo",cardInfo);
         return ResultData.success(map);
         return ResultData.success(map);
     }
     }
 
 

+ 5 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/controller/LabSubjectController.java

@@ -402,6 +402,11 @@ public class LabSubjectController extends BaseController {
         return ResultData.success(labSubjectService.multipleDetpBysubList(ids));
         return ResultData.success(labSubjectService.multipleDetpBysubList(ids));
     }
     }
 
 
+    @GetMapping("/cardInfo/subList")
+    public ResultData cardinfoSubList(LabSubject labSubject) {
+        return ResultData.success(labSubjectService.cardinfoSubList(labSubject));
+    }
+
     /**
     /**
      * 获取实验室气瓶数量详细信息
      * 获取实验室气瓶数量详细信息
      */
      */

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

@@ -48,7 +48,7 @@ public class LabXxpCardInfoController extends BaseController
     @ApiOperation(value = "查询电子信息牌列表")
     @ApiOperation(value = "查询电子信息牌列表")
     public TableDataInfo<XxpCardInfo> list(XxpCardInfo xxpCardInfo)
     public TableDataInfo<XxpCardInfo> list(XxpCardInfo xxpCardInfo)
     {
     {
-        startPage();
+        startPage("create_time","descending");
         List<XxpCardInfo> list = xxpCardInfoService.selectXxpCardInfoList(xxpCardInfo);
         List<XxpCardInfo> list = xxpCardInfoService.selectXxpCardInfoList(xxpCardInfo);
         return getDataTable(list);
         return getDataTable(list);
     }
     }

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

@@ -60,6 +60,7 @@ public class LabXxpClassifyDetailedController extends BaseController
     public TableDataInfo<XxpClassifyDetailVO> list(XxpClassifyDetailVO classifyDetailed)
     public TableDataInfo<XxpClassifyDetailVO> list(XxpClassifyDetailVO classifyDetailed)
     {
     {
         startPage();
         startPage();
+        classifyDetailed.setRemark("list");
         List<XxpClassifyDetailVO> list = classifyDetailedService.selectXxpClassifyDetailedList(classifyDetailed);
         List<XxpClassifyDetailVO> list = classifyDetailedService.selectXxpClassifyDetailedList(classifyDetailed);
         return getDataTable(list);
         return getDataTable(list);
     }
     }

+ 13 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/domain/LabSubject.java

@@ -240,6 +240,11 @@ public class LabSubject extends BaseEntity implements QCInterface {
      */
      */
     private String details;
     private String details;
 
 
+    /***
+     * 关联的硬件 1海康 2电子信息牌
+     */
+    private Integer hardwareType;
+
     private List<Long> deptIds;
     private List<Long> deptIds;
 
 
     /**
     /**
@@ -627,4 +632,12 @@ public class LabSubject extends BaseEntity implements QCInterface {
     public void setClassifyList(List<XxpClassify> classifyList) {
     public void setClassifyList(List<XxpClassify> classifyList) {
         this.classifyList = classifyList;
         this.classifyList = classifyList;
     }
     }
+
+    public Integer getHardwareType() {
+        return hardwareType;
+    }
+
+    public void setHardwareType(Integer hardwareType) {
+        this.hardwareType = hardwareType;
+    }
 }
 }

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

@@ -72,6 +72,14 @@ public class XxpCardInfo extends BaseEntity {
     @ApiModelProperty(value = "设备状态")
     @ApiModelProperty(value = "设备状态")
     private Integer operate;
     private Integer operate;
 
 
+    @Excel(name = "授权方式")
+    @ApiModelProperty(value = "授权方式")
+    private Integer authType;
+
+    @Excel(name = "授权密码")
+    @ApiModelProperty(value = "授权密码")
+    private String authPwd;
+
     /**
     /**
      * 实验室id
      * 实验室id
      */
      */
@@ -229,4 +237,8 @@ public class XxpCardInfo extends BaseEntity {
     public void setSubjectId(Long subjectId) {
     public void setSubjectId(Long subjectId) {
         this.subjectId = subjectId;
         this.subjectId = subjectId;
     }
     }
+
+    public Integer getAuthType() {        return authType;    }
+
+    public void setAuthType(Integer authType) {        this.authType = authType;    }
 }
 }

+ 11 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/domain/vo/LabOnlineSubVO.java

@@ -28,6 +28,9 @@ public class LabOnlineSubVO {
     @ApiModelProperty("在线人数")
     @ApiModelProperty("在线人数")
     private Integer online;
     private Integer online;
 
 
+    @ApiModelProperty("根据实验室,合并多用户到一个字段上")
+    private String groupUserName;
+
     public String getName() {
     public String getName() {
         return name;
         return name;
     }
     }
@@ -67,4 +70,12 @@ public class LabOnlineSubVO {
     public void setOnline(Integer online) {
     public void setOnline(Integer online) {
         this.online = online;
         this.online = online;
     }
     }
+
+    public String getGroupUserName() {
+        return groupUserName;
+    }
+
+    public void setGroupUserName(String groupUserName) {
+        this.groupUserName = groupUserName;
+    }
 }
 }

+ 12 - 2
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/domain/vo/LabSecurityMaterialDataVO.java

@@ -19,7 +19,11 @@ import java.util.Map;
  */
  */
 @ApiModel("安全检查模板表")
 @ApiModel("安全检查模板表")
 public class LabSecurityMaterialDataVO extends LabSecurityMaterialData {
 public class LabSecurityMaterialDataVO extends LabSecurityMaterialData {
-    //材料表集合
+
+    List<LabSecurityMaterialrelation>  listMr; //材料表集合
+
+    Long subjectId;//实验室id
+
     public List<LabSecurityMaterialrelation> getListMr() {
     public List<LabSecurityMaterialrelation> getListMr() {
         return listMr;
         return listMr;
     }
     }
@@ -28,5 +32,11 @@ public class LabSecurityMaterialDataVO extends LabSecurityMaterialData {
         this.listMr = listMr;
         this.listMr = listMr;
     }
     }
 
 
-    List<LabSecurityMaterialrelation>  listMr;
+    public Long getSubjectId() {
+        return subjectId;
+    }
+
+    public void setSubjectId(Long subjectId) {
+        this.subjectId = subjectId;
+    }
 }
 }

+ 12 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/domain/vo/LabSecuritySubjectmaterialVO.java

@@ -24,6 +24,10 @@ public class LabSecuritySubjectmaterialVO extends LabSecuritySubjectmaterial {
 
 
     private List<LabSecuritySubjectmaterial> publicList;//通用模板
     private List<LabSecuritySubjectmaterial> publicList;//通用模板
 
 
+    private Integer authType;//授权方式
+
+    private String authPwd;//授权密码
+
     public Long getIscheck() {        return ischeck;    }
     public Long getIscheck() {        return ischeck;    }
 
 
     public void setIscheck(Long ischeck) {        this.ischeck = ischeck;    }
     public void setIscheck(Long ischeck) {        this.ischeck = ischeck;    }
@@ -69,4 +73,12 @@ public class LabSecuritySubjectmaterialVO extends LabSecuritySubjectmaterial {
     public void setPublicList(List<LabSecuritySubjectmaterial> publicList) {
     public void setPublicList(List<LabSecuritySubjectmaterial> publicList) {
         this.publicList = publicList;
         this.publicList = publicList;
     }
     }
+
+    public Integer getAuthType() {        return authType;    }
+
+    public void setAuthType(Integer authType) {        this.authType = authType;    }
+
+    public String getAuthPwd() {        return authPwd;    }
+
+    public void setAuthPwd(String authPwd) {        this.authPwd = authPwd;    }
 }
 }

+ 7 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/mapper/LabSubjectMapper.java

@@ -272,6 +272,13 @@ public interface LabSubjectMapper {
      */
      */
     public List<LabSubject> multipleDetpBysubList(Long[] ids);
     public List<LabSubject> multipleDetpBysubList(Long[] ids);
 
 
+    /***
+     * 实验室列表查询-信息牌使用
+     * @param labSubject
+     * @return
+     */
+    public List<LabSubject> cardinfoSubList(LabSubject labSubject);
+
     List<LabSubject> getByIds(List<Long> ids);
     List<LabSubject> getByIds(List<Long> ids);
 
 
 
 

+ 7 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/ILabSubjectService.java

@@ -290,4 +290,11 @@ public interface ILabSubjectService {
      * @return
      * @return
      */
      */
     String getSubjectNameById(Long id);
     String getSubjectNameById(Long id);
+
+    /***
+     * 实验室列表查询-信息牌使用
+     * @param labSubject
+     * @return
+     */
+    public List<LabSubject> cardinfoSubList(LabSubject labSubject);
 }
 }

+ 17 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabSecuritySubjectmaterialServiceImpl.java

@@ -7,7 +7,9 @@ import com.zd.common.core.security.TokenService;
 import com.zd.common.core.utils.SaveUtil;
 import com.zd.common.core.utils.SaveUtil;
 
 
 import com.zd.laboratory.domain.LabSubject;
 import com.zd.laboratory.domain.LabSubject;
+import com.zd.laboratory.domain.XxpCardInfo;
 import com.zd.laboratory.domain.vo.LabSecuritySubjectmaterialVO;
 import com.zd.laboratory.domain.vo.LabSecuritySubjectmaterialVO;
+import com.zd.laboratory.service.IXxpCardInfoService;
 import com.zd.model.entity.SysUser;
 import com.zd.model.entity.SysUser;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
@@ -31,6 +33,9 @@ public class LabSecuritySubjectmaterialServiceImpl implements ILabSecuritySubjec
     @Autowired
     @Autowired
     private TokenService tokenService;
     private TokenService tokenService;
 
 
+    @Autowired
+    private IXxpCardInfoService xxpCardInfoService;
+
     /**
     /**
      * 查询实验室和准入模板关系
      * 查询实验室和准入模板关系
      *
      *
@@ -146,6 +151,18 @@ public class LabSecuritySubjectmaterialServiceImpl implements ILabSecuritySubjec
     public int addList(LabSecuritySubjectmaterialVO labSecuritySubjectmaterialVO) {
     public int addList(LabSecuritySubjectmaterialVO labSecuritySubjectmaterialVO) {
         SysUser sysUser = tokenService.getLoginUser().getSysUser();
         SysUser sysUser = tokenService.getLoginUser().getSysUser();
         List<LabSubject> labSubjectList= labSecuritySubjectmaterialVO.getLabSubjectList();//实验室集合
         List<LabSubject> labSubjectList= labSecuritySubjectmaterialVO.getLabSubjectList();//实验室集合
+
+        //配置信息牌 考勤方式和考勤密码
+        XxpCardInfo cardInfo = new XxpCardInfo();
+        cardInfo.setSubjectId(labSubjectList.get(0).getId());
+        List<XxpCardInfo> xxpList =  xxpCardInfoService.selectXxpCardInfoList(cardInfo);
+        if(xxpList.size()>0){
+            cardInfo = xxpList.get(0);
+            cardInfo.setAuthType(labSecuritySubjectmaterialVO.getAuthType());
+            cardInfo.setAuthPwd(labSecuritySubjectmaterialVO.getAuthPwd());
+            xxpCardInfoService.updateXxpCardInfo(cardInfo);
+        }
+
         //删除改实验室模板重新添加
         //删除改实验室模板重新添加
         labSecuritySubjectmaterialMapper.deleteLabSecurityMaterialDataBysubjectId(labSubjectList.get(0).getId());
         labSecuritySubjectmaterialMapper.deleteLabSecurityMaterialDataBysubjectId(labSubjectList.get(0).getId());
         int id=0;
         int id=0;

+ 11 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabSubjectServiceImpl.java

@@ -558,4 +558,15 @@ public class LabSubjectServiceImpl implements ILabSubjectService {
     public String getSubjectNameById(Long id) {
     public String getSubjectNameById(Long id) {
         return labSubjectMapper.getSubjectNameById(id);
         return labSubjectMapper.getSubjectNameById(id);
     }
     }
+
+    /***
+     * 实验室列表查询-信息牌使用
+     * @param labSubject
+     * @return
+     */
+    @Override
+    @DataScope(deptAlias = "d" , permi = PerPrefix.LABORATORY_SUBJECT)
+    public List<LabSubject> cardinfoSubList(LabSubject labSubject) {
+        return labSubjectMapper.cardinfoSubList(labSubject);
+    }
 }
 }

+ 3 - 0
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/LabTimedExhaustServiceImpl.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.TypeReference;
 import com.alibaba.fastjson.TypeReference;
+import com.zd.common.core.annotation.DataScope;
 import com.zd.common.core.redis.RedisService;
 import com.zd.common.core.redis.RedisService;
 import com.zd.common.core.security.TokenService;
 import com.zd.common.core.security.TokenService;
 import com.zd.common.core.utils.StringUtils;
 import com.zd.common.core.utils.StringUtils;
@@ -14,6 +15,7 @@ import com.zd.laboratory.mapper.LabTimedExhaustJoinsubMapper;
 import com.zd.laboratory.mapper.LabTimedExhaustMapper;
 import com.zd.laboratory.mapper.LabTimedExhaustMapper;
 import com.zd.laboratory.service.ILabTimedExhaustService;
 import com.zd.laboratory.service.ILabTimedExhaustService;
 import com.zd.model.constant.BaseConstants;
 import com.zd.model.constant.BaseConstants;
+import com.zd.model.domain.per.PerPrefix;
 import org.slf4j.Logger;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.BeanUtils;
@@ -58,6 +60,7 @@ public class LabTimedExhaustServiceImpl implements ILabTimedExhaustService {
      * @return 定时排风集合
      * @return 定时排风集合
      */
      */
     @Override
     @Override
+    @DataScope(deptAlias = "ur", userAlias = "te", permi = PerPrefix.LABORATORY_EXHAUST)
     public List <LabTimedExhaust> selectLabTimedExhaustList(LabTimedExhaust labTimedExhaust) {
     public List <LabTimedExhaust> selectLabTimedExhaustList(LabTimedExhaust labTimedExhaust) {
         return labTimedExhaustMapper.selectLabTimedExhaustList(labTimedExhaust);
         return labTimedExhaustMapper.selectLabTimedExhaustList(labTimedExhaust);
     }
     }

+ 7 - 2
zd-modules/zd-modules-laboratory/src/main/java/com/zd/laboratory/service/impl/XxpCardInfoServiceImpl.java

@@ -76,8 +76,8 @@ public class XxpCardInfoServiceImpl implements IXxpCardInfoService
         xxpCardInfo.setCreateBy(sysUser.getNickName());
         xxpCardInfo.setCreateBy(sysUser.getNickName());
         xxpCardInfo.setCreateTime(new Date());
         xxpCardInfo.setCreateTime(new Date());
         xxpCardInfo.setUserId(sysUser.getUserId());
         xxpCardInfo.setUserId(sysUser.getUserId());
-        xxpCardInfo.setDeptId(sysUser.getDept().getDeptId());
-        xxpCardInfo.setDeptName(sysUser.getDept().getDeptName());
+        xxpCardInfo.setDeptId(xxpCardInfo.getDeptId());
+        xxpCardInfo.setDeptName(xxpCardInfo.getDeptName());
         if(StringUtils.isNull(xxpCardInfo.getLocation()) ){
         if(StringUtils.isNull(xxpCardInfo.getLocation()) ){
             xxpCardInfo.setCardName("电子信息牌");
             xxpCardInfo.setCardName("电子信息牌");
         }else{
         }else{
@@ -97,6 +97,11 @@ public class XxpCardInfoServiceImpl implements IXxpCardInfoService
         SysUser sysUser = tokenService.getLoginUser().getSysUser();
         SysUser sysUser = tokenService.getLoginUser().getSysUser();
         xxpCardInfo.setUpdateBy(sysUser.getNickName());
         xxpCardInfo.setUpdateBy(sysUser.getNickName());
         xxpCardInfo.setUpdateTime(new Date());
         xxpCardInfo.setUpdateTime(new Date());
+        if(StringUtils.isNull(xxpCardInfo.getLocation()) ){
+            xxpCardInfo.setCardName("电子信息牌");
+        }else{
+            xxpCardInfo.setCardName(xxpCardInfo.getLocation()+"电子信息牌");
+        }
         return xxpCardInfoMapper.updateXxpCardInfo(xxpCardInfo);
         return xxpCardInfoMapper.updateXxpCardInfo(xxpCardInfo);
     }
     }
 
 

+ 2 - 1
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/LabBigViewMapper.xml

@@ -102,7 +102,8 @@
         WHERE d.parent_id = 0 AND FIND_IN_SET(dt.dept_id,t.`ancestors`)) groupDeptName,
         WHERE d.parent_id = 0 AND FIND_IN_SET(dt.dept_id,t.`ancestors`)) groupDeptName,
         (SELECT sc.classified_name FROM lab_safe_classified sc WHERE sc.id = s.level) AS classifiedName,
         (SELECT sc.classified_name FROM lab_safe_classified sc WHERE sc.id = s.level) AS classifiedName,
         (SELECT sc.type_name FROM lab_safe_classtype sc WHERE sc.id = s.type_id) AS typeName,
         (SELECT sc.type_name FROM lab_safe_classtype sc WHERE sc.id = s.type_id) AS typeName,
-        COUNT(DISTINCT sar.join_user_id) AS online
+        COUNT(DISTINCT sar.join_user_id) AS online,
+        GROUP_CONCAT((select su.nick_name from sys_user su where su.user_id = sar.`join_user_id`)) groupUserName
         FROM lab_subject s LEFT JOIN lab_subject_access_record sar ON sar.subject_id = s.id
         FROM lab_subject s LEFT JOIN lab_subject_access_record sar ON sar.subject_id = s.id
         LEFT JOIN sys_dept t ON s.`dept_id` = t.`dept_id`
         LEFT JOIN sys_dept t ON s.`dept_id` = t.`dept_id`
         <where>
         <where>

+ 1 - 2
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/LabControlMapper.xml

@@ -56,8 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         from
         from
           lab_control cl
           lab_control cl
           INNER JOIN lab_subject s on  s.id = cl.subject_id
           INNER JOIN lab_subject s on  s.id = cl.subject_id
-          INNER JOIN lab_building bd ON bd.id = s.floor_id
-          INNER JOIN sys_dept dt ON dt.dept_id = bd.dept_id
+          INNER JOIN sys_dept dt ON dt.dept_id = s.dept_id
           )xx
           )xx
     </sql>
     </sql>
 
 

+ 7 - 0
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/LabSecurityApplyMapper.xml

@@ -145,6 +145,13 @@
             <if test="subjectId != null "> and subject_id = #{subjectId}</if>
             <if test="subjectId != null "> and subject_id = #{subjectId}</if>
             <if test="subjectAdminid != null "> and subject_adminid = #{subjectAdminid}</if>
             <if test="subjectAdminid != null "> and subject_adminid = #{subjectAdminid}</if>
             <if test="subjectName != null  and subjectName != ''"> and subject_name like concat('%', #{subjectName}, '%')</if>
             <if test="subjectName != null  and subjectName != ''"> and subject_name like concat('%', #{subjectName}, '%')</if>
+            <if test="searchValue != null  and searchValue != ''">
+                and (
+                t.subject_name like concat('%', #{searchValue}, '%')
+                or
+                t.user_name like concat('%', #{searchValue}, '%')
+                )
+            </if>
             <if test="securityCertificate != null  and securityCertificate != ''"> and security_certificate = #{securityCertificate}</if>
             <if test="securityCertificate != null  and securityCertificate != ''"> and security_certificate = #{securityCertificate}</if>
             <if test="securityCommitment != null  and securityCommitment != ''"> and security_commitment = #{securityCommitment}</if>
             <if test="securityCommitment != null  and securityCommitment != ''"> and security_commitment = #{securityCommitment}</if>
             <if test="riskReport != null  and riskReport != ''"> and risk_report = #{riskReport}</if>
             <if test="riskReport != null  and riskReport != ''"> and risk_report = #{riskReport}</if>

+ 65 - 2
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/LabSubjectMapper.xml

@@ -32,6 +32,7 @@
         <result property="inspectCheckCount" column="inspect_check_count"/>
         <result property="inspectCheckCount" column="inspect_check_count"/>
         <result property="inspectSignTime" column="inspect_sign_time"/>
         <result property="inspectSignTime" column="inspect_sign_time"/>
         <result property="details" column="details"/>
         <result property="details" column="details"/>
+        <result property="hardwareType" column="hardware_type"/>
     </resultMap>
     </resultMap>
 
 
     <resultMap type="com.zd.laboratory.domain.vo.LabSubjectVO" id="LabSubjectResultVO">
     <resultMap type="com.zd.laboratory.domain.vo.LabSubjectVO" id="LabSubjectResultVO">
@@ -81,6 +82,7 @@
         <result property="inspectCheckCount" column="inspect_check_count"/>
         <result property="inspectCheckCount" column="inspect_check_count"/>
         <result property="inspectSignTime" column="inspect_sign_time"/>
         <result property="inspectSignTime" column="inspect_sign_time"/>
         <result property="details" column="details"/>
         <result property="details" column="details"/>
+        <result property="hardwareType" column="hardware_type"/>
     </resultMap>
     </resultMap>
 
 
     <resultMap type="com.zd.laboratory.domain.vo.LabSubjectDetailVO" id="subjectAndInfoResult">
     <resultMap type="com.zd.laboratory.domain.vo.LabSubjectDetailVO" id="subjectAndInfoResult">
@@ -123,6 +125,7 @@
         <result property="inspectCheckCount" column="inspect_check_count"/>
         <result property="inspectCheckCount" column="inspect_check_count"/>
         <result property="inspectSignTime" column="inspect_sign_time"/>
         <result property="inspectSignTime" column="inspect_sign_time"/>
         <result property="details" column="details"/>
         <result property="details" column="details"/>
+        <result property="hardwareType" column="hardware_type"/>
 
 
         <collection property="hazardSubjectRelations" column="id"
         <collection property="hazardSubjectRelations" column="id"
                     ofType="com.zd.laboratory.domain.LabHazardSubjectRelation"
                     ofType="com.zd.laboratory.domain.LabHazardSubjectRelation"
@@ -171,6 +174,7 @@
                inspect_check_count,
                inspect_check_count,
                inspect_sign_time,
                inspect_sign_time,
                details,
                details,
+               hardware_type,
                (SELECT GROUP_CONCAT(ur.nick_name)
                (SELECT GROUP_CONCAT(ur.nick_name)
                 FROM sys_user ur
                 FROM sys_user ur
                 WHERE ur.`user_id`
                 WHERE ur.`user_id`
@@ -256,6 +260,7 @@
                t.inspect_check_count,
                t.inspect_check_count,
                t.inspect_sign_time,
                t.inspect_sign_time,
                t.details,
                t.details,
+               t.hardware_type,
                (select i.id from xxp_card_info i where i.subJect_id=t.id LIMIT 1)         xxpCardInfoId,
                (select i.id from xxp_card_info i where i.subJect_id=t.id LIMIT 1)         xxpCardInfoId,
                CONCAT(su.nick_name, '@', su.phonenumber)                      AS          adminNameAndPhone,
                CONCAT(su.nick_name, '@', su.phonenumber)                      AS          adminNameAndPhone,
 
 
@@ -312,7 +317,8 @@
                t.inspect_skipped,
                t.inspect_skipped,
                t.inspect_check_count,
                t.inspect_check_count,
                t.inspect_sign_time,
                t.inspect_sign_time,
-               t.details
+               t.details,
+               t.hardware_type
         from lab_subject t
         from lab_subject t
                  left join sys_user su on su.user_id = t.admin_id
                  left join sys_user su on su.user_id = t.admin_id
                  left join sys_dept sd on sd.dept_id = t.dept_id
                  left join sys_dept sd on sd.dept_id = t.dept_id
@@ -462,7 +468,8 @@
         t.inspect_skipped,
         t.inspect_skipped,
         t.inspect_check_count,
         t.inspect_check_count,
         t.inspect_sign_time,
         t.inspect_sign_time,
-        t.details
+        t.details,
+        t.hardware_type
         from lab_subject t
         from lab_subject t
         left join sys_user su on su.user_id = t.admin_id AND su.`del_flag`=0
         left join sys_user su on su.user_id = t.admin_id AND su.`del_flag`=0
         left join sys_dept sd on sd.dept_id = t.dept_id
         left join sys_dept sd on sd.dept_id = t.dept_id
@@ -585,6 +592,7 @@
             <if test="inspectCheckCount != null">inspect_check_count,</if>
             <if test="inspectCheckCount != null">inspect_check_count,</if>
             <if test="inspectSignTime != null">inspect_sign_time,</if>
             <if test="inspectSignTime != null">inspect_sign_time,</if>
             <if test="details != null">details,</if>
             <if test="details != null">details,</if>
+            <if test="hardwareType != null">hardware_type,</if>
         </trim>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
             <if test="id != null">#{id},</if>
@@ -625,6 +633,7 @@
             <if test="inspectCheckCount != null">#{inspectCheckCount},</if>
             <if test="inspectCheckCount != null">#{inspectCheckCount},</if>
             <if test="inspectSignTime != null">#{inspectSignTime},</if>
             <if test="inspectSignTime != null">#{inspectSignTime},</if>
             <if test="details != null">#{details},</if>
             <if test="details != null">#{details},</if>
+            <if test="hardwareType != null">#{hardwareType},</if>
         </trim>
         </trim>
     </insert>
     </insert>
 
 
@@ -669,6 +678,7 @@
             <if test="inspectCheckCount != null">inspect_check_count = #{inspectCheckCount},</if>
             <if test="inspectCheckCount != null">inspect_check_count = #{inspectCheckCount},</if>
             <if test="inspectSignTime != null">inspect_sign_time = #{inspectSignTime},</if>
             <if test="inspectSignTime != null">inspect_sign_time = #{inspectSignTime},</if>
             <if test="details != null">details = #{details},</if>
             <if test="details != null">details = #{details},</if>
+            <if test="hardwareType != null">hardware_type = #{hardwareType},</if>
         </trim>
         </trim>
         where id = #{id}
         where id = #{id}
     </update>
     </update>
@@ -1081,6 +1091,59 @@
         </foreach>
         </foreach>
     </select>
     </select>
 
 
+    <!--安全信息牌新增实验室列表 -->
+    <select id="cardinfoSubList" parameterType="com.zd.laboratory.domain.LabSubject" resultMap="LabSubjectResult">
+        SELECT
+        s.id,
+        s.name,
+        s.floor_id,
+        s.layout_id,
+        s.build_id,
+        s.sub_dept,
+        s.`level`,
+        s.check_out,
+        s.check_in,
+        s.room,
+        s.dept_id,
+        d.dept_name,
+        s.admin_id,
+        s.is_del,
+        s.create_time,
+        s.user_id,
+        s.create_by,
+        s.update_time,
+        s.update_by,
+        s.remark,
+        s.sub_dept,
+        s.check_out,
+        s.check_in,
+        s.safe_user_id,
+        s.safe_signs,
+        s.hazard_category,
+        s.risk_measure,
+        s.outfire,
+        s.qr_code,
+        s.safe_user_id,
+        s.skipped,
+        s.check_count,
+        s.sign_time
+        FROM
+        lab_subject s
+        LEFT JOIN sys_dept d ON d.dept_id = s.dept_id
+        <where>
+            <if test="deptId != null ">and ( dept_id in (SELECT dt.dept_id FROM sys_dept dt WHERE find_in_set(#{deptId}
+                ,ancestors )) or dept_id = #{deptId} )
+            </if>
+            <if test="name != null and name !=''">
+                and s.name like concat('%', #{name}, '%')
+            </if>
+            and id not in( select subject_id from xxp_card_info  )
+            <if test="id != null ">or s.id = #{id}</if>
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+    </select>
+
     <select id="getByIds" resultType="com.zd.laboratory.domain.LabSubject">
     <select id="getByIds" resultType="com.zd.laboratory.domain.LabSubject">
         select * from lab_subject
         select * from lab_subject
         <where>
         <where>

+ 3 - 0
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/LabTimedExhaustMapper.xml

@@ -24,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         SELECT DISTINCT te.id,te.`task_name`,te.`exhaust_period`,te.`execution_date_type`,te.`execution_date`,te.`exhaust_type`,te.`user_id`,
         SELECT DISTINCT te.id,te.`task_name`,te.`exhaust_period`,te.`execution_date_type`,te.`execution_date`,te.`exhaust_type`,te.`user_id`,
         te.`create_by`,te.`create_time`,te.`update_by`,te.`update_time`,te.`remark`
         te.`create_by`,te.`create_time`,te.`update_by`,te.`update_time`,te.`remark`
         FROM lab_timed_exhaust te
         FROM lab_timed_exhaust te
+        inner join sys_user ur on te.`user_id` = ur.`user_id`
     </sql>
     </sql>
     <delete id="deleteLabTimedExhaustByIds">
     <delete id="deleteLabTimedExhaustByIds">
         delete from lab_timed_exhaust where id = #{ids}
         delete from lab_timed_exhaust where id = #{ids}
@@ -48,6 +49,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="deptId != null  and deptId != ''">
             <if test="deptId != null  and deptId != ''">
                 and s.dept_id = #{deptId}
                 and s.dept_id = #{deptId}
             </if>
             </if>
+            <!-- 数据范围过滤 -->
+            ${params.dataScope}
         </where>
         </where>
         ORDER BY te.`create_time` desc
         ORDER BY te.`create_time` desc
     </select>
     </select>

+ 0 - 1
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/LabViolationMapper.xml

@@ -315,7 +315,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         </where>
         GROUP BY t.violation_type
         GROUP BY t.violation_type
         ) lv ON dd.violation_name = lv.violation_type
         ) lv ON dd.violation_name = lv.violation_type
-        ORDER BY COUNT DESC
     </select>
     </select>
 
 
     <select id="columnar" resultType="com.zd.laboratory.domain.vo.LabViolationColumnarVO">
     <select id="columnar" resultType="com.zd.laboratory.domain.vo.LabViolationColumnarVO">

+ 22 - 1
zd-modules/zd-modules-laboratory/src/main/resources/mapper/laboratory/XxpCardInfoMapper.xml

@@ -12,6 +12,8 @@
         <result property="collegeId" column="college_id"/>
         <result property="collegeId" column="college_id"/>
         <result property="location" column="location"/>
         <result property="location" column="location"/>
         <result property="operate" column="operate"/>
         <result property="operate" column="operate"/>
+        <result property="authType" column="auth_type"/>
+        <result property="authPwd" column="auth_pwd"/>
         <result property="subjectId" column="subject_id"/>
         <result property="subjectId" column="subject_id"/>
         <result property="subjectName" column="subject_name"/>
         <result property="subjectName" column="subject_name"/>
         <result property="deptId" column="dept_id"/>
         <result property="deptId" column="dept_id"/>
@@ -32,6 +34,8 @@
                college_id,
                college_id,
                location,
                location,
                operate,
                operate,
+               auth_type,
+               auth_pwd,
                subject_id,
                subject_id,
                subject_name,
                subject_name,
                dept_id,
                dept_id,
@@ -55,9 +59,13 @@
             <if test="collegeId != null">and t.college_id = #{collegeId}</if>
             <if test="collegeId != null">and t.college_id = #{collegeId}</if>
             <if test="location != null and location != '' ">and t.location = #{location}</if>
             <if test="location != null and location != '' ">and t.location = #{location}</if>
             <if test="operate != null ">and t.operate = #{operate}</if>
             <if test="operate != null ">and t.operate = #{operate}</if>
+            <if test="authType != null ">and t.auth_type = #{authType}</if>
+            <if test="authPwd != null ">and t.auth_pwd = #{authPwd}</if>
             <if test="subjectId != null ">and t.subject_id = #{subjectId}</if>
             <if test="subjectId != null ">and t.subject_id = #{subjectId}</if>
             <if test="subjectName != null ">and t.subject_name = #{subjectName}</if>
             <if test="subjectName != null ">and t.subject_name = #{subjectName}</if>
-            <if test="deptId != null ">and t.dept_id = #{deptId}</if>
+            <if test="deptId != null ">and ( t.dept_id in (SELECT dt.dept_id FROM sys_dept dt WHERE
+                find_in_set(#{deptId} ,ancestors )) or t.dept_id = #{deptId} )
+            </if>
             <if test="deptName != null ">and t.dept_name = #{deptName}</if>
             <if test="deptName != null ">and t.dept_name = #{deptName}</if>
             <if test="isStart != null ">and t.is_start = #{isStart}</if>
             <if test="isStart != null ">and t.is_start = #{isStart}</if>
             <if test="userId != null ">and t.user_id = #{userId}</if>
             <if test="userId != null ">and t.user_id = #{userId}</if>
@@ -65,6 +73,13 @@
             <if test="createTime != null ">and t.create_time = #{createTime}</if>
             <if test="createTime != null ">and t.create_time = #{createTime}</if>
             <if test="updateBy != null ">and t.update_by = #{updateBy}</if>
             <if test="updateBy != null ">and t.update_by = #{updateBy}</if>
             <if test="updateTime != null">and t.update_time =#{updateTime}</if>
             <if test="updateTime != null">and t.update_time =#{updateTime}</if>
+            <if test="searchValue != null and searchValue != ''">
+                and (
+                t.card_name like concat('%', #{searchValue}, '%')
+                or t.card_num like concat('%', #{searchValue}, '%')
+                or t.subject_name like concat('%', #{searchValue}, '%')
+                )
+            </if>
         </where>
         </where>
     </select>
     </select>
 
 
@@ -87,6 +102,8 @@
             <if test="collegeId != null">college_id,</if>
             <if test="collegeId != null">college_id,</if>
             <if test="location != null">location,</if>
             <if test="location != null">location,</if>
             <if test="operate != null">operate,</if>
             <if test="operate != null">operate,</if>
+            <if test="authType != null">auth_type,</if>
+            <if test="authPwd != null">auth_pwd,</if>
             <if test="subjectId != null">subject_id,</if>
             <if test="subjectId != null">subject_id,</if>
             <if test="subjectName != null">subject_name,</if>
             <if test="subjectName != null">subject_name,</if>
             <if test="deptId != null">dept_id,</if>
             <if test="deptId != null">dept_id,</if>
@@ -105,6 +122,8 @@
             <if test="collegeId != null">#{collegeId},</if>
             <if test="collegeId != null">#{collegeId},</if>
             <if test="location != null">#{location},</if>
             <if test="location != null">#{location},</if>
             <if test="operate != null">#{operate},</if>
             <if test="operate != null">#{operate},</if>
+            <if test="authType != null">#{authType},</if>
+            <if test="authPwd != null">#{authPwd},</if>
             <if test="subjectId != null">#{subjectId},</if>
             <if test="subjectId != null">#{subjectId},</if>
             <if test="subjectName != null">#{subjectName},</if>
             <if test="subjectName != null">#{subjectName},</if>
             <if test="deptId != null">#{deptId},</if>
             <if test="deptId != null">#{deptId},</if>
@@ -127,6 +146,8 @@
             <if test="collegeId != null">college_id = #{collegeId},</if>
             <if test="collegeId != null">college_id = #{collegeId},</if>
             <if test="location != null">location = #{location},</if>
             <if test="location != null">location = #{location},</if>
             <if test="operate != null">operate = #{operate},</if>
             <if test="operate != null">operate = #{operate},</if>
+            <if test="authType != null">auth_type = #{authType},</if>
+            <if test="authPwd != null">auth_pwd = #{authPwd},</if>
             <if test="subjectId != null">subject_id = #{subjectId},</if>
             <if test="subjectId != null">subject_id = #{subjectId},</if>
             <if test="subjectName != null">subject_name = #{subjectName},</if>
             <if test="subjectName != null">subject_name = #{subjectName},</if>
             <if test="deptId != null">dept_id = #{deptId},</if>
             <if test="deptId != null">dept_id = #{deptId},</if>

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

@@ -58,6 +58,7 @@
                 and t.create_time &lt;= str_to_date(#{endTime}, '%Y-%m-%d')
                 and t.create_time &lt;= str_to_date(#{endTime}, '%Y-%m-%d')
             </if>
             </if>
         </where>
         </where>
+        <if test="remark =='list' "> order by isnull(sort),sort,is_collective desc ,create_time desc</if>
     </select>
     </select>
 
 
     <select id="selectXxpClassifyDetailedById" resultMap="XxpClassifyDetailedResult">
     <select id="selectXxpClassifyDetailedById" resultMap="XxpClassifyDetailedResult">

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

@@ -62,7 +62,7 @@
             order by t.create_time desc
             order by t.create_time desc
         </if>
         </if>
         <if test="remark == 'sort' ">
         <if test="remark == 'sort' ">
-            order by t.sort desc
+            order by isnull(t.sort) ,t.sort
         </if>
         </if>
     </select>
     </select>
 
 

+ 1 - 1
zd-modules/zd-modules-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -1050,7 +1050,7 @@
             ancestors) ))
             ancestors) ))
         </if>
         </if>
        <if test="nickName != null and nickName != ''">
        <if test="nickName != null and nickName != ''">
-            AND u.nick_name = #{nickName}
+            AND u.nick_name like concat('%', #{nickName}, '%')
         </if>
         </if>
         <if test="userType != null and userType != ''">
         <if test="userType != null and userType != ''">
             AND u.user_type = #{userType}
             AND u.user_type = #{userType}