Parcourir la source

小程序功能

wanghaicheng il y a 5 ans
Parent
commit
1f6a970189

+ 40 - 0
lift-business-service/src/main/java/cn/com/ty/lift/business/applet/controller/AppletController.java

@@ -1,7 +1,47 @@
 package cn.com.ty.lift.business.applet.controller;
 
+import cn.com.ty.lift.business.applet.dao.mapper.AppletMapper;
+import cn.com.ty.lift.business.emergency.mapper.EmergencyRepairMapper;
+import cn.com.ty.lift.business.emergency.service.EmergencyRepairService;
+import cn.com.ty.lift.business.maintenance.dao.mapper.MaintenanceRecordMapper;
+import cn.com.ty.lift.business.project.dao.entity.ProjectLiftRelevance;
+import cn.com.xwy.boot.web.dto.RestResponse;
+import lombok.AllArgsConstructor;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.List;
+import java.util.Map;
+
 @RestController
+@AllArgsConstructor
 public class AppletController {
+    private final EmergencyRepairService emergencyRepairService;
+    private final MaintenanceRecordMapper maintenanceRecordMapper;
+
+    private final EmergencyRepairMapper emergencyRepairMapper;
+    private final AppletMapper appletMapper;
+
+    @PostMapping("/lift/info")
+    public RestResponse liftInfo(@RequestBody ProjectLiftRelevance projectLift) {
+        List<Map<String, Object>> projectLiftInfos = appletMapper.projectLiftInfo(projectLift.getProjectId(), projectLift.getLiftId());
+        if (null != projectLiftInfos) {
+            return RestResponse.success(projectLiftInfos);
+        }
+        return RestResponse.success();
+    }
+
+    //fixme 维保以及下面急修记录可能需要新增接口处理
+    @PostMapping("/record/maintenance")
+    public RestResponse maintenanceRecord() {
+        //maintenanceRecordMapper.selectMaps();
+        return RestResponse.success();
+    }
+
+    @PostMapping("/record/emergency")
+    public RestResponse emergencyRecord() {
+//        emergencyRepairMapper.selectMaps()
+        return RestResponse.success();
+    }
 }

+ 2 - 2
lift-business-service/src/main/java/cn/com/ty/lift/business/applet/service/AppletService.java

@@ -1,7 +1,7 @@
 package cn.com.ty.lift.business.applet.service;
 
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.stereotype.Service;
 
-@RestController
+@Service
 public class AppletService {
 }

+ 0 - 1
lift-business-service/src/main/java/cn/com/ty/lift/business/evaluation/controller/EvaluationController.java

@@ -35,5 +35,4 @@ public class EvaluationController {
     public RestResponse save(EvaluationRequest evaluationRequest) {
         return evaluationService.saveEvaluation(evaluationRequest);
     }
-
 }

+ 5 - 0
lift-system-service/pom.xml

@@ -29,6 +29,11 @@
             <artifactId>lift-common</artifactId>
             <version>1.0-SNAPSHOT</version>
         </dependency>
+        <dependency>
+            <groupId>com.google.zxing</groupId>
+            <artifactId>core</artifactId>
+            <version>3.3.3</version>
+        </dependency>
         <dependency>
             <groupId>org.projectlombok</groupId>
             <artifactId>lombok</artifactId>

+ 1 - 3
lift-system-service/src/main/java/cn/com/ty/lift/system/settings/controller/GlobalSetController.java

@@ -11,9 +11,7 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
-import java.time.Clock;
 import java.time.LocalDateTime;
-import java.time.ZoneId;
 import java.util.List;
 
 /**
@@ -56,7 +54,7 @@ public class GlobalSetController {
     @PostMapping("/modify")
     public RestResponse modify(@RequestBody List<GlobalSet> globalSets) {
         globalSets.forEach(globalSet -> globalSet.setUpdateTime(LocalDateTime.now()));
-        if (globalSetService.saveOrUpdateBatch(globalSets)) {
+        if (globalSetService.updateBatchById(globalSets)) {
             return RestResponse.success(null, "成功");
         }
         return RestResponse.success();