部门与地图关联配置
This commit is contained in:
@@ -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 removeDeptMapConfigById(String id);
|
||||
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ public class DeptMapServiceImpl implements DeptMapService {
|
||||
deptMap.setBeValue(beValue);
|
||||
deptMap.setMapType(mapType);
|
||||
deptMap.setDeptId(deptId);
|
||||
deptMap.setState(DataStateEnum.ENABLE.getCode());
|
||||
// deptMap.setState(DataStateEnum.ENABLE.getCode());
|
||||
deptMap.setCreateBy(RequestUtil.getUserIndex());
|
||||
deptMap.setCreateTime(LocalDateTime.now());
|
||||
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