lange 5 tahun lalu
induk
melakukan
06c8673057

+ 0 - 15
admin-ui/app/whepi/lingyun/dialogLiaodan.js

@@ -430,8 +430,6 @@ define(function (require) {
                     [
                         {
                             text: "保存", iconCls: "fa fa-save", onClick: function () {
-                                var formFirst = $form.formGet();
-
                                 $.yvan.postForm($form, {
                                     url: api('/home/addRibaoTripxq'),
                                     success: function () {
@@ -442,19 +440,6 @@ define(function (require) {
                                         }
                                     }
                                 });
-                               /* $.ajax({
-                                    url: "/home/addRibaoTrip",
-                                    type: "post",
-                                    contentType: "application/json; charset=utf-8",
-                                    data: JSON.stringify(formFirst),
-                                    success: function (data) {
-                                        $.yvan.msg('操作成功');
-                                        $dlg.window('close');
-                                        if ($.type(context.confirm) === 'function') {
-                                            context.confirm();
-                                        }
-                                    },
-                                });*/
                             }
                         }, {
                         text: "关闭", iconCls: "fa fa-times", onClick: function () {

+ 31 - 1
admin-ui/app/whepi/lingyun/liaodan.js

@@ -40,6 +40,30 @@ define(function (require) {
           }, true);
       }
 
+    //删除
+    function deleteRow1() {
+      var row = $grid.rowData();
+      if (!row) {
+        $.yvan.msg('请先选择一行数据');
+        return;
+      }
+      $.yvan.confirm('确定上报[' + row.reportDate + "] ?", {
+        yes: function (index) {
+          $.yvan.ajax({
+            url: api('/home/shaobaoReport'),
+            data: {
+              reportDate: row.reportDate,
+            },
+            method: 'post',
+            success: function (data) {
+              $.yvan.msg(data.msg);
+              $grid.reload();
+              $grid2.reload();
+            }
+          });
+        }
+      });
+    }
     // 搜索按钮
     var queryToolbarTitle = '个人管理';
     var queryToolbar = {
@@ -92,7 +116,13 @@ define(function (require) {
     // 列表增删改查按钮
     var gridToolbarTitle = '上报列表';
     var gridToolbar = {
-      xtype: 'toolbar', title: gridToolbarTitle,
+      xtype: 'toolbar', title: gridToolbarTitle,items: [
+      {
+        text: '上报', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+          deleteRow1();
+        }
+      }
+    ]
 
     }
 

+ 0 - 1
whepi-web/src/main/java/com/bofeng/service/MsSuspectedService.java

@@ -292,7 +292,6 @@ public class MsSuspectedService {
             msReportMapper.updateById(msReport);
         }
     }
-
     //健康评估
     @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
     public MsSuspected getScore(Long susprectedId, String userName, Integer medical, BigDecimal temperature, Integer cough, Integer muscle, Integer dyspnea, Integer fatigue, Integer diarrhea, Long userCreate) {

+ 52 - 9
whepi-web/src/main/java/com/bofeng/service/MsTripService.java

@@ -2,14 +2,8 @@ package com.bofeng.service;
 
 
 import com.baomidou.mybatisplus.toolkit.IdWorker;
-import com.bofeng.dao.MsReportMapper;
-import com.bofeng.dao.MsSuspectedMapper;
-import com.bofeng.dao.MsTripDetMapper;
-import com.bofeng.dao.MsTripMapper;
-import com.bofeng.entity.MsReport;
-import com.bofeng.entity.MsSuspected;
-import com.bofeng.entity.MsTrip;
-import com.bofeng.entity.MsTripDet;
+import com.bofeng.dao.*;
+import com.bofeng.entity.*;
 import com.yvan.platform.Conv;
 import org.joda.time.DateTime;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -40,6 +34,8 @@ public class MsTripService {
     private MsTripDetMapper msTripDetMapper;
     @Autowired
     private MsSuspectedService msSuspectedService;
+    @Autowired
+    private UptownUnitMapper uptownUnitMapper;
 
 
     //添加家人
@@ -268,11 +264,58 @@ public class MsTripService {
         msSuspectedService.updateReport(reportId, medical, singleRoom, temperature);
         return reportId;
     }
-
     @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
     public Integer deleteTrip(Long suspectedId) {
         msTripDetMapper.deleteByTripId(suspectedId);
         msTripMapper.deleteById(suspectedId);
         return 0;
     }
+
+
+    //上报
+    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
+    public Integer addReportTest(Long userCreate,String reportDate) {
+        List<MsReport> listReport = msReportMapper.selectByReportDate(reportDate, userCreate);
+        if (listReport == null || listReport.size() == 0)
+            return 0;
+
+        //判断体温是否填写
+        List<MsSuspected> listSuspected = msSuspectedMapper.selectByReportId(Long.parseLong(listReport.get(0).getReportId().toString()));
+        if (listSuspected == null || listSuspected.size() == 0)
+            return 3;
+        else {
+            for (MsSuspected msSuspected : listSuspected) {
+                //体温是否填写
+                if (msSuspected.getTemperature().compareTo(new BigDecimal(0)) == 0)
+                    return 2;
+
+                //如果是凌云,判断出行是否填写异常
+                UptownUnit unit = uptownUnitMapper.getUptownUnitByUser(userCreate);
+                if (unit != null) {
+                    if (unit.getUptownId() == 1238790987234L || unit.getUptownId() == 5) {
+                        //上一天的上报记录.3天内
+                        List<MsSuspected> listSuspected1 = msSuspectedMapper.selectNext3Suspected(userCreate);
+                        if (listSuspected1 != null && listSuspected1.size() > 0) {
+                            if (listSuspected1.get(0).getTodayLocal() != 0 && msSuspected.getTodayLocal() != 0) {
+                                if (listSuspected1.get(0).getTodayLocalOther() != msSuspected.getTodayLocalOther() && listSuspected1.get(0).getTodayLocal() != msSuspected.getTodayLocal() && msSuspected.getIsTrip() == 0) {
+                                    return 4;
+                                }
+                            }
+                        }
+
+                    }
+                }
+            }
+
+        }
+        MsReport msReport = msReportMapper.selectById(Long.parseLong(listReport.get(0).getReportId().toString()));
+        if (msReport != null) {
+            msReport.setReportStatus(1);
+            msReport.setUserUpdate(userCreate);
+            msReport.setTimeUpdate(DateTime.now());
+            msReportMapper.updateById(msReport);
+        }
+        return 1;
+    }
+
 }

File diff ditekan karena terlalu besar
+ 23 - 8
whepi-web/src/main/java/com/bofeng/wx/controller/MsTripController.java