Browse Source

凌云集团更改公司

peiguo 5 years ago
parent
commit
d32ce64471

+ 2 - 2
whepi-web/src/main/java/com/bofeng/dao/MsReportMapper.java

@@ -182,8 +182,8 @@ public interface MsReportMapper extends BaseMapper<MsReport> {
      * @param userId
      * @return
      */
-    @Select("select b.is_contact from ms_report a INNER JOIN ms_suspected b on a.report_id=b.report_id where a.report_status=1 and a.user_create=#{userId}")
-    Integer queryMsReportIsXGHome(@Param("userId") Long userId);
+    @Select("select * from ms_report a INNER JOIN ms_suspected b on a.report_id=b.report_id where a.report_status=1 and a.user_create=#{userId} and b.is_contact = 1")
+    List<MsReport> queryMsReportIsXGHome(@Param("userId") Long userId);
 
     /**
      * 最近状态 0无,1确诊,2疑似,3密切接触者,4解除隔离

+ 4 - 4
whepi-web/src/main/java/com/bofeng/wx/controller/ScanController.java

@@ -210,8 +210,8 @@ public class ScanController {
 //                            return new ModelAndView("/user/scan.ftl", model);
 //                        }
                     }
-                    Integer isContact = msReportMapper.queryMsReportIsXGHome(userOpen.getUserId());
-                    if (isContact != null && isContact == 1) {
+                    List<MsReport> msReportList = msReportMapper.queryMsReportIsXGHome(userOpen.getUserId());
+                    if (msReportList.size() > 0) {
                         model.put("collor", "red");
                         model.put("collor2", "red");
                         model.put("into", "不许进入");
@@ -616,8 +616,8 @@ public class ScanController {
 //                    return new ModelAndView("/user/returnWork.ftl", model);
 //                }
             }
-            Integer isContact = msReportMapper.queryMsReportIsXGHome(userId);
-            if (isContact != null && isContact == 1) {
+            List<MsReport> msReportList = msReportMapper.queryMsReportIsXGHome(userId);
+            if (msReportList.size() > 0) {
                 model.put("collor", "red");
                 model.put("collor2", "red");
                 model.put("into", "不可复工");