瀏覽代碼

更改导出

peiguo 4 年之前
父節點
當前提交
9029009eb5

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

@@ -202,7 +202,7 @@ public class SweepCodeService {
         return sysUptownHouses;
     }
 
-    public List<ExcelRiBaoLYBM4> exSelectLingyunUser(Map<String, Object> queryParam, Long uptownId) throws ParseException {
+    public List<ExcelRiBaoLYBM4> exSelectLingyunUser(Map<String, Object> queryParam, Long uptownId, Long userId) throws ParseException {
         queryParam.put("uptownId", uptownId);
         List<ExcelRiBaoLYBM4> sysUptownHouses = rbMapper.exSelectLingyunUser(queryParam);
 
@@ -245,11 +245,13 @@ public class SweepCodeService {
                     }
                     excelRiBaoLYBM4.setTripDetDesc(tripDet.substring(0, tripDet.length() - 1));
                 }// 复工
-                excelRiBaoLYBM4.setReturnWork(scanService.returnWorkLYlist(excelRiBaoLYBM4.getUserId(), excelRiBaoLYBM4.getLinkman(), excelRiBaoLYBM4.getPhone()));
-                if (excelRiBaoLYBM4.getReturnWork() == 1) {
-                    excelRiBaoLYBM4.setReturnWorkMsg("允许复工");
-                } else {
-                    excelRiBaoLYBM4.setReturnWorkMsg("禁止复工");
+                if (userId > 7000 && userId < 8000) {
+                    excelRiBaoLYBM4.setReturnWork(scanService.returnWorkLYlist(excelRiBaoLYBM4.getUserId(), excelRiBaoLYBM4.getLinkman(), excelRiBaoLYBM4.getPhone()));
+                    if (excelRiBaoLYBM4.getReturnWork() == 1) {
+                        excelRiBaoLYBM4.setReturnWorkMsg("允许复工");
+                    } else {
+                        excelRiBaoLYBM4.setReturnWorkMsg("禁止复工");
+                    }
                 }
             }
         }

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

@@ -1,6 +1,5 @@
 package com.bofeng.wx.controller;
 
-import cn.afterturn.easypoi.cache.manager.IFileLoader;
 import com.baomidou.mybatisplus.toolkit.IdWorker;
 import com.bofeng.JwtHelper;
 import com.bofeng.dao.*;
@@ -11,32 +10,21 @@ import com.bofeng.service.ScanAdminService;
 import com.bofeng.service.ScanService;
 import com.bofeng.service.SweepCodeService;
 import com.bofeng.unit.QRCode;
-import com.google.zxing.BarcodeFormat;
-import com.google.zxing.MultiFormatWriter;
 import com.google.zxing.WriterException;
-import com.google.zxing.client.j2se.MatrixToImageConfig;
-import com.google.zxing.client.j2se.MatrixToImageWriter;
-import com.google.zxing.common.BitMatrix;
 import com.yvan.Model;
 import com.yvan.PageDb;
 import com.yvan.mvc.JsonBody;
 import com.yvan.mvc.Pd;
-import com.yvan.platform.Conv;
 import com.yvan.springmvc.HttpParameterParser;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-import lombok.Cleanup;
 import lombok.SneakyThrows;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import javax.servlet.ServletOutputStream;
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.net.URLEncoder;
@@ -160,7 +148,7 @@ public class ScanAdminController {
         if (uptownUnits!=null && uptownUnits.size()>0) {
             unitName = uptownUnits.get(0).getRidgepole()+uptownUnits.get(0).getUnit();
         }
-        List<ExcelRiBaoLYBM4> list = sweepCodeService.exSelectLingyunUser(map, 1238790987234L);
+        List<ExcelRiBaoLYBM4> list = sweepCodeService.exSelectLingyunUser(map, 1238790987234L, userId);
         ExcelUtils.writeSheet(ExcelRiBaoLYBM4.class, list).export(resp, unitName + "上报信息-" + date);
     }
 
@@ -193,7 +181,7 @@ public class ScanAdminController {
         if (uptownUnits!=null && uptownUnits.size()>0) {
             unitName = uptownUnits.get(0).getRidgepole()+uptownUnits.get(0).getUnit();
         }
-        List<ExcelRiBaoLYBM4> list = sweepCodeService.exSelectLingyunUser(map, 5L);
+        List<ExcelRiBaoLYBM4> list = sweepCodeService.exSelectLingyunUser(map, 5L, userId);
         List<ExcelRiBaoZJBM4> excelRiBaoZJBM4s = sweepCodeService.listCopyToAotherList(ExcelRiBaoZJBM4.class, list);
         ExcelUtils.writeSheet(ExcelRiBaoZJBM4.class, excelRiBaoZJBM4s).export(resp, unitName + "上报信息-" + date);
     }

+ 2 - 3
whepi-web/src/main/java/com/bofeng/wx/controller/YeWeiHuiController.java

@@ -28,7 +28,6 @@ import org.springframework.web.servlet.ModelAndView;
 
 import javax.servlet.http.HttpServletResponse;
 import java.lang.reflect.InvocationTargetException;
-import java.text.SimpleDateFormat;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -255,7 +254,7 @@ public class YeWeiHuiController {
       String fileName = uptown.getUptownName();
       Map<String, Object> map = new HashMap<>();
       map.put("date", date);
-      List<ExcelRiBaoLYBM4> list = sweepCodeService.exSelectLingyunUser(map, uptownId);
+      List<ExcelRiBaoLYBM4> list = sweepCodeService.exSelectLingyunUser(map, uptownId, 1L);
       ExcelUtils.writeSheet(ExcelRiBaoLYBM4.class, list).export(resp, fileName + "上报信息-" + date);
     }
   }
@@ -287,7 +286,7 @@ public class YeWeiHuiController {
     if (uptownUnits!=null && uptownUnits.size()>0) {
       unitName = uptownUnits.get(0).getRidgepole()+uptownUnits.get(0).getUnit();
     }
-    List<ExcelRiBaoLYBM4> list = sweepCodeService.exSelectLingyunUser(map, 1238790987234L);
+    List<ExcelRiBaoLYBM4> list = sweepCodeService.exSelectLingyunUser(map, 1238790987234L, 1L);
     ExcelUtils.writeSheet(ExcelRiBaoLYBM4.class, list).export(resp, unitName + "上报信息-" + date);
   }