Procházet zdrojové kódy

邵武:近邻照料

chengxiaowen před 2 týdny
rodič
revize
e7cd7c6b01

+ 3 - 0
pom.xml

@@ -318,6 +318,9 @@
             </resource>
             <resource>
                 <directory>src/main/resources</directory>
+                <excludes>
+                    <exclude>*/application.yml</exclude>
+                </excludes>
             </resource>
         </resources>
         <pluginManagement>

+ 27 - 0
src/main/java/com/poteviohealth/cgp/statistics/controller/OrderController.java

@@ -424,4 +424,31 @@ public class OrderController extends BaseWebController {
     }
 
 
+    @PostMapping(value = "/busSendExport")
+    @ApiOperation(httpMethod = "POST", value = "邵武乘车津贴发放Excel导出")
+    public void busSendExport(HttpServletResponse resp,@RequestBody GoldSendPage page){
+        String key ="busSendExport";
+        String error =  this.checkExcelExport(key);
+        try{
+            if ("".equals(error)) {
+                String templateLocation = "classpath:excel/busSend.xlsx";
+                String filename = "";
+                Map<String, Object> data = Maps.newHashMap();
+                orgConstrainService.fillOrgParams(page);
+                List<GoldSendExcelDTO> list = orderService.excelGoldSendList(page);
+                ExcelUtils2.easyDownload(templateLocation,data , list, filename, resp);
+            }else{
+                throw new BusinessException(error);
+            }
+        }catch (Exception e){
+            e.printStackTrace();
+            throw new BusinessException(e.getMessage());
+        }finally {
+            if(cacheService.exists(key)){
+                if(cacheService.get(key).equals(TokenContext.cureWebUser().getUserId().toString())){
+                    cacheService.del(key);
+                }
+            }
+        }
+    }
 }

binární
src/main/resources/excel/busSend.xlsx


+ 2 - 1
src/main/resources/mapper/statistics/OrderMapper.xml

@@ -530,7 +530,8 @@
         d.bank_holder,
         case when d.gold_type = 0 then '80-89周岁'
              when d.gold_type = 1 then '90-99周岁'
-             when d.gold_type = 2 then '100周岁以上' end as goldTypeStr
+             when d.gold_type = 2 then '100周岁以上'
+             when d.gold_type = 4 then remark end as goldTypeStr
         from ${dbName}_customer.c_gold_send_${yearTime} d
         where d.yn = 0
         and d.id > #{start}