Browse Source

操作日志

lin 3 years ago
parent
commit
18e3e963a5

+ 12 - 0
zoniot-rmcp/zoniot-rmcp-web/src/main/java/com/zcxk/rmcp/web/controller/ImportController.java

@@ -66,5 +66,17 @@ public class ImportController {
             operateLog.setCreateTime(new Date());
             userCenterClient.insert(operateLog);
         }
+        if(importType == 3){
+            LoginUser user = UserUtil.getCurrentUser();
+            OperateLogEntity operateLog = new OperateLogEntity();
+            operateLog.setUserName(user.getUsername());
+            operateLog.setPhone(user.getPhoneNumber());
+            operateLog.setTenantId(user.getTenantId());
+            operateLog.setCompanyId(user.getCompanyId());
+            operateLog.setDepartmentId(user.getDepartmentId());
+            operateLog.setOperateContent("【安装计划】批量添加");
+            operateLog.setCreateTime(new Date());
+            userCenterClient.insert(operateLog);
+        }
     }
 }

+ 5 - 0
zoniot-rmcp/zoniot-rmcp-web/src/main/java/com/zcxk/rmcp/web/controller/InstallPlanController.java

@@ -10,6 +10,7 @@ import com.zcxk.rmcp.api.vo.DeviceStatisticsVo;
 import com.zcxk.rmcp.api.vo.InstallPlanVo;
 import com.zcxk.rmcp.api.vo.PlanStatisticsVo;
 import com.zcxk.rmcp.core.entity.InstallList;
+import com.zcxk.rmcp.web.logAdvice.LogAnnotation;
 import com.zcxk.rmcp.web.service.install.InstallListService;
 import com.zcxk.rmcp.web.service.install.InstallPlanService;
 import io.swagger.annotations.Api;
@@ -66,6 +67,7 @@ public class InstallPlanController {
 
     @PostMapping("add")
     @ApiOperation(value = "添加安装计划")
+    @LogAnnotation(module = "【安装计划】添加")
     public AjaxMessage<Void> add(
             @ApiParam(value = "安装计划", required = true) @RequestBody(required = true) @Valid InstallPlanInputDto installPlanInput
     ) {
@@ -74,6 +76,7 @@ public class InstallPlanController {
     }
 
     @PostMapping("batchDel")
+    @LogAnnotation(module = "【安装计划】删除")
     @ApiOperation(value = "批量删除安装计划")
     public AjaxMessage<Void> batchDel(
             @ApiParam(value = "安装计划id", required = true) @RequestBody(required = true)  List<Integer> ids
@@ -83,6 +86,7 @@ public class InstallPlanController {
     }
 
     @PostMapping("allDel")
+    @LogAnnotation(module = "【安装计划】全部删除")
     @ApiOperation(value = "全部删除安装计划")
     public AjaxMessage<Void> allDel(
             @ApiParam(value = "名称", required = false) @RequestParam(required = false) String name,
@@ -115,6 +119,7 @@ public class InstallPlanController {
 
     @GetMapping("downPlanTemplate")
     @ApiOperation(value = "下载计划模板", notes = "下载计划模板")
+    @LogAnnotation(module = "【安装计划】下载模板")
     public void planDownTemplate(
             @ApiParam(value = "access_token", required = true) @RequestParam(required = true) String accessToken,
             HttpServletRequest request, HttpServletResponse response