部门与地图关联配置
This commit is contained in:
@@ -87,6 +87,8 @@ public enum CommonResponseEnum {
|
|||||||
DEPT_NOT_EXIST("A0098", "部门id不存在"),
|
DEPT_NOT_EXIST("A0098", "部门id不存在"),
|
||||||
|
|
||||||
DEPT_BINDED("A0099", "部门id已绑定"),
|
DEPT_BINDED("A0099", "部门id已绑定"),
|
||||||
|
|
||||||
|
ID_NOT_EXIST("A0099", "id不存在"),
|
||||||
;
|
;
|
||||||
|
|
||||||
private final String code;
|
private final String code;
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ package com.njcn.system.pojo.po;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.njcn.db.bo.BaseEntity;
|
import com.njcn.db.bo.BaseEntity;
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author hongawen
|
* @author hongawen
|
||||||
@@ -42,7 +42,7 @@ public class Config extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 审计日志存储时间(1-6个月,默认3个月)
|
* 审计日志存储时间(1-6个月,默认3个月)
|
||||||
*/
|
*/
|
||||||
private Boolean logTime;
|
private Integer logTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态:0-删除 1-正常
|
* 状态:0-删除 1-正常
|
||||||
|
|||||||
@@ -101,5 +101,20 @@ public class DeptMapController extends BaseController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON, operateType = OperateType.DELETE)
|
||||||
|
@GetMapping("/removeDeptMapConfigById")
|
||||||
|
@ApiOperation("根据id删除地图与部门关联配置")
|
||||||
|
@ApiImplicitParam(name = "id", value = "参数id", required = true)
|
||||||
|
public HttpResult removeDeptMapConfigById(@RequestParam("id") String id) {
|
||||||
|
String methodDescribe = getMethodDescribe("removeDeptMapConfigById");
|
||||||
|
LogUtil.njcnDebug(log, "{}", methodDescribe, methodDescribe);
|
||||||
|
boolean res = deptMapService.removeDeptMapConfigById(id);
|
||||||
|
if (res) {
|
||||||
|
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||||
|
} else {
|
||||||
|
throw new BusinessException(CommonResponseEnum.ID_NOT_EXIST);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,4 +19,6 @@ public interface DeptMapService {
|
|||||||
|
|
||||||
boolean addDeptMapConfig(Double longitude, Double latitude, Integer maxValue, Integer minValue, Integer beValue, Integer mapType, String deptId);
|
boolean addDeptMapConfig(Double longitude, Double latitude, Integer maxValue, Integer minValue, Integer beValue, Integer mapType, String deptId);
|
||||||
|
|
||||||
|
boolean removeDeptMapConfigById(String id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ public class DeptMapServiceImpl implements DeptMapService {
|
|||||||
deptMap.setBeValue(beValue);
|
deptMap.setBeValue(beValue);
|
||||||
deptMap.setMapType(mapType);
|
deptMap.setMapType(mapType);
|
||||||
deptMap.setDeptId(deptId);
|
deptMap.setDeptId(deptId);
|
||||||
deptMap.setState(DataStateEnum.ENABLE.getCode());
|
// deptMap.setState(DataStateEnum.ENABLE.getCode());
|
||||||
deptMap.setCreateBy(RequestUtil.getUserIndex());
|
deptMap.setCreateBy(RequestUtil.getUserIndex());
|
||||||
deptMap.setCreateTime(LocalDateTime.now());
|
deptMap.setCreateTime(LocalDateTime.now());
|
||||||
deptMap.setUpdateBy(RequestUtil.getUserIndex());
|
deptMap.setUpdateBy(RequestUtil.getUserIndex());
|
||||||
@@ -105,5 +105,16 @@ public class DeptMapServiceImpl implements DeptMapService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean removeDeptMapConfigById(String id) {
|
||||||
|
DeptMap deptMap = deptMapMapper.selectOne(new QueryWrapper<DeptMap>().eq("sys_dept_map.Id", id));
|
||||||
|
if (!Objects.isNull(deptMap) && deptMap.getState().equals(DataStateEnum.ENABLE.getCode())) {
|
||||||
|
deptMap.setState(DataStateEnum.DELETED.getCode());
|
||||||
|
deptMapMapper.updateById(deptMap);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user