Browse Source

添加调拨客户信息

zyg 2 years ago
parent
commit
896f910a13

+ 7 - 2
src/main/java/cn/fastfun/controller/api/ApiAppDeviceLogController.java

@@ -203,6 +203,13 @@ public class ApiAppDeviceLogController {
         return ApiDTO.ok();
     }
 
+    @ApiOperation(value = "获取客户列表 ")
+    @RequestMapping(value = "customList", method = RequestMethod.GET)
+    public synchronized ApiDTO getCustomList() {
+        List<Map<String,Object>> result = deviceLogService.getCustomList();
+        return ApiDTO.ok(result);
+    }
+
     @ApiOperation(value = "调回平台 ")
     @RequestMapping(value = "transferBack", method = RequestMethod.POST)
     public synchronized ApiDTO transferBack(@RequestBody @ApiParam(name = "回调参数", value = "输入sn", required = true) TransferFormParam param) {
@@ -210,8 +217,6 @@ public class ApiAppDeviceLogController {
         return ApiDTO.ok();
     }
 
-
-
     @ApiOperation(value = "设备调拨 查看详情")
     @RequestMapping(value = "transfer/detialQuery", method = RequestMethod.POST)
     public ApiPageDTO transferDetialQuery(@RequestBody detialQueryParam param) {

+ 6 - 8
src/main/java/cn/fastfun/service/AppDeviceLogService.java

@@ -1,17 +1,10 @@
 package cn.fastfun.service;
 
 import cn.fastfun.controller.param.*;
-import cn.fastfun.service.entity.AppDevice;
 import cn.fastfun.service.entity.AppDeviceLog;
-import com.bridge.dto.ApiDTO;
-import com.bridge.dto.QueryParamExp;
 import com.bridge.service.JpaService;
-import io.swagger.annotations.ApiOperation;
-import io.swagger.annotations.ApiParam;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
 
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -56,4 +49,9 @@ public interface AppDeviceLogService extends JpaService<AppDeviceLog, String> {
      */
     void handle(HandelFormParam param);
 
+    /**
+     * 获取客户列表
+     * @return java.util.List<java.util.Map<java.lang.String,java.lang.Object>>
+     */
+    List<Map<String,Object>> getCustomList();
 }

+ 14 - 0
src/main/java/cn/fastfun/service/impl/AppDeviceLogServiceImpl.java

@@ -343,4 +343,18 @@ public class AppDeviceLogServiceImpl extends JpaServiceImp<AppDeviceLog, String>
             save(appDeviceLog); // 记录处置日志
         });
     }
+
+    /**
+     * 获取客户列表
+     *
+     * @return java.util.List<java.util.Map < java.lang.String, java.lang.Object>>
+     */
+    @Override
+    public List<Map<String, Object>> getCustomList() {
+        StringBuilder sql = new StringBuilder();
+        sql.append("SELECT id,organ_code,title from app_custom where organ_code is not null");
+        log.info("SQL: {}", sql.toString());
+        List<Map<String, Object>> mapList = this.getListBySQL(sql.toString(), new HashMap<>());
+        return mapList;
+    }
 }