Commit 57438801 by 刘宇峰

新e盾业务管理系统后台-围栏

1 parent 41af67b4
package cn.com.glsx.admin.modules.controller; package cn.com.glsx.admin.modules.controller;
import cn.com.glsx.admin.modules.model.ElectricFenceBO;
import com.glsx.plat.common.annotation.SysLog;
import com.glsx.plat.core.web.R;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.*;
@Slf4j @Slf4j
@RestController @RestController
@RequestMapping(value = "/fence") @RequestMapping(value = "/fence")
public class ElectricFenceController { public class ElectricFenceController {
/**
* 新增围栏
*
* @param fenceBO
* @return
*/
@SysLog("新增围栏")
@PostMapping(value = "/add")
public R add(@RequestBody @Validated ElectricFenceBO fenceBO) {
return R.ok();
}
/**
* 编辑围栏
*
* @param fenceBO
* @return
*/
@SysLog("编辑围栏")
@PostMapping(value = "/edit")
public R edit(@RequestBody @Validated ElectricFenceBO fenceBO) {
return R.ok();
}
/**
* 围栏详情
*
* @param fenceId
* @return
*/
@GetMapping(value = "/info")
public R info(@RequestParam("fenceId") Long fenceId) {
return R.ok();
}
/**
* 删除围栏
*
* @param fenceId
* @return
*/
@SysLog("删除围栏")
@GetMapping(value = "/delete")
public R delete(@RequestParam("fenceId") Long fenceId) {
return R.ok();
}
} }
...@@ -38,8 +38,7 @@ public class ElectricFenceService { ...@@ -38,8 +38,7 @@ public class ElectricFenceService {
//设置定位信息类型为gps类型 默认都是创建gps类型围栏 //设置定位信息类型为gps类型 默认都是创建gps类型围栏
fence.setLocationType(fenceBO.getLocationType() == null ? 1 : fenceBO.getLocationType()); fence.setLocationType(fenceBO.getLocationType() == null ? 1 : fenceBO.getLocationType());
fence.setRecord("操作时间:" + DateUtils.formatNormal(new Date()) fence.setRecord("操作时间:" + DateUtils.formatNormal(new Date())
+ " 操作人:" + " 操作人:" + ShieldContextHolder.getAccount() + "(" + ShieldContextHolder.getUserId() + ")"
+ ShieldContextHolder.getAccount() + "(" + ShieldContextHolder.getUserId() + ")"
+ "<br/>"); + "<br/>");
fence.setCreatedBy(ShieldContextHolder.getUserId()); fence.setCreatedBy(ShieldContextHolder.getUserId());
fence.setCreatedDate(new Date()); fence.setCreatedDate(new Date());
...@@ -79,7 +78,7 @@ public class ElectricFenceService { ...@@ -79,7 +78,7 @@ public class ElectricFenceService {
fence.setBizFenceType(fenceBO.getBizFenceType() == null ? localFence.getBizFenceType() : fenceBO.getBizFenceType()); fence.setBizFenceType(fenceBO.getBizFenceType() == null ? localFence.getBizFenceType() : fenceBO.getBizFenceType());
fence.setLocationType(fenceBO.getLocationType() == null ? localFence.getLocationType() : fenceBO.getLocationType()); fence.setLocationType(fenceBO.getLocationType() == null ? localFence.getLocationType() : fenceBO.getLocationType());
fence.setRecord(localFence.getRecord() + "操作时间:" + DateUtils.formatNormal(new Date()) fence.setRecord(localFence.getRecord() + "操作时间:" + DateUtils.formatNormal(new Date())
+ ShieldContextHolder.getAccount() + "(" + ShieldContextHolder.getUserId() + ")" + " 操作人:" + ShieldContextHolder.getAccount() + "(" + ShieldContextHolder.getUserId() + ")"
+ "<br/>"); + "<br/>");
fence.setStartTime(fenceBO.getStartTime()); fence.setStartTime(fenceBO.getStartTime());
fence.setEndTime(fenceBO.getEndTime()); fence.setEndTime(fenceBO.getEndTime());
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!