lyhzzz 1 rok temu
rodzic
commit
19e3b596e8

+ 0 - 3
src/main/java/com/fdkankan/manage/controller/IncrementTypeController.java

@@ -35,8 +35,5 @@ public class IncrementTypeController {
         return ResultData.ok(incrementTypeService.list(wrapper));
     }
 
-    public static void main(String[] args) {
-        System.out.println(SecurityUtil.MD5("DDDDDFFC'\u0010"));
-    }
 }
 

+ 9 - 0
src/main/java/com/fdkankan/manage/httpClient/service/LaserService.java

@@ -416,6 +416,15 @@ public class LaserService {
         return this.list(newParam);
     }
 
+    public HashMap<String, JSONObject> list(String sceneName,Integer sceneSource) {
+        LaserSceneParam newParam = new LaserSceneParam();
+        newParam.setPageNum(1);
+        newParam.setPageSize(9999);
+        newParam.setTitle(sceneName);
+        newParam.setSceneSource(sceneSource);
+        return this.list(newParam);
+    }
+
     public HashMap<String, JSONObject> list(LaserSceneParam newParam) {
         HashMap<String, JSONObject> map = new HashMap<>();
         try {

+ 1 - 1
src/main/java/com/fdkankan/manage/mapper/IScenePlusMapper.java

@@ -20,7 +20,7 @@ import java.util.List;
 @Mapper
 public interface IScenePlusMapper extends BaseMapper<ScenePlus> {
 
-    List<GroupByCount> getCountGroupByUserId(@Param("userIdList") List<Long> userIdList, @Param("isObj") Integer isObj);
+    List<GroupByCount> getCountGroupByUserId(@Param("userIdList") List<Long> userIdList);
 
     List<GroupByCount> getCountGroupByCameraId(@Param("cameraIds") List<Long> cameraIds);
 

+ 1 - 1
src/main/java/com/fdkankan/manage/mapper/ISceneProMapper.java

@@ -22,7 +22,7 @@ import java.util.List;
 @Mapper
 public interface ISceneProMapper extends BaseMapper<ScenePro> {
 
-    List<GroupByCount> getCountGroupByUserId(@Param("userIdList") List<Long> userIdList,@Param("isObj") Integer isObj);
+    List<GroupByCount> getCountGroupByUserId(@Param("userIdList") List<Long> userIdLis);
 
     List<GroupByCount> getCountGroupByCameraId(@Param("cameraIds") List<Long> cameraIds);
 

+ 1 - 1
src/main/java/com/fdkankan/manage/service/IScenePlusService.java

@@ -22,7 +22,7 @@ public interface IScenePlusService extends IService<ScenePlus> {
 
     void unbindCamera(Long cameraId);
 
-    HashMap<Long, Long> getCountGroupByUserId(List<Long> userIdList,Integer isObj);
+    HashMap<Long, Long> getCountGroupByUserId(List<Long> userIdList);
 
     HashMap<Long, Long> getCountGroupByCameraId(ArrayList<Long> longs);
 

+ 1 - 1
src/main/java/com/fdkankan/manage/service/ISceneProService.java

@@ -29,7 +29,7 @@ public interface ISceneProService extends IService<ScenePro> {
 
     List<ScenePro> getListByCameraId(Long cameraId);
 
-    HashMap<Long, Long> getCountGroupByUserId(List<Long> userIdList,Integer isObj);
+    HashMap<Long, Long> getCountGroupByUserId(List<Long> userIdList);
 
     HashMap<Long, Long>  getCountGroupByCameraId(List<Long> cameraIds);
 

+ 1 - 0
src/main/java/com/fdkankan/manage/service/impl/IncrementOrderMgServiceImpl.java

@@ -33,6 +33,7 @@ public class IncrementOrderMgServiceImpl extends ServiceImpl<IIncrementOrderMgMa
         incrementOrderMg.setOrderSn(DateUtils.getOrderSn());
         incrementOrderMg.setPayStatus(1);
         incrementOrderMg.setIncrementType(incrementType.getId());
+        incrementOrderMg.setAmount(param.getAmount());
         if(incrementType.getValidTimeType() == 0){
             incrementOrderMg.setMemberLevels("PR");
         }

+ 2 - 2
src/main/java/com/fdkankan/manage/service/impl/ScenePlusServiceImpl.java

@@ -55,9 +55,9 @@ public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlu
     }
 
     @Override
-    public HashMap<Long, Long> getCountGroupByUserId(List<Long> userIdList,Integer isObj) {
+    public HashMap<Long, Long> getCountGroupByUserId(List<Long> userIdList) {
         HashMap<Long,Long> map = new HashMap<>();
-        List<GroupByCount> result = this.getBaseMapper().getCountGroupByUserId(userIdList,isObj);
+        List<GroupByCount> result = this.getBaseMapper().getCountGroupByUserId(userIdList);
         result.forEach(entity ->map.put(entity.getId(),entity.getCount()));
         return map;
     }

+ 23 - 10
src/main/java/com/fdkankan/manage/service/impl/SceneProServiceImpl.java

@@ -120,9 +120,9 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
     }
 
     @Override
-    public HashMap<Long, Long> getCountGroupByUserId(List<Long> userIdList,Integer isObj) {
+    public HashMap<Long, Long> getCountGroupByUserId(List<Long> userIdList) {
         HashMap<Long,Long> map = new HashMap<>();
-        List<GroupByCount> result = this.getBaseMapper().getCountGroupByUserId(userIdList,isObj);
+        List<GroupByCount> result = this.getBaseMapper().getCountGroupByUserId(userIdList);
         result.forEach(entity ->map.put(entity.getId(),entity.getCount()));
         return map;
     }
@@ -231,7 +231,20 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
             }
         }
         if((param.getCameraIds() != null && param.getCameraIds().size()<=0) || (param.getUserIds() != null && param.getUserIds().size()<=0)){
-            param.setNum("empty");
+            return PageInfo.PageInfoEmpty(param.getPageNum(),param.getPageSize());
+        }
+        HashMap<String, JSONObject> laserMap = new HashMap<>();
+        if(param.getType() == 2 && StringUtils.isNotBlank(param.getSceneName())){
+            laserMap = laserService.list(param.getSceneName(), 4);
+            param.setSceneName(null);
+        }
+        if(param.getType() == 6 && StringUtils.isNotBlank(param.getSceneName())){
+            laserMap = laserService.list(param.getSceneName(), 5);
+            param.setSceneName(null);
+        }
+        if(!laserMap.isEmpty()){
+            Set<String> keySet = laserMap.keySet();
+            param.setNumList(new ArrayList<>(keySet));
         }
 
         Page<SceneVo> page = this.getBaseMapper().pageList(new Page<>(param.getPageNum(),param.getPageSize()),param);
@@ -240,7 +253,6 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         HashMap<String,SceneColdStorage> coldStorageMap = null;
         HashMap<Long, User> userMap = null;
         HashMap<Long, Camera> cameraMap = null;
-        HashMap<String,JSONObject> ssSceneMap = null;
         HashMap<String,MqSendLog> mqSendLogMap = null;
 
         List<String> sceneNumList = page.getRecords().stream().map(SceneVo::getNum).collect(Collectors.toList());
@@ -252,12 +264,13 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
             List<Long> cameraIds = records.parallelStream().map(SceneVo::getCameraId).collect(Collectors.toList());
             cameraMap = cameraService.getByIds(cameraIds);
 
-            if(param.getType() == 2 ){
-                ssSceneMap = laserService.list(sceneNumList,4);
+            if(param.getType() == 2 && laserMap.isEmpty()){
+                laserMap = laserService.list(sceneNumList,4);
             }
-            if(param.getType() == 6){
-                ssSceneMap = laserService.list(sceneNumList,5);
+            if(param.getType() == 6 && laserMap.isEmpty()){
+                laserMap = laserService.list(sceneNumList,5);
             }
+
             List<String> modelingNumList = page.getRecords().stream().filter(e -> e.getStatus() == 0).map(SceneVo::getNum).collect(Collectors.toList());
             if(!modelingNumList.isEmpty()){
                 mqSendLogMap = mqSendLogService.getByNumList(modelingNumList);
@@ -265,7 +278,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         }
         for (SceneVo record : page.getRecords()) {
             if(param.getType() == 2 || param.getType() == 6){
-                JSONObject ssObj = ssSceneMap.get(record.getNum());
+                JSONObject ssObj = laserMap.get(record.getNum());
                 if(ssObj!=null){
                     record.setSceneName(ssObj.getString("title"));
                     record.setThumb(ssObj.getString("thumb"));
@@ -274,7 +287,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
                     record.setViewCount(ssObj.getInteger("viewCount"));
                     record.setStatus(toFdStatus(ssObj.getInteger("status")));
                     record.setAlgorithmTime(ssObj.getString("algorithmTime"));
-                }else{
+                }else if(record.getStatus() != 0){
                     record.setStatus(-1);
                     record.setWebSite(null);
                 }

+ 2 - 2
src/main/java/com/fdkankan/manage/service/impl/UserServiceImpl.java

@@ -122,8 +122,8 @@ public class UserServiceImpl extends ServiceImpl<IUserMapper, User> implements I
             HashMap<Long,Long> incrementCountMap = userIncrementService.getValidCountGroupByUserId(userIdList);
             HashMap<Long,Long> cameraCountMap = cameraDetailService.getCountGroupByUserId(userIdList);
             HashMap<Long,Long> sceneCountMap = sceneService.getCountGroupByUserId(userIdList);
-            HashMap<Long,Long> sceneProCountMap = sceneProService.getCountGroupByUserId(userIdList,0);
-            HashMap<Long,Long> scenePlusCountMap = scenePlusService.getCountGroupByUserId(userIdList,0);
+            HashMap<Long,Long> sceneProCountMap = sceneProService.getCountGroupByUserId(userIdList);
+            HashMap<Long,Long> scenePlusCountMap = scenePlusService.getCountGroupByUserId(userIdList);
            // HashMap<Long,Long> sceneProCountObjMap = sceneProService.getCountGroupByUserId(userIdList,1);
           //  HashMap<Long,Long> scenePlusCountObjMap = scenePlusService.getCountGroupByUserId(userIdList,1);
 

+ 4 - 2
src/main/java/com/fdkankan/manage/util/ExcelUtil.java

@@ -42,8 +42,10 @@ public class ExcelUtil {
                     continue;
                 }
                 if(cell != null){
-                    String value = fommartNum(cell.toString().trim());
-                    map.put(cellNum,value);
+                    DataFormatter dataFormatter = new DataFormatter();
+                    String cellValue = dataFormatter.formatCellValue(cell);
+                    map.put(cellNum,cellValue);
+
                 }
 
             }

+ 4 - 0
src/main/java/com/fdkankan/manage/vo/request/UserIncrementParam.java

@@ -3,6 +3,8 @@ package com.fdkankan.manage.vo.request;
 import com.baomidou.mybatisplus.annotation.TableField;
 import lombok.Data;
 
+import java.math.BigDecimal;
+
 @Data
 public class UserIncrementParam {
     private Long id;
@@ -48,4 +50,6 @@ public class UserIncrementParam {
      * 备注
      */
     private String remark;
+
+    private BigDecimal amount;
 }

+ 0 - 10
src/main/resources/mapper/manage/ScenePlusMapper.xml

@@ -4,21 +4,11 @@
 
     <select id="getCountGroupByUserId" resultType="com.fdkankan.manage.vo.response.GroupByCount" >
         SELECT user_id as id, count(p.id) as count FROM t_scene_plus p
-        <if test="isObj != null and isObj == 1">
-            left join t_scene_plus_ext e on p.id = e.plus_id
-        </if>
         WHERE  p.rec_status = 'A'
         and  p.user_id in
         <foreach item="userId" collection="userIdList" open="(" separator="," close=")">
             #{userId}
         </foreach>
-        <if test="isObj != null and isObj == 0">
-            and p.scene_source in (1,2,3,12,13,14)
-        </if>
-        <if test="isObj != null and isObj == 1">
-            and e.is_obj = 1
-            and p.scene_source = 4
-        </if>
         GROUP BY p.user_id
     </select>
 

+ 7 - 7
src/main/resources/mapper/manage/SceneProMapper.xml

@@ -8,13 +8,6 @@
          <foreach item="userId" collection="userIdList" open="(" separator="," close=")">
             #{userId}
         </foreach>
-        <if test="isObj !=null and isObj == 0">
-            and scene_source in (1,2,3,12,13,14)
-        </if>
-        <if test="isObj !=null and isObj == 1">
-           and  is_obj = 1
-            and scene_source  = 4
-        </if>
         GROUP BY user_id
     </select>
     <select id="getCountGroupByCameraId" resultType="com.fdkankan.manage.vo.response.GroupByCount">
@@ -68,6 +61,13 @@
             </foreach>
         </if>
 
+        <if test="param.numList !=null and param.numList.size >0">
+            and s.num in
+            <foreach item="num" collection="param.numList" open="(" separator="," close=")">
+                #{num}
+            </foreach>
+        </if>
+
         <if test="param.type !=null and param.type == 0">
             and s.scene_source in (1,2,12,13,14)
         </if>