Jelajahi Sumber

收费调整

zsf 4 bulan lalu
induk
melakukan
6a98fad2d5

+ 1 - 1
src/main/java/com/rf/psychological/filter/JWTInterceptorPublicConfig.java

@@ -35,7 +35,7 @@ public class JWTInterceptorPublicConfig implements WebMvcConfigurer {
         String[] temp = new String[]{"/category/getCognizeCategoryList", "/category/getCategoryList",
                 "/subjectInfo/getSubjectListByAuth", "/subjectInfo/getCognizeListByAuth", "/subjectInfo/getRecallChar", "/subjectInfo/getRecallCharTwo",
                 "/subjectInfo/getSubjectByFlag/*","/subjectInfo/getSubjectByFlagV2/*","/scaleInfo/*","/record/getRecordByModelPhone",
-                "/api/orderInfo/queryOrderDetail/**","/scaleExternalSource/save","/system/updateItem/**","/system/updateAnswer/**","/system/addMarks/**","/system/updateMarks/**"};
+                "/api/orderInfo/queryOrderDetail/**","/scaleExternalSource/save"};
         String[] wxPay = new String[]{"/api/wx-pay/native/notify","/api/wx-pay/refunds/notify",
                 "/api/wx-pay/getPhone/*","/api/wx-pay/code2openid","/api/wx-pay/h5Pay",
                 "/api/wx-pay/code2openid2","/api/wx-pay/queryOrder/**","/api/promotionInfo/queryPromotionDetail/**","/record/getWeiboRecordById","/record/getWeiboRecordById/**"};

+ 21 - 3
src/main/java/com/rf/psychological/user/rest/SystemController.java

@@ -43,6 +43,7 @@ import javax.servlet.http.HttpServletRequest;
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.util.Arrays;
 import java.util.List;
 import java.util.concurrent.TimeUnit;
 
@@ -612,7 +613,25 @@ public class SystemController extends BaseController {
         return "hello";
     }
 
+    @GetMapping("/addItem")
+    public  void addItem(String fileName,String flag){
+        File file = new File("C:\\Users\\Administrator\\Desktop\\推广量表\\"+fileName+".xlsx");
+        try {
+            List<List<List<Object>>> datas = ExcelUtil.getBankListByExcelSheet(new FileInputStream(file.getAbsolutePath()), file.getName());
+            List<ScaleEntity> scaleEntities = scaleService.getScaleByFlag(flag);
+            List<List<Object>> an = datas.get(5);
+            for (int i=5;i<scaleEntities.size();i++){
+                ScaleEntity entity = scaleEntities.get(i);
+                entity.setCheckItems(an.get(i-5).get(2).toString());
+                log.info(entity.toString());
+                //scaleService.saveScale(entity);
+
 
+            }
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+    }
 
     @GetMapping("/updateItem")
     public  void updateItem(String fileName,String flag){
@@ -670,17 +689,16 @@ public class SystemController extends BaseController {
 
     @GetMapping("updateMarks")
     public void updateMarks(String fileName,String flag){
-        File file = new File("C:\\Users\\Administrator\\Desktop\\推广量表\\"+fileName+".xlsx");
+        File file = new File("C:\\Users\\Administrator\\Desktop\\"+fileName+".xlsx");
         try {
             List<List<List<Object>>> datas = ExcelUtil.getBankListByExcelSheet(new FileInputStream(file.getAbsolutePath()), file.getName());
             List<ScaleMarksEntity> scaleMarksEntities = scaleMarksService.getScaleMarksByFlag(flag);
             List<List<Object>> markObj = datas.get(2);
             for (int i =0;i<scaleMarksEntities.size();i++){
                 ScaleMarksEntity entity = scaleMarksEntities.get(i);
-                entity.setSymptom(markObj.get(i).get(3).toString());
                 entity.setImprovementSuggestions(markObj.get(i).get(4).toString());
                 log.info(entity.toString());
-            //    scaleMarksService.saveScaleMarks(entity);
+                //scaleMarksService.saveScaleMarks(entity);
             }
 
         }catch (Exception e){

+ 2 - 12
src/main/java/com/rf/psychological/wxpay/controller/PromotionInfoController.java

@@ -1,13 +1,10 @@
 package com.rf.psychological.wxpay.controller;
 
-import cn.hutool.core.date.DatePattern;
 import cn.hutool.core.date.DateUtil;
 import com.rf.psychological.base.rest.BaseController;
 import com.rf.psychological.dao.model.CognitiveTaskEntity;
-import com.rf.psychological.scale.dao.model.ScaleDetailsEntity;
 import com.rf.psychological.scale.dao.model.SubjectEntity;
 import com.rf.psychological.scale.dao.repository.CognitiveTaskRepository;
-import com.rf.psychological.scale.service.ScaleDetailsService;
 import com.rf.psychological.scale.service.SubjectService;
 import com.rf.psychological.security.SafetyProcess;
 import com.rf.psychological.utils.Result;
@@ -39,17 +36,11 @@ import java.util.List;
 public class PromotionInfoController extends BaseController {
     @Autowired
     private PromotionInfoService infoService;
-
     @Autowired
     private CognitiveTaskRepository repository;
-
     @Autowired
     private SubjectService subjectService;
 
-
-    @Autowired
-    private ScaleDetailsService scaleDetailsService;
-
     @Autowired
     private OrderInfoService orderInfoService;
 
@@ -61,7 +52,6 @@ public class PromotionInfoController extends BaseController {
         try {
             PromotionInfo info = infoService.findInfoByFlag(subjectId);
             SubjectEntity entity = subjectService.getSubjectEntityByFlag(info.getFlag());
-            //ScaleDetailsEntity entity = scaleDetailsService.getSubjectDetailsByFlag(info.getFlag());
             if (entity != null){
                 info.setName(entity.getName());
             }
@@ -81,8 +71,8 @@ public class PromotionInfoController extends BaseController {
             if (info == null){
                 return success(null,"免费");
             }
-            int count = orderInfoService.countNum(info.getFlag(),DateUtil.format(info.getPromotionStartTime(), DatePattern.NORM_DATETIME_PATTERN));
-            info.setResidueNum(info.getPromotionNum()-count);
+            //int count = orderInfoService.countNum(info.getFlag(),DateUtil.format(info.getPromotionStartTime(), DatePattern.NORM_DATETIME_PATTERN));
+            //info.setResidueNum(info.getPromotionNum()-count);
             return success(info);
         }catch (Exception e ){
             e.printStackTrace();