Browse Source

未选中二级部门报错

caotao 5 năm trước cách đây
mục cha
commit
68f51ff63b

+ 3 - 1
admin-ui/app/whepi/lingyun/lingyunUser.js

@@ -276,13 +276,15 @@ define(function (require) {
                         $.yvan.msg('请选择导出时间');
                         return
                       }
+
+                      var isBand = $form.formGet().isBand;
                       var msStatus = $form.formGet().msStatus;
                       var isContact = $form.formGet().isContact;
                       var isSuspected = $form.formGet().isSuspected;
                       var isTrip = $form.formGet().isTrip;
                       var departmentId = $form.formGet().departmentId;
                       window.open(api('/sweepCode/exSelectLingyunUser?queryProperties='+queryProperties+"&unitId="+unitId + "&date="+date+
-                      '&msStatus='+msStatus+'&isContact='+isContact+'&isSuspected='+isSuspected+'&isTrip='+isTrip + '&departmentId=' + departmentId));
+                      '&msStatus='+msStatus+'&isContact='+isContact+'&isSuspected='+isSuspected+'&isTrip='+isTrip+ '&isBand='+isBand +'&departmentId=' + departmentId));
                     }
                   },
                   {

+ 2 - 1
admin-ui/app/whepi/lingyun/lingyunUser2.js

@@ -254,13 +254,14 @@ define(function (require) {
                         $.yvan.msg('请选择导出时间');
                         return
                       }
+                      var isBand = $form.formGet().isBand;
                       var msStatus = $form.formGet().msStatus;
                       var isContact = $form.formGet().isContact;
                       var isSuspected = $form.formGet().isSuspected;
                       var isTrip = $form.formGet().isTrip;
                       var departmentId = $form.formGet().departmentId;
                       window.open(api('/sweepCode/exSelectLingyunUser?queryProperties='+queryProperties+"&unitId=0&date="+date+
-                        '&msStatus='+msStatus+'&isContact='+isContact+'&isSuspected='+isSuspected+'&isTrip='+isTrip + '&departmentId=' + departmentId));
+                        '&msStatus='+msStatus+'&isContact='+isContact+'&isSuspected='+isSuspected+'&isTrip='+isTrip + '&isBand='+isBand +'&departmentId=' + departmentId));
                     }
                   },
                   {

+ 26 - 1
admin-ui/app/whepi/lingyun/lingyunUser7.js

@@ -199,6 +199,17 @@ define(function (require) {
               queryGrid1();
             },
           },
+
+          {
+            name: 'isBand',
+            xtype: 'combobox',
+            label: '是否迁移',
+            data: [{id: '', text: '全部'}, {id: '1', text: '否'}, {id: '2', text: '是'}],
+            value: '',
+            onChange: function (value) {
+              queryGrid1();
+            },
+          },
         ]]
       };
 
@@ -265,13 +276,14 @@ define(function (require) {
                         $.yvan.msg('请选择导出时间');
                         return
                       }
+                      var isBand = $form.formGet().isBand;
                       var msStatus = $form.formGet().msStatus;
                       var isContact = $form.formGet().isContact;
                       var isSuspected = $form.formGet().isSuspected;
                       var isTrip = $form.formGet().isTrip;
                       var departmentId = $form.formGet().departmentId;
                       window.open(api('/sweepCode/exSelectLingyunUser?queryProperties='+queryProperties+"&unitId="+unitId + "&date="+date+
-                        '&msStatus='+msStatus+'&isContact='+isContact+'&isSuspected='+isSuspected+'&isTrip='+isTrip + '&departmentId=' + departmentId));
+                        '&msStatus='+msStatus+'&isContact='+isContact+'&isSuspected='+isSuspected+'&isTrip='+isTrip +'&isBand='+isBand + '&departmentId=' + departmentId));
                     }
                   },
                   {
@@ -352,6 +364,19 @@ define(function (require) {
                     },
                     {field: 'phone', title: '联系电话', maxWidth: 200, align: 'left',},
                     {field: 'doorplate', title: '工号', maxWidth: 200, align: 'left',},
+
+
+                    {field: 'oldOpenId', title: '旧openId',hidden: true},
+                    {field: 'isBand', title: '是否迁移', maxWidth: 200, align:  'center', formatter: function (value, row) {
+                        if (row.rowData.oldOpenId) {
+                          return "<span style='color: green;'>是<span>";
+                        } else {
+                          return "<span style='color: red;'>否<span>";
+                        }
+                      }
+                    },
+
+
                     {field: 'bingqingDesc', title: '病情表述', align: 'left',},
                     {field: 'isContactDesc', title: '家人确诊或接触', align: 'left',formatter: function (value) {
                         if (value == "否") {

+ 1 - 1
admin-ui/app/whepi/lingyun/lingyunUserNotOnJob.js

@@ -108,7 +108,7 @@ define(function (require) {
           {
             name: 'isBand',
             xtype: 'combobox',
-            label: '是否绑定',
+            label: '是否迁移',
             data: [{id: '', text: '全部'}, {id: '1', text: '否'}, {id: '2', text: '是'}],
             value: '',
             onChange: function (value) {

+ 1 - 1
whepi-web/src/main/java/com/bofeng/entity/ExcelRiBaoLYBM4.java

@@ -393,7 +393,7 @@ public class ExcelRiBaoLYBM4 {
     @ExcelProperty(value = "个人上报状态", index = 4)
     private String reportStatusDesc = "";
 
-    @ExcelProperty(value = "是否绑定", index = 14)
+    @ExcelProperty(value = "是否迁移", index = 14)
     private String isBand="";
 
     private String oldOpenId="";

+ 8 - 0
whepi-web/src/main/java/com/bofeng/service/SweepCodeService.java

@@ -8,6 +8,7 @@ import com.bofeng.dao.RbMapper;
 import com.bofeng.dao.SweepCodeMapper;
 import com.bofeng.entity.*;
 import com.yvan.PageDb;
+import com.yvan.platform.StringUtils;
 import org.apache.shiro.util.CollectionUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -226,6 +227,13 @@ public class SweepCodeService {
                 } else {
                     excelRiBaoLYBM4.setReportStatusDesc("异常");
                 }
+
+                if(StringUtils.isNullOrEmpty(excelRiBaoLYBM4.getOldOpenId())){
+                    excelRiBaoLYBM4.setIsBand("否");
+                }else{
+                    excelRiBaoLYBM4.setIsBand("是");
+                }
+
                 tripDet = "";
                 //出行详细
                 List<MsTripDet> listDet = msSuspectedMapper.selectTripSuspected(excelRiBaoLYBM4.getTripId());

+ 2 - 0
whepi-web/src/main/java/com/bofeng/wx/controller/ScanAdminController.java

@@ -137,6 +137,7 @@ public class ScanAdminController {
                                     @Pd(name = "isContact", required = false, defaultValue = "0") Integer isContact,
                                     @Pd(name = "isSuspected", required = false, defaultValue = "0") Integer isSuspected,
                                     @Pd(name = "isTrip", required = false, defaultValue = "0") Integer isTrip,
+                                    @Pd(name = "isBand", required = false, defaultValue = "0") Integer isBand,
                                     @Pd(name = "date") String date,
                                     @Pd(name = "departmentId", required = false, defaultValue = "0") Long departmentId) {
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@@ -146,6 +147,7 @@ public class ScanAdminController {
         map.put("isContact", isContact);
         map.put("isSuspected", isSuspected);
         map.put("isTrip", isTrip);
+        map.put("isBand", isBand);
         map.put("departmentId", departmentId);
         Long userId = JwtHelper.getUserId();
         if (userId > 7000 && userId < 8000) {

+ 10 - 2
whepi-web/src/main/resources/mapper/RbMapper.xml

@@ -32,7 +32,7 @@
 
     <select id="exSelectLingyunUser" resultType="com.bofeng.entity.ExcelRiBaoLYBM4">
         select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum, msr.report_status as reportStatus,
-        msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum,msr.ms_status as msStatus,
+        msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum,msr.ms_status as msStatus,op.old_open_id as oldOpenId,
         msr.single_num as singleNum,mss.user_name as userName,mss.grender, mss.age,mss.family_status as familyStatus,de.department_name as departmentName,
         mss.medical,mss.temperature,mss.cough,mss.muscle ,mss.dyspnea,mss.fatigue,mss.diarrhea,mss.single_room as singleRoom,mss.score_rezult,mss.is_contact,mss.is_suspected,
         tr.trip_id,tr.is_trip,tr.today_local,tr.today_local_other,tr.work_local,tr.work_local_other, tr.auto_local, tr.auto_addr,ur.user_id as userId
@@ -48,7 +48,8 @@
         </if>
         left join ms_suspected mss on mss.report_id=msr.report_id
         left join ms_trip tr on mss.suspected_id=trip_id
-        INNER JOIN sys_user_role ur on ur.property_id = suho.house_id and ur.role_id = 1
+        INNER JOIN sys_user_role ur on ur.property_id = suho.house_id
+        left JOIN sys_user_open op on op.user_id = ur.user_id
         left join sys_department de on de.department_id = suh.department_id
         <where>
             <if test="unitId!=null and uptownId!='' and unitId!= '0'.toString()">
@@ -100,6 +101,13 @@
             <if test="isTrip == '2'.toString()">
                 and tr.is_trip = 1
             </if>
+            <if test="isBand == '1'.toString()">
+                and (op.old_open_id is null or op.old_open_id = '')
+            </if>
+            <if test="isBand == '2'.toString()">
+                and op.old_open_id is not null and op.old_open_id != ''
+            </if>
+            and ur.role_id = 1
         </where>
         order by suu.unit_id asc,suho.linkman
     </select>