diff --git a/pom.xml b/pom.xml index a1dba4e..76aa5dc 100644 --- a/pom.xml +++ b/pom.xml @@ -24,11 +24,6 @@ spring-boot-starter-web - mysql - mysql-connector-java - 8.0.15 - - org.springframework.boot spring-boot-starter-test test @@ -57,13 +52,6 @@ spring-boot-starter-data-redis - - - - com.alibaba - druid-spring-boot-starter - 1.1.10 - io.jsonwebtoken @@ -101,16 +89,6 @@ 4.5.7 - com.github.pagehelper - pagehelper-spring-boot-autoconfigure - 1.2.9 - - - com.github.pagehelper - pagehelper - 5.0.0 - - org.springframework.boot spring-boot-starter-data-mongodb @@ -121,22 +99,12 @@ 2.1.5.RELEASE - org.mybatis.spring.boot - mybatis-spring-boot-starter - 1.2.0 - - commons-net commons-net 3.6 - org.mybatis - mybatis - 3.4.6 - - org.apache.commons commons-lang3 3.8.1 diff --git a/src/main/java/com/objecteye/VehicleApplication.java b/src/main/java/com/objecteye/VehicleApplication.java index 58f09f1..806e1e9 100644 --- a/src/main/java/com/objecteye/VehicleApplication.java +++ b/src/main/java/com/objecteye/VehicleApplication.java @@ -1,6 +1,5 @@ package com.objecteye; -import com.objecteye.handle.Ftp2Mongo; import com.objecteye.websocket.SelectMongoData; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -26,10 +25,6 @@ public class VehicleApplication { //存储系统开始运行时间 SelectMongoData selectMongoData = run.getBean(SelectMongoData.class); selectMongoData.setSystemStartTime(); - - Ftp2Mongo bean = run.getBean(Ftp2Mongo.class); - bean.downloadFile(); - } @Bean diff --git a/src/main/java/com/objecteye/common/CommonPage.java b/src/main/java/com/objecteye/common/CommonPage.java deleted file mode 100644 index 074d31d..0000000 --- a/src/main/java/com/objecteye/common/CommonPage.java +++ /dev/null @@ -1,84 +0,0 @@ -package com.objecteye.common; - -import com.github.pagehelper.PageInfo; -import org.springframework.data.domain.Page; - -import java.util.List; - -/** - * 分页数据封装类 - */ -public class CommonPage { - private Integer pageNum; - private Integer pageSize; - private Integer totalPage; - private Long total; - private List list; - - /** - * 将PageHelper分页后的list转为分页信息 - */ - public static CommonPage restPage(List list) { - CommonPage result = new CommonPage(); - PageInfo pageInfo = new PageInfo(list); - result.setTotalPage(pageInfo.getPages()); - result.setPageNum(pageInfo.getPageNum()); - result.setPageSize(pageInfo.getPageSize()); - result.setTotal(pageInfo.getTotal()); - result.setList(pageInfo.getList()); - return result; - } - - /** - * 将SpringData分页后的list转为分页信息 - */ - public static CommonPage restPage(Page pageInfo) { - CommonPage result = new CommonPage(); - result.setTotalPage(pageInfo.getTotalPages()); - result.setPageNum(pageInfo.getNumber()); - result.setPageSize(pageInfo.getSize()); - result.setTotal(pageInfo.getTotalElements()); - result.setList(pageInfo.getContent()); - return result; - } - - public Integer getPageNum() { - return pageNum; - } - - public void setPageNum(Integer pageNum) { - this.pageNum = pageNum; - } - - public Integer getPageSize() { - return pageSize; - } - - public void setPageSize(Integer pageSize) { - this.pageSize = pageSize; - } - - public Integer getTotalPage() { - return totalPage; - } - - public void setTotalPage(Integer totalPage) { - this.totalPage = totalPage; - } - - public List getList() { - return list; - } - - public void setList(List list) { - this.list = list; - } - - public Long getTotal() { - return total; - } - - public void setTotal(Long total) { - this.total = total; - } -} diff --git a/src/main/java/com/objecteye/component/ParamInterceptor.java b/src/main/java/com/objecteye/component/ParamInterceptor.java deleted file mode 100644 index d6ea525..0000000 --- a/src/main/java/com/objecteye/component/ParamInterceptor.java +++ /dev/null @@ -1,74 +0,0 @@ - -package com.objecteye.component; - -/*@Component -public class ParamInterceptor implements HandlerInterceptor { - - @Autowired - private JwtTokenUtil jwtTokenUtil; - @Autowired - private UserService userService; - - - @Override - public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { - - String token = request.getHeader("token"); - if (!(handler instanceof HandlerMethod)) { - return true; - } - if (token == null || token.equals("")) { - printJson(response, ""); - return false; - } - String userName = jwtTokenUtil.getUserNameFromToken(token); - SyUser user = userService.getAdminByUsername(userName); - if (user == null) { - printJson(response, ""); - return false; - } - - *//*String userId = user.getId(); - User sqlUser = getUserService().getUserById(userId); - String enterpriseId = getUserEnterpriseService().selectEnterpriseByUser(userId); - if (enterpriseId == null) { - getRedisService().set(REDIS_USER_SESSION_KEY + ":" + token, sqlUser, SSO_SESSION_EXPIRE); - return true; - } - Enterprise sqlEnterprise = getEnterpriseService().selectEnterpriseById(enterpriseId); - getRedisService().set(REDIS_USER_SESSION_KEY + ":" + token, sqlUser, SSO_SESSION_EXPIRE); - getRedisService().set(REDIS_ENTERPRISE_SESSION_KEY + ":" + token, sqlEnterprise, SSO_SESSION_EXPIRE);*//* - - return true; - } - - @Override - public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { - - } - - @Override - public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { - - - } - private static void printJson(HttpServletResponse response, String code) { - printContent(response, "token过期,请重新登陆"); - } - - - private static void printContent(HttpServletResponse response, String content) { - try { - response.reset(); - response.setContentType("application/json"); - response.setHeader("Cache-Control", "no-store"); - response.setCharacterEncoding("UTF-8"); - PrintWriter pw = response.getWriter(); - pw.write(content); - pw.flush(); - } catch (Exception e) { - e.printStackTrace(); - } - } -}*/ - diff --git a/src/main/java/com/objecteye/config/MyBatisConfig.java b/src/main/java/com/objecteye/config/MyBatisConfig.java deleted file mode 100644 index 902ff57..0000000 --- a/src/main/java/com/objecteye/config/MyBatisConfig.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.objecteye.config; - -import org.mybatis.spring.annotation.MapperScan; -import org.springframework.context.annotation.Configuration; - -@Configuration -@MapperScan({"com.objecteye.mapper"}) -public class MyBatisConfig { - -} diff --git a/src/main/java/com/objecteye/controller/AreaEquipmentController.java b/src/main/java/com/objecteye/controller/AreaEquipmentController.java deleted file mode 100644 index 9246a22..0000000 --- a/src/main/java/com/objecteye/controller/AreaEquipmentController.java +++ /dev/null @@ -1,155 +0,0 @@ -package com.objecteye.controller; - - -import com.objecteye.common.CommonResult; -import com.objecteye.entity.SyAreaEquipment; -import com.objecteye.service.AreaEquipmentService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * controller - * - * @author Administrator - */ -@RestController -@Api(tags = "AreaEquipmentController", description = "区域设备管理") -@RequestMapping("/areaEquipment") -@CrossOrigin -public class AreaEquipmentController { - - @Autowired - private AreaEquipmentService areaEquipmentService; - - /** - * 返回全部列表 - * - * @return - */ - @ApiOperation("区域设备树的展示==区域可操作") - @RequestMapping(value = "/findAll", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult findAll() { - if (areaEquipmentService.findAll() == null) { - return CommonResult.success("", "无符合条件的数据"); - } - return CommonResult.success(areaEquipmentService.findAll()); - } - - /** - * 返回全部列表 - * - * @return - */ - @ApiOperation("区域设备树的展示==区域设备可操作") - @RequestMapping(value = "/findAllEquipAndArea", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult findAllEquipAndArea() { - if (areaEquipmentService.findAllEquipAndArea() == null) { - return CommonResult.success("", "无符合条件的数据"); - } - return CommonResult.success(areaEquipmentService.findAllEquipAndArea()); - } - - /** - * 增加 - * - * @param areaEquipment - * @return - */ - @ApiOperation("添加区域") - @RequestMapping(value = "/add", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult add(@RequestBody SyAreaEquipment areaEquipment) { - Integer parentId = areaEquipment.getParentId(); - if (parentId == 1) { - int count = areaEquipmentService.add(areaEquipment); - if (count > 0) { - return CommonResult.success(count); - } - } - return CommonResult.failed("该区域下只能创建设备"); - } - - /** - * 修改 - * - * @param areaEquipment - * @return - */ - @ApiOperation("修改区域名称") - @RequestMapping(value = "/update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult update(@RequestBody SyAreaEquipment areaEquipment) { - int count = areaEquipmentService.update(areaEquipment); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed("节点id无效"); - } - - /** - * 获取实体 - * - * @return - */ - /*@ApiOperation("查找区域或者设备") - @RequestMapping(value = "/findOne",method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult findOne(@RequestBody Map map){ - Integer id = map.get("id"); - if(areaEquipmentService.findOne(id)==null){ - return CommonResult.success("","节点无效"); - } - return CommonResult.success(areaEquipmentService.findOne(id)); - }*/ - - /** - * 删除区域 - * - * @param map - * @return - */ - @ApiOperation("删除区域") - @RequestMapping(value = "/delete", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult delete(@RequestBody Map map) { - try { - int[] ids = map.get("ids"); - areaEquipmentService.delete(ids); - return CommonResult.success("删除成功", "删除成功"); - } catch (Exception e) { - e.printStackTrace(); - return CommonResult.failed(e.getMessage()); - } - } - - @ApiOperation("判断该区域下是否有设备") - @RequestMapping(value = "/isHaveChild", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult isHaveChild(@RequestBody Map map) { - int id = map.get("id"); - List ids = areaEquipmentService.findCaptureById(id); - if (ids == null || ids.size() == 0) { - return CommonResult.success(ids, "是否确认删除该区域?"); - } - return CommonResult.success(ids, "该区域下存在设备,且可能存在正在执行的布控任务,请确认是否删除该区域?"); - } - - - @ApiOperation("根据id查找该区域下所有设备") - @RequestMapping(value = "/findCaptureById", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult findCaptureById(@RequestBody Map map) { - try { - Integer id = map.get("id"); - List> captureMsgById = areaEquipmentService.findCaptureMsgById(id); - if (captureMsgById == null) { - return CommonResult.success("", "该区域下无设备"); - } - return CommonResult.success(captureMsgById); - } catch (Exception e) { - e.printStackTrace(); - return CommonResult.failed(); - } - } - -} diff --git a/src/main/java/com/objecteye/controller/DeployController.java b/src/main/java/com/objecteye/controller/DeployController.java index 6931347..403bd9e 100644 --- a/src/main/java/com/objecteye/controller/DeployController.java +++ b/src/main/java/com/objecteye/controller/DeployController.java @@ -66,8 +66,8 @@ public class DeployController { */ @ApiOperation("查看布控任务详细信息") @RequestMapping(value = "/findOne", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult findOne(@RequestBody Map param) { - SyDeploy syDeploy = deployService.findOne(param.get("id")); + public CommonResult findOne(@RequestBody Map param) { + SyDeploy syDeploy = deployService.findOne((String) param.get("id")); if (syDeploy == null) { return CommonResult.success(201, "没有找到对应任务", new ArrayList<>()); } @@ -101,7 +101,7 @@ public class DeployController { */ @ApiOperation("分页查看全部的布控任务内容") @RequestMapping(value = "/findMonitorTaskDetail", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult findMonitorTaskDetail(@RequestParam Integer currentpage, @RequestParam Integer pagevolume, @RequestParam Integer deployId) { + public CommonResult findMonitorTaskDetail(@RequestParam Integer currentpage, @RequestParam Integer pagevolume, @RequestParam String deployId) { PageResult page = deployService.findMonitorTaskDetail(deployId, currentpage, pagevolume); if (page.getRow().size() == 0) { return CommonResult.success(201, "无符合条件的数据", new PageResult<>()); @@ -153,9 +153,9 @@ public class DeployController { */ @ApiOperation("删除布控任务") @RequestMapping(value = "/delete", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult delete(@RequestBody Map map) { + public CommonResult delete(@RequestBody Map map) { try { - int[] ids = map.get("ids"); + String[] ids = (String[]) map.get("ids"); deployService.delete(ids); return CommonResult.success("操作成功"); } catch (Exception e) { diff --git a/src/main/java/com/objecteye/controller/EquipmentController.java b/src/main/java/com/objecteye/controller/EquipmentController.java deleted file mode 100644 index a7c4c4e..0000000 --- a/src/main/java/com/objecteye/controller/EquipmentController.java +++ /dev/null @@ -1,173 +0,0 @@ -package com.objecteye.controller; - -import com.objecteye.common.CommonResult; -import com.objecteye.entity.PageResult; -import com.objecteye.entity.SyEquipment; -import com.objecteye.service.EquipmentService; -import com.objecteye.utils.GlobalUtil; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.transaction.annotation.Transactional; -import org.springframework.web.bind.annotation.*; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -/** - * controller - * - * @author Administrator - */ -@RestController -@RequestMapping("/equipment") -@Api(tags = "EquipmentController", description = "设备管理") -@CrossOrigin -public class EquipmentController { - - @Autowired - private EquipmentService equipmentService; - @Autowired - private RedisTemplate redisTemplate; - - /** - * 返回全部列表 - * - * @return - */ - @ApiOperation("分页返回全部设备") - @RequestMapping(value = "/findPage", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult findPage(@RequestParam int currentpage, @RequestParam int pagevolume) { //@RequestBody PagePara pagePara - //PageResult page1 = equipmentService.findPage(pagePara.getPage(), pagePara.getLimit()); - PageResult page1 = equipmentService.findPage(currentpage, pagevolume); - if (page1 != null) { - return CommonResult.success(page1); - } - return CommonResult.success("", "无可用设备"); - } - - /** - * 增加 - * - * @param equipment - * @return - */ - @ApiOperation("添加设备") - @RequestMapping(value = "/add", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult add(@RequestBody SyEquipment equipment) { - SyEquipment byIp = equipmentService.findByIp(equipment.getEquipmentIp()); - SyEquipment byName = equipmentService.findByName(equipment.getEquipmentName()); - SyEquipment byPort = equipmentService.findByPort(equipment.getEquipmentPort()); - if ((byIp == null) & (byName == null) & (byPort == null)) { - int count = equipmentService.add(equipment); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); - } - return CommonResult.failed("设备名称、ip、端口不能重复"); - } - - /** - * 修改 - * - * @param equipment - * @return - */ - @ApiOperation("更新设备") - @RequestMapping(value = "/update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult update(@RequestBody SyEquipment equipment) { - int update = equipmentService.update(equipment); - if (update > 0) { - return CommonResult.success(update); - } - if (update == 0) { - return CommonResult.failed("设备名称不能重复"); - } - return CommonResult.failed(); - } - - /** - * 获取实体 - * - * @return - */ - @ApiOperation("根据id查找设备") - @RequestMapping(value = "/findOne", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult findOne(@RequestBody Map map) { - Integer id = map.get("id"); - SyEquipment equipment = equipmentService.findOne(id); - if (equipment != null) { - return CommonResult.success(equipment); - } - return CommonResult.failed("设备id无效"); - } - - /** - * 批量删除 - * - * @return - */ - @ApiOperation("删除设备") - @Transactional - @RequestMapping(value = "/delete", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult delete(@RequestBody Map map) { - try { - int[] ids = map.get("ids"); - equipmentService.delete(ids); - return CommonResult.success("删除成功", "操作成功"); - } catch (Exception e) { - e.printStackTrace(); - return CommonResult.failed(e.getMessage()); - } - } - - /** - * 设备开关 - * - * @param map - * @return - */ - @ApiOperation("设备开关") - @RequestMapping(value = "/updateStatusById", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult updateStatusById(@RequestBody Map map) { - Integer id = map.get("id"); - int i = equipmentService.updateStatusById(id); - if (i == -1) { - return CommonResult.failed("设备id无效"); - } - if (i != 0) { - return CommonResult.success("设备状态更新成功"); - } - return CommonResult.failed(); - } - - /** - * 设备开关 - * - * @param map id区域id - * @return 设备是否可以删除 - */ - @ApiOperation("设备是否可以删除") - @RequestMapping(value = "/checkDelete", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult checkDelete(@RequestBody Map map) { - Integer id = map.get("id"); - boolean canDel = true; - List msgList = new ArrayList<>(); - if (redisTemplate.opsForHash().hasKey(GlobalUtil.IPWITHDEPLOYLIST, id)) { - canDel = false; - msgList.add("布控预警任务"); - } - if (redisTemplate.opsForHash().hasKey(GlobalUtil.FORBIDDEN_TASK, id)) { - canDel = false; - msgList.add("禁行任务"); - } - if (canDel) { - return CommonResult.success(200, "不存在设备占用情况", ""); - } else { - return CommonResult.success(201, "存在" + String.join(",", msgList) + "占用设备", ""); - } - } -} diff --git a/src/main/java/com/objecteye/controller/FeatureController.java b/src/main/java/com/objecteye/controller/FeatureController.java index fd7a04a..776b826 100644 --- a/src/main/java/com/objecteye/controller/FeatureController.java +++ b/src/main/java/com/objecteye/controller/FeatureController.java @@ -38,7 +38,7 @@ public class FeatureController { @RequestMapping(value = "/findAllName", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) public CommonResult findAllName() { List> all = featureService.findAllName(); - if (all != null) { + if (all.size() > 0) { return CommonResult.success(all); } return CommonResult.success("", "人像库为空"); @@ -68,10 +68,9 @@ public class FeatureController { @ApiOperation("添加人像库") @RequestMapping(value = "/add", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) public CommonResult add(@RequestBody SyFeature feature) { - - int count = featureService.add(feature); - if (count > 0) { - return CommonResult.success(count); + String id = featureService.add(feature); + if (id != null) { + return CommonResult.success(id); } return CommonResult.failed(); } @@ -83,9 +82,9 @@ public class FeatureController { @ApiOperation("更新人像库") @RequestMapping(value = "/update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) public CommonResult update(@RequestBody SyFeature feature) { - int count = featureService.update(feature); - if (count > 0) { - return CommonResult.success(count); + String id = featureService.update(feature); + if (id != null) { + return CommonResult.success(id); } return CommonResult.failed(); } @@ -98,9 +97,9 @@ public class FeatureController { */ @ApiOperation("删除人像库") @RequestMapping(value = "/delete", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult delete(@RequestBody Map map) { + public CommonResult delete(@RequestBody Map map) { try { - int[] ids = map.get("ids"); + String[] ids = (String[]) map.get("ids"); featureService.delete(ids); return CommonResult.success("操作成功"); } catch (RuntimeException e) { @@ -119,8 +118,8 @@ public class FeatureController { */ @ApiOperation("判断人像库是否被使用") @RequestMapping(value = "/checkDelete", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult checkDelete(@RequestBody Map map) { - List deploys = deployService.getDeployListByLibAndDeployType(map.get("id"), 2); + public CommonResult checkDelete(@RequestBody Map map) { + List deploys = deployService.getDeployListByLibAndDeployType((String) map.get("id"), 2); if (deploys != null && deploys.size() > 0) { return CommonResult.success(201, "存在布控任务使用该人像库", ""); } else { diff --git a/src/main/java/com/objecteye/controller/PersonnelController.java b/src/main/java/com/objecteye/controller/PersonnelController.java index 3a8f944..eb4639c 100644 --- a/src/main/java/com/objecteye/controller/PersonnelController.java +++ b/src/main/java/com/objecteye/controller/PersonnelController.java @@ -38,7 +38,7 @@ public class PersonnelController { */ @ApiOperation("人像库上传多条数据") @RequestMapping(value = "/uploadfiles", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult uploadfiles(MultipartFile[] uploadFiles, @RequestParam(name = "featureId") int featureId) { + public CommonResult uploadfiles(MultipartFile[] uploadFiles, @RequestParam(name = "featureId") String featureId) { String msg = personnelService.uploadFiles(uploadFiles, featureId); if (uploadFiles != null && uploadFiles.length > 0) { @@ -79,8 +79,8 @@ public class PersonnelController { */ @ApiOperation("查找单条人像信息") @RequestMapping(value = "/findOne", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult findOne(@RequestBody Map map) { - Integer id = map.get("id"); + public CommonResult findOne(@RequestBody Map map) { + String id = (String) map.get("id"); SyPersonnel one = personnelService.findOne(id); if (one != null) { return CommonResult.success(one); @@ -96,9 +96,9 @@ public class PersonnelController { */ @ApiOperation("批量删除") @RequestMapping(value = "/delete", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult delete(@RequestBody Map map) { + public CommonResult delete(@RequestBody Map map) { try { - int[] ids = map.get("ids"); + String[] ids = (String[]) map.get("ids"); personnelService.delete(ids); return CommonResult.success("操作成功"); } catch (Exception e) { @@ -119,10 +119,6 @@ public class PersonnelController { public CommonResult search(@RequestParam int currentpage, @RequestParam int pagevolume, @RequestParam int fid, @RequestParam String name) {//@RequestBody PagePara pagePara PageResult page = personnelService.findPage(fid, name, currentpage, pagevolume); - /*if (page != null) { - return CommonResult.success(page); - } - return CommonResult.success("", "无符合条件的数据");*/ if (page.gettotal() == 0) { return CommonResult.failed("无符合条件的数据"); } diff --git a/src/main/java/com/objecteye/controller/PreviewController.java b/src/main/java/com/objecteye/controller/PreviewController.java deleted file mode 100644 index 671993f..0000000 --- a/src/main/java/com/objecteye/controller/PreviewController.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.objecteye.controller; - -import com.objecteye.common.CommonResult; -import com.objecteye.entity.SyAreaEquipment; -import com.objecteye.entity.SyEquipment; -import com.objecteye.service.AreaEquipmentService; -import com.objecteye.service.EquipmentService; -import com.objecteye.utils.PreviewUtils; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.Map; - -@Api(tags = "PreviewController", description = "实时预览") -@RestController -@RequestMapping(value = "/preview") -@CrossOrigin -public class PreviewController { - - - @Autowired - private EquipmentService equipmentService; - @Autowired - private AreaEquipmentService areaEquipmentService; - - - @ApiOperation("实时预览:获取rtmp流") - @RequestMapping(value = "/getRtmpStream", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult getRtmpStream(@RequestBody Map map) { - - try { - /*String token = map.get("token"); - String userNameFromToken = jwtTokenUtil.getUserNameFromToken(token); - System.out.println("username:"+userNameFromToken);*/ - String address = InetAddress.getLocalHost().toString().split("/")[1]; - - //获得区域信息 - int deviceId = map.get("deviceId"); - SyAreaEquipment areaEquipment = areaEquipmentService.findOne(deviceId); - - if (areaEquipment != null) { - Integer isEquipment = areaEquipment.getIsEquipment(); - - //为设备,进行转流 - if (isEquipment == 1) { - Integer typeId = areaEquipment.getTypeId(); - SyEquipment equipment = equipmentService.findOne(typeId); - - if (equipment == null) { - throw new RuntimeException("设备无效"); - } - //进行转流 - String rtmp = PreviewUtils.RtspToRtmp(address, equipment.getRtspUrl(), typeId, equipment.getUsername(), equipment.getPassword(), equipment.getEquipmentIp(), equipment.getIntentPort()); - if (rtmp != null) { - return CommonResult.success(rtmp); - } - return CommonResult.failed("转流失败"); - - } else { //选择区域,则提示信息 - return CommonResult.failed("请选择具体设备"); - } - } - } catch (RuntimeException e) { - //e.printStackTrace(); - return CommonResult.failed(e.getMessage()); - } catch (InterruptedException e) { - e.printStackTrace(); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - return CommonResult.failed("转流失败"); - } -} diff --git a/src/main/java/com/objecteye/controller/UploadFileController.java b/src/main/java/com/objecteye/controller/UploadFileController.java new file mode 100644 index 0000000..fedfc22 --- /dev/null +++ b/src/main/java/com/objecteye/controller/UploadFileController.java @@ -0,0 +1,21 @@ +package com.objecteye.controller; + +import com.objecteye.common.CommonResult; +import com.objecteye.utils.GlobalUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +@RestController +@RequestMapping("uploadDbMongo") +@Api(value = "UploadFileController", description = "上传文件解析保存到mongo库,代替ftp") +@CrossOrigin +public class UploadFileController { + + @ApiOperation("上传文件到mongo") + @RequestMapping(value = "uploadToMongo", method = RequestMethod.POST, produces = GlobalUtil.COMMON_HEADER_CONTENT_TYPE) + public CommonResult uploadToMongo(@RequestParam MultipartFile multipartFile) { + return CommonResult.success(""); + } +} diff --git a/src/main/java/com/objecteye/controller/VehicleController.java b/src/main/java/com/objecteye/controller/VehicleController.java index 1b5ffa3..fb27162 100644 --- a/src/main/java/com/objecteye/controller/VehicleController.java +++ b/src/main/java/com/objecteye/controller/VehicleController.java @@ -25,7 +25,7 @@ public class VehicleController { @ApiOperation("车辆库上传多条数据") @RequestMapping(value = "/uploadfiles", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult uploadfiles(MultipartFile[] uploadFiles, int vehicleId) { + public CommonResult uploadfiles(MultipartFile[] uploadFiles, String vehicleId) { if (uploadFiles != null && uploadFiles.length > 0) { String msg = vehicleService.uploadFiles(uploadFiles, vehicleId); if (null != msg) { diff --git a/src/main/java/com/objecteye/controller/VehicleCurrencyController.java b/src/main/java/com/objecteye/controller/VehicleCurrencyController.java index 21ee9ac..2cb615d 100644 --- a/src/main/java/com/objecteye/controller/VehicleCurrencyController.java +++ b/src/main/java/com/objecteye/controller/VehicleCurrencyController.java @@ -72,8 +72,7 @@ public class VehicleCurrencyController { */ @RequestMapping("/vehicleBase/getVehicleModelId") public CommonResult> selectDisplayForInitials() { - CommonResult> commonResult = vehicleCurrencyService.selectDisplayForInitials(); - return commonResult; + return vehicleCurrencyService.selectDisplayForInitials(); } @@ -85,8 +84,7 @@ public class VehicleCurrencyController { */ @RequestMapping("/vehicleBase/getVehicleModelInitials") public CommonResult> selectDisplayForBrand(@RequestBody Map map) { - CommonResult> commonResult = vehicleCurrencyService.selectDisplayForBrand(map.get("vehicleModelInitials")); - return commonResult; + return vehicleCurrencyService.selectDisplayForBrand(map.get("vehicleModelInitials")); } @@ -98,8 +96,7 @@ public class VehicleCurrencyController { */ @RequestMapping("/vehicleBase/getVehicleModelSubbrandByBrand") public CommonResult> selectDisplayForSubbrand(@RequestBody Map map) { - CommonResult> commonResult = vehicleCurrencyService.selectDisplayForSubbrand(map.get("vehicleModelBrand")); - return commonResult; + return vehicleCurrencyService.selectDisplayForSubbrand(map.get("vehicleModelBrand")); } /** @@ -110,8 +107,7 @@ public class VehicleCurrencyController { */ @RequestMapping("/vehicleBase/getVehicleModelBirthdayBySubbrand") public CommonResult> selectDisplayForBirthday(@RequestBody Map map) { - CommonResult> commonResult = vehicleCurrencyService.selectDisplayForBirthday(map.get("vehicleModelSubbrand")); - return commonResult; + return vehicleCurrencyService.selectDisplayForBirthday(map.get("vehicleModelSubbrand")); } @@ -122,8 +118,7 @@ public class VehicleCurrencyController { */ @RequestMapping("/vehicleBase/getVehicleTypeList") public CommonResult> displayVehicleTypeList() { - CommonResult> commonResult = vehicleCurrencyService.displayVehicleTypeList(); - return commonResult; + return vehicleCurrencyService.displayVehicleTypeList(); } /** @@ -133,8 +128,7 @@ public class VehicleCurrencyController { */ @RequestMapping("/vehicleBase/getVehicleColorList") public CommonResult> displayVehicleColorList() { - CommonResult> commonResult = vehicleCurrencyService.displayVehicleColorList(); - return commonResult; + return vehicleCurrencyService.displayVehicleColorList(); } /** @@ -144,8 +138,7 @@ public class VehicleCurrencyController { */ @RequestMapping("/vehicleBase/getVehiclePlateTypeList") public CommonResult> displayVehiclePlateTypeList() { - CommonResult> commonResult = vehicleCurrencyService.displayVehiclePlateTypeList(); - return commonResult; + return vehicleCurrencyService.displayVehiclePlateTypeList(); } /** @@ -155,7 +148,6 @@ public class VehicleCurrencyController { */ @RequestMapping("/vehicleBase/getVehicleNjbNumberList") public CommonResult> displayVehicleNjbNumberList() { - CommonResult> commonResult = vehicleCurrencyService.displayVehicleNjbNumberList(); - return commonResult; + return vehicleCurrencyService.displayVehicleNjbNumberList(); } } diff --git a/src/main/java/com/objecteye/controller/VehicleDbController.java b/src/main/java/com/objecteye/controller/VehicleDbController.java index 0ed7a38..8bbb15f 100644 --- a/src/main/java/com/objecteye/controller/VehicleDbController.java +++ b/src/main/java/com/objecteye/controller/VehicleDbController.java @@ -54,10 +54,9 @@ public class VehicleDbController { @ApiOperation("添加车库") @RequestMapping(value = "/add", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) public CommonResult add(@RequestBody SyVehicleDb vehicel) { - - int count = vehicleDbService.add(vehicel); - if (count > 0) { - return CommonResult.success(count); + String id = vehicleDbService.add(vehicel); + if (id != null) { + return CommonResult.success(id); } return CommonResult.failed(); } @@ -69,12 +68,8 @@ public class VehicleDbController { @ApiOperation("更新车库") @RequestMapping(value = "/update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) public CommonResult update(@RequestBody SyVehicleDb feature) { - - int count = vehicleDbService.update(feature); - if (count > 0) { - return CommonResult.success(count); - } - return CommonResult.failed(); + vehicleDbService.update(feature); + return CommonResult.success(null); } /** @@ -85,8 +80,8 @@ public class VehicleDbController { */ @ApiOperation("查找车库") @RequestMapping(value = "/findOne", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult findOne(@RequestBody Map map) { - Integer id = map.get("id"); + public CommonResult findOne(@RequestBody Map map) { + String id = (String) map.get("id"); SyVehicleDb feature = vehicleDbService.findOne(id); if (feature != null) { return CommonResult.success(feature); @@ -102,9 +97,9 @@ public class VehicleDbController { */ @ApiOperation("删除车库") @RequestMapping(value = "/delete", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult delete(@RequestBody Map map) { + public CommonResult delete(@RequestBody Map map) { try { - int[] ids = map.get("ids"); + String[] ids = (String[]) map.get("ids"); vehicleDbService.delete(ids); return CommonResult.success(""); } catch (Exception e) { @@ -121,8 +116,8 @@ public class VehicleDbController { */ @ApiOperation("判断车辆库是否被使用") @RequestMapping(value = "/checkDelete", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public CommonResult checkDeleteByLibIdDeployType(@RequestBody Map map) { - List deploys = deployService.getDeployListByLibAndDeployType(map.get("id"), 1); + public CommonResult checkDeleteByLibIdDeployType(@RequestBody Map map) { + List deploys = deployService.getDeployListByLibAndDeployType((String) map.get("id"), 1); if (deploys != null && deploys.size() > 0) { return CommonResult.success(201, "存在布控任务使用该车辆库", ""); } else { @@ -139,7 +134,7 @@ public class VehicleDbController { @RequestMapping(value = "/findAllName", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) public CommonResult findAllName() { List> all = vehicleDbService.findAllName(); - if (all != null) { + if (all.size() > 0) { return CommonResult.success(all); } return CommonResult.success("", "车库为空"); diff --git a/src/main/java/com/objecteye/dao/MongoTemplates.java b/src/main/java/com/objecteye/dao/MongoTemplates.java index 0ed430d..f49f18d 100644 --- a/src/main/java/com/objecteye/dao/MongoTemplates.java +++ b/src/main/java/com/objecteye/dao/MongoTemplates.java @@ -5,7 +5,6 @@ import com.alibaba.fastjson.JSONObject; import com.objecteye.pojo.FaceInfoParam; import com.objecteye.pojo.RabbitMQVehicle; import com.objecteye.pojo.VehicleCondition; -import com.objecteye.service.AreaEquipmentService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Sort; import org.springframework.data.mongodb.core.MongoTemplate; @@ -15,17 +14,13 @@ import org.springframework.stereotype.Component; import java.text.SimpleDateFormat; import java.util.Date; -import java.util.HashSet; import java.util.List; -import java.util.Set; import java.util.regex.Pattern; @Component public class MongoTemplates { @Autowired private MongoTemplate mongoTemplate; - @Autowired - private AreaEquipmentService areaEquipmentService; //mongodb插入车辆数据 public RabbitMQVehicle insertData(RabbitMQVehicle rabbitMQVehicle) { @@ -131,22 +126,6 @@ public class MongoTemplates { } } - - //卡口范围 - if (customspass != null && customspass.length > 0) { - Set alleqids = new HashSet<>(); - for (int i = 0; i < customspass.length; i++) { - List epids = areaEquipmentService.findCaptureById(customspass[i]); - System.out.println("设备:" + epids); - for (int j = 0; j < epids.size(); j++) { - alleqids.add(epids.get(j)); - } - } - - //获取当前设备id - c.and("deviceid").in(alleqids); - } - query.addCriteria(c); long totalNumber = mongoTemplate.count(query, JSONObject.class, "rabbitMQVehicle"); @@ -310,17 +289,6 @@ public class MongoTemplates { } } } - - //卡口范围 - if (customspass != null && customspass.length > 0) { - Set alleqids = new HashSet<>(); - for (int value : customspass) { - List epids = areaEquipmentService.findCaptureById(value); - alleqids.addAll(epids); - } - //获取当前设备id - c.and("deviceid").in(alleqids); - } query.addCriteria(c); // 分页 @@ -333,7 +301,6 @@ public class MongoTemplates { query.fields().include("equipmentName"); query.fields().include("pictime"); return mongoTemplate.find(query, RabbitMQVehicle.class); - } catch (Exception e) { e.printStackTrace(); } diff --git a/src/main/java/com/objecteye/entity/AreaEquipmentShow.java b/src/main/java/com/objecteye/entity/AreaEquipmentShow.java deleted file mode 100644 index fd83bd7..0000000 --- a/src/main/java/com/objecteye/entity/AreaEquipmentShow.java +++ /dev/null @@ -1,81 +0,0 @@ -package com.objecteye.entity; - - -import java.io.Serializable; -import java.util.List; - -public class AreaEquipmentShow implements Serializable { - - private Integer id; - private Integer parentId; - private String title; - private Integer typeId; - private Integer isEquipment; - private Integer equipmentNum; - private boolean disabled; - private List children; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Integer getParentId() { - return parentId; - } - - public void setParentId(Integer parentId) { - this.parentId = parentId; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public Integer getTypeId() { - return typeId; - } - - public void setTypeId(Integer typeId) { - this.typeId = typeId; - } - - public Integer getIsEquipment() { - return isEquipment; - } - - public void setIsEquipment(Integer isEquipment) { - this.isEquipment = isEquipment; - } - - public Integer getEquipmentNum() { - return equipmentNum; - } - - public void setEquipmentNum(Integer equipmentNum) { - this.equipmentNum = equipmentNum; - } - - public boolean isDisabled() { - return disabled; - } - - public void setDisabled(boolean disabled) { - this.disabled = disabled; - } - - public List getChildren() { - return children; - } - - public void setChildren(List children) { - this.children = children; - } -} diff --git a/src/main/java/com/objecteye/entity/CaputureMsg.java b/src/main/java/com/objecteye/entity/CaputureMsg.java deleted file mode 100644 index d9d8114..0000000 --- a/src/main/java/com/objecteye/entity/CaputureMsg.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.objecteye.entity; - -import java.io.Serializable; - -/** - * @Author: ljh - * @Date: 2019/9/18 11:53 - * @Version 1.0 - * @Message: - */ -public class CaputureMsg implements Serializable { - private int vehicleCount; - private int vehicleCountInHours; - private int violateCount; - private String imageUrl; - - public CaputureMsg() { - super(); - } - - public int getVehicleCount() { - return vehicleCount; - } - - public void setVehicleCount(int vehicleCount) { - this.vehicleCount = vehicleCount; - } - - public int getVehicleCountInHours() { - return vehicleCountInHours; - } - - public void setVehicleCountInHours(int vehicleCountInHours) { - this.vehicleCountInHours = vehicleCountInHours; - } - - public int getViolateCount() { - return violateCount; - } - - public void setViolateCount(int violateCount) { - this.violateCount = violateCount; - } - - public String getImageUrl() { - return imageUrl; - } - - public void setImageUrl(String imageUrl) { - this.imageUrl = imageUrl; - } - - public CaputureMsg(int vehicleCount, int vehicleCountInHours, int violateCount, String imageUrl) { - this.vehicleCount = vehicleCount; - this.vehicleCountInHours = vehicleCountInHours; - this.violateCount = violateCount; - this.imageUrl = imageUrl; - } - - @Override - public String toString() { - return "CaputureMsg{" + - "vehicleCount=" + vehicleCount + - ", vehicleCountInHours=" + vehicleCountInHours + - ", violateCount=" + violateCount + - ", imageUrl='" + imageUrl + '\'' + - '}'; - } -} diff --git a/src/main/java/com/objecteye/entity/CountMsg.java b/src/main/java/com/objecteye/entity/CountMsg.java index eb7e3ee..32bb59e 100644 --- a/src/main/java/com/objecteye/entity/CountMsg.java +++ b/src/main/java/com/objecteye/entity/CountMsg.java @@ -9,9 +9,20 @@ import java.io.Serializable; * @Message: */ public class CountMsg implements Serializable { - private String vehicleCount; //卡口经过车辆数 - private String vehicleCountInHours; //一天的车流量 - private String violateCount; //违规车辆数 + + private static final long serialVersionUID = 7718751591479620478L; + /** + * 卡口经过车辆数 + */ + private String vehicleCount; + /** + * 一天的车流量 + */ + private String vehicleCountInHours; + /** + * 违规车辆数 + */ + private String violateCount; public CountMsg() { super(); diff --git a/src/main/java/com/objecteye/entity/DeployResultMsg.java b/src/main/java/com/objecteye/entity/DeployResultMsg.java index 3d25fb8..b99b4e5 100644 --- a/src/main/java/com/objecteye/entity/DeployResultMsg.java +++ b/src/main/java/com/objecteye/entity/DeployResultMsg.java @@ -1,53 +1,25 @@ package com.objecteye.entity; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; + import java.io.Serializable; +@AllArgsConstructor +@NoArgsConstructor +@Data +@ToString public class DeployResultMsg implements Serializable { - private int deployId; - private String deployName; - private int status; - private long alarmNum; - - public DeployResultMsg() { - } - - public DeployResultMsg(int deployId, String deployName, int status, long alarmNum) { - this.deployId = deployId; - this.deployName = deployName; - this.status = status; - this.alarmNum = alarmNum; - } - - public int getDeployId() { - return deployId; - } + private static final long serialVersionUID = -3929775886679972442L; - public void setDeployId(int deployId) { - this.deployId = deployId; - } + private String deployId; - public String getDeployName() { - return deployName; - } - - public void setDeployName(String deployName) { - this.deployName = deployName; - } - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } + private String deployName; - public long getAlarmNum() { - return alarmNum; - } + private int status; - public void setAlarmNum(long alarmNum) { - this.alarmNum = alarmNum; - } + private long alarmNum; } diff --git a/src/main/java/com/objecteye/entity/DetectParam.java b/src/main/java/com/objecteye/entity/DetectParam.java index 65c6547..f53ae79 100644 --- a/src/main/java/com/objecteye/entity/DetectParam.java +++ b/src/main/java/com/objecteye/entity/DetectParam.java @@ -10,8 +10,11 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class DetectParam { + int process_min_l; + int process_max_l; + float threshold; } diff --git a/src/main/java/com/objecteye/entity/DetectResult.java b/src/main/java/com/objecteye/entity/DetectResult.java deleted file mode 100644 index aa45d86..0000000 --- a/src/main/java/com/objecteye/entity/DetectResult.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.objecteye.entity; - -import java.io.Serializable; - -public class DetectResult implements Serializable { - - private int deviceId; - private String pictureName; - private String picUrl; - private long picTime; - private int flag; - private String personId; - private double[] vehicleFeaResFea; - private Integer[] vehiclePlateDetRecgRect; - private float vehiclePlateDetRecgRectScore; - private int vehiclePlateDetRecgRectType; - private String plateNum; - private float plateNumScore; - private VehiclePlateNumParam[] plateNumParams; - private int vehicleColorRes; - private float vehicleColorScore; - private float vehicleDetectScore; - private Integer[] syRectParam; - - -} diff --git a/src/main/java/com/objecteye/entity/FaceClusterParam.java b/src/main/java/com/objecteye/entity/FaceClusterParam.java index a6f5b87..e2f8178 100644 --- a/src/main/java/com/objecteye/entity/FaceClusterParam.java +++ b/src/main/java/com/objecteye/entity/FaceClusterParam.java @@ -9,8 +9,18 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class FaceClusterParam { - private float threshold; // thresld of face similarity - private int fea_size; //length of feature - private int log_config; //if open log + /** + * thresld of face similarity + */ + private float threshold; + /** + * length of feature + */ + private int fea_size; + /** + * if open log + */ + private int log_config; + private String index_db_path; } diff --git a/src/main/java/com/objecteye/entity/FaceDetectInfoParam.java b/src/main/java/com/objecteye/entity/FaceDetectInfoParam.java index 558f830..ef43393 100644 --- a/src/main/java/com/objecteye/entity/FaceDetectInfoParam.java +++ b/src/main/java/com/objecteye/entity/FaceDetectInfoParam.java @@ -12,14 +12,48 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class FaceDetectInfoParam { - private SyRectParam face_position; //人脸位置 - private float face_pos_score; //人脸框置信度 - private SyPointParam[] syPointParams; //人脸关键点位置信息 - private int quality; //质量评价 - private int clarity; //清晰度 0 - 100 - private int brightness; //亮度 0 - 255 - private float roll; //姿态角 - private float yaw; //姿态角 - private float pitch; //姿态角 - private float score; //人脸置信度 + /** + * 人脸位置 + */ + private SyRectParam face_position; + /** + * 人脸框置信度 + */ + private float face_pos_score; + /** + * 人脸关键点位置信息 + */ + private SyPointParam[] syPointParams; + /** + * 质量评价 + */ + private int quality; + /** + * 清晰度 0 - 100 + */ + private int clarity; + /** + * 亮度 0 - 255 + */ + private int brightness; + + /** + * 姿态角 + */ + private float roll; + + /** + * 姿态角 + */ + private float yaw; + + /** + * 姿态角 + */ + private float pitch; + + /** + * 人脸置信度 + */ + private float score; } diff --git a/src/main/java/com/objecteye/entity/FaceDetectParam.java b/src/main/java/com/objecteye/entity/FaceDetectParam.java index 37bc39f..201288b 100644 --- a/src/main/java/com/objecteye/entity/FaceDetectParam.java +++ b/src/main/java/com/objecteye/entity/FaceDetectParam.java @@ -12,12 +12,36 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class FaceDetectParam { - private int facial_fea_point_config; //是否启动关键点检测 - private int pose_config; //是否启动姿态角 - private int quality_config; //是否启动质量检测 - private int score_config; //是否启动人脸置信度 - private float threshold; //检测阈值 建议0.7 - private int process_w; //reshape宽 - private int process_h; //reshape高 - private int log; //日志 + /** + * 是否启动关键点检测 + */ + private int facial_fea_point_config; + /** + * 是否启动姿态角 + */ + private int pose_config; + /** + * 是否启动质量检测 + */ + private int quality_config; + /** + * 是否启动人脸置信度 + */ + private int score_config; + /** + * 检测阈值 建议0.7 + */ + private float threshold; + /** + * reshape宽 + */ + private int process_w; + /** + * reshape高 + */ + private int process_h; + /** + * 日志 + */ + private int log; } diff --git a/src/main/java/com/objecteye/entity/FaceDetectResultParam.java b/src/main/java/com/objecteye/entity/FaceDetectResultParam.java index e5a0867..c528d63 100644 --- a/src/main/java/com/objecteye/entity/FaceDetectResultParam.java +++ b/src/main/java/com/objecteye/entity/FaceDetectResultParam.java @@ -11,6 +11,12 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class FaceDetectResultParam { - private FaceDetectInfoParam[] faceDetectInfoParams; //内存由外部申请 - private int count; //人脸个数 + /** + * 内存由外部申请 + */ + private FaceDetectInfoParam[] faceDetectInfoParams; + /** + * 人脸个数 + */ + private int count; } diff --git a/src/main/java/com/objecteye/entity/FaceFeatureAnalysisParam.java b/src/main/java/com/objecteye/entity/FaceFeatureAnalysisParam.java index bff501e..5ef1a3b 100644 --- a/src/main/java/com/objecteye/entity/FaceFeatureAnalysisParam.java +++ b/src/main/java/com/objecteye/entity/FaceFeatureAnalysisParam.java @@ -9,6 +9,8 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class FaceFeatureAnalysisParam { + FaceFeatureResultParam[] info; + int count; } diff --git a/src/main/java/com/objecteye/entity/FaceFeatureParam.java b/src/main/java/com/objecteye/entity/FaceFeatureParam.java index 9b79d51..8e504bd 100644 --- a/src/main/java/com/objecteye/entity/FaceFeatureParam.java +++ b/src/main/java/com/objecteye/entity/FaceFeatureParam.java @@ -12,6 +12,8 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class FaceFeatureParam { + private static final long serialVersionUID = -5848996632992784111L; + private int log; } diff --git a/src/main/java/com/objecteye/entity/FaceFeatureResultParam.java b/src/main/java/com/objecteye/entity/FaceFeatureResultParam.java index c4748ce..fdbc110 100644 --- a/src/main/java/com/objecteye/entity/FaceFeatureResultParam.java +++ b/src/main/java/com/objecteye/entity/FaceFeatureResultParam.java @@ -9,6 +9,10 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class FaceFeatureResultParam { + private FaceDetectInfoParam faceDetectInfoParam; - private float[] feature; // 特征值 + /** + * 特征值 + */ + private float[] feature; } diff --git a/src/main/java/com/objecteye/entity/FaceInfoParam.java b/src/main/java/com/objecteye/entity/FaceInfoParam.java index d19d7a6..735f49a 100644 --- a/src/main/java/com/objecteye/entity/FaceInfoParam.java +++ b/src/main/java/com/objecteye/entity/FaceInfoParam.java @@ -9,9 +9,24 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class FaceInfoParam { - private FaceDetectInfoParam faceDetectInfoParam; //人脸检测值 - private String mattingData;//抠图人脸base64 - private float[] fea; //人脸特征值 - private String retrieveKey; //1vN检索key - private String label; //聚类label标签 + /** + * 人脸检测值 + */ + private FaceDetectInfoParam faceDetectInfoParam; + /** + * 抠图人脸base64 + */ + private String mattingData; + /** + * 人脸特征值 + */ + private float[] fea; + /** + * 1vN检索key + */ + private String retrieveKey; + /** + * 聚类label标签 + */ + private String label; } diff --git a/src/main/java/com/objecteye/entity/FaceRetrieveInfoParam.java b/src/main/java/com/objecteye/entity/FaceRetrieveInfoParam.java index 437efc7..5cd275c 100644 --- a/src/main/java/com/objecteye/entity/FaceRetrieveInfoParam.java +++ b/src/main/java/com/objecteye/entity/FaceRetrieveInfoParam.java @@ -8,6 +8,8 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class FaceRetrieveInfoParam { + private String retrieveKey; + private float[] feature; } diff --git a/src/main/java/com/objecteye/entity/FaceRetrieveParam.java b/src/main/java/com/objecteye/entity/FaceRetrieveParam.java index 12d901f..9a64526 100644 --- a/src/main/java/com/objecteye/entity/FaceRetrieveParam.java +++ b/src/main/java/com/objecteye/entity/FaceRetrieveParam.java @@ -9,7 +9,14 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class FaceRetrieveParam { + int log; - int fea_size; //feature长度 - String db_path; //db_path如果不存在 -> 新建一个本地数据库并同步加载到内存 若存在 则直接加载至内存 + /** + * feature长度 + */ + int fea_size; + /** + * db_path如果不存在 -> 新建一个本地数据库并同步加载到内存 若存在 则直接加载至内存 + */ + String db_path; } diff --git a/src/main/java/com/objecteye/entity/FaceRetrieveResultParam.java b/src/main/java/com/objecteye/entity/FaceRetrieveResultParam.java index 42cae76..f8c9d4d 100644 --- a/src/main/java/com/objecteye/entity/FaceRetrieveResultParam.java +++ b/src/main/java/com/objecteye/entity/FaceRetrieveResultParam.java @@ -9,6 +9,8 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class FaceRetrieveResultParam { + private String retrieveKey; + float score; } diff --git a/src/main/java/com/objecteye/entity/FeatureResultMsg.java b/src/main/java/com/objecteye/entity/FeatureResultMsg.java index 8139f65..da2440f 100644 --- a/src/main/java/com/objecteye/entity/FeatureResultMsg.java +++ b/src/main/java/com/objecteye/entity/FeatureResultMsg.java @@ -1,64 +1,28 @@ package com.objecteye.entity; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; + import java.io.Serializable; import java.util.List; +@AllArgsConstructor +@NoArgsConstructor +@Data +@ToString public class FeatureResultMsg implements Serializable { - private Integer id; - private String name; - private String createDate; - private Integer count; - private List deplyNameList; - - public FeatureResultMsg() { - } - - public FeatureResultMsg(Integer id, String name, String createDate, Integer count, List deplyNameList) { - this.id = id; - this.name = name; - this.createDate = createDate; - this.count = count; - this.deplyNameList = deplyNameList; - } - - public Integer getId() { - return id; - } + private static final long serialVersionUID = 2942151599925027629L; - public void setId(Integer id) { - this.id = id; - } + private String id; - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getCreateDate() { - return createDate; - } - - public void setCreateDate(String createDate) { - this.createDate = createDate; - } - - public Integer getCount() { - return count; - } + private String name; - public void setCount(Integer count) { - this.count = count; - } + private String createDate; - public List getDeplyNameList() { - return deplyNameList; - } + private Integer count; - public void setDeplyNameList(List deplyNameList) { - this.deplyNameList = deplyNameList; - } + private List deplyNameList; } diff --git a/src/main/java/com/objecteye/entity/LocusOrbitQueryParams.java b/src/main/java/com/objecteye/entity/LocusOrbitQueryParams.java index 3525b3e..5ba018c 100644 --- a/src/main/java/com/objecteye/entity/LocusOrbitQueryParams.java +++ b/src/main/java/com/objecteye/entity/LocusOrbitQueryParams.java @@ -15,6 +15,7 @@ import java.io.Serializable; @NoArgsConstructor @Data public class LocusOrbitQueryParams implements Serializable { + private static final long serialVersionUID = -8007831938659574791L; /** diff --git a/src/main/java/com/objecteye/entity/MonitorMainTableQueryInfo.java b/src/main/java/com/objecteye/entity/MonitorMainTableQueryInfo.java index 7e11c2b..1057fb3 100644 --- a/src/main/java/com/objecteye/entity/MonitorMainTableQueryInfo.java +++ b/src/main/java/com/objecteye/entity/MonitorMainTableQueryInfo.java @@ -15,6 +15,7 @@ import java.io.Serializable; @ToString @Data public class MonitorMainTableQueryInfo implements Serializable { + private static final long serialVersionUID = 2387317754137036734L; /** * 开始时间 diff --git a/src/main/java/com/objecteye/entity/MonitorMainTableResultInfo.java b/src/main/java/com/objecteye/entity/MonitorMainTableResultInfo.java index 7d0ea65..bfe62a0 100644 --- a/src/main/java/com/objecteye/entity/MonitorMainTableResultInfo.java +++ b/src/main/java/com/objecteye/entity/MonitorMainTableResultInfo.java @@ -15,6 +15,7 @@ import java.io.Serializable; @Data @ToString public class MonitorMainTableResultInfo implements Serializable { + private static final long serialVersionUID = -7947600423993334962L; /** * 车牌号 diff --git a/src/main/java/com/objecteye/entity/MonitorTaskContentResultInfo.java b/src/main/java/com/objecteye/entity/MonitorTaskContentResultInfo.java index f0db825..3d22026 100644 --- a/src/main/java/com/objecteye/entity/MonitorTaskContentResultInfo.java +++ b/src/main/java/com/objecteye/entity/MonitorTaskContentResultInfo.java @@ -17,6 +17,7 @@ import java.io.Serializable; @ToString @Data public class MonitorTaskContentResultInfo implements Serializable { + private static final long serialVersionUID = 4851770658456303503L; /** * 车牌号 diff --git a/src/main/java/com/objecteye/entity/MonitorTaskResultInfo.java b/src/main/java/com/objecteye/entity/MonitorTaskResultInfo.java index d605577..16b90d8 100644 --- a/src/main/java/com/objecteye/entity/MonitorTaskResultInfo.java +++ b/src/main/java/com/objecteye/entity/MonitorTaskResultInfo.java @@ -15,12 +15,13 @@ import java.io.Serializable; @Data @ToString public class MonitorTaskResultInfo implements Serializable { + private static final long serialVersionUID = -2303276515208972965L; /** * 布控任务id */ - private Integer id; + private String id; /** * 布控任务名称 */ diff --git a/src/main/java/com/objecteye/entity/PagePara.java b/src/main/java/com/objecteye/entity/PagePara.java deleted file mode 100644 index 484c646..0000000 --- a/src/main/java/com/objecteye/entity/PagePara.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.objecteye.entity; - -import java.io.Serializable; - -public class PagePara implements Serializable { - private int currentpage; - private int pagevolume; - private T data; - - public PagePara() { - } - - public PagePara(int currentpage, int pagevolume, T data) { - this.currentpage = currentpage; - this.pagevolume = pagevolume; - this.data = data; - } - - public T getData() { - return data; - } - - public void setData(T data) { - this.data = data; - } - - public int getCurrentpage() { - return currentpage; - } - - public void setCurrentpage(int currentpage) { - this.currentpage = currentpage; - } - - public int getPagevolume() { - return pagevolume; - } - - public void setPagevolume(int pagevolume) { - this.pagevolume = pagevolume; - } -} diff --git a/src/main/java/com/objecteye/entity/PageResult.java b/src/main/java/com/objecteye/entity/PageResult.java index 7b63ed0..fac1180 100644 --- a/src/main/java/com/objecteye/entity/PageResult.java +++ b/src/main/java/com/objecteye/entity/PageResult.java @@ -5,7 +5,10 @@ import java.util.List; public class PageResult implements Serializable { + private static final long serialVersionUID = 3161527748709808462L; + private long total; + private List row; public PageResult() { diff --git a/src/main/java/com/objecteye/entity/PersonIdAndScore.java b/src/main/java/com/objecteye/entity/PersonIdAndScore.java index 44ee4d2..72c23d6 100644 --- a/src/main/java/com/objecteye/entity/PersonIdAndScore.java +++ b/src/main/java/com/objecteye/entity/PersonIdAndScore.java @@ -10,5 +10,6 @@ import lombok.NoArgsConstructor; public class PersonIdAndScore { private String retrieveKey; + private String score; } diff --git a/src/main/java/com/objecteye/entity/PersonMsg.java b/src/main/java/com/objecteye/entity/PersonMsg.java index d7de7a6..ebaca07 100644 --- a/src/main/java/com/objecteye/entity/PersonMsg.java +++ b/src/main/java/com/objecteye/entity/PersonMsg.java @@ -11,9 +11,12 @@ import java.io.Serializable; @NoArgsConstructor @AllArgsConstructor public class PersonMsg implements Serializable { + + private static final long serialVersionUID = 594655270956188373L; + private String id; - private int deviceId; + private Integer deviceId; private String imageUrl; diff --git a/src/main/java/com/objecteye/entity/PersonnelResultMsg.java b/src/main/java/com/objecteye/entity/PersonnelResultMsg.java index 8cfe029..b6a9d06 100644 --- a/src/main/java/com/objecteye/entity/PersonnelResultMsg.java +++ b/src/main/java/com/objecteye/entity/PersonnelResultMsg.java @@ -1,94 +1,31 @@ package com.objecteye.entity; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; + import java.io.Serializable; +@AllArgsConstructor +@NoArgsConstructor +@Data +@ToString public class PersonnelResultMsg implements Serializable { + private static final long serialVersionUID = -1225429701928451101L; - private int personId; - private String personName; - private String createTime; - private String conreason; - private int personfileNum; - private String imageUrl; - private String indentity; - - public PersonnelResultMsg() { - } - - public PersonnelResultMsg(int personId, String personName, String createTime, String conreason, int personfileNum, String imageUrl) { - this.personId = personId; - this.personName = personName; - this.createTime = createTime; - this.conreason = conreason; - this.personfileNum = personfileNum; - this.imageUrl = imageUrl; - } - - - public int getPersonId() { - return personId; - } - - public void setPersonId(int personId) { - this.personId = personId; - } - - public PersonnelResultMsg(int personId, String personName, String createTime, String conreason, int personfileNum, String imageUrl, String indentity) { - this.personId = personId; - this.personName = personName; - this.createTime = createTime; - this.conreason = conreason; - this.personfileNum = personfileNum; - this.imageUrl = imageUrl; - this.indentity = indentity; - } + private String personId; - public String getPersonName() { - return personName; - } - - public void setPersonName(String personName) { - this.personName = personName; - } - - public String getCreateTime() { - return createTime; - } - - public void setCreateTime(String createTime) { - this.createTime = createTime; - } - - public String getConreason() { - return conreason; - } - - public void setConreason(String conreason) { - this.conreason = conreason; - } - - public int getPersonfileNum() { - return personfileNum; - } + private String personName; - public void setPersonfileNum(int personfileNum) { - this.personfileNum = personfileNum; - } + private String createTime; - public String getImageUrl() { - return imageUrl; - } + private String conreason; - public void setImageUrl(String imageUrl) { - this.imageUrl = imageUrl; - } + private int personfileNum; - public String getIndentity() { - return indentity; - } + private String imageUrl; - public void setIndentity(String indentity) { - this.indentity = indentity; - } + private String indentity; } diff --git a/src/main/java/com/objecteye/entity/RelationMappingUtil.java b/src/main/java/com/objecteye/entity/RelationMappingUtil.java deleted file mode 100644 index 65a350d..0000000 --- a/src/main/java/com/objecteye/entity/RelationMappingUtil.java +++ /dev/null @@ -1,134 +0,0 @@ -package com.objecteye.entity; - -import org.springframework.stereotype.Component; - -@Component -public class RelationMappingUtil { - - public static String getVehicleColor(int i) { - switch (i) { - case 0: - return "棕"; - case 1: - return "橙"; - case 2: - return "灰"; - case 3: - return "白"; - case 4: - return "粉"; - case 5: - return "紫"; - case 6: - return "红"; - case 7: - return "绿"; - case 8: - return "蓝"; - case 9: - return "金"; - case 10: - return "银"; - case 11: - return "青"; - case 12: - return "黄"; - case 13: - return "黑"; - default: - return "检测失败"; - } - } - - //号牌种类 - public static String getVehiclePlateType(int i) { - switch (i) { - case 0: - return "单排蓝色"; - case 1: - return "单排黄色"; - case 2: - return "单排白色"; - case 3: - return "单排黑色"; - case 4: - return "双排黄色"; - case 5: - return "双排白色"; - case 6: - return "新能源黄绿色"; - case 7: - return "新能源白绿色"; - default: - return "检测失败"; - } - } - - //获取车辆属性 - public String getVehiclePendantParam(int i) { - switch (i) { - case 0: - return "司机"; - case 1: - return "人脸"; - case 2: - return "安全带"; - case 3: - return "遮阳板"; - case 4: - return "年检标"; - case 5: - return "挂件"; - case 6: - return "纸巾盒"; - case 7: - return "转经筒"; - case 8: - return "手机"; - case 9: - return "天窗"; - case 10: - return "行李架"; - case 11: - return "烟"; - default: - return "检测失败"; - } - } - - //获取车辆违法数据 - public String getVehicleIllegalStatus(int i) { - switch (i) { - case 1000: - return "违规"; - case 1001: - return "合法"; - case 1002: - return "不确定"; - case 1003: - return "无人"; - case 1004: - return "有人"; - default: - return "检测失败"; - } - } - - //获取车辆类型 - public static String getVehicleSpecialType(int i) { - switch (i) { - case -1: - return "其他"; - case 0: - return "货车"; - case 1: - return "危化品车"; - case 2: - return "渣土车"; - default: - return "检测失败"; - } - } - - -} diff --git a/src/main/java/com/objecteye/entity/ResponseParam.java b/src/main/java/com/objecteye/entity/ResponseParam.java index 391cb0d..c3a932f 100644 --- a/src/main/java/com/objecteye/entity/ResponseParam.java +++ b/src/main/java/com/objecteye/entity/ResponseParam.java @@ -9,7 +9,16 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class ResponseParam { - private String code; //状态码 - private String msg; //提示消息 - private T result; // 泛型类结果 + /** + * 状态码 + */ + private String code; + /** + * 提示消息 + */ + private String msg; + /** + * 泛型类结果 + */ + private T result; } diff --git a/src/main/java/com/objecteye/entity/RetrieveSearchDataParam.java b/src/main/java/com/objecteye/entity/RetrieveSearchDataParam.java index 20a142a..6823c24 100644 --- a/src/main/java/com/objecteye/entity/RetrieveSearchDataParam.java +++ b/src/main/java/com/objecteye/entity/RetrieveSearchDataParam.java @@ -8,8 +8,12 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class RetrieveSearchDataParam { + private int topN; + private float threshold; + private int threadNum; + private float[] feature; } diff --git a/src/main/java/com/objecteye/entity/SyAreaEquipment.java b/src/main/java/com/objecteye/entity/SyAreaEquipment.java deleted file mode 100644 index 041493e..0000000 --- a/src/main/java/com/objecteye/entity/SyAreaEquipment.java +++ /dev/null @@ -1,76 +0,0 @@ -package com.objecteye.entity; - -import io.swagger.annotations.ApiModelProperty; - -import java.io.Serializable; - -public class SyAreaEquipment implements Serializable { - @ApiModelProperty(value = "自增主键") - private Integer id; - @ApiModelProperty(value = "父id") - private Integer parentId; - @ApiModelProperty(value = "设备(区域)名称") - private String name; - @ApiModelProperty(value = "设备(区域)外键") - private Integer typeId; - @ApiModelProperty(value = "0表示区域,1表示设备") - private Integer isEquipment; - - private static final long serialVersionUID = 1L; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Integer getParentId() { - return parentId; - } - - public void setParentId(Integer parentId) { - this.parentId = parentId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Integer getTypeId() { - return typeId; - } - - public void setTypeId(Integer typeId) { - this.typeId = typeId; - } - - public Integer getIsEquipment() { - return isEquipment; - } - - public void setIsEquipment(Integer isEquipment) { - this.isEquipment = isEquipment; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", parentId=").append(parentId); - sb.append(", name=").append(name); - sb.append(", typeId=").append(typeId); - sb.append(", isEquipment=").append(isEquipment); - sb.append(", serialVersionUID=").append(serialVersionUID); - sb.append("]"); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyAreaEquipmentExample.java b/src/main/java/com/objecteye/entity/SyAreaEquipmentExample.java deleted file mode 100644 index 24751d8..0000000 --- a/src/main/java/com/objecteye/entity/SyAreaEquipmentExample.java +++ /dev/null @@ -1,510 +0,0 @@ -package com.objecteye.entity; - -import java.util.ArrayList; -import java.util.List; - -public class SyAreaEquipmentExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public SyAreaEquipmentExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Integer value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Integer value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Integer value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Integer value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Integer value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Integer value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Integer value1, Integer value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Integer value1, Integer value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andParentIdIsNull() { - addCriterion("parent_id is null"); - return (Criteria) this; - } - - public Criteria andParentIdIsNotNull() { - addCriterion("parent_id is not null"); - return (Criteria) this; - } - - public Criteria andParentIdEqualTo(Integer value) { - addCriterion("parent_id =", value, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdNotEqualTo(Integer value) { - addCriterion("parent_id <>", value, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdGreaterThan(Integer value) { - addCriterion("parent_id >", value, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdGreaterThanOrEqualTo(Integer value) { - addCriterion("parent_id >=", value, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdLessThan(Integer value) { - addCriterion("parent_id <", value, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdLessThanOrEqualTo(Integer value) { - addCriterion("parent_id <=", value, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdIn(List values) { - addCriterion("parent_id in", values, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdNotIn(List values) { - addCriterion("parent_id not in", values, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdBetween(Integer value1, Integer value2) { - addCriterion("parent_id between", value1, value2, "parentId"); - return (Criteria) this; - } - - public Criteria andParentIdNotBetween(Integer value1, Integer value2) { - addCriterion("parent_id not between", value1, value2, "parentId"); - return (Criteria) this; - } - - public Criteria andNameIsNull() { - addCriterion("name is null"); - return (Criteria) this; - } - - public Criteria andNameIsNotNull() { - addCriterion("name is not null"); - return (Criteria) this; - } - - public Criteria andNameEqualTo(String value) { - addCriterion("name =", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotEqualTo(String value) { - addCriterion("name <>", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThan(String value) { - addCriterion("name >", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThanOrEqualTo(String value) { - addCriterion("name >=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThan(String value) { - addCriterion("name <", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThanOrEqualTo(String value) { - addCriterion("name <=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLike(String value) { - addCriterion("name like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotLike(String value) { - addCriterion("name not like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameIn(List values) { - addCriterion("name in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameNotIn(List values) { - addCriterion("name not in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameBetween(String value1, String value2) { - addCriterion("name between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andNameNotBetween(String value1, String value2) { - addCriterion("name not between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andTypeIdIsNull() { - addCriterion("type_id is null"); - return (Criteria) this; - } - - public Criteria andTypeIdIsNotNull() { - addCriterion("type_id is not null"); - return (Criteria) this; - } - - public Criteria andTypeIdEqualTo(Integer value) { - addCriterion("type_id =", value, "typeId"); - return (Criteria) this; - } - - public Criteria andTypeIdNotEqualTo(Integer value) { - addCriterion("type_id <>", value, "typeId"); - return (Criteria) this; - } - - public Criteria andTypeIdGreaterThan(Integer value) { - addCriterion("type_id >", value, "typeId"); - return (Criteria) this; - } - - public Criteria andTypeIdGreaterThanOrEqualTo(Integer value) { - addCriterion("type_id >=", value, "typeId"); - return (Criteria) this; - } - - public Criteria andTypeIdLessThan(Integer value) { - addCriterion("type_id <", value, "typeId"); - return (Criteria) this; - } - - public Criteria andTypeIdLessThanOrEqualTo(Integer value) { - addCriterion("type_id <=", value, "typeId"); - return (Criteria) this; - } - - public Criteria andTypeIdIn(List values) { - addCriterion("type_id in", values, "typeId"); - return (Criteria) this; - } - - public Criteria andTypeIdNotIn(List values) { - addCriterion("type_id not in", values, "typeId"); - return (Criteria) this; - } - - public Criteria andTypeIdBetween(Integer value1, Integer value2) { - addCriterion("type_id between", value1, value2, "typeId"); - return (Criteria) this; - } - - public Criteria andTypeIdNotBetween(Integer value1, Integer value2) { - addCriterion("type_id not between", value1, value2, "typeId"); - return (Criteria) this; - } - - public Criteria andIsEquipmentIsNull() { - addCriterion("is_equipment is null"); - return (Criteria) this; - } - - public Criteria andIsEquipmentIsNotNull() { - addCriterion("is_equipment is not null"); - return (Criteria) this; - } - - public Criteria andIsEquipmentEqualTo(Integer value) { - addCriterion("is_equipment =", value, "isEquipment"); - return (Criteria) this; - } - - public Criteria andIsEquipmentNotEqualTo(Integer value) { - addCriterion("is_equipment <>", value, "isEquipment"); - return (Criteria) this; - } - - public Criteria andIsEquipmentGreaterThan(Integer value) { - addCriterion("is_equipment >", value, "isEquipment"); - return (Criteria) this; - } - - public Criteria andIsEquipmentGreaterThanOrEqualTo(Integer value) { - addCriterion("is_equipment >=", value, "isEquipment"); - return (Criteria) this; - } - - public Criteria andIsEquipmentLessThan(Integer value) { - addCriterion("is_equipment <", value, "isEquipment"); - return (Criteria) this; - } - - public Criteria andIsEquipmentLessThanOrEqualTo(Integer value) { - addCriterion("is_equipment <=", value, "isEquipment"); - return (Criteria) this; - } - - public Criteria andIsEquipmentIn(List values) { - addCriterion("is_equipment in", values, "isEquipment"); - return (Criteria) this; - } - - public Criteria andIsEquipmentNotIn(List values) { - addCriterion("is_equipment not in", values, "isEquipment"); - return (Criteria) this; - } - - public Criteria andIsEquipmentBetween(Integer value1, Integer value2) { - addCriterion("is_equipment between", value1, value2, "isEquipment"); - return (Criteria) this; - } - - public Criteria andIsEquipmentNotBetween(Integer value1, Integer value2) { - addCriterion("is_equipment not between", value1, value2, "isEquipment"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyDeploy.java b/src/main/java/com/objecteye/entity/SyDeploy.java index aafda11..8001813 100644 --- a/src/main/java/com/objecteye/entity/SyDeploy.java +++ b/src/main/java/com/objecteye/entity/SyDeploy.java @@ -1,12 +1,22 @@ package com.objecteye.entity; import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; +import org.springframework.data.mongodb.core.mapping.Document; import java.io.Serializable; +@AllArgsConstructor +@NoArgsConstructor +@ToString +@Data +@Document(collection = "syDeploy") public class SyDeploy implements Serializable { @ApiModelProperty(value = "自增主键") - private Integer id; + private String id; @ApiModelProperty(value = "布控任务名称") private String name; @@ -50,149 +60,4 @@ public class SyDeploy implements Serializable { private String areaName; private static final long serialVersionUID = 1L; - - public String getAreaName() { - return areaName; - } - - public void setAreaName(String areaName) { - this.areaName = areaName; - } - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getStartTime() { - return startTime; - } - - public void setStartTime(String startTime) { - this.startTime = startTime; - } - - public String getEndTime() { - return endTime; - } - - public void setEndTime(String endTime) { - this.endTime = endTime; - } - - public Float getThresld() { - return thresld; - } - - public void setThresld(Float thresld) { - this.thresld = thresld; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getDeployEquip() { - return deployEquip; - } - - public void setDeployEquip(String deployEquip) { - this.deployEquip = deployEquip; - } - - public String getDeployLib() { - return deployLib; - } - - public void setDeployLib(String deployLib) { - this.deployLib = deployLib; - } - - public Integer getDeployType() { - return deployType; - } - - public void setDeployType(Integer deployType) { - this.deployType = deployType; - } - - public String getCreateDate() { - return createDate; - } - - public void setCreateDate(String createDate) { - this.createDate = createDate; - } - - public Integer getStatus() { - return status; - } - - public void setStatus(Integer status) { - this.status = status; - } - - public Integer getIsDelete() { - return isDelete; - } - - public void setIsDelete(Integer isDelete) { - this.isDelete = isDelete; - } - - public Integer getSinglemonitor() { - return singlemonitor; - } - - public void setSinglemonitor(Integer singlemonitor) { - this.singlemonitor = singlemonitor; - } - - public String getSingleId() { - return singleId; - } - - public void setSingleId(String singleId) { - this.singleId = singleId; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", name=").append(name); - sb.append(", startTime=").append(startTime); - sb.append(", endTime=").append(endTime); - sb.append(", thresld=").append(thresld); - sb.append(", description=").append(description); - sb.append(", deployEquip=").append(deployEquip); - sb.append(", deployLib=").append(deployLib); - sb.append(", deployType=").append(deployType); - sb.append(", createDate=").append(createDate); - sb.append(", status=").append(status); - sb.append(", isDelete=").append(isDelete); - sb.append(", singlemonitor=").append(singlemonitor); - sb.append(", singleId=").append(singleId); - sb.append(", serialVersionUID=").append(serialVersionUID); - sb.append("]"); - return sb.toString(); - } } \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyDeployEquipment.java b/src/main/java/com/objecteye/entity/SyDeployEquipment.java deleted file mode 100644 index efbf715..0000000 --- a/src/main/java/com/objecteye/entity/SyDeployEquipment.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.objecteye.entity; - -import io.swagger.annotations.ApiModelProperty; - -import java.io.Serializable; - -public class SyDeployEquipment implements Serializable { - @ApiModelProperty(value = "自增主键") - private Integer id; - - @ApiModelProperty(value = "设备外键") - private Integer eid; - - @ApiModelProperty(value = "布控表外键") - private Integer did; - - @ApiModelProperty(value = "是否删除") - private Integer isDelete; - - private static final long serialVersionUID = 1L; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Integer getEid() { - return eid; - } - - public void setEid(Integer eid) { - this.eid = eid; - } - - public Integer getDid() { - return did; - } - - public void setDid(Integer did) { - this.did = did; - } - - public Integer getIsDelete() { - return isDelete; - } - - public void setIsDelete(Integer isDelete) { - this.isDelete = isDelete; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", eid=").append(eid); - sb.append(", did=").append(did); - sb.append(", isDelete=").append(isDelete); - sb.append(", serialVersionUID=").append(serialVersionUID); - sb.append("]"); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyDeployEquipmentExample.java b/src/main/java/com/objecteye/entity/SyDeployEquipmentExample.java deleted file mode 100644 index f932c49..0000000 --- a/src/main/java/com/objecteye/entity/SyDeployEquipmentExample.java +++ /dev/null @@ -1,440 +0,0 @@ -package com.objecteye.entity; - -import java.util.ArrayList; -import java.util.List; - -public class SyDeployEquipmentExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public SyDeployEquipmentExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Integer value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Integer value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Integer value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Integer value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Integer value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Integer value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Integer value1, Integer value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Integer value1, Integer value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andEidIsNull() { - addCriterion("eid is null"); - return (Criteria) this; - } - - public Criteria andEidIsNotNull() { - addCriterion("eid is not null"); - return (Criteria) this; - } - - public Criteria andEidEqualTo(Integer value) { - addCriterion("eid =", value, "eid"); - return (Criteria) this; - } - - public Criteria andEidNotEqualTo(Integer value) { - addCriterion("eid <>", value, "eid"); - return (Criteria) this; - } - - public Criteria andEidGreaterThan(Integer value) { - addCriterion("eid >", value, "eid"); - return (Criteria) this; - } - - public Criteria andEidGreaterThanOrEqualTo(Integer value) { - addCriterion("eid >=", value, "eid"); - return (Criteria) this; - } - - public Criteria andEidLessThan(Integer value) { - addCriterion("eid <", value, "eid"); - return (Criteria) this; - } - - public Criteria andEidLessThanOrEqualTo(Integer value) { - addCriterion("eid <=", value, "eid"); - return (Criteria) this; - } - - public Criteria andEidIn(List values) { - addCriterion("eid in", values, "eid"); - return (Criteria) this; - } - - public Criteria andEidNotIn(List values) { - addCriterion("eid not in", values, "eid"); - return (Criteria) this; - } - - public Criteria andEidBetween(Integer value1, Integer value2) { - addCriterion("eid between", value1, value2, "eid"); - return (Criteria) this; - } - - public Criteria andEidNotBetween(Integer value1, Integer value2) { - addCriterion("eid not between", value1, value2, "eid"); - return (Criteria) this; - } - - public Criteria andDidIsNull() { - addCriterion("did is null"); - return (Criteria) this; - } - - public Criteria andDidIsNotNull() { - addCriterion("did is not null"); - return (Criteria) this; - } - - public Criteria andDidEqualTo(Integer value) { - addCriterion("did =", value, "did"); - return (Criteria) this; - } - - public Criteria andDidNotEqualTo(Integer value) { - addCriterion("did <>", value, "did"); - return (Criteria) this; - } - - public Criteria andDidGreaterThan(Integer value) { - addCriterion("did >", value, "did"); - return (Criteria) this; - } - - public Criteria andDidGreaterThanOrEqualTo(Integer value) { - addCriterion("did >=", value, "did"); - return (Criteria) this; - } - - public Criteria andDidLessThan(Integer value) { - addCriterion("did <", value, "did"); - return (Criteria) this; - } - - public Criteria andDidLessThanOrEqualTo(Integer value) { - addCriterion("did <=", value, "did"); - return (Criteria) this; - } - - public Criteria andDidIn(List values) { - addCriterion("did in", values, "did"); - return (Criteria) this; - } - - public Criteria andDidNotIn(List values) { - addCriterion("did not in", values, "did"); - return (Criteria) this; - } - - public Criteria andDidBetween(Integer value1, Integer value2) { - addCriterion("did between", value1, value2, "did"); - return (Criteria) this; - } - - public Criteria andDidNotBetween(Integer value1, Integer value2) { - addCriterion("did not between", value1, value2, "did"); - return (Criteria) this; - } - - public Criteria andIsDeleteIsNull() { - addCriterion("is_delete is null"); - return (Criteria) this; - } - - public Criteria andIsDeleteIsNotNull() { - addCriterion("is_delete is not null"); - return (Criteria) this; - } - - public Criteria andIsDeleteEqualTo(Integer value) { - addCriterion("is_delete =", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotEqualTo(Integer value) { - addCriterion("is_delete <>", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteGreaterThan(Integer value) { - addCriterion("is_delete >", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteGreaterThanOrEqualTo(Integer value) { - addCriterion("is_delete >=", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteLessThan(Integer value) { - addCriterion("is_delete <", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteLessThanOrEqualTo(Integer value) { - addCriterion("is_delete <=", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteIn(List values) { - addCriterion("is_delete in", values, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotIn(List values) { - addCriterion("is_delete not in", values, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteBetween(Integer value1, Integer value2) { - addCriterion("is_delete between", value1, value2, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotBetween(Integer value1, Integer value2) { - addCriterion("is_delete not between", value1, value2, "isDelete"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyDeployExample.java b/src/main/java/com/objecteye/entity/SyDeployExample.java deleted file mode 100644 index 23adc05..0000000 --- a/src/main/java/com/objecteye/entity/SyDeployExample.java +++ /dev/null @@ -1,1120 +0,0 @@ -package com.objecteye.entity; - -import java.util.ArrayList; -import java.util.List; - -public class SyDeployExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public SyDeployExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Integer value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Integer value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Integer value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Integer value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Integer value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Integer value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Integer value1, Integer value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Integer value1, Integer value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andNameIsNull() { - addCriterion("name is null"); - return (Criteria) this; - } - - public Criteria andNameIsNotNull() { - addCriterion("name is not null"); - return (Criteria) this; - } - - public Criteria andNameEqualTo(String value) { - addCriterion("name =", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotEqualTo(String value) { - addCriterion("name <>", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThan(String value) { - addCriterion("name >", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThanOrEqualTo(String value) { - addCriterion("name >=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThan(String value) { - addCriterion("name <", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThanOrEqualTo(String value) { - addCriterion("name <=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLike(String value) { - addCriterion("name like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotLike(String value) { - addCriterion("name not like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameIn(List values) { - addCriterion("name in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameNotIn(List values) { - addCriterion("name not in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameBetween(String value1, String value2) { - addCriterion("name between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andNameNotBetween(String value1, String value2) { - addCriterion("name not between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andStartTimeIsNull() { - addCriterion("start_time is null"); - return (Criteria) this; - } - - public Criteria andStartTimeIsNotNull() { - addCriterion("start_time is not null"); - return (Criteria) this; - } - - public Criteria andStartTimeEqualTo(String value) { - addCriterion("start_time =", value, "startTime"); - return (Criteria) this; - } - - public Criteria andStartTimeNotEqualTo(String value) { - addCriterion("start_time <>", value, "startTime"); - return (Criteria) this; - } - - public Criteria andStartTimeGreaterThan(String value) { - addCriterion("start_time >", value, "startTime"); - return (Criteria) this; - } - - public Criteria andStartTimeGreaterThanOrEqualTo(String value) { - addCriterion("start_time >=", value, "startTime"); - return (Criteria) this; - } - - public Criteria andStartTimeLessThan(String value) { - addCriterion("start_time <", value, "startTime"); - return (Criteria) this; - } - - public Criteria andStartTimeLessThanOrEqualTo(String value) { - addCriterion("start_time <=", value, "startTime"); - return (Criteria) this; - } - - public Criteria andStartTimeLike(String value) { - addCriterion("start_time like", value, "startTime"); - return (Criteria) this; - } - - public Criteria andStartTimeNotLike(String value) { - addCriterion("start_time not like", value, "startTime"); - return (Criteria) this; - } - - public Criteria andStartTimeIn(List values) { - addCriterion("start_time in", values, "startTime"); - return (Criteria) this; - } - - public Criteria andStartTimeNotIn(List values) { - addCriterion("start_time not in", values, "startTime"); - return (Criteria) this; - } - - public Criteria andStartTimeBetween(String value1, String value2) { - addCriterion("start_time between", value1, value2, "startTime"); - return (Criteria) this; - } - - public Criteria andStartTimeNotBetween(String value1, String value2) { - addCriterion("start_time not between", value1, value2, "startTime"); - return (Criteria) this; - } - - public Criteria andEndTimeIsNull() { - addCriterion("end_time is null"); - return (Criteria) this; - } - - public Criteria andEndTimeIsNotNull() { - addCriterion("end_time is not null"); - return (Criteria) this; - } - - public Criteria andEndTimeEqualTo(String value) { - addCriterion("end_time =", value, "endTime"); - return (Criteria) this; - } - - public Criteria andEndTimeNotEqualTo(String value) { - addCriterion("end_time <>", value, "endTime"); - return (Criteria) this; - } - - public Criteria andEndTimeGreaterThan(String value) { - addCriterion("end_time >", value, "endTime"); - return (Criteria) this; - } - - public Criteria andEndTimeGreaterThanOrEqualTo(String value) { - addCriterion("end_time >=", value, "endTime"); - return (Criteria) this; - } - - public Criteria andEndTimeLessThan(String value) { - addCriterion("end_time <", value, "endTime"); - return (Criteria) this; - } - - public Criteria andEndTimeLessThanOrEqualTo(String value) { - addCriterion("end_time <=", value, "endTime"); - return (Criteria) this; - } - - public Criteria andEndTimeLike(String value) { - addCriterion("end_time like", value, "endTime"); - return (Criteria) this; - } - - public Criteria andEndTimeNotLike(String value) { - addCriterion("end_time not like", value, "endTime"); - return (Criteria) this; - } - - public Criteria andEndTimeIn(List values) { - addCriterion("end_time in", values, "endTime"); - return (Criteria) this; - } - - public Criteria andEndTimeNotIn(List values) { - addCriterion("end_time not in", values, "endTime"); - return (Criteria) this; - } - - public Criteria andEndTimeBetween(String value1, String value2) { - addCriterion("end_time between", value1, value2, "endTime"); - return (Criteria) this; - } - - public Criteria andEndTimeNotBetween(String value1, String value2) { - addCriterion("end_time not between", value1, value2, "endTime"); - return (Criteria) this; - } - - public Criteria andThresldIsNull() { - addCriterion("thresld is null"); - return (Criteria) this; - } - - public Criteria andThresldIsNotNull() { - addCriterion("thresld is not null"); - return (Criteria) this; - } - - public Criteria andThresldEqualTo(Float value) { - addCriterion("thresld =", value, "thresld"); - return (Criteria) this; - } - - public Criteria andThresldNotEqualTo(Float value) { - addCriterion("thresld <>", value, "thresld"); - return (Criteria) this; - } - - public Criteria andThresldGreaterThan(Float value) { - addCriterion("thresld >", value, "thresld"); - return (Criteria) this; - } - - public Criteria andThresldGreaterThanOrEqualTo(Float value) { - addCriterion("thresld >=", value, "thresld"); - return (Criteria) this; - } - - public Criteria andThresldLessThan(Float value) { - addCriterion("thresld <", value, "thresld"); - return (Criteria) this; - } - - public Criteria andThresldLessThanOrEqualTo(Float value) { - addCriterion("thresld <=", value, "thresld"); - return (Criteria) this; - } - - public Criteria andThresldIn(List values) { - addCriterion("thresld in", values, "thresld"); - return (Criteria) this; - } - - public Criteria andThresldNotIn(List values) { - addCriterion("thresld not in", values, "thresld"); - return (Criteria) this; - } - - public Criteria andThresldBetween(Float value1, Float value2) { - addCriterion("thresld between", value1, value2, "thresld"); - return (Criteria) this; - } - - public Criteria andThresldNotBetween(Float value1, Float value2) { - addCriterion("thresld not between", value1, value2, "thresld"); - return (Criteria) this; - } - - public Criteria andDescriptionIsNull() { - addCriterion("description is null"); - return (Criteria) this; - } - - public Criteria andDescriptionIsNotNull() { - addCriterion("description is not null"); - return (Criteria) this; - } - - public Criteria andDescriptionEqualTo(String value) { - addCriterion("description =", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotEqualTo(String value) { - addCriterion("description <>", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionGreaterThan(String value) { - addCriterion("description >", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionGreaterThanOrEqualTo(String value) { - addCriterion("description >=", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLessThan(String value) { - addCriterion("description <", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLessThanOrEqualTo(String value) { - addCriterion("description <=", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLike(String value) { - addCriterion("description like", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotLike(String value) { - addCriterion("description not like", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionIn(List values) { - addCriterion("description in", values, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotIn(List values) { - addCriterion("description not in", values, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionBetween(String value1, String value2) { - addCriterion("description between", value1, value2, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotBetween(String value1, String value2) { - addCriterion("description not between", value1, value2, "description"); - return (Criteria) this; - } - - public Criteria andDeployEquipIsNull() { - addCriterion("deploy_equip is null"); - return (Criteria) this; - } - - public Criteria andDeployEquipIsNotNull() { - addCriterion("deploy_equip is not null"); - return (Criteria) this; - } - - public Criteria andDeployEquipEqualTo(String value) { - addCriterion("deploy_equip =", value, "deployEquip"); - return (Criteria) this; - } - - public Criteria andDeployEquipNotEqualTo(String value) { - addCriterion("deploy_equip <>", value, "deployEquip"); - return (Criteria) this; - } - - public Criteria andDeployEquipGreaterThan(String value) { - addCriterion("deploy_equip >", value, "deployEquip"); - return (Criteria) this; - } - - public Criteria andDeployEquipGreaterThanOrEqualTo(String value) { - addCriterion("deploy_equip >=", value, "deployEquip"); - return (Criteria) this; - } - - public Criteria andDeployEquipLessThan(String value) { - addCriterion("deploy_equip <", value, "deployEquip"); - return (Criteria) this; - } - - public Criteria andDeployEquipLessThanOrEqualTo(String value) { - addCriterion("deploy_equip <=", value, "deployEquip"); - return (Criteria) this; - } - - public Criteria andDeployEquipLike(String value) { - addCriterion("deploy_equip like", value, "deployEquip"); - return (Criteria) this; - } - - public Criteria andDeployEquipNotLike(String value) { - addCriterion("deploy_equip not like", value, "deployEquip"); - return (Criteria) this; - } - - public Criteria andDeployEquipIn(List values) { - addCriterion("deploy_equip in", values, "deployEquip"); - return (Criteria) this; - } - - public Criteria andDeployEquipNotIn(List values) { - addCriterion("deploy_equip not in", values, "deployEquip"); - return (Criteria) this; - } - - public Criteria andDeployEquipBetween(String value1, String value2) { - addCriterion("deploy_equip between", value1, value2, "deployEquip"); - return (Criteria) this; - } - - public Criteria andDeployEquipNotBetween(String value1, String value2) { - addCriterion("deploy_equip not between", value1, value2, "deployEquip"); - return (Criteria) this; - } - - public Criteria andDeployLibIsNull() { - addCriterion("deploy_lib is null"); - return (Criteria) this; - } - - public Criteria andDeployLibIsNotNull() { - addCriterion("deploy_lib is not null"); - return (Criteria) this; - } - - public Criteria andDeployLibEqualTo(String value) { - addCriterion("deploy_lib =", value, "deployLib"); - return (Criteria) this; - } - - public Criteria andDeployLibNotEqualTo(String value) { - addCriterion("deploy_lib <>", value, "deployLib"); - return (Criteria) this; - } - - public Criteria andDeployLibGreaterThan(String value) { - addCriterion("deploy_lib >", value, "deployLib"); - return (Criteria) this; - } - - public Criteria andDeployLibGreaterThanOrEqualTo(String value) { - addCriterion("deploy_lib >=", value, "deployLib"); - return (Criteria) this; - } - - public Criteria andDeployLibLessThan(String value) { - addCriterion("deploy_lib <", value, "deployLib"); - return (Criteria) this; - } - - public Criteria andDeployLibLessThanOrEqualTo(String value) { - addCriterion("deploy_lib <=", value, "deployLib"); - return (Criteria) this; - } - - public Criteria andDeployLibLike(String value) { - addCriterion("deploy_lib like", value, "deployLib"); - return (Criteria) this; - } - - public Criteria andDeployLibNotLike(String value) { - addCriterion("deploy_lib not like", value, "deployLib"); - return (Criteria) this; - } - - public Criteria andDeployLibIn(List values) { - addCriterion("deploy_lib in", values, "deployLib"); - return (Criteria) this; - } - - public Criteria andDeployLibNotIn(List values) { - addCriterion("deploy_lib not in", values, "deployLib"); - return (Criteria) this; - } - - public Criteria andDeployLibBetween(String value1, String value2) { - addCriterion("deploy_lib between", value1, value2, "deployLib"); - return (Criteria) this; - } - - public Criteria andDeployLibNotBetween(String value1, String value2) { - addCriterion("deploy_lib not between", value1, value2, "deployLib"); - return (Criteria) this; - } - - public Criteria andDeployTypeIsNull() { - addCriterion("deploy_type is null"); - return (Criteria) this; - } - - public Criteria andDeployTypeIsNotNull() { - addCriterion("deploy_type is not null"); - return (Criteria) this; - } - - public Criteria andDeployTypeEqualTo(Integer value) { - addCriterion("deploy_type =", value, "deployType"); - return (Criteria) this; - } - - public Criteria andDeployTypeNotEqualTo(Integer value) { - addCriterion("deploy_type <>", value, "deployType"); - return (Criteria) this; - } - - public Criteria andDeployTypeGreaterThan(Integer value) { - addCriterion("deploy_type >", value, "deployType"); - return (Criteria) this; - } - - public Criteria andDeployTypeGreaterThanOrEqualTo(Integer value) { - addCriterion("deploy_type >=", value, "deployType"); - return (Criteria) this; - } - - public Criteria andDeployTypeLessThan(Integer value) { - addCriterion("deploy_type <", value, "deployType"); - return (Criteria) this; - } - - public Criteria andDeployTypeLessThanOrEqualTo(Integer value) { - addCriterion("deploy_type <=", value, "deployType"); - return (Criteria) this; - } - - public Criteria andDeployTypeIn(List values) { - addCriterion("deploy_type in", values, "deployType"); - return (Criteria) this; - } - - public Criteria andDeployTypeNotIn(List values) { - addCriterion("deploy_type not in", values, "deployType"); - return (Criteria) this; - } - - public Criteria andDeployTypeBetween(Integer value1, Integer value2) { - addCriterion("deploy_type between", value1, value2, "deployType"); - return (Criteria) this; - } - - public Criteria andDeployTypeNotBetween(Integer value1, Integer value2) { - addCriterion("deploy_type not between", value1, value2, "deployType"); - return (Criteria) this; - } - - public Criteria andCreateDateIsNull() { - addCriterion("create_date is null"); - return (Criteria) this; - } - - public Criteria andCreateDateIsNotNull() { - addCriterion("create_date is not null"); - return (Criteria) this; - } - - public Criteria andCreateDateEqualTo(String value) { - addCriterion("create_date =", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotEqualTo(String value) { - addCriterion("create_date <>", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateGreaterThan(String value) { - addCriterion("create_date >", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateGreaterThanOrEqualTo(String value) { - addCriterion("create_date >=", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateLessThan(String value) { - addCriterion("create_date <", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateLessThanOrEqualTo(String value) { - addCriterion("create_date <=", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateLike(String value) { - addCriterion("create_date like", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotLike(String value) { - addCriterion("create_date not like", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateIn(List values) { - addCriterion("create_date in", values, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotIn(List values) { - addCriterion("create_date not in", values, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateBetween(String value1, String value2) { - addCriterion("create_date between", value1, value2, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotBetween(String value1, String value2) { - addCriterion("create_date not between", value1, value2, "createDate"); - return (Criteria) this; - } - - public Criteria andStatusIsNull() { - addCriterion("status is null"); - return (Criteria) this; - } - - public Criteria andStatusIsNotNull() { - addCriterion("status is not null"); - return (Criteria) this; - } - - public Criteria andStatusEqualTo(Integer value) { - addCriterion("status =", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotEqualTo(Integer value) { - addCriterion("status <>", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusGreaterThan(Integer value) { - addCriterion("status >", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusGreaterThanOrEqualTo(Integer value) { - addCriterion("status >=", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusLessThan(Integer value) { - addCriterion("status <", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusLessThanOrEqualTo(Integer value) { - addCriterion("status <=", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusIn(List values) { - addCriterion("status in", values, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotIn(List values) { - addCriterion("status not in", values, "status"); - return (Criteria) this; - } - - public Criteria andStatusBetween(Integer value1, Integer value2) { - addCriterion("status between", value1, value2, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotBetween(Integer value1, Integer value2) { - addCriterion("status not between", value1, value2, "status"); - return (Criteria) this; - } - - public Criteria andIsDeleteIsNull() { - addCriterion("is_delete is null"); - return (Criteria) this; - } - - public Criteria andIsDeleteIsNotNull() { - addCriterion("is_delete is not null"); - return (Criteria) this; - } - - public Criteria andIsDeleteEqualTo(Integer value) { - addCriterion("is_delete =", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotEqualTo(Integer value) { - addCriterion("is_delete <>", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteGreaterThan(Integer value) { - addCriterion("is_delete >", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteGreaterThanOrEqualTo(Integer value) { - addCriterion("is_delete >=", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteLessThan(Integer value) { - addCriterion("is_delete <", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteLessThanOrEqualTo(Integer value) { - addCriterion("is_delete <=", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteIn(List values) { - addCriterion("is_delete in", values, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotIn(List values) { - addCriterion("is_delete not in", values, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteBetween(Integer value1, Integer value2) { - addCriterion("is_delete between", value1, value2, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotBetween(Integer value1, Integer value2) { - addCriterion("is_delete not between", value1, value2, "isDelete"); - return (Criteria) this; - } - - public Criteria andSinglemonitorIsNull() { - addCriterion("singleMonitor is null"); - return (Criteria) this; - } - - public Criteria andSinglemonitorIsNotNull() { - addCriterion("singleMonitor is not null"); - return (Criteria) this; - } - - public Criteria andSinglemonitorEqualTo(Integer value) { - addCriterion("singleMonitor =", value, "singlemonitor"); - return (Criteria) this; - } - - public Criteria andSinglemonitorNotEqualTo(Integer value) { - addCriterion("singleMonitor <>", value, "singlemonitor"); - return (Criteria) this; - } - - public Criteria andSinglemonitorGreaterThan(Integer value) { - addCriterion("singleMonitor >", value, "singlemonitor"); - return (Criteria) this; - } - - public Criteria andSinglemonitorGreaterThanOrEqualTo(Integer value) { - addCriterion("singleMonitor >=", value, "singlemonitor"); - return (Criteria) this; - } - - public Criteria andSinglemonitorLessThan(Integer value) { - addCriterion("singleMonitor <", value, "singlemonitor"); - return (Criteria) this; - } - - public Criteria andSinglemonitorLessThanOrEqualTo(Integer value) { - addCriterion("singleMonitor <=", value, "singlemonitor"); - return (Criteria) this; - } - - public Criteria andSinglemonitorIn(List values) { - addCriterion("singleMonitor in", values, "singlemonitor"); - return (Criteria) this; - } - - public Criteria andSinglemonitorNotIn(List values) { - addCriterion("singleMonitor not in", values, "singlemonitor"); - return (Criteria) this; - } - - public Criteria andSinglemonitorBetween(Integer value1, Integer value2) { - addCriterion("singleMonitor between", value1, value2, "singlemonitor"); - return (Criteria) this; - } - - public Criteria andSinglemonitorNotBetween(Integer value1, Integer value2) { - addCriterion("singleMonitor not between", value1, value2, "singlemonitor"); - return (Criteria) this; - } - - public Criteria andSingleIdIsNull() { - addCriterion("single_id is null"); - return (Criteria) this; - } - - public Criteria andSingleIdIsNotNull() { - addCriterion("single_id is not null"); - return (Criteria) this; - } - - public Criteria andSingleIdEqualTo(String value) { - addCriterion("single_id =", value, "singleId"); - return (Criteria) this; - } - - public Criteria andSingleIdNotEqualTo(String value) { - addCriterion("single_id <>", value, "singleId"); - return (Criteria) this; - } - - public Criteria andSingleIdGreaterThan(String value) { - addCriterion("single_id >", value, "singleId"); - return (Criteria) this; - } - - public Criteria andSingleIdGreaterThanOrEqualTo(String value) { - addCriterion("single_id >=", value, "singleId"); - return (Criteria) this; - } - - public Criteria andSingleIdLessThan(String value) { - addCriterion("single_id <", value, "singleId"); - return (Criteria) this; - } - - public Criteria andSingleIdLessThanOrEqualTo(String value) { - addCriterion("single_id <=", value, "singleId"); - return (Criteria) this; - } - - public Criteria andSingleIdLike(String value) { - addCriterion("single_id like", value, "singleId"); - return (Criteria) this; - } - - public Criteria andSingleIdNotLike(String value) { - addCriterion("single_id not like", value, "singleId"); - return (Criteria) this; - } - - public Criteria andSingleIdIn(List values) { - addCriterion("single_id in", values, "singleId"); - return (Criteria) this; - } - - public Criteria andSingleIdNotIn(List values) { - addCriterion("single_id not in", values, "singleId"); - return (Criteria) this; - } - - public Criteria andSingleIdBetween(String value1, String value2) { - addCriterion("single_id between", value1, value2, "singleId"); - return (Criteria) this; - } - - public Criteria andSingleIdNotBetween(String value1, String value2) { - addCriterion("single_id not between", value1, value2, "singleId"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyDeployFeature.java b/src/main/java/com/objecteye/entity/SyDeployFeature.java deleted file mode 100644 index f192ef8..0000000 --- a/src/main/java/com/objecteye/entity/SyDeployFeature.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.objecteye.entity; - -import io.swagger.annotations.ApiModelProperty; - -import java.io.Serializable; - -public class SyDeployFeature implements Serializable { - private Integer id; - - @ApiModelProperty(value = "布控外键") - private Integer did; - - @ApiModelProperty(value = "人像库外键") - private Integer fid; - - @ApiModelProperty(value = "是否删除") - private Integer isDelete; - - private static final long serialVersionUID = 1L; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Integer getDid() { - return did; - } - - public void setDid(Integer did) { - this.did = did; - } - - public Integer getFid() { - return fid; - } - - public void setFid(Integer fid) { - this.fid = fid; - } - - public Integer getIsDelete() { - return isDelete; - } - - public void setIsDelete(Integer isDelete) { - this.isDelete = isDelete; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", did=").append(did); - sb.append(", fid=").append(fid); - sb.append(", isDelete=").append(isDelete); - sb.append(", serialVersionUID=").append(serialVersionUID); - sb.append("]"); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyDeployFeatureExample.java b/src/main/java/com/objecteye/entity/SyDeployFeatureExample.java deleted file mode 100644 index 79dfc63..0000000 --- a/src/main/java/com/objecteye/entity/SyDeployFeatureExample.java +++ /dev/null @@ -1,440 +0,0 @@ -package com.objecteye.entity; - -import java.util.ArrayList; -import java.util.List; - -public class SyDeployFeatureExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public SyDeployFeatureExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Integer value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Integer value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Integer value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Integer value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Integer value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Integer value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Integer value1, Integer value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Integer value1, Integer value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andDidIsNull() { - addCriterion("did is null"); - return (Criteria) this; - } - - public Criteria andDidIsNotNull() { - addCriterion("did is not null"); - return (Criteria) this; - } - - public Criteria andDidEqualTo(Integer value) { - addCriterion("did =", value, "did"); - return (Criteria) this; - } - - public Criteria andDidNotEqualTo(Integer value) { - addCriterion("did <>", value, "did"); - return (Criteria) this; - } - - public Criteria andDidGreaterThan(Integer value) { - addCriterion("did >", value, "did"); - return (Criteria) this; - } - - public Criteria andDidGreaterThanOrEqualTo(Integer value) { - addCriterion("did >=", value, "did"); - return (Criteria) this; - } - - public Criteria andDidLessThan(Integer value) { - addCriterion("did <", value, "did"); - return (Criteria) this; - } - - public Criteria andDidLessThanOrEqualTo(Integer value) { - addCriterion("did <=", value, "did"); - return (Criteria) this; - } - - public Criteria andDidIn(List values) { - addCriterion("did in", values, "did"); - return (Criteria) this; - } - - public Criteria andDidNotIn(List values) { - addCriterion("did not in", values, "did"); - return (Criteria) this; - } - - public Criteria andDidBetween(Integer value1, Integer value2) { - addCriterion("did between", value1, value2, "did"); - return (Criteria) this; - } - - public Criteria andDidNotBetween(Integer value1, Integer value2) { - addCriterion("did not between", value1, value2, "did"); - return (Criteria) this; - } - - public Criteria andFidIsNull() { - addCriterion("fid is null"); - return (Criteria) this; - } - - public Criteria andFidIsNotNull() { - addCriterion("fid is not null"); - return (Criteria) this; - } - - public Criteria andFidEqualTo(Integer value) { - addCriterion("fid =", value, "fid"); - return (Criteria) this; - } - - public Criteria andFidNotEqualTo(Integer value) { - addCriterion("fid <>", value, "fid"); - return (Criteria) this; - } - - public Criteria andFidGreaterThan(Integer value) { - addCriterion("fid >", value, "fid"); - return (Criteria) this; - } - - public Criteria andFidGreaterThanOrEqualTo(Integer value) { - addCriterion("fid >=", value, "fid"); - return (Criteria) this; - } - - public Criteria andFidLessThan(Integer value) { - addCriterion("fid <", value, "fid"); - return (Criteria) this; - } - - public Criteria andFidLessThanOrEqualTo(Integer value) { - addCriterion("fid <=", value, "fid"); - return (Criteria) this; - } - - public Criteria andFidIn(List values) { - addCriterion("fid in", values, "fid"); - return (Criteria) this; - } - - public Criteria andFidNotIn(List values) { - addCriterion("fid not in", values, "fid"); - return (Criteria) this; - } - - public Criteria andFidBetween(Integer value1, Integer value2) { - addCriterion("fid between", value1, value2, "fid"); - return (Criteria) this; - } - - public Criteria andFidNotBetween(Integer value1, Integer value2) { - addCriterion("fid not between", value1, value2, "fid"); - return (Criteria) this; - } - - public Criteria andIsDeleteIsNull() { - addCriterion("is_delete is null"); - return (Criteria) this; - } - - public Criteria andIsDeleteIsNotNull() { - addCriterion("is_delete is not null"); - return (Criteria) this; - } - - public Criteria andIsDeleteEqualTo(Integer value) { - addCriterion("is_delete =", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotEqualTo(Integer value) { - addCriterion("is_delete <>", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteGreaterThan(Integer value) { - addCriterion("is_delete >", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteGreaterThanOrEqualTo(Integer value) { - addCriterion("is_delete >=", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteLessThan(Integer value) { - addCriterion("is_delete <", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteLessThanOrEqualTo(Integer value) { - addCriterion("is_delete <=", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteIn(List values) { - addCriterion("is_delete in", values, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotIn(List values) { - addCriterion("is_delete not in", values, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteBetween(Integer value1, Integer value2) { - addCriterion("is_delete between", value1, value2, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotBetween(Integer value1, Integer value2) { - addCriterion("is_delete not between", value1, value2, "isDelete"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyDeployParam.java b/src/main/java/com/objecteye/entity/SyDeployParam.java index 507ccaf..9cb677b 100644 --- a/src/main/java/com/objecteye/entity/SyDeployParam.java +++ b/src/main/java/com/objecteye/entity/SyDeployParam.java @@ -12,12 +12,19 @@ import java.io.Serializable; public class SyDeployParam implements Serializable { private String[] featureIds; + private int[] equipmentIds; + private String name; + private String startTime; + private String endTime; + private float detectThresld; + private String description; + private int deployType; } diff --git a/src/main/java/com/objecteye/entity/SyEquipment.java b/src/main/java/com/objecteye/entity/SyEquipment.java deleted file mode 100644 index c2d94a6..0000000 --- a/src/main/java/com/objecteye/entity/SyEquipment.java +++ /dev/null @@ -1,257 +0,0 @@ -package com.objecteye.entity; - -import io.swagger.annotations.ApiModelProperty; - -import java.io.Serializable; - -public class SyEquipment implements Serializable { - @ApiModelProperty(value = "自增主键") - private Integer id; - - @ApiModelProperty(value = "设备名") - private String equipmentName; - - @ApiModelProperty(value = "设备ip") - private String equipmentIp; - - @ApiModelProperty(value = "rtsp流地址") - private String rtspUrl; - - @ApiModelProperty(value = "经度") - private String longitude; - - @ApiModelProperty(value = "纬度") - private String latitude; - - @ApiModelProperty(value = "朝向") - private String orientation; - - @ApiModelProperty(value = "用户名") - private String username; - - @ApiModelProperty(value = "用户密码") - private String password; - - @ApiModelProperty(value = "设备端口") - private String equipmentPort; - - @ApiModelProperty(value = "网络端口") - private String intentPort; - - @ApiModelProperty(value = "厂商") - private String vendor; - - @ApiModelProperty(value = "描述") - private String description; - - private String createDate; - - @ApiModelProperty(value = "更新时间") - private String updateDate; - - private Integer isDelete; - - private Integer equipmentType; - - @ApiModelProperty(value = "设备状态") - private Integer status; - - @ApiModelProperty(value = "区域外键") - private Integer aid; - - @ApiModelProperty(value = "场所") - private String place; - - private static final long serialVersionUID = 1L; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getEquipmentName() { - return equipmentName; - } - - public void setEquipmentName(String equipmentName) { - this.equipmentName = equipmentName; - } - - public String getEquipmentIp() { - return equipmentIp; - } - - public void setEquipmentIp(String equipmentIp) { - this.equipmentIp = equipmentIp; - } - - public String getRtspUrl() { - return rtspUrl; - } - - public void setRtspUrl(String rtspUrl) { - this.rtspUrl = rtspUrl; - } - - public String getLongitude() { - return longitude; - } - - public void setLongitude(String longitude) { - this.longitude = longitude; - } - - public String getLatitude() { - return latitude; - } - - public void setLatitude(String latitude) { - this.latitude = latitude; - } - - public String getOrientation() { - return orientation; - } - - public void setOrientation(String orientation) { - this.orientation = orientation; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public String getEquipmentPort() { - return equipmentPort; - } - - public void setEquipmentPort(String equipmentPort) { - this.equipmentPort = equipmentPort; - } - - public String getIntentPort() { - return intentPort; - } - - public void setIntentPort(String intentPort) { - this.intentPort = intentPort; - } - - public String getVendor() { - return vendor; - } - - public void setVendor(String vendor) { - this.vendor = vendor; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getCreateDate() { - return createDate; - } - - public void setCreateDate(String createDate) { - this.createDate = createDate; - } - - public String getUpdateDate() { - return updateDate; - } - - public void setUpdateDate(String updateDate) { - this.updateDate = updateDate; - } - - public Integer getIsDelete() { - return isDelete; - } - - public void setIsDelete(Integer isDelete) { - this.isDelete = isDelete; - } - - public Integer getEquipmentType() { - return equipmentType; - } - - public void setEquipmentType(Integer equipmentType) { - this.equipmentType = equipmentType; - } - - public Integer getStatus() { - return status; - } - - public void setStatus(Integer status) { - this.status = status; - } - - public Integer getAid() { - return aid; - } - - public void setAid(Integer aid) { - this.aid = aid; - } - - public String getPlace() { - return place; - } - - public void setPlace(String place) { - this.place = place; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", equipmentName=").append(equipmentName); - sb.append(", equipmentIp=").append(equipmentIp); - sb.append(", rtspUrl=").append(rtspUrl); - sb.append(", longitude=").append(longitude); - sb.append(", latitude=").append(latitude); - sb.append(", orientation=").append(orientation); - sb.append(", username=").append(username); - sb.append(", password=").append(password); - sb.append(", equipmentPort=").append(equipmentPort); - sb.append(", intentPort=").append(intentPort); - sb.append(", vendor=").append(vendor); - sb.append(", description=").append(description); - sb.append(", createDate=").append(createDate); - sb.append(", updateDate=").append(updateDate); - sb.append(", isDelete=").append(isDelete); - sb.append(", equipmentType=").append(equipmentType); - sb.append(", status=").append(status); - sb.append(", aid=").append(aid); - sb.append(", place=").append(place); - sb.append(", serialVersionUID=").append(serialVersionUID); - sb.append("]"); - return sb.toString(); - } -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyEquipmentExample.java b/src/main/java/com/objecteye/entity/SyEquipmentExample.java deleted file mode 100644 index 4ef5854..0000000 --- a/src/main/java/com/objecteye/entity/SyEquipmentExample.java +++ /dev/null @@ -1,1550 +0,0 @@ -package com.objecteye.entity; - -import java.util.ArrayList; -import java.util.List; - -public class SyEquipmentExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public SyEquipmentExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Integer value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Integer value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Integer value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Integer value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Integer value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Integer value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Integer value1, Integer value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Integer value1, Integer value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andEquipmentNameIsNull() { - addCriterion("equipment_name is null"); - return (Criteria) this; - } - - public Criteria andEquipmentNameIsNotNull() { - addCriterion("equipment_name is not null"); - return (Criteria) this; - } - - public Criteria andEquipmentNameEqualTo(String value) { - addCriterion("equipment_name =", value, "equipmentName"); - return (Criteria) this; - } - - public Criteria andEquipmentNameNotEqualTo(String value) { - addCriterion("equipment_name <>", value, "equipmentName"); - return (Criteria) this; - } - - public Criteria andEquipmentNameGreaterThan(String value) { - addCriterion("equipment_name >", value, "equipmentName"); - return (Criteria) this; - } - - public Criteria andEquipmentNameGreaterThanOrEqualTo(String value) { - addCriterion("equipment_name >=", value, "equipmentName"); - return (Criteria) this; - } - - public Criteria andEquipmentNameLessThan(String value) { - addCriterion("equipment_name <", value, "equipmentName"); - return (Criteria) this; - } - - public Criteria andEquipmentNameLessThanOrEqualTo(String value) { - addCriterion("equipment_name <=", value, "equipmentName"); - return (Criteria) this; - } - - public Criteria andEquipmentNameLike(String value) { - addCriterion("equipment_name like", value, "equipmentName"); - return (Criteria) this; - } - - public Criteria andEquipmentNameNotLike(String value) { - addCriterion("equipment_name not like", value, "equipmentName"); - return (Criteria) this; - } - - public Criteria andEquipmentNameIn(List values) { - addCriterion("equipment_name in", values, "equipmentName"); - return (Criteria) this; - } - - public Criteria andEquipmentNameNotIn(List values) { - addCriterion("equipment_name not in", values, "equipmentName"); - return (Criteria) this; - } - - public Criteria andEquipmentNameBetween(String value1, String value2) { - addCriterion("equipment_name between", value1, value2, "equipmentName"); - return (Criteria) this; - } - - public Criteria andEquipmentNameNotBetween(String value1, String value2) { - addCriterion("equipment_name not between", value1, value2, "equipmentName"); - return (Criteria) this; - } - - public Criteria andEquipmentIpIsNull() { - addCriterion("equipment_ip is null"); - return (Criteria) this; - } - - public Criteria andEquipmentIpIsNotNull() { - addCriterion("equipment_ip is not null"); - return (Criteria) this; - } - - public Criteria andEquipmentIpEqualTo(String value) { - addCriterion("equipment_ip =", value, "equipmentIp"); - return (Criteria) this; - } - - public Criteria andEquipmentIpNotEqualTo(String value) { - addCriterion("equipment_ip <>", value, "equipmentIp"); - return (Criteria) this; - } - - public Criteria andEquipmentIpGreaterThan(String value) { - addCriterion("equipment_ip >", value, "equipmentIp"); - return (Criteria) this; - } - - public Criteria andEquipmentIpGreaterThanOrEqualTo(String value) { - addCriterion("equipment_ip >=", value, "equipmentIp"); - return (Criteria) this; - } - - public Criteria andEquipmentIpLessThan(String value) { - addCriterion("equipment_ip <", value, "equipmentIp"); - return (Criteria) this; - } - - public Criteria andEquipmentIpLessThanOrEqualTo(String value) { - addCriterion("equipment_ip <=", value, "equipmentIp"); - return (Criteria) this; - } - - public Criteria andEquipmentIpLike(String value) { - addCriterion("equipment_ip like", value, "equipmentIp"); - return (Criteria) this; - } - - public Criteria andEquipmentIpNotLike(String value) { - addCriterion("equipment_ip not like", value, "equipmentIp"); - return (Criteria) this; - } - - public Criteria andEquipmentIpIn(List values) { - addCriterion("equipment_ip in", values, "equipmentIp"); - return (Criteria) this; - } - - public Criteria andEquipmentIpNotIn(List values) { - addCriterion("equipment_ip not in", values, "equipmentIp"); - return (Criteria) this; - } - - public Criteria andEquipmentIpBetween(String value1, String value2) { - addCriterion("equipment_ip between", value1, value2, "equipmentIp"); - return (Criteria) this; - } - - public Criteria andEquipmentIpNotBetween(String value1, String value2) { - addCriterion("equipment_ip not between", value1, value2, "equipmentIp"); - return (Criteria) this; - } - - public Criteria andRtspUrlIsNull() { - addCriterion("rtsp_url is null"); - return (Criteria) this; - } - - public Criteria andRtspUrlIsNotNull() { - addCriterion("rtsp_url is not null"); - return (Criteria) this; - } - - public Criteria andRtspUrlEqualTo(String value) { - addCriterion("rtsp_url =", value, "rtspUrl"); - return (Criteria) this; - } - - public Criteria andRtspUrlNotEqualTo(String value) { - addCriterion("rtsp_url <>", value, "rtspUrl"); - return (Criteria) this; - } - - public Criteria andRtspUrlGreaterThan(String value) { - addCriterion("rtsp_url >", value, "rtspUrl"); - return (Criteria) this; - } - - public Criteria andRtspUrlGreaterThanOrEqualTo(String value) { - addCriterion("rtsp_url >=", value, "rtspUrl"); - return (Criteria) this; - } - - public Criteria andRtspUrlLessThan(String value) { - addCriterion("rtsp_url <", value, "rtspUrl"); - return (Criteria) this; - } - - public Criteria andRtspUrlLessThanOrEqualTo(String value) { - addCriterion("rtsp_url <=", value, "rtspUrl"); - return (Criteria) this; - } - - public Criteria andRtspUrlLike(String value) { - addCriterion("rtsp_url like", value, "rtspUrl"); - return (Criteria) this; - } - - public Criteria andRtspUrlNotLike(String value) { - addCriterion("rtsp_url not like", value, "rtspUrl"); - return (Criteria) this; - } - - public Criteria andRtspUrlIn(List values) { - addCriterion("rtsp_url in", values, "rtspUrl"); - return (Criteria) this; - } - - public Criteria andRtspUrlNotIn(List values) { - addCriterion("rtsp_url not in", values, "rtspUrl"); - return (Criteria) this; - } - - public Criteria andRtspUrlBetween(String value1, String value2) { - addCriterion("rtsp_url between", value1, value2, "rtspUrl"); - return (Criteria) this; - } - - public Criteria andRtspUrlNotBetween(String value1, String value2) { - addCriterion("rtsp_url not between", value1, value2, "rtspUrl"); - return (Criteria) this; - } - - public Criteria andLongitudeIsNull() { - addCriterion("longitude is null"); - return (Criteria) this; - } - - public Criteria andLongitudeIsNotNull() { - addCriterion("longitude is not null"); - return (Criteria) this; - } - - public Criteria andLongitudeEqualTo(String value) { - addCriterion("longitude =", value, "longitude"); - return (Criteria) this; - } - - public Criteria andLongitudeNotEqualTo(String value) { - addCriterion("longitude <>", value, "longitude"); - return (Criteria) this; - } - - public Criteria andLongitudeGreaterThan(String value) { - addCriterion("longitude >", value, "longitude"); - return (Criteria) this; - } - - public Criteria andLongitudeGreaterThanOrEqualTo(String value) { - addCriterion("longitude >=", value, "longitude"); - return (Criteria) this; - } - - public Criteria andLongitudeLessThan(String value) { - addCriterion("longitude <", value, "longitude"); - return (Criteria) this; - } - - public Criteria andLongitudeLessThanOrEqualTo(String value) { - addCriterion("longitude <=", value, "longitude"); - return (Criteria) this; - } - - public Criteria andLongitudeLike(String value) { - addCriterion("longitude like", value, "longitude"); - return (Criteria) this; - } - - public Criteria andLongitudeNotLike(String value) { - addCriterion("longitude not like", value, "longitude"); - return (Criteria) this; - } - - public Criteria andLongitudeIn(List values) { - addCriterion("longitude in", values, "longitude"); - return (Criteria) this; - } - - public Criteria andLongitudeNotIn(List values) { - addCriterion("longitude not in", values, "longitude"); - return (Criteria) this; - } - - public Criteria andLongitudeBetween(String value1, String value2) { - addCriterion("longitude between", value1, value2, "longitude"); - return (Criteria) this; - } - - public Criteria andLongitudeNotBetween(String value1, String value2) { - addCriterion("longitude not between", value1, value2, "longitude"); - return (Criteria) this; - } - - public Criteria andLatitudeIsNull() { - addCriterion("latitude is null"); - return (Criteria) this; - } - - public Criteria andLatitudeIsNotNull() { - addCriterion("latitude is not null"); - return (Criteria) this; - } - - public Criteria andLatitudeEqualTo(String value) { - addCriterion("latitude =", value, "latitude"); - return (Criteria) this; - } - - public Criteria andLatitudeNotEqualTo(String value) { - addCriterion("latitude <>", value, "latitude"); - return (Criteria) this; - } - - public Criteria andLatitudeGreaterThan(String value) { - addCriterion("latitude >", value, "latitude"); - return (Criteria) this; - } - - public Criteria andLatitudeGreaterThanOrEqualTo(String value) { - addCriterion("latitude >=", value, "latitude"); - return (Criteria) this; - } - - public Criteria andLatitudeLessThan(String value) { - addCriterion("latitude <", value, "latitude"); - return (Criteria) this; - } - - public Criteria andLatitudeLessThanOrEqualTo(String value) { - addCriterion("latitude <=", value, "latitude"); - return (Criteria) this; - } - - public Criteria andLatitudeLike(String value) { - addCriterion("latitude like", value, "latitude"); - return (Criteria) this; - } - - public Criteria andLatitudeNotLike(String value) { - addCriterion("latitude not like", value, "latitude"); - return (Criteria) this; - } - - public Criteria andLatitudeIn(List values) { - addCriterion("latitude in", values, "latitude"); - return (Criteria) this; - } - - public Criteria andLatitudeNotIn(List values) { - addCriterion("latitude not in", values, "latitude"); - return (Criteria) this; - } - - public Criteria andLatitudeBetween(String value1, String value2) { - addCriterion("latitude between", value1, value2, "latitude"); - return (Criteria) this; - } - - public Criteria andLatitudeNotBetween(String value1, String value2) { - addCriterion("latitude not between", value1, value2, "latitude"); - return (Criteria) this; - } - - public Criteria andOrientationIsNull() { - addCriterion("orientation is null"); - return (Criteria) this; - } - - public Criteria andOrientationIsNotNull() { - addCriterion("orientation is not null"); - return (Criteria) this; - } - - public Criteria andOrientationEqualTo(String value) { - addCriterion("orientation =", value, "orientation"); - return (Criteria) this; - } - - public Criteria andOrientationNotEqualTo(String value) { - addCriterion("orientation <>", value, "orientation"); - return (Criteria) this; - } - - public Criteria andOrientationGreaterThan(String value) { - addCriterion("orientation >", value, "orientation"); - return (Criteria) this; - } - - public Criteria andOrientationGreaterThanOrEqualTo(String value) { - addCriterion("orientation >=", value, "orientation"); - return (Criteria) this; - } - - public Criteria andOrientationLessThan(String value) { - addCriterion("orientation <", value, "orientation"); - return (Criteria) this; - } - - public Criteria andOrientationLessThanOrEqualTo(String value) { - addCriterion("orientation <=", value, "orientation"); - return (Criteria) this; - } - - public Criteria andOrientationLike(String value) { - addCriterion("orientation like", value, "orientation"); - return (Criteria) this; - } - - public Criteria andOrientationNotLike(String value) { - addCriterion("orientation not like", value, "orientation"); - return (Criteria) this; - } - - public Criteria andOrientationIn(List values) { - addCriterion("orientation in", values, "orientation"); - return (Criteria) this; - } - - public Criteria andOrientationNotIn(List values) { - addCriterion("orientation not in", values, "orientation"); - return (Criteria) this; - } - - public Criteria andOrientationBetween(String value1, String value2) { - addCriterion("orientation between", value1, value2, "orientation"); - return (Criteria) this; - } - - public Criteria andOrientationNotBetween(String value1, String value2) { - addCriterion("orientation not between", value1, value2, "orientation"); - return (Criteria) this; - } - - public Criteria andUsernameIsNull() { - addCriterion("username is null"); - return (Criteria) this; - } - - public Criteria andUsernameIsNotNull() { - addCriterion("username is not null"); - return (Criteria) this; - } - - public Criteria andUsernameEqualTo(String value) { - addCriterion("username =", value, "username"); - return (Criteria) this; - } - - public Criteria andUsernameNotEqualTo(String value) { - addCriterion("username <>", value, "username"); - return (Criteria) this; - } - - public Criteria andUsernameGreaterThan(String value) { - addCriterion("username >", value, "username"); - return (Criteria) this; - } - - public Criteria andUsernameGreaterThanOrEqualTo(String value) { - addCriterion("username >=", value, "username"); - return (Criteria) this; - } - - public Criteria andUsernameLessThan(String value) { - addCriterion("username <", value, "username"); - return (Criteria) this; - } - - public Criteria andUsernameLessThanOrEqualTo(String value) { - addCriterion("username <=", value, "username"); - return (Criteria) this; - } - - public Criteria andUsernameLike(String value) { - addCriterion("username like", value, "username"); - return (Criteria) this; - } - - public Criteria andUsernameNotLike(String value) { - addCriterion("username not like", value, "username"); - return (Criteria) this; - } - - public Criteria andUsernameIn(List values) { - addCriterion("username in", values, "username"); - return (Criteria) this; - } - - public Criteria andUsernameNotIn(List values) { - addCriterion("username not in", values, "username"); - return (Criteria) this; - } - - public Criteria andUsernameBetween(String value1, String value2) { - addCriterion("username between", value1, value2, "username"); - return (Criteria) this; - } - - public Criteria andUsernameNotBetween(String value1, String value2) { - addCriterion("username not between", value1, value2, "username"); - return (Criteria) this; - } - - public Criteria andPasswordIsNull() { - addCriterion("password is null"); - return (Criteria) this; - } - - public Criteria andPasswordIsNotNull() { - addCriterion("password is not null"); - return (Criteria) this; - } - - public Criteria andPasswordEqualTo(String value) { - addCriterion("password =", value, "password"); - return (Criteria) this; - } - - public Criteria andPasswordNotEqualTo(String value) { - addCriterion("password <>", value, "password"); - return (Criteria) this; - } - - public Criteria andPasswordGreaterThan(String value) { - addCriterion("password >", value, "password"); - return (Criteria) this; - } - - public Criteria andPasswordGreaterThanOrEqualTo(String value) { - addCriterion("password >=", value, "password"); - return (Criteria) this; - } - - public Criteria andPasswordLessThan(String value) { - addCriterion("password <", value, "password"); - return (Criteria) this; - } - - public Criteria andPasswordLessThanOrEqualTo(String value) { - addCriterion("password <=", value, "password"); - return (Criteria) this; - } - - public Criteria andPasswordLike(String value) { - addCriterion("password like", value, "password"); - return (Criteria) this; - } - - public Criteria andPasswordNotLike(String value) { - addCriterion("password not like", value, "password"); - return (Criteria) this; - } - - public Criteria andPasswordIn(List values) { - addCriterion("password in", values, "password"); - return (Criteria) this; - } - - public Criteria andPasswordNotIn(List values) { - addCriterion("password not in", values, "password"); - return (Criteria) this; - } - - public Criteria andPasswordBetween(String value1, String value2) { - addCriterion("password between", value1, value2, "password"); - return (Criteria) this; - } - - public Criteria andPasswordNotBetween(String value1, String value2) { - addCriterion("password not between", value1, value2, "password"); - return (Criteria) this; - } - - public Criteria andEquipmentPortIsNull() { - addCriterion("equipment_port is null"); - return (Criteria) this; - } - - public Criteria andEquipmentPortIsNotNull() { - addCriterion("equipment_port is not null"); - return (Criteria) this; - } - - public Criteria andEquipmentPortEqualTo(String value) { - addCriterion("equipment_port =", value, "equipmentPort"); - return (Criteria) this; - } - - public Criteria andEquipmentPortNotEqualTo(String value) { - addCriterion("equipment_port <>", value, "equipmentPort"); - return (Criteria) this; - } - - public Criteria andEquipmentPortGreaterThan(String value) { - addCriterion("equipment_port >", value, "equipmentPort"); - return (Criteria) this; - } - - public Criteria andEquipmentPortGreaterThanOrEqualTo(String value) { - addCriterion("equipment_port >=", value, "equipmentPort"); - return (Criteria) this; - } - - public Criteria andEquipmentPortLessThan(String value) { - addCriterion("equipment_port <", value, "equipmentPort"); - return (Criteria) this; - } - - public Criteria andEquipmentPortLessThanOrEqualTo(String value) { - addCriterion("equipment_port <=", value, "equipmentPort"); - return (Criteria) this; - } - - public Criteria andEquipmentPortLike(String value) { - addCriterion("equipment_port like", value, "equipmentPort"); - return (Criteria) this; - } - - public Criteria andEquipmentPortNotLike(String value) { - addCriterion("equipment_port not like", value, "equipmentPort"); - return (Criteria) this; - } - - public Criteria andEquipmentPortIn(List values) { - addCriterion("equipment_port in", values, "equipmentPort"); - return (Criteria) this; - } - - public Criteria andEquipmentPortNotIn(List values) { - addCriterion("equipment_port not in", values, "equipmentPort"); - return (Criteria) this; - } - - public Criteria andEquipmentPortBetween(String value1, String value2) { - addCriterion("equipment_port between", value1, value2, "equipmentPort"); - return (Criteria) this; - } - - public Criteria andEquipmentPortNotBetween(String value1, String value2) { - addCriterion("equipment_port not between", value1, value2, "equipmentPort"); - return (Criteria) this; - } - - public Criteria andIntentPortIsNull() { - addCriterion("intent_port is null"); - return (Criteria) this; - } - - public Criteria andIntentPortIsNotNull() { - addCriterion("intent_port is not null"); - return (Criteria) this; - } - - public Criteria andIntentPortEqualTo(String value) { - addCriterion("intent_port =", value, "intentPort"); - return (Criteria) this; - } - - public Criteria andIntentPortNotEqualTo(String value) { - addCriterion("intent_port <>", value, "intentPort"); - return (Criteria) this; - } - - public Criteria andIntentPortGreaterThan(String value) { - addCriterion("intent_port >", value, "intentPort"); - return (Criteria) this; - } - - public Criteria andIntentPortGreaterThanOrEqualTo(String value) { - addCriterion("intent_port >=", value, "intentPort"); - return (Criteria) this; - } - - public Criteria andIntentPortLessThan(String value) { - addCriterion("intent_port <", value, "intentPort"); - return (Criteria) this; - } - - public Criteria andIntentPortLessThanOrEqualTo(String value) { - addCriterion("intent_port <=", value, "intentPort"); - return (Criteria) this; - } - - public Criteria andIntentPortLike(String value) { - addCriterion("intent_port like", value, "intentPort"); - return (Criteria) this; - } - - public Criteria andIntentPortNotLike(String value) { - addCriterion("intent_port not like", value, "intentPort"); - return (Criteria) this; - } - - public Criteria andIntentPortIn(List values) { - addCriterion("intent_port in", values, "intentPort"); - return (Criteria) this; - } - - public Criteria andIntentPortNotIn(List values) { - addCriterion("intent_port not in", values, "intentPort"); - return (Criteria) this; - } - - public Criteria andIntentPortBetween(String value1, String value2) { - addCriterion("intent_port between", value1, value2, "intentPort"); - return (Criteria) this; - } - - public Criteria andIntentPortNotBetween(String value1, String value2) { - addCriterion("intent_port not between", value1, value2, "intentPort"); - return (Criteria) this; - } - - public Criteria andVendorIsNull() { - addCriterion("vendor is null"); - return (Criteria) this; - } - - public Criteria andVendorIsNotNull() { - addCriterion("vendor is not null"); - return (Criteria) this; - } - - public Criteria andVendorEqualTo(String value) { - addCriterion("vendor =", value, "vendor"); - return (Criteria) this; - } - - public Criteria andVendorNotEqualTo(String value) { - addCriterion("vendor <>", value, "vendor"); - return (Criteria) this; - } - - public Criteria andVendorGreaterThan(String value) { - addCriterion("vendor >", value, "vendor"); - return (Criteria) this; - } - - public Criteria andVendorGreaterThanOrEqualTo(String value) { - addCriterion("vendor >=", value, "vendor"); - return (Criteria) this; - } - - public Criteria andVendorLessThan(String value) { - addCriterion("vendor <", value, "vendor"); - return (Criteria) this; - } - - public Criteria andVendorLessThanOrEqualTo(String value) { - addCriterion("vendor <=", value, "vendor"); - return (Criteria) this; - } - - public Criteria andVendorLike(String value) { - addCriterion("vendor like", value, "vendor"); - return (Criteria) this; - } - - public Criteria andVendorNotLike(String value) { - addCriterion("vendor not like", value, "vendor"); - return (Criteria) this; - } - - public Criteria andVendorIn(List values) { - addCriterion("vendor in", values, "vendor"); - return (Criteria) this; - } - - public Criteria andVendorNotIn(List values) { - addCriterion("vendor not in", values, "vendor"); - return (Criteria) this; - } - - public Criteria andVendorBetween(String value1, String value2) { - addCriterion("vendor between", value1, value2, "vendor"); - return (Criteria) this; - } - - public Criteria andVendorNotBetween(String value1, String value2) { - addCriterion("vendor not between", value1, value2, "vendor"); - return (Criteria) this; - } - - public Criteria andDescriptionIsNull() { - addCriterion("description is null"); - return (Criteria) this; - } - - public Criteria andDescriptionIsNotNull() { - addCriterion("description is not null"); - return (Criteria) this; - } - - public Criteria andDescriptionEqualTo(String value) { - addCriterion("description =", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotEqualTo(String value) { - addCriterion("description <>", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionGreaterThan(String value) { - addCriterion("description >", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionGreaterThanOrEqualTo(String value) { - addCriterion("description >=", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLessThan(String value) { - addCriterion("description <", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLessThanOrEqualTo(String value) { - addCriterion("description <=", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLike(String value) { - addCriterion("description like", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotLike(String value) { - addCriterion("description not like", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionIn(List values) { - addCriterion("description in", values, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotIn(List values) { - addCriterion("description not in", values, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionBetween(String value1, String value2) { - addCriterion("description between", value1, value2, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotBetween(String value1, String value2) { - addCriterion("description not between", value1, value2, "description"); - return (Criteria) this; - } - - public Criteria andCreateDateIsNull() { - addCriterion("create_date is null"); - return (Criteria) this; - } - - public Criteria andCreateDateIsNotNull() { - addCriterion("create_date is not null"); - return (Criteria) this; - } - - public Criteria andCreateDateEqualTo(String value) { - addCriterion("create_date =", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotEqualTo(String value) { - addCriterion("create_date <>", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateGreaterThan(String value) { - addCriterion("create_date >", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateGreaterThanOrEqualTo(String value) { - addCriterion("create_date >=", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateLessThan(String value) { - addCriterion("create_date <", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateLessThanOrEqualTo(String value) { - addCriterion("create_date <=", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateLike(String value) { - addCriterion("create_date like", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotLike(String value) { - addCriterion("create_date not like", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateIn(List values) { - addCriterion("create_date in", values, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotIn(List values) { - addCriterion("create_date not in", values, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateBetween(String value1, String value2) { - addCriterion("create_date between", value1, value2, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotBetween(String value1, String value2) { - addCriterion("create_date not between", value1, value2, "createDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateIsNull() { - addCriterion("update_date is null"); - return (Criteria) this; - } - - public Criteria andUpdateDateIsNotNull() { - addCriterion("update_date is not null"); - return (Criteria) this; - } - - public Criteria andUpdateDateEqualTo(String value) { - addCriterion("update_date =", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateNotEqualTo(String value) { - addCriterion("update_date <>", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateGreaterThan(String value) { - addCriterion("update_date >", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateGreaterThanOrEqualTo(String value) { - addCriterion("update_date >=", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateLessThan(String value) { - addCriterion("update_date <", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateLessThanOrEqualTo(String value) { - addCriterion("update_date <=", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateLike(String value) { - addCriterion("update_date like", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateNotLike(String value) { - addCriterion("update_date not like", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateIn(List values) { - addCriterion("update_date in", values, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateNotIn(List values) { - addCriterion("update_date not in", values, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateBetween(String value1, String value2) { - addCriterion("update_date between", value1, value2, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateNotBetween(String value1, String value2) { - addCriterion("update_date not between", value1, value2, "updateDate"); - return (Criteria) this; - } - - public Criteria andIsDeleteIsNull() { - addCriterion("is_delete is null"); - return (Criteria) this; - } - - public Criteria andIsDeleteIsNotNull() { - addCriterion("is_delete is not null"); - return (Criteria) this; - } - - public Criteria andIsDeleteEqualTo(Integer value) { - addCriterion("is_delete =", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotEqualTo(Integer value) { - addCriterion("is_delete <>", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteGreaterThan(Integer value) { - addCriterion("is_delete >", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteGreaterThanOrEqualTo(Integer value) { - addCriterion("is_delete >=", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteLessThan(Integer value) { - addCriterion("is_delete <", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteLessThanOrEqualTo(Integer value) { - addCriterion("is_delete <=", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteIn(List values) { - addCriterion("is_delete in", values, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotIn(List values) { - addCriterion("is_delete not in", values, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteBetween(Integer value1, Integer value2) { - addCriterion("is_delete between", value1, value2, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotBetween(Integer value1, Integer value2) { - addCriterion("is_delete not between", value1, value2, "isDelete"); - return (Criteria) this; - } - - public Criteria andEquipmentTypeIsNull() { - addCriterion("equipment_type is null"); - return (Criteria) this; - } - - public Criteria andEquipmentTypeIsNotNull() { - addCriterion("equipment_type is not null"); - return (Criteria) this; - } - - public Criteria andEquipmentTypeEqualTo(Integer value) { - addCriterion("equipment_type =", value, "equipmentType"); - return (Criteria) this; - } - - public Criteria andEquipmentTypeNotEqualTo(Integer value) { - addCriterion("equipment_type <>", value, "equipmentType"); - return (Criteria) this; - } - - public Criteria andEquipmentTypeGreaterThan(Integer value) { - addCriterion("equipment_type >", value, "equipmentType"); - return (Criteria) this; - } - - public Criteria andEquipmentTypeGreaterThanOrEqualTo(Integer value) { - addCriterion("equipment_type >=", value, "equipmentType"); - return (Criteria) this; - } - - public Criteria andEquipmentTypeLessThan(Integer value) { - addCriterion("equipment_type <", value, "equipmentType"); - return (Criteria) this; - } - - public Criteria andEquipmentTypeLessThanOrEqualTo(Integer value) { - addCriterion("equipment_type <=", value, "equipmentType"); - return (Criteria) this; - } - - public Criteria andEquipmentTypeIn(List values) { - addCriterion("equipment_type in", values, "equipmentType"); - return (Criteria) this; - } - - public Criteria andEquipmentTypeNotIn(List values) { - addCriterion("equipment_type not in", values, "equipmentType"); - return (Criteria) this; - } - - public Criteria andEquipmentTypeBetween(Integer value1, Integer value2) { - addCriterion("equipment_type between", value1, value2, "equipmentType"); - return (Criteria) this; - } - - public Criteria andEquipmentTypeNotBetween(Integer value1, Integer value2) { - addCriterion("equipment_type not between", value1, value2, "equipmentType"); - return (Criteria) this; - } - - public Criteria andStatusIsNull() { - addCriterion("status is null"); - return (Criteria) this; - } - - public Criteria andStatusIsNotNull() { - addCriterion("status is not null"); - return (Criteria) this; - } - - public Criteria andStatusEqualTo(Integer value) { - addCriterion("status =", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotEqualTo(Integer value) { - addCriterion("status <>", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusGreaterThan(Integer value) { - addCriterion("status >", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusGreaterThanOrEqualTo(Integer value) { - addCriterion("status >=", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusLessThan(Integer value) { - addCriterion("status <", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusLessThanOrEqualTo(Integer value) { - addCriterion("status <=", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusIn(List values) { - addCriterion("status in", values, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotIn(List values) { - addCriterion("status not in", values, "status"); - return (Criteria) this; - } - - public Criteria andStatusBetween(Integer value1, Integer value2) { - addCriterion("status between", value1, value2, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotBetween(Integer value1, Integer value2) { - addCriterion("status not between", value1, value2, "status"); - return (Criteria) this; - } - - public Criteria andAidIsNull() { - addCriterion("aid is null"); - return (Criteria) this; - } - - public Criteria andAidIsNotNull() { - addCriterion("aid is not null"); - return (Criteria) this; - } - - public Criteria andAidEqualTo(Integer value) { - addCriterion("aid =", value, "aid"); - return (Criteria) this; - } - - public Criteria andAidNotEqualTo(Integer value) { - addCriterion("aid <>", value, "aid"); - return (Criteria) this; - } - - public Criteria andAidGreaterThan(Integer value) { - addCriterion("aid >", value, "aid"); - return (Criteria) this; - } - - public Criteria andAidGreaterThanOrEqualTo(Integer value) { - addCriterion("aid >=", value, "aid"); - return (Criteria) this; - } - - public Criteria andAidLessThan(Integer value) { - addCriterion("aid <", value, "aid"); - return (Criteria) this; - } - - public Criteria andAidLessThanOrEqualTo(Integer value) { - addCriterion("aid <=", value, "aid"); - return (Criteria) this; - } - - public Criteria andAidIn(List values) { - addCriterion("aid in", values, "aid"); - return (Criteria) this; - } - - public Criteria andAidNotIn(List values) { - addCriterion("aid not in", values, "aid"); - return (Criteria) this; - } - - public Criteria andAidBetween(Integer value1, Integer value2) { - addCriterion("aid between", value1, value2, "aid"); - return (Criteria) this; - } - - public Criteria andAidNotBetween(Integer value1, Integer value2) { - addCriterion("aid not between", value1, value2, "aid"); - return (Criteria) this; - } - - public Criteria andPlaceIsNull() { - addCriterion("place is null"); - return (Criteria) this; - } - - public Criteria andPlaceIsNotNull() { - addCriterion("place is not null"); - return (Criteria) this; - } - - public Criteria andPlaceEqualTo(String value) { - addCriterion("place =", value, "place"); - return (Criteria) this; - } - - public Criteria andPlaceNotEqualTo(String value) { - addCriterion("place <>", value, "place"); - return (Criteria) this; - } - - public Criteria andPlaceGreaterThan(String value) { - addCriterion("place >", value, "place"); - return (Criteria) this; - } - - public Criteria andPlaceGreaterThanOrEqualTo(String value) { - addCriterion("place >=", value, "place"); - return (Criteria) this; - } - - public Criteria andPlaceLessThan(String value) { - addCriterion("place <", value, "place"); - return (Criteria) this; - } - - public Criteria andPlaceLessThanOrEqualTo(String value) { - addCriterion("place <=", value, "place"); - return (Criteria) this; - } - - public Criteria andPlaceLike(String value) { - addCriterion("place like", value, "place"); - return (Criteria) this; - } - - public Criteria andPlaceNotLike(String value) { - addCriterion("place not like", value, "place"); - return (Criteria) this; - } - - public Criteria andPlaceIn(List values) { - addCriterion("place in", values, "place"); - return (Criteria) this; - } - - public Criteria andPlaceNotIn(List values) { - addCriterion("place not in", values, "place"); - return (Criteria) this; - } - - public Criteria andPlaceBetween(String value1, String value2) { - addCriterion("place between", value1, value2, "place"); - return (Criteria) this; - } - - public Criteria andPlaceNotBetween(String value1, String value2) { - addCriterion("place not between", value1, value2, "place"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyFeature.java b/src/main/java/com/objecteye/entity/SyFeature.java index 1291703..e57755b 100644 --- a/src/main/java/com/objecteye/entity/SyFeature.java +++ b/src/main/java/com/objecteye/entity/SyFeature.java @@ -1,12 +1,25 @@ package com.objecteye.entity; import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; +import org.springframework.data.mongodb.core.mapping.Document; import java.io.Serializable; +@AllArgsConstructor +@NoArgsConstructor +@Data +@Document(collection = "syFeature") +@ToString public class SyFeature implements Serializable { + + private static final long serialVersionUID = -8648830370751749239L; + @ApiModelProperty(value = "自增主键") - private Integer id; + private String id; @ApiModelProperty(value = "人像库名") private String name; @@ -28,89 +41,4 @@ public class SyFeature implements Serializable { @ApiModelProperty(value = "是否是单人布控") private Integer isSingle; - - private static final long serialVersionUID = 1L; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Integer getCount() { - return count; - } - - public void setCount(Integer count) { - this.count = count; - } - - public Integer getIsDelete() { - return isDelete; - } - - public void setIsDelete(Integer isDelete) { - this.isDelete = isDelete; - } - - public String getCreateDate() { - return createDate; - } - - public void setCreateDate(String createDate) { - this.createDate = createDate; - } - - public String getUpdateDate() { - return updateDate; - } - - public void setUpdateDate(String updateDate) { - this.updateDate = updateDate; - } - - public Integer getIsSingle() { - return isSingle; - } - - public void setIsSingle(Integer isSingle) { - this.isSingle = isSingle; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", name=").append(name); - sb.append(", description=").append(description); - sb.append(", count=").append(count); - sb.append(", isDelete=").append(isDelete); - sb.append(", createDate=").append(createDate); - sb.append(", updateDate=").append(updateDate); - sb.append(", isSingle=").append(isSingle); - sb.append(", serialVersionUID=").append(serialVersionUID); - sb.append("]"); - return sb.toString(); - } } \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyFeatureExample.java b/src/main/java/com/objecteye/entity/SyFeatureExample.java deleted file mode 100644 index 2519d3f..0000000 --- a/src/main/java/com/objecteye/entity/SyFeatureExample.java +++ /dev/null @@ -1,720 +0,0 @@ -package com.objecteye.entity; - -import java.util.ArrayList; -import java.util.List; - -public class SyFeatureExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public SyFeatureExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Integer value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Integer value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Integer value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Integer value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Integer value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Integer value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Integer value1, Integer value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Integer value1, Integer value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andNameIsNull() { - addCriterion("name is null"); - return (Criteria) this; - } - - public Criteria andNameIsNotNull() { - addCriterion("name is not null"); - return (Criteria) this; - } - - public Criteria andNameEqualTo(String value) { - addCriterion("name =", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotEqualTo(String value) { - addCriterion("name <>", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThan(String value) { - addCriterion("name >", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThanOrEqualTo(String value) { - addCriterion("name >=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThan(String value) { - addCriterion("name <", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThanOrEqualTo(String value) { - addCriterion("name <=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLike(String value) { - addCriterion("name like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotLike(String value) { - addCriterion("name not like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameIn(List values) { - addCriterion("name in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameNotIn(List values) { - addCriterion("name not in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameBetween(String value1, String value2) { - addCriterion("name between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andNameNotBetween(String value1, String value2) { - addCriterion("name not between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andDescriptionIsNull() { - addCriterion("description is null"); - return (Criteria) this; - } - - public Criteria andDescriptionIsNotNull() { - addCriterion("description is not null"); - return (Criteria) this; - } - - public Criteria andDescriptionEqualTo(String value) { - addCriterion("description =", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotEqualTo(String value) { - addCriterion("description <>", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionGreaterThan(String value) { - addCriterion("description >", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionGreaterThanOrEqualTo(String value) { - addCriterion("description >=", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLessThan(String value) { - addCriterion("description <", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLessThanOrEqualTo(String value) { - addCriterion("description <=", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLike(String value) { - addCriterion("description like", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotLike(String value) { - addCriterion("description not like", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionIn(List values) { - addCriterion("description in", values, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotIn(List values) { - addCriterion("description not in", values, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionBetween(String value1, String value2) { - addCriterion("description between", value1, value2, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotBetween(String value1, String value2) { - addCriterion("description not between", value1, value2, "description"); - return (Criteria) this; - } - - public Criteria andCountIsNull() { - addCriterion("count is null"); - return (Criteria) this; - } - - public Criteria andCountIsNotNull() { - addCriterion("count is not null"); - return (Criteria) this; - } - - public Criteria andCountEqualTo(Integer value) { - addCriterion("count =", value, "count"); - return (Criteria) this; - } - - public Criteria andCountNotEqualTo(Integer value) { - addCriterion("count <>", value, "count"); - return (Criteria) this; - } - - public Criteria andCountGreaterThan(Integer value) { - addCriterion("count >", value, "count"); - return (Criteria) this; - } - - public Criteria andCountGreaterThanOrEqualTo(Integer value) { - addCriterion("count >=", value, "count"); - return (Criteria) this; - } - - public Criteria andCountLessThan(Integer value) { - addCriterion("count <", value, "count"); - return (Criteria) this; - } - - public Criteria andCountLessThanOrEqualTo(Integer value) { - addCriterion("count <=", value, "count"); - return (Criteria) this; - } - - public Criteria andCountIn(List values) { - addCriterion("count in", values, "count"); - return (Criteria) this; - } - - public Criteria andCountNotIn(List values) { - addCriterion("count not in", values, "count"); - return (Criteria) this; - } - - public Criteria andCountBetween(Integer value1, Integer value2) { - addCriterion("count between", value1, value2, "count"); - return (Criteria) this; - } - - public Criteria andCountNotBetween(Integer value1, Integer value2) { - addCriterion("count not between", value1, value2, "count"); - return (Criteria) this; - } - - public Criteria andIsDeleteIsNull() { - addCriterion("is_delete is null"); - return (Criteria) this; - } - - public Criteria andIsDeleteIsNotNull() { - addCriterion("is_delete is not null"); - return (Criteria) this; - } - - public Criteria andIsDeleteEqualTo(Integer value) { - addCriterion("is_delete =", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotEqualTo(Integer value) { - addCriterion("is_delete <>", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteGreaterThan(Integer value) { - addCriterion("is_delete >", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteGreaterThanOrEqualTo(Integer value) { - addCriterion("is_delete >=", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteLessThan(Integer value) { - addCriterion("is_delete <", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteLessThanOrEqualTo(Integer value) { - addCriterion("is_delete <=", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteIn(List values) { - addCriterion("is_delete in", values, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotIn(List values) { - addCriterion("is_delete not in", values, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteBetween(Integer value1, Integer value2) { - addCriterion("is_delete between", value1, value2, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotBetween(Integer value1, Integer value2) { - addCriterion("is_delete not between", value1, value2, "isDelete"); - return (Criteria) this; - } - - public Criteria andCreateDateIsNull() { - addCriterion("create_date is null"); - return (Criteria) this; - } - - public Criteria andCreateDateIsNotNull() { - addCriterion("create_date is not null"); - return (Criteria) this; - } - - public Criteria andCreateDateEqualTo(String value) { - addCriterion("create_date =", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotEqualTo(String value) { - addCriterion("create_date <>", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateGreaterThan(String value) { - addCriterion("create_date >", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateGreaterThanOrEqualTo(String value) { - addCriterion("create_date >=", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateLessThan(String value) { - addCriterion("create_date <", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateLessThanOrEqualTo(String value) { - addCriterion("create_date <=", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateLike(String value) { - addCriterion("create_date like", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotLike(String value) { - addCriterion("create_date not like", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateIn(List values) { - addCriterion("create_date in", values, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotIn(List values) { - addCriterion("create_date not in", values, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateBetween(String value1, String value2) { - addCriterion("create_date between", value1, value2, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotBetween(String value1, String value2) { - addCriterion("create_date not between", value1, value2, "createDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateIsNull() { - addCriterion("update_date is null"); - return (Criteria) this; - } - - public Criteria andUpdateDateIsNotNull() { - addCriterion("update_date is not null"); - return (Criteria) this; - } - - public Criteria andUpdateDateEqualTo(String value) { - addCriterion("update_date =", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateNotEqualTo(String value) { - addCriterion("update_date <>", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateGreaterThan(String value) { - addCriterion("update_date >", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateGreaterThanOrEqualTo(String value) { - addCriterion("update_date >=", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateLessThan(String value) { - addCriterion("update_date <", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateLessThanOrEqualTo(String value) { - addCriterion("update_date <=", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateLike(String value) { - addCriterion("update_date like", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateNotLike(String value) { - addCriterion("update_date not like", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateIn(List values) { - addCriterion("update_date in", values, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateNotIn(List values) { - addCriterion("update_date not in", values, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateBetween(String value1, String value2) { - addCriterion("update_date between", value1, value2, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateNotBetween(String value1, String value2) { - addCriterion("update_date not between", value1, value2, "updateDate"); - return (Criteria) this; - } - - public Criteria andIsSingleIsNull() { - addCriterion("is_single is null"); - return (Criteria) this; - } - - public Criteria andIsSingleIsNotNull() { - addCriterion("is_single is not null"); - return (Criteria) this; - } - - public Criteria andIsSingleEqualTo(Integer value) { - addCriterion("is_single =", value, "isSingle"); - return (Criteria) this; - } - - public Criteria andIsSingleNotEqualTo(Integer value) { - addCriterion("is_single <>", value, "isSingle"); - return (Criteria) this; - } - - public Criteria andIsSingleGreaterThan(Integer value) { - addCriterion("is_single >", value, "isSingle"); - return (Criteria) this; - } - - public Criteria andIsSingleGreaterThanOrEqualTo(Integer value) { - addCriterion("is_single >=", value, "isSingle"); - return (Criteria) this; - } - - public Criteria andIsSingleLessThan(Integer value) { - addCriterion("is_single <", value, "isSingle"); - return (Criteria) this; - } - - public Criteria andIsSingleLessThanOrEqualTo(Integer value) { - addCriterion("is_single <=", value, "isSingle"); - return (Criteria) this; - } - - public Criteria andIsSingleIn(List values) { - addCriterion("is_single in", values, "isSingle"); - return (Criteria) this; - } - - public Criteria andIsSingleNotIn(List values) { - addCriterion("is_single not in", values, "isSingle"); - return (Criteria) this; - } - - public Criteria andIsSingleBetween(Integer value1, Integer value2) { - addCriterion("is_single between", value1, value2, "isSingle"); - return (Criteria) this; - } - - public Criteria andIsSingleNotBetween(Integer value1, Integer value2) { - addCriterion("is_single not between", value1, value2, "isSingle"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyImgParam.java b/src/main/java/com/objecteye/entity/SyImgParam.java index df194c9..a9faeaa 100644 --- a/src/main/java/com/objecteye/entity/SyImgParam.java +++ b/src/main/java/com/objecteye/entity/SyImgParam.java @@ -12,8 +12,12 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class SyImgParam { + byte[] data; + int width; + int height; + int channel; } diff --git a/src/main/java/com/objecteye/entity/SyPersonnel.java b/src/main/java/com/objecteye/entity/SyPersonnel.java index 575f551..9280387 100644 --- a/src/main/java/com/objecteye/entity/SyPersonnel.java +++ b/src/main/java/com/objecteye/entity/SyPersonnel.java @@ -1,12 +1,25 @@ package com.objecteye.entity; import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; +import org.springframework.data.mongodb.core.mapping.Document; import java.io.Serializable; +@AllArgsConstructor +@NoArgsConstructor +@Data +@ToString +@Document(collection = "syPersonnel") public class SyPersonnel implements Serializable { + + private static final long serialVersionUID = -8681796840918583478L; + @ApiModelProperty(value = "自增主键") - private Integer id; + private String id; @ApiModelProperty(value = "姓名") private String name; @@ -30,99 +43,5 @@ public class SyPersonnel implements Serializable { private String conreason; @ApiModelProperty(value = "人像库外键") - private Integer fid; - - private static final long serialVersionUID = 1L; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getIndentity() { - return indentity; - } - - public void setIndentity(String indentity) { - this.indentity = indentity; - } - - public String getImageUrl() { - return imageUrl; - } - - public void setImageUrl(String imageUrl) { - this.imageUrl = imageUrl; - } - - public String getCreateDate() { - return createDate; - } - - public void setCreateDate(String createDate) { - this.createDate = createDate; - } - - public String getUpdateDate() { - return updateDate; - } - - public void setUpdateDate(String updateDate) { - this.updateDate = updateDate; - } - - public Integer getStatus() { - return status; - } - - public void setStatus(Integer status) { - this.status = status; - } - - public String getConreason() { - return conreason; - } - - public void setConreason(String conreason) { - this.conreason = conreason; - } - - public Integer getFid() { - return fid; - } - - public void setFid(Integer fid) { - this.fid = fid; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", name=").append(name); - sb.append(", indentity=").append(indentity); - sb.append(", imageUrl=").append(imageUrl); - sb.append(", createDate=").append(createDate); - sb.append(", updateDate=").append(updateDate); - sb.append(", status=").append(status); - sb.append(", conreason=").append(conreason); - sb.append(", fid=").append(fid); - sb.append(", serialVersionUID=").append(serialVersionUID); - sb.append("]"); - return sb.toString(); - } + private String fid; } \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyPersonnelExample.java b/src/main/java/com/objecteye/entity/SyPersonnelExample.java deleted file mode 100644 index 1cdfc4b..0000000 --- a/src/main/java/com/objecteye/entity/SyPersonnelExample.java +++ /dev/null @@ -1,800 +0,0 @@ -package com.objecteye.entity; - -import java.util.ArrayList; -import java.util.List; - -public class SyPersonnelExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public SyPersonnelExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Integer value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Integer value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Integer value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Integer value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Integer value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Integer value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Integer value1, Integer value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Integer value1, Integer value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andNameIsNull() { - addCriterion("name is null"); - return (Criteria) this; - } - - public Criteria andNameIsNotNull() { - addCriterion("name is not null"); - return (Criteria) this; - } - - public Criteria andNameEqualTo(String value) { - addCriterion("name =", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotEqualTo(String value) { - addCriterion("name <>", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThan(String value) { - addCriterion("name >", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThanOrEqualTo(String value) { - addCriterion("name >=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThan(String value) { - addCriterion("name <", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThanOrEqualTo(String value) { - addCriterion("name <=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLike(String value) { - addCriterion("name like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotLike(String value) { - addCriterion("name not like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameIn(List values) { - addCriterion("name in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameNotIn(List values) { - addCriterion("name not in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameBetween(String value1, String value2) { - addCriterion("name between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andNameNotBetween(String value1, String value2) { - addCriterion("name not between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andIndentityIsNull() { - addCriterion("indentity is null"); - return (Criteria) this; - } - - public Criteria andIndentityIsNotNull() { - addCriterion("indentity is not null"); - return (Criteria) this; - } - - public Criteria andIndentityEqualTo(String value) { - addCriterion("indentity =", value, "indentity"); - return (Criteria) this; - } - - public Criteria andIndentityNotEqualTo(String value) { - addCriterion("indentity <>", value, "indentity"); - return (Criteria) this; - } - - public Criteria andIndentityGreaterThan(String value) { - addCriterion("indentity >", value, "indentity"); - return (Criteria) this; - } - - public Criteria andIndentityGreaterThanOrEqualTo(String value) { - addCriterion("indentity >=", value, "indentity"); - return (Criteria) this; - } - - public Criteria andIndentityLessThan(String value) { - addCriterion("indentity <", value, "indentity"); - return (Criteria) this; - } - - public Criteria andIndentityLessThanOrEqualTo(String value) { - addCriterion("indentity <=", value, "indentity"); - return (Criteria) this; - } - - public Criteria andIndentityLike(String value) { - addCriterion("indentity like", value, "indentity"); - return (Criteria) this; - } - - public Criteria andIndentityNotLike(String value) { - addCriterion("indentity not like", value, "indentity"); - return (Criteria) this; - } - - public Criteria andIndentityIn(List values) { - addCriterion("indentity in", values, "indentity"); - return (Criteria) this; - } - - public Criteria andIndentityNotIn(List values) { - addCriterion("indentity not in", values, "indentity"); - return (Criteria) this; - } - - public Criteria andIndentityBetween(String value1, String value2) { - addCriterion("indentity between", value1, value2, "indentity"); - return (Criteria) this; - } - - public Criteria andIndentityNotBetween(String value1, String value2) { - addCriterion("indentity not between", value1, value2, "indentity"); - return (Criteria) this; - } - - public Criteria andImageUrlIsNull() { - addCriterion("image_url is null"); - return (Criteria) this; - } - - public Criteria andImageUrlIsNotNull() { - addCriterion("image_url is not null"); - return (Criteria) this; - } - - public Criteria andImageUrlEqualTo(String value) { - addCriterion("image_url =", value, "imageUrl"); - return (Criteria) this; - } - - public Criteria andImageUrlNotEqualTo(String value) { - addCriterion("image_url <>", value, "imageUrl"); - return (Criteria) this; - } - - public Criteria andImageUrlGreaterThan(String value) { - addCriterion("image_url >", value, "imageUrl"); - return (Criteria) this; - } - - public Criteria andImageUrlGreaterThanOrEqualTo(String value) { - addCriterion("image_url >=", value, "imageUrl"); - return (Criteria) this; - } - - public Criteria andImageUrlLessThan(String value) { - addCriterion("image_url <", value, "imageUrl"); - return (Criteria) this; - } - - public Criteria andImageUrlLessThanOrEqualTo(String value) { - addCriterion("image_url <=", value, "imageUrl"); - return (Criteria) this; - } - - public Criteria andImageUrlLike(String value) { - addCriterion("image_url like", value, "imageUrl"); - return (Criteria) this; - } - - public Criteria andImageUrlNotLike(String value) { - addCriterion("image_url not like", value, "imageUrl"); - return (Criteria) this; - } - - public Criteria andImageUrlIn(List values) { - addCriterion("image_url in", values, "imageUrl"); - return (Criteria) this; - } - - public Criteria andImageUrlNotIn(List values) { - addCriterion("image_url not in", values, "imageUrl"); - return (Criteria) this; - } - - public Criteria andImageUrlBetween(String value1, String value2) { - addCriterion("image_url between", value1, value2, "imageUrl"); - return (Criteria) this; - } - - public Criteria andImageUrlNotBetween(String value1, String value2) { - addCriterion("image_url not between", value1, value2, "imageUrl"); - return (Criteria) this; - } - - public Criteria andCreateDateIsNull() { - addCriterion("create_date is null"); - return (Criteria) this; - } - - public Criteria andCreateDateIsNotNull() { - addCriterion("create_date is not null"); - return (Criteria) this; - } - - public Criteria andCreateDateEqualTo(String value) { - addCriterion("create_date =", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotEqualTo(String value) { - addCriterion("create_date <>", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateGreaterThan(String value) { - addCriterion("create_date >", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateGreaterThanOrEqualTo(String value) { - addCriterion("create_date >=", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateLessThan(String value) { - addCriterion("create_date <", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateLessThanOrEqualTo(String value) { - addCriterion("create_date <=", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateLike(String value) { - addCriterion("create_date like", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotLike(String value) { - addCriterion("create_date not like", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateIn(List values) { - addCriterion("create_date in", values, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotIn(List values) { - addCriterion("create_date not in", values, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateBetween(String value1, String value2) { - addCriterion("create_date between", value1, value2, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotBetween(String value1, String value2) { - addCriterion("create_date not between", value1, value2, "createDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateIsNull() { - addCriterion("update_date is null"); - return (Criteria) this; - } - - public Criteria andUpdateDateIsNotNull() { - addCriterion("update_date is not null"); - return (Criteria) this; - } - - public Criteria andUpdateDateEqualTo(String value) { - addCriterion("update_date =", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateNotEqualTo(String value) { - addCriterion("update_date <>", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateGreaterThan(String value) { - addCriterion("update_date >", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateGreaterThanOrEqualTo(String value) { - addCriterion("update_date >=", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateLessThan(String value) { - addCriterion("update_date <", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateLessThanOrEqualTo(String value) { - addCriterion("update_date <=", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateLike(String value) { - addCriterion("update_date like", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateNotLike(String value) { - addCriterion("update_date not like", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateIn(List values) { - addCriterion("update_date in", values, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateNotIn(List values) { - addCriterion("update_date not in", values, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateBetween(String value1, String value2) { - addCriterion("update_date between", value1, value2, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateNotBetween(String value1, String value2) { - addCriterion("update_date not between", value1, value2, "updateDate"); - return (Criteria) this; - } - - public Criteria andStatusIsNull() { - addCriterion("status is null"); - return (Criteria) this; - } - - public Criteria andStatusIsNotNull() { - addCriterion("status is not null"); - return (Criteria) this; - } - - public Criteria andStatusEqualTo(Integer value) { - addCriterion("status =", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotEqualTo(Integer value) { - addCriterion("status <>", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusGreaterThan(Integer value) { - addCriterion("status >", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusGreaterThanOrEqualTo(Integer value) { - addCriterion("status >=", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusLessThan(Integer value) { - addCriterion("status <", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusLessThanOrEqualTo(Integer value) { - addCriterion("status <=", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusIn(List values) { - addCriterion("status in", values, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotIn(List values) { - addCriterion("status not in", values, "status"); - return (Criteria) this; - } - - public Criteria andStatusBetween(Integer value1, Integer value2) { - addCriterion("status between", value1, value2, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotBetween(Integer value1, Integer value2) { - addCriterion("status not between", value1, value2, "status"); - return (Criteria) this; - } - - public Criteria andConreasonIsNull() { - addCriterion("conreason is null"); - return (Criteria) this; - } - - public Criteria andConreasonIsNotNull() { - addCriterion("conreason is not null"); - return (Criteria) this; - } - - public Criteria andConreasonEqualTo(String value) { - addCriterion("conreason =", value, "conreason"); - return (Criteria) this; - } - - public Criteria andConreasonNotEqualTo(String value) { - addCriterion("conreason <>", value, "conreason"); - return (Criteria) this; - } - - public Criteria andConreasonGreaterThan(String value) { - addCriterion("conreason >", value, "conreason"); - return (Criteria) this; - } - - public Criteria andConreasonGreaterThanOrEqualTo(String value) { - addCriterion("conreason >=", value, "conreason"); - return (Criteria) this; - } - - public Criteria andConreasonLessThan(String value) { - addCriterion("conreason <", value, "conreason"); - return (Criteria) this; - } - - public Criteria andConreasonLessThanOrEqualTo(String value) { - addCriterion("conreason <=", value, "conreason"); - return (Criteria) this; - } - - public Criteria andConreasonLike(String value) { - addCriterion("conreason like", value, "conreason"); - return (Criteria) this; - } - - public Criteria andConreasonNotLike(String value) { - addCriterion("conreason not like", value, "conreason"); - return (Criteria) this; - } - - public Criteria andConreasonIn(List values) { - addCriterion("conreason in", values, "conreason"); - return (Criteria) this; - } - - public Criteria andConreasonNotIn(List values) { - addCriterion("conreason not in", values, "conreason"); - return (Criteria) this; - } - - public Criteria andConreasonBetween(String value1, String value2) { - addCriterion("conreason between", value1, value2, "conreason"); - return (Criteria) this; - } - - public Criteria andConreasonNotBetween(String value1, String value2) { - addCriterion("conreason not between", value1, value2, "conreason"); - return (Criteria) this; - } - - public Criteria andFidIsNull() { - addCriterion("fid is null"); - return (Criteria) this; - } - - public Criteria andFidIsNotNull() { - addCriterion("fid is not null"); - return (Criteria) this; - } - - public Criteria andFidEqualTo(Integer value) { - addCriterion("fid =", value, "fid"); - return (Criteria) this; - } - - public Criteria andFidNotEqualTo(Integer value) { - addCriterion("fid <>", value, "fid"); - return (Criteria) this; - } - - public Criteria andFidGreaterThan(Integer value) { - addCriterion("fid >", value, "fid"); - return (Criteria) this; - } - - public Criteria andFidGreaterThanOrEqualTo(Integer value) { - addCriterion("fid >=", value, "fid"); - return (Criteria) this; - } - - public Criteria andFidLessThan(Integer value) { - addCriterion("fid <", value, "fid"); - return (Criteria) this; - } - - public Criteria andFidLessThanOrEqualTo(Integer value) { - addCriterion("fid <=", value, "fid"); - return (Criteria) this; - } - - public Criteria andFidIn(List values) { - addCriterion("fid in", values, "fid"); - return (Criteria) this; - } - - public Criteria andFidNotIn(List values) { - addCriterion("fid not in", values, "fid"); - return (Criteria) this; - } - - public Criteria andFidBetween(Integer value1, Integer value2) { - addCriterion("fid between", value1, value2, "fid"); - return (Criteria) this; - } - - public Criteria andFidNotBetween(Integer value1, Integer value2) { - addCriterion("fid not between", value1, value2, "fid"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyPointParam.java b/src/main/java/com/objecteye/entity/SyPointParam.java index f1571d5..d8d372c 100644 --- a/src/main/java/com/objecteye/entity/SyPointParam.java +++ b/src/main/java/com/objecteye/entity/SyPointParam.java @@ -11,6 +11,8 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class SyPointParam { + private int x; + private int y; } diff --git a/src/main/java/com/objecteye/entity/SyPrivilege.java b/src/main/java/com/objecteye/entity/SyPrivilege.java index af7f4ca..e38dd80 100644 --- a/src/main/java/com/objecteye/entity/SyPrivilege.java +++ b/src/main/java/com/objecteye/entity/SyPrivilege.java @@ -1,12 +1,25 @@ package com.objecteye.entity; import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; +import org.springframework.data.mongodb.core.mapping.Document; import java.io.Serializable; +@AllArgsConstructor +@NoArgsConstructor +@Data +@ToString +@Document(collection = "syPrivilege") public class SyPrivilege implements Serializable { + + private static final long serialVersionUID = -1073087821937860479L; + @ApiModelProperty(value = "主键") - private Integer id; + private String id; @ApiModelProperty(value = "权限名称") private String privilegeName; @@ -16,53 +29,4 @@ public class SyPrivilege implements Serializable { @ApiModelProperty(value = "创建时间") private String createDate; - - private static final long serialVersionUID = 1L; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getPrivilegeName() { - return privilegeName; - } - - public void setPrivilegeName(String privilegeName) { - this.privilegeName = privilegeName; - } - - public String getIsDelete() { - return isDelete; - } - - public void setIsDelete(String isDelete) { - this.isDelete = isDelete; - } - - public String getCreateDate() { - return createDate; - } - - public void setCreateDate(String createDate) { - this.createDate = createDate; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", privilegeName=").append(privilegeName); - sb.append(", isDelete=").append(isDelete); - sb.append(", createDate=").append(createDate); - sb.append(", serialVersionUID=").append(serialVersionUID); - sb.append("]"); - return sb.toString(); - } } \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyPrivilegeExample.java b/src/main/java/com/objecteye/entity/SyPrivilegeExample.java deleted file mode 100644 index f06f605..0000000 --- a/src/main/java/com/objecteye/entity/SyPrivilegeExample.java +++ /dev/null @@ -1,470 +0,0 @@ -package com.objecteye.entity; - -import java.util.ArrayList; -import java.util.List; - -public class SyPrivilegeExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public SyPrivilegeExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Integer value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Integer value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Integer value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Integer value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Integer value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Integer value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Integer value1, Integer value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Integer value1, Integer value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andPrivilegeNameIsNull() { - addCriterion("privilege_name is null"); - return (Criteria) this; - } - - public Criteria andPrivilegeNameIsNotNull() { - addCriterion("privilege_name is not null"); - return (Criteria) this; - } - - public Criteria andPrivilegeNameEqualTo(String value) { - addCriterion("privilege_name =", value, "privilegeName"); - return (Criteria) this; - } - - public Criteria andPrivilegeNameNotEqualTo(String value) { - addCriterion("privilege_name <>", value, "privilegeName"); - return (Criteria) this; - } - - public Criteria andPrivilegeNameGreaterThan(String value) { - addCriterion("privilege_name >", value, "privilegeName"); - return (Criteria) this; - } - - public Criteria andPrivilegeNameGreaterThanOrEqualTo(String value) { - addCriterion("privilege_name >=", value, "privilegeName"); - return (Criteria) this; - } - - public Criteria andPrivilegeNameLessThan(String value) { - addCriterion("privilege_name <", value, "privilegeName"); - return (Criteria) this; - } - - public Criteria andPrivilegeNameLessThanOrEqualTo(String value) { - addCriterion("privilege_name <=", value, "privilegeName"); - return (Criteria) this; - } - - public Criteria andPrivilegeNameLike(String value) { - addCriterion("privilege_name like", value, "privilegeName"); - return (Criteria) this; - } - - public Criteria andPrivilegeNameNotLike(String value) { - addCriterion("privilege_name not like", value, "privilegeName"); - return (Criteria) this; - } - - public Criteria andPrivilegeNameIn(List values) { - addCriterion("privilege_name in", values, "privilegeName"); - return (Criteria) this; - } - - public Criteria andPrivilegeNameNotIn(List values) { - addCriterion("privilege_name not in", values, "privilegeName"); - return (Criteria) this; - } - - public Criteria andPrivilegeNameBetween(String value1, String value2) { - addCriterion("privilege_name between", value1, value2, "privilegeName"); - return (Criteria) this; - } - - public Criteria andPrivilegeNameNotBetween(String value1, String value2) { - addCriterion("privilege_name not between", value1, value2, "privilegeName"); - return (Criteria) this; - } - - public Criteria andIsDeleteIsNull() { - addCriterion("is_delete is null"); - return (Criteria) this; - } - - public Criteria andIsDeleteIsNotNull() { - addCriterion("is_delete is not null"); - return (Criteria) this; - } - - public Criteria andIsDeleteEqualTo(String value) { - addCriterion("is_delete =", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotEqualTo(String value) { - addCriterion("is_delete <>", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteGreaterThan(String value) { - addCriterion("is_delete >", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteGreaterThanOrEqualTo(String value) { - addCriterion("is_delete >=", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteLessThan(String value) { - addCriterion("is_delete <", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteLessThanOrEqualTo(String value) { - addCriterion("is_delete <=", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteLike(String value) { - addCriterion("is_delete like", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotLike(String value) { - addCriterion("is_delete not like", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteIn(List values) { - addCriterion("is_delete in", values, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotIn(List values) { - addCriterion("is_delete not in", values, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteBetween(String value1, String value2) { - addCriterion("is_delete between", value1, value2, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotBetween(String value1, String value2) { - addCriterion("is_delete not between", value1, value2, "isDelete"); - return (Criteria) this; - } - - public Criteria andCreateDateIsNull() { - addCriterion("create_date is null"); - return (Criteria) this; - } - - public Criteria andCreateDateIsNotNull() { - addCriterion("create_date is not null"); - return (Criteria) this; - } - - public Criteria andCreateDateEqualTo(String value) { - addCriterion("create_date =", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotEqualTo(String value) { - addCriterion("create_date <>", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateGreaterThan(String value) { - addCriterion("create_date >", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateGreaterThanOrEqualTo(String value) { - addCriterion("create_date >=", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateLessThan(String value) { - addCriterion("create_date <", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateLessThanOrEqualTo(String value) { - addCriterion("create_date <=", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateLike(String value) { - addCriterion("create_date like", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotLike(String value) { - addCriterion("create_date not like", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateIn(List values) { - addCriterion("create_date in", values, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotIn(List values) { - addCriterion("create_date not in", values, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateBetween(String value1, String value2) { - addCriterion("create_date between", value1, value2, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotBetween(String value1, String value2) { - addCriterion("create_date not between", value1, value2, "createDate"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyRectParam.java b/src/main/java/com/objecteye/entity/SyRectParam.java index 5ea2380..fed43d0 100644 --- a/src/main/java/com/objecteye/entity/SyRectParam.java +++ b/src/main/java/com/objecteye/entity/SyRectParam.java @@ -9,8 +9,12 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class SyRectParam { + int left; + int top; + int width; + int height; } diff --git a/src/main/java/com/objecteye/entity/SyRole.java b/src/main/java/com/objecteye/entity/SyRole.java index 9c1011e..e2f86d7 100644 --- a/src/main/java/com/objecteye/entity/SyRole.java +++ b/src/main/java/com/objecteye/entity/SyRole.java @@ -1,14 +1,25 @@ package com.objecteye.entity; import io.swagger.annotations.ApiModelProperty; -import org.springframework.stereotype.Component; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; +import org.springframework.data.mongodb.core.mapping.Document; import java.io.Serializable; -@Component +@AllArgsConstructor +@NoArgsConstructor +@Data +@ToString +@Document(collection = "syRole") public class SyRole implements Serializable { + + private static final long serialVersionUID = 7650137228880896437L; + @ApiModelProperty(value = "主键") - private Integer id; + private String id; @ApiModelProperty(value = "角色名称") private String roleName; @@ -18,53 +29,4 @@ public class SyRole implements Serializable { @ApiModelProperty(value = "创建日期") private String createDate; - - private static final long serialVersionUID = 1L; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getRoleName() { - return roleName; - } - - public void setRoleName(String roleName) { - this.roleName = roleName; - } - - public Integer getIsDelete() { - return isDelete; - } - - public void setIsDelete(Integer isDelete) { - this.isDelete = isDelete; - } - - public String getCreateDate() { - return createDate; - } - - public void setCreateDate(String createDate) { - this.createDate = createDate; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", roleName=").append(roleName); - sb.append(", isDelete=").append(isDelete); - sb.append(", createDate=").append(createDate); - sb.append(", serialVersionUID=").append(serialVersionUID); - sb.append("]"); - return sb.toString(); - } } \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyRoleExample.java b/src/main/java/com/objecteye/entity/SyRoleExample.java deleted file mode 100644 index e83a7e3..0000000 --- a/src/main/java/com/objecteye/entity/SyRoleExample.java +++ /dev/null @@ -1,463 +0,0 @@ -package com.objecteye.entity; - -import org.springframework.stereotype.Component; - -import java.util.ArrayList; -import java.util.List; - -@Component -public class SyRoleExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public SyRoleExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Integer value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Integer value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Integer value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Integer value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Integer value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Integer value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Integer value1, Integer value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Integer value1, Integer value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andRoleNameIsNull() { - addCriterion("role_name is null"); - return (Criteria) this; - } - - public Criteria andRoleNameIsNotNull() { - addCriterion("role_name is not null"); - return (Criteria) this; - } - - public Criteria andRoleNameEqualTo(String value) { - addCriterion("role_name =", value, "roleName"); - return (Criteria) this; - } - - public Criteria andRoleNameNotEqualTo(String value) { - addCriterion("role_name <>", value, "roleName"); - return (Criteria) this; - } - - public Criteria andRoleNameGreaterThan(String value) { - addCriterion("role_name >", value, "roleName"); - return (Criteria) this; - } - - public Criteria andRoleNameGreaterThanOrEqualTo(String value) { - addCriterion("role_name >=", value, "roleName"); - return (Criteria) this; - } - - public Criteria andRoleNameLessThan(String value) { - addCriterion("role_name <", value, "roleName"); - return (Criteria) this; - } - - public Criteria andRoleNameLessThanOrEqualTo(String value) { - addCriterion("role_name <=", value, "roleName"); - return (Criteria) this; - } - - public Criteria andRoleNameLike(String value) { - addCriterion("role_name like", value, "roleName"); - return (Criteria) this; - } - - public Criteria andRoleNameNotLike(String value) { - addCriterion("role_name not like", value, "roleName"); - return (Criteria) this; - } - - public Criteria andRoleNameIn(List values) { - addCriterion("role_name in", values, "roleName"); - return (Criteria) this; - } - - public Criteria andRoleNameNotIn(List values) { - addCriterion("role_name not in", values, "roleName"); - return (Criteria) this; - } - - public Criteria andRoleNameBetween(String value1, String value2) { - addCriterion("role_name between", value1, value2, "roleName"); - return (Criteria) this; - } - - public Criteria andRoleNameNotBetween(String value1, String value2) { - addCriterion("role_name not between", value1, value2, "roleName"); - return (Criteria) this; - } - - public Criteria andIsDeleteIsNull() { - addCriterion("is_delete is null"); - return (Criteria) this; - } - - public Criteria andIsDeleteIsNotNull() { - addCriterion("is_delete is not null"); - return (Criteria) this; - } - - public Criteria andIsDeleteEqualTo(Integer value) { - addCriterion("is_delete =", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotEqualTo(Integer value) { - addCriterion("is_delete <>", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteGreaterThan(Integer value) { - addCriterion("is_delete >", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteGreaterThanOrEqualTo(Integer value) { - addCriterion("is_delete >=", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteLessThan(Integer value) { - addCriterion("is_delete <", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteLessThanOrEqualTo(Integer value) { - addCriterion("is_delete <=", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteIn(List values) { - addCriterion("is_delete in", values, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotIn(List values) { - addCriterion("is_delete not in", values, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteBetween(Integer value1, Integer value2) { - addCriterion("is_delete between", value1, value2, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotBetween(Integer value1, Integer value2) { - addCriterion("is_delete not between", value1, value2, "isDelete"); - return (Criteria) this; - } - - public Criteria andCreateDateIsNull() { - addCriterion("create_date is null"); - return (Criteria) this; - } - - public Criteria andCreateDateIsNotNull() { - addCriterion("create_date is not null"); - return (Criteria) this; - } - - public Criteria andCreateDateEqualTo(String value) { - addCriterion("create_date =", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotEqualTo(String value) { - addCriterion("create_date <>", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateGreaterThan(String value) { - addCriterion("create_date >", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateGreaterThanOrEqualTo(String value) { - addCriterion("create_date >=", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateLessThan(String value) { - addCriterion("create_date <", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateLessThanOrEqualTo(String value) { - addCriterion("create_date <=", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateLike(String value) { - addCriterion("create_date like", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotLike(String value) { - addCriterion("create_date not like", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateIn(List values) { - addCriterion("create_date in", values, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotIn(List values) { - addCriterion("create_date not in", values, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateBetween(String value1, String value2) { - addCriterion("create_date between", value1, value2, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotBetween(String value1, String value2) { - addCriterion("create_date not between", value1, value2, "createDate"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyRolePrivilege.java b/src/main/java/com/objecteye/entity/SyRolePrivilege.java index d93bc79..fa4d667 100644 --- a/src/main/java/com/objecteye/entity/SyRolePrivilege.java +++ b/src/main/java/com/objecteye/entity/SyRolePrivilege.java @@ -1,12 +1,23 @@ package com.objecteye.entity; import io.swagger.annotations.ApiModelProperty; -import org.springframework.stereotype.Component; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; +import org.springframework.data.mongodb.core.mapping.Document; import java.io.Serializable; -@Component +@AllArgsConstructor +@NoArgsConstructor +@ToString +@Data +@Document(collection = "syRolePrivilege") public class SyRolePrivilege implements Serializable { + + private static final long serialVersionUID = 8220570657213440288L; + @ApiModelProperty(value = "主键") private Integer id; @@ -15,44 +26,4 @@ public class SyRolePrivilege implements Serializable { @ApiModelProperty(value = "角色id") private Integer rid; - - private static final long serialVersionUID = 1L; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public Integer getPid() { - return pid; - } - - public void setPid(Integer pid) { - this.pid = pid; - } - - public Integer getRid() { - return rid; - } - - public void setRid(Integer rid) { - this.rid = rid; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", pid=").append(pid); - sb.append(", rid=").append(rid); - sb.append(", serialVersionUID=").append(serialVersionUID); - sb.append("]"); - return sb.toString(); - } } \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyRolePrivilegeExample.java b/src/main/java/com/objecteye/entity/SyRolePrivilegeExample.java deleted file mode 100644 index 609c372..0000000 --- a/src/main/java/com/objecteye/entity/SyRolePrivilegeExample.java +++ /dev/null @@ -1,383 +0,0 @@ -package com.objecteye.entity; - -import org.springframework.stereotype.Component; - -import java.util.ArrayList; -import java.util.List; - -@Component -public class SyRolePrivilegeExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public SyRolePrivilegeExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Integer value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Integer value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Integer value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Integer value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Integer value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Integer value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Integer value1, Integer value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Integer value1, Integer value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andPidIsNull() { - addCriterion("pid is null"); - return (Criteria) this; - } - - public Criteria andPidIsNotNull() { - addCriterion("pid is not null"); - return (Criteria) this; - } - - public Criteria andPidEqualTo(Integer value) { - addCriterion("pid =", value, "pid"); - return (Criteria) this; - } - - public Criteria andPidNotEqualTo(Integer value) { - addCriterion("pid <>", value, "pid"); - return (Criteria) this; - } - - public Criteria andPidGreaterThan(Integer value) { - addCriterion("pid >", value, "pid"); - return (Criteria) this; - } - - public Criteria andPidGreaterThanOrEqualTo(Integer value) { - addCriterion("pid >=", value, "pid"); - return (Criteria) this; - } - - public Criteria andPidLessThan(Integer value) { - addCriterion("pid <", value, "pid"); - return (Criteria) this; - } - - public Criteria andPidLessThanOrEqualTo(Integer value) { - addCriterion("pid <=", value, "pid"); - return (Criteria) this; - } - - public Criteria andPidIn(List values) { - addCriterion("pid in", values, "pid"); - return (Criteria) this; - } - - public Criteria andPidNotIn(List values) { - addCriterion("pid not in", values, "pid"); - return (Criteria) this; - } - - public Criteria andPidBetween(Integer value1, Integer value2) { - addCriterion("pid between", value1, value2, "pid"); - return (Criteria) this; - } - - public Criteria andPidNotBetween(Integer value1, Integer value2) { - addCriterion("pid not between", value1, value2, "pid"); - return (Criteria) this; - } - - public Criteria andRidIsNull() { - addCriterion("rid is null"); - return (Criteria) this; - } - - public Criteria andRidIsNotNull() { - addCriterion("rid is not null"); - return (Criteria) this; - } - - public Criteria andRidEqualTo(Integer value) { - addCriterion("rid =", value, "rid"); - return (Criteria) this; - } - - public Criteria andRidNotEqualTo(Integer value) { - addCriterion("rid <>", value, "rid"); - return (Criteria) this; - } - - public Criteria andRidGreaterThan(Integer value) { - addCriterion("rid >", value, "rid"); - return (Criteria) this; - } - - public Criteria andRidGreaterThanOrEqualTo(Integer value) { - addCriterion("rid >=", value, "rid"); - return (Criteria) this; - } - - public Criteria andRidLessThan(Integer value) { - addCriterion("rid <", value, "rid"); - return (Criteria) this; - } - - public Criteria andRidLessThanOrEqualTo(Integer value) { - addCriterion("rid <=", value, "rid"); - return (Criteria) this; - } - - public Criteria andRidIn(List values) { - addCriterion("rid in", values, "rid"); - return (Criteria) this; - } - - public Criteria andRidNotIn(List values) { - addCriterion("rid not in", values, "rid"); - return (Criteria) this; - } - - public Criteria andRidBetween(Integer value1, Integer value2) { - addCriterion("rid between", value1, value2, "rid"); - return (Criteria) this; - } - - public Criteria andRidNotBetween(Integer value1, Integer value2) { - addCriterion("rid not between", value1, value2, "rid"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SySingleDeployParam.java b/src/main/java/com/objecteye/entity/SySingleDeployParam.java deleted file mode 100644 index da0d5a3..0000000 --- a/src/main/java/com/objecteye/entity/SySingleDeployParam.java +++ /dev/null @@ -1,79 +0,0 @@ -package com.objecteye.entity; - -import java.io.Serializable; - -public class SySingleDeployParam implements Serializable { - - private int featureId; - private int personnelId; - private int[] equipmentIds; - private String name; - private String startTime; - private String endTime; - private float detectThresld; - private String description; - - public int getFeatureId() { - return featureId; - } - - public void setFeatureId(int featureId) { - this.featureId = featureId; - } - - public int getPersonnelId() { - return personnelId; - } - - public void setPersonnelId(int personnelId) { - this.personnelId = personnelId; - } - - public int[] getEquipmentIds() { - return equipmentIds; - } - - public void setEquipmentIds(int[] equipmentIds) { - this.equipmentIds = equipmentIds; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getStartTime() { - return startTime; - } - - public void setStartTime(String startTime) { - this.startTime = startTime; - } - - public String getEndTime() { - return endTime; - } - - public void setEndTime(String endTime) { - this.endTime = endTime; - } - - public float getDetectThresld() { - return detectThresld; - } - - public void setDetectThresld(float detectThresld) { - this.detectThresld = detectThresld; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } -} diff --git a/src/main/java/com/objecteye/entity/SyUser.java b/src/main/java/com/objecteye/entity/SyUser.java index 00c88e6..cad4c65 100644 --- a/src/main/java/com/objecteye/entity/SyUser.java +++ b/src/main/java/com/objecteye/entity/SyUser.java @@ -1,14 +1,25 @@ package com.objecteye.entity; import io.swagger.annotations.ApiModelProperty; -import org.springframework.stereotype.Component; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; +import org.springframework.data.mongodb.core.mapping.Document; import java.io.Serializable; -@Component +@AllArgsConstructor +@NoArgsConstructor +@Data +@ToString +@Document(collection = "syUser") public class SyUser implements Serializable { + + private static final long serialVersionUID = -809864927373976180L; + @ApiModelProperty(value = "主键自增") - private Integer id; + private String id; @ApiModelProperty(value = "用户名,唯一性") private String username; @@ -21,80 +32,4 @@ public class SyUser implements Serializable { @ApiModelProperty(value = "创建表") private String createDate; - - public SyUser() { - } - - public SyUser(String username, String password, String userRole, String createDate) { - this.username = username; - this.password = password; - this.userRole = userRole; - this.createDate = createDate; - } - - public SyUser(Integer id, String username, String password, String userRole, String createDate) { - this.id = id; - this.username = username; - this.password = password; - this.userRole = userRole; - this.createDate = createDate; - } - - private static final long serialVersionUID = 1L; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public String getUserRole() { - return userRole; - } - - public void setUserRole(String userRole) { - this.userRole = userRole; - } - - public String getCreateDate() { - return createDate; - } - - public void setCreateDate(String createDate) { - this.createDate = createDate; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", username=").append(username); - sb.append(", password=").append(password); - sb.append(", userRole=").append(userRole); - sb.append(", createDate=").append(createDate); - sb.append(", serialVersionUID=").append(serialVersionUID); - sb.append("]"); - return sb.toString(); - } } \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyUserExample.java b/src/main/java/com/objecteye/entity/SyUserExample.java deleted file mode 100644 index 9177f17..0000000 --- a/src/main/java/com/objecteye/entity/SyUserExample.java +++ /dev/null @@ -1,543 +0,0 @@ -package com.objecteye.entity; - -import org.springframework.stereotype.Component; - -import java.util.ArrayList; -import java.util.List; - -@Component -public class SyUserExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public SyUserExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Integer value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Integer value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Integer value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Integer value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Integer value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Integer value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Integer value1, Integer value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Integer value1, Integer value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andUsernameIsNull() { - addCriterion("username is null"); - return (Criteria) this; - } - - public Criteria andUsernameIsNotNull() { - addCriterion("username is not null"); - return (Criteria) this; - } - - public Criteria andUsernameEqualTo(String value) { - addCriterion("username =", value, "username"); - return (Criteria) this; - } - - public Criteria andUsernameNotEqualTo(String value) { - addCriterion("username <>", value, "username"); - return (Criteria) this; - } - - public Criteria andUsernameGreaterThan(String value) { - addCriterion("username >", value, "username"); - return (Criteria) this; - } - - public Criteria andUsernameGreaterThanOrEqualTo(String value) { - addCriterion("username >=", value, "username"); - return (Criteria) this; - } - - public Criteria andUsernameLessThan(String value) { - addCriterion("username <", value, "username"); - return (Criteria) this; - } - - public Criteria andUsernameLessThanOrEqualTo(String value) { - addCriterion("username <=", value, "username"); - return (Criteria) this; - } - - public Criteria andUsernameLike(String value) { - addCriterion("username like", value, "username"); - return (Criteria) this; - } - - public Criteria andUsernameNotLike(String value) { - addCriterion("username not like", value, "username"); - return (Criteria) this; - } - - public Criteria andUsernameIn(List values) { - addCriterion("username in", values, "username"); - return (Criteria) this; - } - - public Criteria andUsernameNotIn(List values) { - addCriterion("username not in", values, "username"); - return (Criteria) this; - } - - public Criteria andUsernameBetween(String value1, String value2) { - addCriterion("username between", value1, value2, "username"); - return (Criteria) this; - } - - public Criteria andUsernameNotBetween(String value1, String value2) { - addCriterion("username not between", value1, value2, "username"); - return (Criteria) this; - } - - public Criteria andPasswordIsNull() { - addCriterion("password is null"); - return (Criteria) this; - } - - public Criteria andPasswordIsNotNull() { - addCriterion("password is not null"); - return (Criteria) this; - } - - public Criteria andPasswordEqualTo(String value) { - addCriterion("password =", value, "password"); - return (Criteria) this; - } - - public Criteria andPasswordNotEqualTo(String value) { - addCriterion("password <>", value, "password"); - return (Criteria) this; - } - - public Criteria andPasswordGreaterThan(String value) { - addCriterion("password >", value, "password"); - return (Criteria) this; - } - - public Criteria andPasswordGreaterThanOrEqualTo(String value) { - addCriterion("password >=", value, "password"); - return (Criteria) this; - } - - public Criteria andPasswordLessThan(String value) { - addCriterion("password <", value, "password"); - return (Criteria) this; - } - - public Criteria andPasswordLessThanOrEqualTo(String value) { - addCriterion("password <=", value, "password"); - return (Criteria) this; - } - - public Criteria andPasswordLike(String value) { - addCriterion("password like", value, "password"); - return (Criteria) this; - } - - public Criteria andPasswordNotLike(String value) { - addCriterion("password not like", value, "password"); - return (Criteria) this; - } - - public Criteria andPasswordIn(List values) { - addCriterion("password in", values, "password"); - return (Criteria) this; - } - - public Criteria andPasswordNotIn(List values) { - addCriterion("password not in", values, "password"); - return (Criteria) this; - } - - public Criteria andPasswordBetween(String value1, String value2) { - addCriterion("password between", value1, value2, "password"); - return (Criteria) this; - } - - public Criteria andPasswordNotBetween(String value1, String value2) { - addCriterion("password not between", value1, value2, "password"); - return (Criteria) this; - } - - public Criteria andUserRoleIsNull() { - addCriterion("user_role is null"); - return (Criteria) this; - } - - public Criteria andUserRoleIsNotNull() { - addCriterion("user_role is not null"); - return (Criteria) this; - } - - public Criteria andUserRoleEqualTo(String value) { - addCriterion("user_role =", value, "userRole"); - return (Criteria) this; - } - - public Criteria andUserRoleNotEqualTo(String value) { - addCriterion("user_role <>", value, "userRole"); - return (Criteria) this; - } - - public Criteria andUserRoleGreaterThan(String value) { - addCriterion("user_role >", value, "userRole"); - return (Criteria) this; - } - - public Criteria andUserRoleGreaterThanOrEqualTo(String value) { - addCriterion("user_role >=", value, "userRole"); - return (Criteria) this; - } - - public Criteria andUserRoleLessThan(String value) { - addCriterion("user_role <", value, "userRole"); - return (Criteria) this; - } - - public Criteria andUserRoleLessThanOrEqualTo(String value) { - addCriterion("user_role <=", value, "userRole"); - return (Criteria) this; - } - - public Criteria andUserRoleLike(String value) { - addCriterion("user_role like", value, "userRole"); - return (Criteria) this; - } - - public Criteria andUserRoleNotLike(String value) { - addCriterion("user_role not like", value, "userRole"); - return (Criteria) this; - } - - public Criteria andUserRoleIn(List values) { - addCriterion("user_role in", values, "userRole"); - return (Criteria) this; - } - - public Criteria andUserRoleNotIn(List values) { - addCriterion("user_role not in", values, "userRole"); - return (Criteria) this; - } - - public Criteria andUserRoleBetween(String value1, String value2) { - addCriterion("user_role between", value1, value2, "userRole"); - return (Criteria) this; - } - - public Criteria andUserRoleNotBetween(String value1, String value2) { - addCriterion("user_role not between", value1, value2, "userRole"); - return (Criteria) this; - } - - public Criteria andCreateDateIsNull() { - addCriterion("create_date is null"); - return (Criteria) this; - } - - public Criteria andCreateDateIsNotNull() { - addCriterion("create_date is not null"); - return (Criteria) this; - } - - public Criteria andCreateDateEqualTo(String value) { - addCriterion("create_date =", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotEqualTo(String value) { - addCriterion("create_date <>", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateGreaterThan(String value) { - addCriterion("create_date >", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateGreaterThanOrEqualTo(String value) { - addCriterion("create_date >=", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateLessThan(String value) { - addCriterion("create_date <", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateLessThanOrEqualTo(String value) { - addCriterion("create_date <=", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateLike(String value) { - addCriterion("create_date like", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotLike(String value) { - addCriterion("create_date not like", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateIn(List values) { - addCriterion("create_date in", values, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotIn(List values) { - addCriterion("create_date not in", values, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateBetween(String value1, String value2) { - addCriterion("create_date between", value1, value2, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotBetween(String value1, String value2) { - addCriterion("create_date not between", value1, value2, "createDate"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyVehicleColor.java b/src/main/java/com/objecteye/entity/SyVehicleColor.java new file mode 100644 index 0000000..1068304 --- /dev/null +++ b/src/main/java/com/objecteye/entity/SyVehicleColor.java @@ -0,0 +1,25 @@ +package com.objecteye.entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; +import org.springframework.data.mongodb.core.mapping.Document; + +import java.io.Serializable; + +@NoArgsConstructor +@AllArgsConstructor +@ToString +@Data +@Document(collection = "syVehicleColor") +public class SyVehicleColor implements Serializable { + + private static final long serialVersionUID = -1037418483294054182L; + + private String id; + + private String name; + + private Integer value; +} \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyVehicleDb.java b/src/main/java/com/objecteye/entity/SyVehicleDb.java index 8956d75..b5760aa 100644 --- a/src/main/java/com/objecteye/entity/SyVehicleDb.java +++ b/src/main/java/com/objecteye/entity/SyVehicleDb.java @@ -1,12 +1,25 @@ package com.objecteye.entity; import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; +import org.springframework.data.mongodb.core.mapping.Document; import java.io.Serializable; +@AllArgsConstructor +@NoArgsConstructor +@Data +@ToString +@Document(collection = "syVehicleDb") public class SyVehicleDb implements Serializable { + + private static final long serialVersionUID = 7689961359294408456L; + @ApiModelProperty(value = "自增主键") - private Integer id; + private String id; @ApiModelProperty(value = "车辆库名称") private String vehicleName; @@ -25,80 +38,4 @@ public class SyVehicleDb implements Serializable { @ApiModelProperty(value = "数量") private Integer count; - - private static final long serialVersionUID = 1L; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getVehicleName() { - return vehicleName; - } - - public void setVehicleName(String vehicleName) { - this.vehicleName = vehicleName; - } - - public String getCreateDate() { - return createDate; - } - - public void setCreateDate(String createDate) { - this.createDate = createDate; - } - - public String getUpdateDate() { - return updateDate; - } - - public void setUpdateDate(String updateDate) { - this.updateDate = updateDate; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public Integer getIsDelete() { - return isDelete; - } - - public void setIsDelete(Integer isDelete) { - this.isDelete = isDelete; - } - - public Integer getCount() { - return count; - } - - public void setCount(Integer count) { - this.count = count; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", vehicleName=").append(vehicleName); - sb.append(", createDate=").append(createDate); - sb.append(", updateDate=").append(updateDate); - sb.append(", description=").append(description); - sb.append(", isDelete=").append(isDelete); - sb.append(", count=").append(count); - sb.append(", serialVersionUID=").append(serialVersionUID); - sb.append("]"); - return sb.toString(); - } } \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyVehicleDbExample.java b/src/main/java/com/objecteye/entity/SyVehicleDbExample.java deleted file mode 100644 index f654dbc..0000000 --- a/src/main/java/com/objecteye/entity/SyVehicleDbExample.java +++ /dev/null @@ -1,660 +0,0 @@ -package com.objecteye.entity; - -import java.util.ArrayList; -import java.util.List; - -public class SyVehicleDbExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public SyVehicleDbExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Integer value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Integer value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Integer value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Integer value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Integer value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Integer value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Integer value1, Integer value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Integer value1, Integer value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andVehicleNameIsNull() { - addCriterion("vehicle_name is null"); - return (Criteria) this; - } - - public Criteria andVehicleNameIsNotNull() { - addCriterion("vehicle_name is not null"); - return (Criteria) this; - } - - public Criteria andVehicleNameEqualTo(String value) { - addCriterion("vehicle_name =", value, "vehicleName"); - return (Criteria) this; - } - - public Criteria andVehicleNameNotEqualTo(String value) { - addCriterion("vehicle_name <>", value, "vehicleName"); - return (Criteria) this; - } - - public Criteria andVehicleNameGreaterThan(String value) { - addCriterion("vehicle_name >", value, "vehicleName"); - return (Criteria) this; - } - - public Criteria andVehicleNameGreaterThanOrEqualTo(String value) { - addCriterion("vehicle_name >=", value, "vehicleName"); - return (Criteria) this; - } - - public Criteria andVehicleNameLessThan(String value) { - addCriterion("vehicle_name <", value, "vehicleName"); - return (Criteria) this; - } - - public Criteria andVehicleNameLessThanOrEqualTo(String value) { - addCriterion("vehicle_name <=", value, "vehicleName"); - return (Criteria) this; - } - - public Criteria andVehicleNameLike(String value) { - addCriterion("vehicle_name like", value, "vehicleName"); - return (Criteria) this; - } - - public Criteria andVehicleNameNotLike(String value) { - addCriterion("vehicle_name not like", value, "vehicleName"); - return (Criteria) this; - } - - public Criteria andVehicleNameIn(List values) { - addCriterion("vehicle_name in", values, "vehicleName"); - return (Criteria) this; - } - - public Criteria andVehicleNameNotIn(List values) { - addCriterion("vehicle_name not in", values, "vehicleName"); - return (Criteria) this; - } - - public Criteria andVehicleNameBetween(String value1, String value2) { - addCriterion("vehicle_name between", value1, value2, "vehicleName"); - return (Criteria) this; - } - - public Criteria andVehicleNameNotBetween(String value1, String value2) { - addCriterion("vehicle_name not between", value1, value2, "vehicleName"); - return (Criteria) this; - } - - public Criteria andCreateDateIsNull() { - addCriterion("create_date is null"); - return (Criteria) this; - } - - public Criteria andCreateDateIsNotNull() { - addCriterion("create_date is not null"); - return (Criteria) this; - } - - public Criteria andCreateDateEqualTo(String value) { - addCriterion("create_date =", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotEqualTo(String value) { - addCriterion("create_date <>", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateGreaterThan(String value) { - addCriterion("create_date >", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateGreaterThanOrEqualTo(String value) { - addCriterion("create_date >=", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateLessThan(String value) { - addCriterion("create_date <", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateLessThanOrEqualTo(String value) { - addCriterion("create_date <=", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateLike(String value) { - addCriterion("create_date like", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotLike(String value) { - addCriterion("create_date not like", value, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateIn(List values) { - addCriterion("create_date in", values, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotIn(List values) { - addCriterion("create_date not in", values, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateBetween(String value1, String value2) { - addCriterion("create_date between", value1, value2, "createDate"); - return (Criteria) this; - } - - public Criteria andCreateDateNotBetween(String value1, String value2) { - addCriterion("create_date not between", value1, value2, "createDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateIsNull() { - addCriterion("update_date is null"); - return (Criteria) this; - } - - public Criteria andUpdateDateIsNotNull() { - addCriterion("update_date is not null"); - return (Criteria) this; - } - - public Criteria andUpdateDateEqualTo(String value) { - addCriterion("update_date =", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateNotEqualTo(String value) { - addCriterion("update_date <>", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateGreaterThan(String value) { - addCriterion("update_date >", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateGreaterThanOrEqualTo(String value) { - addCriterion("update_date >=", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateLessThan(String value) { - addCriterion("update_date <", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateLessThanOrEqualTo(String value) { - addCriterion("update_date <=", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateLike(String value) { - addCriterion("update_date like", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateNotLike(String value) { - addCriterion("update_date not like", value, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateIn(List values) { - addCriterion("update_date in", values, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateNotIn(List values) { - addCriterion("update_date not in", values, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateBetween(String value1, String value2) { - addCriterion("update_date between", value1, value2, "updateDate"); - return (Criteria) this; - } - - public Criteria andUpdateDateNotBetween(String value1, String value2) { - addCriterion("update_date not between", value1, value2, "updateDate"); - return (Criteria) this; - } - - public Criteria andDescriptionIsNull() { - addCriterion("description is null"); - return (Criteria) this; - } - - public Criteria andDescriptionIsNotNull() { - addCriterion("description is not null"); - return (Criteria) this; - } - - public Criteria andDescriptionEqualTo(String value) { - addCriterion("description =", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotEqualTo(String value) { - addCriterion("description <>", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionGreaterThan(String value) { - addCriterion("description >", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionGreaterThanOrEqualTo(String value) { - addCriterion("description >=", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLessThan(String value) { - addCriterion("description <", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLessThanOrEqualTo(String value) { - addCriterion("description <=", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLike(String value) { - addCriterion("description like", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotLike(String value) { - addCriterion("description not like", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionIn(List values) { - addCriterion("description in", values, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotIn(List values) { - addCriterion("description not in", values, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionBetween(String value1, String value2) { - addCriterion("description between", value1, value2, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotBetween(String value1, String value2) { - addCriterion("description not between", value1, value2, "description"); - return (Criteria) this; - } - - public Criteria andIsDeleteIsNull() { - addCriterion("is_delete is null"); - return (Criteria) this; - } - - public Criteria andIsDeleteIsNotNull() { - addCriterion("is_delete is not null"); - return (Criteria) this; - } - - public Criteria andIsDeleteEqualTo(Integer value) { - addCriterion("is_delete =", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotEqualTo(Integer value) { - addCriterion("is_delete <>", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteGreaterThan(Integer value) { - addCriterion("is_delete >", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteGreaterThanOrEqualTo(Integer value) { - addCriterion("is_delete >=", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteLessThan(Integer value) { - addCriterion("is_delete <", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteLessThanOrEqualTo(Integer value) { - addCriterion("is_delete <=", value, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteIn(List values) { - addCriterion("is_delete in", values, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotIn(List values) { - addCriterion("is_delete not in", values, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteBetween(Integer value1, Integer value2) { - addCriterion("is_delete between", value1, value2, "isDelete"); - return (Criteria) this; - } - - public Criteria andIsDeleteNotBetween(Integer value1, Integer value2) { - addCriterion("is_delete not between", value1, value2, "isDelete"); - return (Criteria) this; - } - - public Criteria andCountIsNull() { - addCriterion("count is null"); - return (Criteria) this; - } - - public Criteria andCountIsNotNull() { - addCriterion("count is not null"); - return (Criteria) this; - } - - public Criteria andCountEqualTo(Integer value) { - addCriterion("count =", value, "count"); - return (Criteria) this; - } - - public Criteria andCountNotEqualTo(Integer value) { - addCriterion("count <>", value, "count"); - return (Criteria) this; - } - - public Criteria andCountGreaterThan(Integer value) { - addCriterion("count >", value, "count"); - return (Criteria) this; - } - - public Criteria andCountGreaterThanOrEqualTo(Integer value) { - addCriterion("count >=", value, "count"); - return (Criteria) this; - } - - public Criteria andCountLessThan(Integer value) { - addCriterion("count <", value, "count"); - return (Criteria) this; - } - - public Criteria andCountLessThanOrEqualTo(Integer value) { - addCriterion("count <=", value, "count"); - return (Criteria) this; - } - - public Criteria andCountIn(List values) { - addCriterion("count in", values, "count"); - return (Criteria) this; - } - - public Criteria andCountNotIn(List values) { - addCriterion("count not in", values, "count"); - return (Criteria) this; - } - - public Criteria andCountBetween(Integer value1, Integer value2) { - addCriterion("count between", value1, value2, "count"); - return (Criteria) this; - } - - public Criteria andCountNotBetween(Integer value1, Integer value2) { - addCriterion("count not between", value1, value2, "count"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyVehicleForbiddenTaskOutput.java b/src/main/java/com/objecteye/entity/SyVehicleForbiddenTaskOutput.java index 127d823..cd07207 100644 --- a/src/main/java/com/objecteye/entity/SyVehicleForbiddenTaskOutput.java +++ b/src/main/java/com/objecteye/entity/SyVehicleForbiddenTaskOutput.java @@ -12,6 +12,7 @@ import java.io.Serializable; @Data @ToString public class SyVehicleForbiddenTaskOutput implements Serializable { + private static final long serialVersionUID = 4358376042063003668L; private String id; diff --git a/src/main/java/com/objecteye/entity/SyVehicleForbidenTask.java b/src/main/java/com/objecteye/entity/SyVehicleForbidenTask.java index 05914ec..313cb18 100644 --- a/src/main/java/com/objecteye/entity/SyVehicleForbidenTask.java +++ b/src/main/java/com/objecteye/entity/SyVehicleForbidenTask.java @@ -1,10 +1,23 @@ package com.objecteye.entity; import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; +import org.springframework.data.mongodb.core.mapping.Document; import java.io.Serializable; +@Document(collection = "syVehicleForbidenTask") +@NoArgsConstructor +@AllArgsConstructor +@Data +@ToString public class SyVehicleForbidenTask implements Serializable { + + private static final long serialVersionUID = -8007441463935902798L; + @ApiModelProperty(value = "任务id, 自增主键") private Integer id; @@ -38,113 +51,4 @@ public class SyVehicleForbidenTask implements Serializable { * 区域id对应名称 (非数据库字段) */ private String areaName; - - public String getAreaName() { - return areaName; - } - - public void setAreaName(String areaName) { - this.areaName = areaName; - } - - private static final long serialVersionUID = 1L; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - public String getAreaId() { - return areaId; - } - - public void setAreaId(String areaId) { - this.areaId = areaId; - } - - public String getDeviceId() { - return deviceId; - } - - public void setDeviceId(String deviceId) { - this.deviceId = deviceId; - } - - public String getVehicleType() { - return vehicleType; - } - - public void setVehicleType(String vehicleType) { - this.vehicleType = vehicleType; - } - - public String getForbiddenDetailTime() { - return forbiddenDetailTime; - } - - public void setForbiddenDetailTime(String forbiddenDetailTime) { - this.forbiddenDetailTime = forbiddenDetailTime; - } - - public Long getEffectStartTime() { - return effectStartTime; - } - - public void setEffectStartTime(Long effectStartTime) { - this.effectStartTime = effectStartTime; - } - - public Long getEffectEndTime() { - return effectEndTime; - } - - public void setEffectEndTime(Long effectEndTime) { - this.effectEndTime = effectEndTime; - } - - public Integer getStatus() { - return status; - } - - public void setStatus(Integer status) { - this.status = status; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", areaId=").append(areaId); - sb.append(", deviceId=").append(deviceId); - sb.append(", vehicleType=").append(vehicleType); - sb.append(", forbiddenDetailTime=").append(forbiddenDetailTime); - sb.append(", effectStartTime=").append(effectStartTime); - sb.append(", effectEndTime=").append(effectEndTime); - sb.append(", status=").append(status); - sb.append(", serialVersionUID=").append(serialVersionUID); - sb.append("]"); - return sb.toString(); - } } \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyVehicleForbidenTaskExample.java b/src/main/java/com/objecteye/entity/SyVehicleForbidenTaskExample.java deleted file mode 100644 index 088faef..0000000 --- a/src/main/java/com/objecteye/entity/SyVehicleForbidenTaskExample.java +++ /dev/null @@ -1,860 +0,0 @@ -package com.objecteye.entity; - -import java.util.ArrayList; -import java.util.List; - -public class SyVehicleForbidenTaskExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public SyVehicleForbidenTaskExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Integer value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Integer value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Integer value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Integer value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Integer value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Integer value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Integer value1, Integer value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Integer value1, Integer value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andAreaIdIsNull() { - addCriterion("area_id is null"); - return (Criteria) this; - } - - public Criteria andAreaIdIsNotNull() { - addCriterion("area_id is not null"); - return (Criteria) this; - } - - public Criteria andAreaIdEqualTo(String value) { - addCriterion("area_id =", value, "areaId"); - return (Criteria) this; - } - - public Criteria andAreaIdNotEqualTo(String value) { - addCriterion("area_id <>", value, "areaId"); - return (Criteria) this; - } - - public Criteria andAreaIdGreaterThan(String value) { - addCriterion("area_id >", value, "areaId"); - return (Criteria) this; - } - - public Criteria andAreaIdGreaterThanOrEqualTo(String value) { - addCriterion("area_id >=", value, "areaId"); - return (Criteria) this; - } - - public Criteria andAreaIdLessThan(String value) { - addCriterion("area_id <", value, "areaId"); - return (Criteria) this; - } - - public Criteria andAreaIdLessThanOrEqualTo(String value) { - addCriterion("area_id <=", value, "areaId"); - return (Criteria) this; - } - - public Criteria andAreaIdLike(String value) { - addCriterion("area_id like", value, "areaId"); - return (Criteria) this; - } - - public Criteria andAreaIdNotLike(String value) { - addCriterion("area_id not like", value, "areaId"); - return (Criteria) this; - } - - public Criteria andAreaIdIn(List values) { - addCriterion("area_id in", values, "areaId"); - return (Criteria) this; - } - - public Criteria andAreaIdNotIn(List values) { - addCriterion("area_id not in", values, "areaId"); - return (Criteria) this; - } - - public Criteria andAreaIdBetween(String value1, String value2) { - addCriterion("area_id between", value1, value2, "areaId"); - return (Criteria) this; - } - - public Criteria andAreaIdNotBetween(String value1, String value2) { - addCriterion("area_id not between", value1, value2, "areaId"); - return (Criteria) this; - } - - public Criteria andNameIsNull() { - addCriterion("name is null"); - return (Criteria) this; - } - - public Criteria andNameIsNotNull() { - addCriterion("name is not null"); - return (Criteria) this; - } - - public Criteria andNameEqualTo(String value) { - addCriterion("name =", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotEqualTo(String value) { - addCriterion("name <>", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThan(String value) { - addCriterion("name >", value, "name"); - return (Criteria) this; - } - - public Criteria andNameGreaterThanOrEqualTo(String value) { - addCriterion("name >=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThan(String value) { - addCriterion("name <", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLessThanOrEqualTo(String value) { - addCriterion("name <=", value, "name"); - return (Criteria) this; - } - - public Criteria andNameLike(String value) { - addCriterion("name like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameNotLike(String value) { - addCriterion("name not like", value, "name"); - return (Criteria) this; - } - - public Criteria andNameIn(List values) { - addCriterion("name in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameNotIn(List values) { - addCriterion("name not in", values, "name"); - return (Criteria) this; - } - - public Criteria andNameBetween(String value1, String value2) { - addCriterion("name between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andNameNotBetween(String value1, String value2) { - addCriterion("name not between", value1, value2, "name"); - return (Criteria) this; - } - - public Criteria andDescriptionIsNull() { - addCriterion("description is null"); - return (Criteria) this; - } - - public Criteria andDescriptionIsNotNull() { - addCriterion("description is not null"); - return (Criteria) this; - } - - public Criteria andDescriptionEqualTo(String value) { - addCriterion("description =", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotEqualTo(String value) { - addCriterion("description <>", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionGreaterThan(String value) { - addCriterion("description >", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionGreaterThanOrEqualTo(String value) { - addCriterion("description >=", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLessThan(String value) { - addCriterion("description <", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLessThanOrEqualTo(String value) { - addCriterion("description <=", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionLike(String value) { - addCriterion("description like", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotLike(String value) { - addCriterion("description not like", value, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionIn(List values) { - addCriterion("description in", values, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotIn(List values) { - addCriterion("description not in", values, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionBetween(String value1, String value2) { - addCriterion("description between", value1, value2, "description"); - return (Criteria) this; - } - - public Criteria andDescriptionNotBetween(String value1, String value2) { - addCriterion("description not between", value1, value2, "description"); - return (Criteria) this; - } - - public Criteria andDeviceIdIsNull() { - addCriterion("device_id is null"); - return (Criteria) this; - } - - public Criteria andDeviceIdIsNotNull() { - addCriterion("device_id is not null"); - return (Criteria) this; - } - - public Criteria andDeviceIdEqualTo(String value) { - addCriterion("device_id =", value, "deviceId"); - return (Criteria) this; - } - - public Criteria andDeviceIdNotEqualTo(String value) { - addCriterion("device_id <>", value, "deviceId"); - return (Criteria) this; - } - - public Criteria andDeviceIdGreaterThan(String value) { - addCriterion("device_id >", value, "deviceId"); - return (Criteria) this; - } - - public Criteria andDeviceIdGreaterThanOrEqualTo(String value) { - addCriterion("device_id >=", value, "deviceId"); - return (Criteria) this; - } - - public Criteria andDeviceIdLessThan(String value) { - addCriterion("device_id <", value, "deviceId"); - return (Criteria) this; - } - - public Criteria andDeviceIdLessThanOrEqualTo(String value) { - addCriterion("device_id <=", value, "deviceId"); - return (Criteria) this; - } - - public Criteria andDeviceIdLike(String value) { - addCriterion("device_id like", value, "deviceId"); - return (Criteria) this; - } - - public Criteria andDeviceIdNotLike(String value) { - addCriterion("device_id not like", value, "deviceId"); - return (Criteria) this; - } - - public Criteria andDeviceIdIn(List values) { - addCriterion("device_id in", values, "deviceId"); - return (Criteria) this; - } - - public Criteria andDeviceIdNotIn(List values) { - addCriterion("device_id not in", values, "deviceId"); - return (Criteria) this; - } - - public Criteria andDeviceIdBetween(String value1, String value2) { - addCriterion("device_id between", value1, value2, "deviceId"); - return (Criteria) this; - } - - public Criteria andDeviceIdNotBetween(String value1, String value2) { - addCriterion("device_id not between", value1, value2, "deviceId"); - return (Criteria) this; - } - - public Criteria andVehicleTypeIsNull() { - addCriterion("vehicle_type is null"); - return (Criteria) this; - } - - public Criteria andVehicleTypeIsNotNull() { - addCriterion("vehicle_type is not null"); - return (Criteria) this; - } - - public Criteria andVehicleTypeEqualTo(String value) { - addCriterion("vehicle_type =", value, "vehicleType"); - return (Criteria) this; - } - - public Criteria andVehicleTypeNotEqualTo(String value) { - addCriterion("vehicle_type <>", value, "vehicleType"); - return (Criteria) this; - } - - public Criteria andVehicleTypeGreaterThan(String value) { - addCriterion("vehicle_type >", value, "vehicleType"); - return (Criteria) this; - } - - public Criteria andVehicleTypeGreaterThanOrEqualTo(String value) { - addCriterion("vehicle_type >=", value, "vehicleType"); - return (Criteria) this; - } - - public Criteria andVehicleTypeLessThan(String value) { - addCriterion("vehicle_type <", value, "vehicleType"); - return (Criteria) this; - } - - public Criteria andVehicleTypeLessThanOrEqualTo(String value) { - addCriterion("vehicle_type <=", value, "vehicleType"); - return (Criteria) this; - } - - public Criteria andVehicleTypeLike(String value) { - addCriterion("vehicle_type like", value, "vehicleType"); - return (Criteria) this; - } - - public Criteria andVehicleTypeNotLike(String value) { - addCriterion("vehicle_type not like", value, "vehicleType"); - return (Criteria) this; - } - - public Criteria andVehicleTypeIn(List values) { - addCriterion("vehicle_type in", values, "vehicleType"); - return (Criteria) this; - } - - public Criteria andVehicleTypeNotIn(List values) { - addCriterion("vehicle_type not in", values, "vehicleType"); - return (Criteria) this; - } - - public Criteria andVehicleTypeBetween(String value1, String value2) { - addCriterion("vehicle_type between", value1, value2, "vehicleType"); - return (Criteria) this; - } - - public Criteria andVehicleTypeNotBetween(String value1, String value2) { - addCriterion("vehicle_type not between", value1, value2, "vehicleType"); - return (Criteria) this; - } - - public Criteria andForbiddenDetailTimeIsNull() { - addCriterion("forbidden_detail_time is null"); - return (Criteria) this; - } - - public Criteria andForbiddenDetailTimeIsNotNull() { - addCriterion("forbidden_detail_time is not null"); - return (Criteria) this; - } - - public Criteria andForbiddenDetailTimeEqualTo(String value) { - addCriterion("forbidden_detail_time =", value, "forbiddenDetailTime"); - return (Criteria) this; - } - - public Criteria andForbiddenDetailTimeNotEqualTo(String value) { - addCriterion("forbidden_detail_time <>", value, "forbiddenDetailTime"); - return (Criteria) this; - } - - public Criteria andForbiddenDetailTimeGreaterThan(String value) { - addCriterion("forbidden_detail_time >", value, "forbiddenDetailTime"); - return (Criteria) this; - } - - public Criteria andForbiddenDetailTimeGreaterThanOrEqualTo(String value) { - addCriterion("forbidden_detail_time >=", value, "forbiddenDetailTime"); - return (Criteria) this; - } - - public Criteria andForbiddenDetailTimeLessThan(String value) { - addCriterion("forbidden_detail_time <", value, "forbiddenDetailTime"); - return (Criteria) this; - } - - public Criteria andForbiddenDetailTimeLessThanOrEqualTo(String value) { - addCriterion("forbidden_detail_time <=", value, "forbiddenDetailTime"); - return (Criteria) this; - } - - public Criteria andForbiddenDetailTimeLike(String value) { - addCriterion("forbidden_detail_time like", value, "forbiddenDetailTime"); - return (Criteria) this; - } - - public Criteria andForbiddenDetailTimeNotLike(String value) { - addCriterion("forbidden_detail_time not like", value, "forbiddenDetailTime"); - return (Criteria) this; - } - - public Criteria andForbiddenDetailTimeIn(List values) { - addCriterion("forbidden_detail_time in", values, "forbiddenDetailTime"); - return (Criteria) this; - } - - public Criteria andForbiddenDetailTimeNotIn(List values) { - addCriterion("forbidden_detail_time not in", values, "forbiddenDetailTime"); - return (Criteria) this; - } - - public Criteria andForbiddenDetailTimeBetween(String value1, String value2) { - addCriterion("forbidden_detail_time between", value1, value2, "forbiddenDetailTime"); - return (Criteria) this; - } - - public Criteria andForbiddenDetailTimeNotBetween(String value1, String value2) { - addCriterion("forbidden_detail_time not between", value1, value2, "forbiddenDetailTime"); - return (Criteria) this; - } - - public Criteria andEffectStartTimeIsNull() { - addCriterion("effect_start_time is null"); - return (Criteria) this; - } - - public Criteria andEffectStartTimeIsNotNull() { - addCriterion("effect_start_time is not null"); - return (Criteria) this; - } - - public Criteria andEffectStartTimeEqualTo(Long value) { - addCriterion("effect_start_time =", value, "effectStartTime"); - return (Criteria) this; - } - - public Criteria andEffectStartTimeNotEqualTo(Long value) { - addCriterion("effect_start_time <>", value, "effectStartTime"); - return (Criteria) this; - } - - public Criteria andEffectStartTimeGreaterThan(Long value) { - addCriterion("effect_start_time >", value, "effectStartTime"); - return (Criteria) this; - } - - public Criteria andEffectStartTimeGreaterThanOrEqualTo(Long value) { - addCriterion("effect_start_time >=", value, "effectStartTime"); - return (Criteria) this; - } - - public Criteria andEffectStartTimeLessThan(Long value) { - addCriterion("effect_start_time <", value, "effectStartTime"); - return (Criteria) this; - } - - public Criteria andEffectStartTimeLessThanOrEqualTo(Long value) { - addCriterion("effect_start_time <=", value, "effectStartTime"); - return (Criteria) this; - } - - public Criteria andEffectStartTimeIn(List values) { - addCriterion("effect_start_time in", values, "effectStartTime"); - return (Criteria) this; - } - - public Criteria andEffectStartTimeNotIn(List values) { - addCriterion("effect_start_time not in", values, "effectStartTime"); - return (Criteria) this; - } - - public Criteria andEffectStartTimeBetween(Long value1, Long value2) { - addCriterion("effect_start_time between", value1, value2, "effectStartTime"); - return (Criteria) this; - } - - public Criteria andEffectStartTimeNotBetween(Long value1, Long value2) { - addCriterion("effect_start_time not between", value1, value2, "effectStartTime"); - return (Criteria) this; - } - - public Criteria andEffectEndTimeIsNull() { - addCriterion("effect_end_time is null"); - return (Criteria) this; - } - - public Criteria andEffectEndTimeIsNotNull() { - addCriterion("effect_end_time is not null"); - return (Criteria) this; - } - - public Criteria andEffectEndTimeEqualTo(Long value) { - addCriterion("effect_end_time =", value, "effectEndTime"); - return (Criteria) this; - } - - public Criteria andEffectEndTimeNotEqualTo(Long value) { - addCriterion("effect_end_time <>", value, "effectEndTime"); - return (Criteria) this; - } - - public Criteria andEffectEndTimeGreaterThan(Long value) { - addCriterion("effect_end_time >", value, "effectEndTime"); - return (Criteria) this; - } - - public Criteria andEffectEndTimeGreaterThanOrEqualTo(Long value) { - addCriterion("effect_end_time >=", value, "effectEndTime"); - return (Criteria) this; - } - - public Criteria andEffectEndTimeLessThan(Long value) { - addCriterion("effect_end_time <", value, "effectEndTime"); - return (Criteria) this; - } - - public Criteria andEffectEndTimeLessThanOrEqualTo(Long value) { - addCriterion("effect_end_time <=", value, "effectEndTime"); - return (Criteria) this; - } - - public Criteria andEffectEndTimeIn(List values) { - addCriterion("effect_end_time in", values, "effectEndTime"); - return (Criteria) this; - } - - public Criteria andEffectEndTimeNotIn(List values) { - addCriterion("effect_end_time not in", values, "effectEndTime"); - return (Criteria) this; - } - - public Criteria andEffectEndTimeBetween(Long value1, Long value2) { - addCriterion("effect_end_time between", value1, value2, "effectEndTime"); - return (Criteria) this; - } - - public Criteria andEffectEndTimeNotBetween(Long value1, Long value2) { - addCriterion("effect_end_time not between", value1, value2, "effectEndTime"); - return (Criteria) this; - } - - public Criteria andStatusIsNull() { - addCriterion("status is null"); - return (Criteria) this; - } - - public Criteria andStatusIsNotNull() { - addCriterion("status is not null"); - return (Criteria) this; - } - - public Criteria andStatusEqualTo(Integer value) { - addCriterion("status =", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotEqualTo(Integer value) { - addCriterion("status <>", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusGreaterThan(Integer value) { - addCriterion("status >", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusGreaterThanOrEqualTo(Integer value) { - addCriterion("status >=", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusLessThan(Integer value) { - addCriterion("status <", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusLessThanOrEqualTo(Integer value) { - addCriterion("status <=", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusIn(List values) { - addCriterion("status in", values, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotIn(List values) { - addCriterion("status not in", values, "status"); - return (Criteria) this; - } - - public Criteria andStatusBetween(Integer value1, Integer value2) { - addCriterion("status between", value1, value2, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotBetween(Integer value1, Integer value2) { - addCriterion("status not between", value1, value2, "status"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyVehicleModel.java b/src/main/java/com/objecteye/entity/SyVehicleModel.java index caa5158..de74031 100644 --- a/src/main/java/com/objecteye/entity/SyVehicleModel.java +++ b/src/main/java/com/objecteye/entity/SyVehicleModel.java @@ -1,12 +1,25 @@ package com.objecteye.entity; import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; +import org.springframework.data.mongodb.core.mapping.Document; import java.io.Serializable; +@AllArgsConstructor +@NoArgsConstructor +@ToString +@Data +@Document(collection = "syVehicleModel") public class SyVehicleModel implements Serializable { + + private static final long serialVersionUID = 4911994330676660575L; + @ApiModelProperty(value = "车辆id") - private Integer id; + private String id; @ApiModelProperty(value = "车辆名称首字母") private String initials; @@ -19,62 +32,4 @@ public class SyVehicleModel implements Serializable { @ApiModelProperty(value = "车辆年款") private String birthday; - - private static final long serialVersionUID = 1L; - - public Integer getId() { - return id; - } - - public void setId(Integer id) { - this.id = id; - } - - public String getInitials() { - return initials; - } - - public void setInitials(String initials) { - this.initials = initials; - } - - public String getBrand() { - return brand; - } - - public void setBrand(String brand) { - this.brand = brand; - } - - public String getSubbrand() { - return subbrand; - } - - public void setSubbrand(String subbrand) { - this.subbrand = subbrand; - } - - public String getBirthday() { - return birthday; - } - - public void setBirthday(String birthday) { - this.birthday = birthday; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(getClass().getSimpleName()); - sb.append(" ["); - sb.append("Hash = ").append(hashCode()); - sb.append(", id=").append(id); - sb.append(", initials=").append(initials); - sb.append(", brand=").append(brand); - sb.append(", subbrand=").append(subbrand); - sb.append(", birthday=").append(birthday); - sb.append(", serialVersionUID=").append(serialVersionUID); - sb.append("]"); - return sb.toString(); - } } \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyVehicleModelExample.java b/src/main/java/com/objecteye/entity/SyVehicleModelExample.java deleted file mode 100644 index 1b993db..0000000 --- a/src/main/java/com/objecteye/entity/SyVehicleModelExample.java +++ /dev/null @@ -1,540 +0,0 @@ -package com.objecteye.entity; - -import java.util.ArrayList; -import java.util.List; - -public class SyVehicleModelExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public SyVehicleModelExample() { - oredCriteria = new ArrayList(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Integer value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Integer value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Integer value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Integer value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Integer value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Integer value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Integer value1, Integer value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Integer value1, Integer value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andInitialsIsNull() { - addCriterion("initials is null"); - return (Criteria) this; - } - - public Criteria andInitialsIsNotNull() { - addCriterion("initials is not null"); - return (Criteria) this; - } - - public Criteria andInitialsEqualTo(String value) { - addCriterion("initials =", value, "initials"); - return (Criteria) this; - } - - public Criteria andInitialsNotEqualTo(String value) { - addCriterion("initials <>", value, "initials"); - return (Criteria) this; - } - - public Criteria andInitialsGreaterThan(String value) { - addCriterion("initials >", value, "initials"); - return (Criteria) this; - } - - public Criteria andInitialsGreaterThanOrEqualTo(String value) { - addCriterion("initials >=", value, "initials"); - return (Criteria) this; - } - - public Criteria andInitialsLessThan(String value) { - addCriterion("initials <", value, "initials"); - return (Criteria) this; - } - - public Criteria andInitialsLessThanOrEqualTo(String value) { - addCriterion("initials <=", value, "initials"); - return (Criteria) this; - } - - public Criteria andInitialsLike(String value) { - addCriterion("initials like", value, "initials"); - return (Criteria) this; - } - - public Criteria andInitialsNotLike(String value) { - addCriterion("initials not like", value, "initials"); - return (Criteria) this; - } - - public Criteria andInitialsIn(List values) { - addCriterion("initials in", values, "initials"); - return (Criteria) this; - } - - public Criteria andInitialsNotIn(List values) { - addCriterion("initials not in", values, "initials"); - return (Criteria) this; - } - - public Criteria andInitialsBetween(String value1, String value2) { - addCriterion("initials between", value1, value2, "initials"); - return (Criteria) this; - } - - public Criteria andInitialsNotBetween(String value1, String value2) { - addCriterion("initials not between", value1, value2, "initials"); - return (Criteria) this; - } - - public Criteria andBrandIsNull() { - addCriterion("brand is null"); - return (Criteria) this; - } - - public Criteria andBrandIsNotNull() { - addCriterion("brand is not null"); - return (Criteria) this; - } - - public Criteria andBrandEqualTo(String value) { - addCriterion("brand =", value, "brand"); - return (Criteria) this; - } - - public Criteria andBrandNotEqualTo(String value) { - addCriterion("brand <>", value, "brand"); - return (Criteria) this; - } - - public Criteria andBrandGreaterThan(String value) { - addCriterion("brand >", value, "brand"); - return (Criteria) this; - } - - public Criteria andBrandGreaterThanOrEqualTo(String value) { - addCriterion("brand >=", value, "brand"); - return (Criteria) this; - } - - public Criteria andBrandLessThan(String value) { - addCriterion("brand <", value, "brand"); - return (Criteria) this; - } - - public Criteria andBrandLessThanOrEqualTo(String value) { - addCriterion("brand <=", value, "brand"); - return (Criteria) this; - } - - public Criteria andBrandLike(String value) { - addCriterion("brand like", value, "brand"); - return (Criteria) this; - } - - public Criteria andBrandNotLike(String value) { - addCriterion("brand not like", value, "brand"); - return (Criteria) this; - } - - public Criteria andBrandIn(List values) { - addCriterion("brand in", values, "brand"); - return (Criteria) this; - } - - public Criteria andBrandNotIn(List values) { - addCriterion("brand not in", values, "brand"); - return (Criteria) this; - } - - public Criteria andBrandBetween(String value1, String value2) { - addCriterion("brand between", value1, value2, "brand"); - return (Criteria) this; - } - - public Criteria andBrandNotBetween(String value1, String value2) { - addCriterion("brand not between", value1, value2, "brand"); - return (Criteria) this; - } - - public Criteria andSubbrandIsNull() { - addCriterion("subbrand is null"); - return (Criteria) this; - } - - public Criteria andSubbrandIsNotNull() { - addCriterion("subbrand is not null"); - return (Criteria) this; - } - - public Criteria andSubbrandEqualTo(String value) { - addCriterion("subbrand =", value, "subbrand"); - return (Criteria) this; - } - - public Criteria andSubbrandNotEqualTo(String value) { - addCriterion("subbrand <>", value, "subbrand"); - return (Criteria) this; - } - - public Criteria andSubbrandGreaterThan(String value) { - addCriterion("subbrand >", value, "subbrand"); - return (Criteria) this; - } - - public Criteria andSubbrandGreaterThanOrEqualTo(String value) { - addCriterion("subbrand >=", value, "subbrand"); - return (Criteria) this; - } - - public Criteria andSubbrandLessThan(String value) { - addCriterion("subbrand <", value, "subbrand"); - return (Criteria) this; - } - - public Criteria andSubbrandLessThanOrEqualTo(String value) { - addCriterion("subbrand <=", value, "subbrand"); - return (Criteria) this; - } - - public Criteria andSubbrandLike(String value) { - addCriterion("subbrand like", value, "subbrand"); - return (Criteria) this; - } - - public Criteria andSubbrandNotLike(String value) { - addCriterion("subbrand not like", value, "subbrand"); - return (Criteria) this; - } - - public Criteria andSubbrandIn(List values) { - addCriterion("subbrand in", values, "subbrand"); - return (Criteria) this; - } - - public Criteria andSubbrandNotIn(List values) { - addCriterion("subbrand not in", values, "subbrand"); - return (Criteria) this; - } - - public Criteria andSubbrandBetween(String value1, String value2) { - addCriterion("subbrand between", value1, value2, "subbrand"); - return (Criteria) this; - } - - public Criteria andSubbrandNotBetween(String value1, String value2) { - addCriterion("subbrand not between", value1, value2, "subbrand"); - return (Criteria) this; - } - - public Criteria andBirthdayIsNull() { - addCriterion("birthday is null"); - return (Criteria) this; - } - - public Criteria andBirthdayIsNotNull() { - addCriterion("birthday is not null"); - return (Criteria) this; - } - - public Criteria andBirthdayEqualTo(String value) { - addCriterion("birthday =", value, "birthday"); - return (Criteria) this; - } - - public Criteria andBirthdayNotEqualTo(String value) { - addCriterion("birthday <>", value, "birthday"); - return (Criteria) this; - } - - public Criteria andBirthdayGreaterThan(String value) { - addCriterion("birthday >", value, "birthday"); - return (Criteria) this; - } - - public Criteria andBirthdayGreaterThanOrEqualTo(String value) { - addCriterion("birthday >=", value, "birthday"); - return (Criteria) this; - } - - public Criteria andBirthdayLessThan(String value) { - addCriterion("birthday <", value, "birthday"); - return (Criteria) this; - } - - public Criteria andBirthdayLessThanOrEqualTo(String value) { - addCriterion("birthday <=", value, "birthday"); - return (Criteria) this; - } - - public Criteria andBirthdayLike(String value) { - addCriterion("birthday like", value, "birthday"); - return (Criteria) this; - } - - public Criteria andBirthdayNotLike(String value) { - addCriterion("birthday not like", value, "birthday"); - return (Criteria) this; - } - - public Criteria andBirthdayIn(List values) { - addCriterion("birthday in", values, "birthday"); - return (Criteria) this; - } - - public Criteria andBirthdayNotIn(List values) { - addCriterion("birthday not in", values, "birthday"); - return (Criteria) this; - } - - public Criteria andBirthdayBetween(String value1, String value2) { - addCriterion("birthday between", value1, value2, "birthday"); - return (Criteria) this; - } - - public Criteria andBirthdayNotBetween(String value1, String value2) { - addCriterion("birthday not between", value1, value2, "birthday"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyVehicleNjbNumber.java b/src/main/java/com/objecteye/entity/SyVehicleNjbNumber.java new file mode 100644 index 0000000..bedec41 --- /dev/null +++ b/src/main/java/com/objecteye/entity/SyVehicleNjbNumber.java @@ -0,0 +1,23 @@ +package com.objecteye.entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; +import org.springframework.data.mongodb.core.mapping.Document; + +import java.io.Serializable; + +@NoArgsConstructor +@AllArgsConstructor +@ToString +@Data +@Document(collection = "syVehicleNjbNumber") +public class SyVehicleNjbNumber implements Serializable { + + private static final long serialVersionUID = 7438603080060582789L; + + private String id; + + private Integer njbNumber; +} \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SyVehicleType.java b/src/main/java/com/objecteye/entity/SyVehicleType.java new file mode 100644 index 0000000..3f195d8 --- /dev/null +++ b/src/main/java/com/objecteye/entity/SyVehicleType.java @@ -0,0 +1,25 @@ +package com.objecteye.entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; +import org.springframework.data.mongodb.core.mapping.Document; + +import java.io.Serializable; + +@AllArgsConstructor +@NoArgsConstructor +@Data +@ToString +@Document(collection = "syVehicleType") +public class SyVehicleType implements Serializable { + + private static final long serialVersionUID = 6739168909204548597L; + + private String id; + + private String name; + + private Integer value; +} \ No newline at end of file diff --git a/src/main/java/com/objecteye/entity/SystemStartTime.java b/src/main/java/com/objecteye/entity/SystemStartTime.java index e3e9b64..2d7b128 100644 --- a/src/main/java/com/objecteye/entity/SystemStartTime.java +++ b/src/main/java/com/objecteye/entity/SystemStartTime.java @@ -9,7 +9,11 @@ import java.io.Serializable; * @Message: */ public class SystemStartTime implements Serializable { + + private static final long serialVersionUID = -181895534098075166L; + private String id; + private long startTime; public SystemStartTime() { diff --git a/src/main/java/com/objecteye/entity/UploadVehicleDbResult.java b/src/main/java/com/objecteye/entity/UploadVehicleDbResult.java index bb655e7..09f2dba 100644 --- a/src/main/java/com/objecteye/entity/UploadVehicleDbResult.java +++ b/src/main/java/com/objecteye/entity/UploadVehicleDbResult.java @@ -17,13 +17,22 @@ import java.io.Serializable; @Data public class UploadVehicleDbResult implements Serializable { + private static final long serialVersionUID = -2209207811031517914L; + private String id; + private VehicleInfoParam vehicleInfoParam; + private String picName; + private int count; - private int vehicleId; + + private String vehicleId; + private String imageUrl; + private String plateNum; + private float plateScore; } diff --git a/src/main/java/com/objecteye/entity/VehicleAnalysisParam.java b/src/main/java/com/objecteye/entity/VehicleAnalysisParam.java index 5bf74f7..e190731 100644 --- a/src/main/java/com/objecteye/entity/VehicleAnalysisParam.java +++ b/src/main/java/com/objecteye/entity/VehicleAnalysisParam.java @@ -9,20 +9,68 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class VehicleAnalysisParam { - int vehicle_car_win_detect_config; //是否启动车车窗检测 - int vehicle_recg_config; //是否启动车型识别 - int vehicle_plate_det_recg_config; //是否启动车牌检测识别 - int vehicle_color_config; //是否启动车辆颜色识别 - int vehicle_pendant_det_config; //是否启动车辆属性识别 - int vehicle_illegal_config; //是否启动车违规行为检测 - int vehicle_feature_config; //是否启动车辆特征提取 - int vehicle_special_config; //是否启动特殊品类车型识别 - int mode; //运行模式(DEVICE_GPU / DEVICE_CPU) - int gpuid; //指定显卡id - DetectParam vehicle_car_win_det_param; //车头车窗检测参数 - int vhd_output_max_num; //车头检测输出的车头个数限制 - DetectParam vehicle_plate_det_param; //车牌检测参数 - DetectParam vehicle_attribute_det_param; //车属性检测参数 - String dbpath; //车型识别车型数据路路径 <当前仅支持英文路径> - int log; //日志 0:关闭 1:开启 + /** + * 是否启动车车窗检测 + */ + int vehicle_car_win_detect_config; + /** + * 是否启动车型识别 + */ + int vehicle_recg_config; + /** + * 是否启动车牌检测识别 + */ + int vehicle_plate_det_recg_config; + /** + * 是否启动车辆颜色识别 + */ + int vehicle_color_config; + /** + * 是否启动车辆属性识别 + */ + int vehicle_pendant_det_config; + /** + * 是否启动车违规行为检测 + */ + int vehicle_illegal_config; + /** + * 是否启动车辆特征提取 + */ + int vehicle_feature_config; + /** + * 是否启动特殊品类车型识别 + */ + int vehicle_special_config; + /** + * 运行模式(DEVICE_GPU / DEVICE_CPU) + */ + int mode; + /** + * 指定显卡id + */ + int gpuid; + /** + * 车头车窗检测参数 + */ + DetectParam vehicle_car_win_det_param; + /** + * 车头检测输出的车头个数限制_output_max_num + */ + int vhd; + /** + * 车牌检测参数icle_plate_det_param + */ + DetectParam veh; + /** + * 车属性检测参数ribute_det_param + */ + DetectParam vehicle_att; + /** + * 车型识别车型数据路路径 <当前仅支持英文路径> + */ + String dbpath; + /** + * 日志 0:关闭 1:开启 + */ + int log; } diff --git a/src/main/java/com/objecteye/entity/VehicleAnalysisResultParam.java b/src/main/java/com/objecteye/entity/VehicleAnalysisResultParam.java index 66b9467..c01a460 100644 --- a/src/main/java/com/objecteye/entity/VehicleAnalysisResultParam.java +++ b/src/main/java/com/objecteye/entity/VehicleAnalysisResultParam.java @@ -9,7 +9,15 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class VehicleAnalysisResultParam { - VehicleInfoParam[] info; //单车辆全部分析结果 - int count; //车辆数量 + + /** + * 单车辆全部分析结果 + */ + VehicleInfoParam[] info; + + /** + * 车辆数量 + */ + int count; } diff --git a/src/main/java/com/objecteye/entity/VehicleColorResultParam.java b/src/main/java/com/objecteye/entity/VehicleColorResultParam.java index 390ba56..b987eec 100644 --- a/src/main/java/com/objecteye/entity/VehicleColorResultParam.java +++ b/src/main/java/com/objecteye/entity/VehicleColorResultParam.java @@ -10,8 +10,11 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class VehicleColorResultParam { + private static final long serialVersionUID = -8045446387456070041L; + float score; + int index; } diff --git a/src/main/java/com/objecteye/entity/VehicleDetailMsg.java b/src/main/java/com/objecteye/entity/VehicleDetailMsg.java index 5a662ea..d340c9a 100644 --- a/src/main/java/com/objecteye/entity/VehicleDetailMsg.java +++ b/src/main/java/com/objecteye/entity/VehicleDetailMsg.java @@ -10,47 +10,165 @@ import lombok.NoArgsConstructor; public class VehicleDetailMsg { private String id; - private int deviceId; //设备号码 - private long captureTime; //抓拍时间 - private String picUrl; //网址 - private String driverId; //司机 - private String picId;//图片id - private int[] vehiclePlateArea; //车牌区域 - private float vehiclePlateScore; //车牌分数 - private int vehiclePlateType; //车牌类型 - private String vehiclePlateNum; //车牌号码 - private int vehicleColorIndex; //车颜色 - private float vehicleColorScore; //车颜色分数 - private int[] vehicleHeadstockArea; //车头区域 - private float vehicleHeadstockScore; //车头分数 - private int[] vehicleWindowArea; //车窗区域 - private float vehicleWindowScore; //车窗分数 - private int vehicleSpecialType; //特殊车类型 - private float vehicleSpecialScore; //特殊车分数 + /** + * 设备号码 + */ + private int deviceId; + /** + * 抓拍时间 + */ + private long captureTime; + /** + * 网址 + */ + private String picUrl; + /** + * 司机 + */ + private String driverId; + /** + * 图片id + */ + private String picId; + /** + * 车牌区域 + */ + private int[] vehiclePlateArea; + /** + * 车牌分数 + */ + private float vehiclePlateScore; + /** + * 车牌类型 + */ + private int vehiclePlateType; + /** + * 车牌号码 + */ + private String vehiclePlateNum; + /** + * 车颜色 + */ + private int vehicleColorIndex; + /** + * 车颜色分数 + */ + private float vehicleColorScore; + /** + * 车头区域 + */ + private int[] vehicleHeadstockArea; + /** + * 车头分数 + */ + private float vehicleHeadstockScore; + /** + * 车窗区域 + */ + private int[] vehicleWindowArea; + /** + * 车窗分数 + */ + private float vehicleWindowScore; + /** + * 特殊车类型 + */ + private int vehicleSpecialType; + /** + * 特殊车分数 + */ + private float vehicleSpecialScore; + //主驾驶 - private int vehicleIllegalSmokeStatus; //是否吸烟 - private float vehicleIllegalSmokeScore; //置信度 - private int vehicleIllegalBeltStatus; //是否系安全带 - private float vehicleIllegalBeltScore; //置信度 - private int vehicleIllegalPhoneStatus; //是否系打电话 - private float vehicleIllegalPhoneScore; //置信度 - private int vehicleIllegalPersonStatus; //是否有人 - private float vehicleIllegalPersonScore; //置信度 + /** + * 是否吸烟 + */ + private int vehicleIllegalSmokeStatus; + /** + * 置信度 + */ + private float vehicleIllegalSmokeScore; + /** + * 是否系安全带 + */ + private int vehicleIllegalBeltStatus; + /** + * 置信度 + */ + private float vehicleIllegalBeltScore; + /** + * 是否系打电话 + */ + private int vehicleIllegalPhoneStatus; + /** + * 置信度 + */ + private float vehicleIllegalPhoneScore; + /** + * 是否有人 + */ + private int vehicleIllegalPersonStatus; + /** + * 置信度 + */ + private float vehicleIllegalPersonScore; //副驾驶 - private int vehicleIllegalSmokeStatusCo; //是否吸烟 - private float vehicleIllegalSmokeScoreCo; //置信度 - private int vehicleIllegalBeltStatusCo; //是否系安全带 - private float vehicleIllegalBeltScoreCo; //置信度 - private int vehicleIllegalPhoneStatusCo; //是否系打电话 - private float vehicleIllegalPhoneScoreCo; //置信度 - private int vehicleIllegalPersonStatusCo; //是否有人 - private float vehicleIllegalPersonScoreCo; //置信度 + /** + * 是否吸烟 + */ + private int vehicleIllegalSmokeStatusCo; + /** + * 置信度 + */ + private float vehicleIllegalSmokeScoreCo; + /** + * 是否系安全带 + */ + private int vehicleIllegalBeltStatusCo; + /** + * 置信度 + */ + private float vehicleIllegalBeltScoreCo; + /** + * 是否系打电话 + */ + private int vehicleIllegalPhoneStatusCo; + /** + * 置信度 + */ + private float vehicleIllegalPhoneScoreCo; + /** + * 是否有人 + */ + private int vehicleIllegalPersonStatusCo; + /** + * 置信度 + */ + private float vehicleIllegalPersonScoreCo; - private String vehicleIssueYear; //车款年份 - private String vehicleBrand; //汽车品牌 - private String vehicleType; //汽车类型 - private String vehicleSubbrand; //车辆子品牌 - private String freightTon; //吨位 - private float nameScore; //检测分数 + /** + * 车款年份 + */ + private String vehicleIssueYear; + /** + * 汽车品牌 + */ + private String vehicleBrand; + /** + * 汽车类型 + */ + private String vehicleType; + /** + * 车辆子品牌 + */ + private String vehicleSubbrand; + /** + * 吨位 + */ + private String freightTon; + /** + * 检测分数 + */ + private float nameScore; } diff --git a/src/main/java/com/objecteye/entity/VehicleDetectResultParam.java b/src/main/java/com/objecteye/entity/VehicleDetectResultParam.java index 1baae6d..dd9dcaf 100644 --- a/src/main/java/com/objecteye/entity/VehicleDetectResultParam.java +++ b/src/main/java/com/objecteye/entity/VehicleDetectResultParam.java @@ -10,7 +10,10 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class VehicleDetectResultParam { + private static final long serialVersionUID = 6070622047126585440L; + SyRectParam syRectParam; + float score; } diff --git a/src/main/java/com/objecteye/entity/VehicleFeatureResultParam.java b/src/main/java/com/objecteye/entity/VehicleFeatureResultParam.java index 57705f6..359ccc2 100644 --- a/src/main/java/com/objecteye/entity/VehicleFeatureResultParam.java +++ b/src/main/java/com/objecteye/entity/VehicleFeatureResultParam.java @@ -10,6 +10,8 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class VehicleFeatureResultParam { + private static final long serialVersionUID = -733179196353398042L; + float[] feature; } diff --git a/src/main/java/com/objecteye/entity/VehicleIllegalDetectDetailsParam.java b/src/main/java/com/objecteye/entity/VehicleIllegalDetectDetailsParam.java index 1629b6d..fe65d54 100644 --- a/src/main/java/com/objecteye/entity/VehicleIllegalDetectDetailsParam.java +++ b/src/main/java/com/objecteye/entity/VehicleIllegalDetectDetailsParam.java @@ -10,6 +10,12 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class VehicleIllegalDetectDetailsParam { - int status; //是否违规 ILLEGAL:违规(抽烟 未系安全带 打电话) lEGAL:未违规(未抽烟 系安全带 未打电话) UNCERTAINTY:不确定 - float confidence; //置信度 + /** + * 是否违规 ILLEGAL:违规(抽烟 未系安全带 打电话) lEGAL:未违规(未抽烟 系安全带 未打电话) UNCERTAINTY:不确定 + */ + int status; + /** + * 置信度 + */ + float confidence; } diff --git a/src/main/java/com/objecteye/entity/VehicleIllegalDetectInfoParam.java b/src/main/java/com/objecteye/entity/VehicleIllegalDetectInfoParam.java index d552b9e..84cb359 100644 --- a/src/main/java/com/objecteye/entity/VehicleIllegalDetectInfoParam.java +++ b/src/main/java/com/objecteye/entity/VehicleIllegalDetectInfoParam.java @@ -9,8 +9,20 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class VehicleIllegalDetectInfoParam { - VehicleIllegalDetectDetailsParam belt; //是否系安全带 ILLEGAL:未系安全带 LEGAL:系安全带 - VehicleIllegalDetectDetailsParam smoke; //是否抽烟 ILLEGAL:抽烟 LEGAL:未抽烟 - VehicleIllegalDetectDetailsParam phone; //是否打电话 ILLEGAL:打电话 LEGAL:未打电话 - VehicleIllegalDetectDetailsParam person; //是否有人 NOBODY:无人 SOMEBODY:有人 + /** + * 是否系安全带 ILLEGAL:未系安全带 LEGAL:系安全带 + */ + VehicleIllegalDetectDetailsParam belt; + /** + * 是否抽烟 ILLEGAL:抽烟 LEGAL:未抽烟 + */ + VehicleIllegalDetectDetailsParam smoke; + /** + * 是否打电话 ILLEGAL:打电话 LEGAL:未打电话 + */ + VehicleIllegalDetectDetailsParam phone; + /** + * 是否有人 NOBODY:无人 SOMEBODY:有人 + */ + VehicleIllegalDetectDetailsParam person; } diff --git a/src/main/java/com/objecteye/entity/VehicleIllegalDetectResultParam.java b/src/main/java/com/objecteye/entity/VehicleIllegalDetectResultParam.java index b629d35..250ae43 100644 --- a/src/main/java/com/objecteye/entity/VehicleIllegalDetectResultParam.java +++ b/src/main/java/com/objecteye/entity/VehicleIllegalDetectResultParam.java @@ -10,8 +10,15 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class VehicleIllegalDetectResultParam { + private static final long serialVersionUID = 2540440122761249998L; - VehicleIllegalDetectInfoParam driver; //主驾驶 - VehicleIllegalDetectInfoParam copilot; //副驾驶 + /** + * 主驾驶 + */ + VehicleIllegalDetectInfoParam driver; + /** + * 副驾驶 + */ + VehicleIllegalDetectInfoParam copilot; } diff --git a/src/main/java/com/objecteye/entity/VehicleInfoParam.java b/src/main/java/com/objecteye/entity/VehicleInfoParam.java index 13ac373..24d80f3 100644 --- a/src/main/java/com/objecteye/entity/VehicleInfoParam.java +++ b/src/main/java/com/objecteye/entity/VehicleInfoParam.java @@ -10,13 +10,40 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class VehicleInfoParam { - VehicleDetectResultParam vehicle_detect_res; //车头检测结果 - VehicleDetectResultParam vehicle_win_detect_res; //车窗检测结果 - VehicleColorResultParam vehicle_color_res; //车颜色 - VehicleRecognizeResultParam vehicle_recg_res; //车型识别 - VehiclePlateResultParam vehicle_plate_det_recg_res; //车牌检测识别结果 - VehiclePendantDetectResultParam vehicle_pendant_det_res; //车属性 - VehicleIllegalDetectResultParam vehicle_illegal_det_res; //车违规 - VehicleFeatureResultParam vehicle_fea_res; //以车搜车 - VehicleSpecialResultParam vehicle_special_res; //特殊品类车型 + /** + * 车头检测结果 + */ + VehicleDetectResultParam vehicle_detect_res; + /** + * 车窗检测结果 + */ + VehicleDetectResultParam vehicle_win_detect_res; + /** + * 车颜色 + */ + VehicleColorResultParam vehicle_color_res; + /** + * 车型识别 + */ + VehicleRecognizeResultParam vehicle_recg_res; + /** + * 车牌检测识别结果 + */ + VehiclePlateResultParam vehicle_plate_det_recg_res; + /** + * 车属性 + */ + VehiclePendantDetectResultParam vehicle_pendant_det_res; + /** + * 车违规 + */ + VehicleIllegalDetectResultParam vehicle_illegal_det_res; + /** + * 以车搜车 + */ + VehicleFeatureResultParam vehicle_fea_res; + /** + * 特殊品类车型 + */ + VehicleSpecialResultParam vehicle_special_res; } diff --git a/src/main/java/com/objecteye/entity/VehiclePendantDetectInfoParam.java b/src/main/java/com/objecteye/entity/VehiclePendantDetectInfoParam.java index 5570842..b63c1f7 100644 --- a/src/main/java/com/objecteye/entity/VehiclePendantDetectInfoParam.java +++ b/src/main/java/com/objecteye/entity/VehiclePendantDetectInfoParam.java @@ -10,8 +10,14 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class VehiclePendantDetectInfoParam { - private static final long serialVersionUID = 2882736879748827058L; + SyRectParam syRectParam; - int index; //类型 - float confidence; //置信度 + /** + * 类型 + */ + int index; + /** + * 置信度 + */ + float confidence; } diff --git a/src/main/java/com/objecteye/entity/VehiclePendantDetectResultParam.java b/src/main/java/com/objecteye/entity/VehiclePendantDetectResultParam.java index 53b1769..8fe4661 100644 --- a/src/main/java/com/objecteye/entity/VehiclePendantDetectResultParam.java +++ b/src/main/java/com/objecteye/entity/VehiclePendantDetectResultParam.java @@ -10,7 +10,8 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class VehiclePendantDetectResultParam { - private static final long serialVersionUID = 8868263681803769170L; + VehiclePendantDetectInfoParam[] vehiclePendantDetectInfoParams; + int count; } diff --git a/src/main/java/com/objecteye/entity/VehiclePlateNumParam.java b/src/main/java/com/objecteye/entity/VehiclePlateNumParam.java index e658986..4d5ef0c 100644 --- a/src/main/java/com/objecteye/entity/VehiclePlateNumParam.java +++ b/src/main/java/com/objecteye/entity/VehiclePlateNumParam.java @@ -10,8 +10,9 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class VehiclePlateNumParam { - private static final long serialVersionUID = 4501502646994970300L; + String character; + float maxprob; } diff --git a/src/main/java/com/objecteye/entity/VehiclePlateResultParam.java b/src/main/java/com/objecteye/entity/VehiclePlateResultParam.java index 5bd488b..5221e98 100644 --- a/src/main/java/com/objecteye/entity/VehiclePlateResultParam.java +++ b/src/main/java/com/objecteye/entity/VehiclePlateResultParam.java @@ -10,12 +10,18 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class VehiclePlateResultParam { - private static final long serialVersionUID = -953025955461815154L; + SyRectParam rect; + float detectScore; + VehiclePlateNumParam[] plateNumParams; + float numScore; - int type; //车牌类型 + /** + * 车牌类型 + */ + int type; } diff --git a/src/main/java/com/objecteye/entity/VehicleRecognizeResultParam.java b/src/main/java/com/objecteye/entity/VehicleRecognizeResultParam.java index b556219..0618ba6 100644 --- a/src/main/java/com/objecteye/entity/VehicleRecognizeResultParam.java +++ b/src/main/java/com/objecteye/entity/VehicleRecognizeResultParam.java @@ -10,12 +10,29 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class VehicleRecognizeResultParam { - private static final long serialVersionUID = 8835423462345211175L; - String vehicle_brand; //车辆品牌 - String vehicle_subbrand; //车辆子品牌 - String vehicle_issue_year; //车辆年款 - String vehicle_type; //车辆类型 - String freight_ton; //货车吨级 - float name_score; //识别置信度 + /** + * 车辆品牌 + */ + String vehicle_brand; + /** + * 车辆子品牌 + */ + String vehicle_subbrand; + /** + * 车辆年款 + */ + String vehicle_issue_year; + /** + * 车辆类型 + */ + String vehicle_type; + /** + * 货车吨级 + */ + String freight_ton; + /** + * 识别置信度 + */ + float name_score; } diff --git a/src/main/java/com/objecteye/entity/VehicleSimpleResult.java b/src/main/java/com/objecteye/entity/VehicleSimpleResult.java index 45f88ac..7a5b00a 100644 --- a/src/main/java/com/objecteye/entity/VehicleSimpleResult.java +++ b/src/main/java/com/objecteye/entity/VehicleSimpleResult.java @@ -17,6 +17,7 @@ import java.io.Serializable; @Data @ToString public class VehicleSimpleResult implements Serializable { + private static final long serialVersionUID = -2033239669605011215L; /** diff --git a/src/main/java/com/objecteye/entity/VehicleSpecialResultParam.java b/src/main/java/com/objecteye/entity/VehicleSpecialResultParam.java index f9d6720..0056be2 100644 --- a/src/main/java/com/objecteye/entity/VehicleSpecialResultParam.java +++ b/src/main/java/com/objecteye/entity/VehicleSpecialResultParam.java @@ -9,7 +9,12 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class VehicleSpecialResultParam { - private static final long serialVersionUID = -5958691029454127790L; - float score; //识别置信度 - int type; //VECHICLE_HAZARDOUS_CHEMICALS 或者 TRUCK 或者 VECHICLE_SEDIMENT + /** + * 识别置信度 + */ + float score; + /** + * VECHICLE_HAZARDOUS_CHEMICALS 或者 TRUCK 或者 VECHICLE_SEDIMENT + */ + int type; } diff --git a/src/main/java/com/objecteye/entity/VehicleViolationsForbidenTaskQueryParams.java b/src/main/java/com/objecteye/entity/VehicleViolationsForbidenTaskQueryParams.java index 3a66359..bdb8532 100644 --- a/src/main/java/com/objecteye/entity/VehicleViolationsForbidenTaskQueryParams.java +++ b/src/main/java/com/objecteye/entity/VehicleViolationsForbidenTaskQueryParams.java @@ -15,6 +15,7 @@ import java.io.Serializable; @NoArgsConstructor @Data public class VehicleViolationsForbidenTaskQueryParams implements Serializable { + private static final long serialVersionUID = -1022725661174789715L; @ApiModelProperty("任务名称") diff --git a/src/main/java/com/objecteye/entity/ViolateAlarmMsg.java b/src/main/java/com/objecteye/entity/ViolateAlarmMsg.java index a598cd9..935fa6b 100644 --- a/src/main/java/com/objecteye/entity/ViolateAlarmMsg.java +++ b/src/main/java/com/objecteye/entity/ViolateAlarmMsg.java @@ -10,9 +10,24 @@ import java.io.Serializable; */ public class ViolateAlarmMsg implements Serializable { - private String alarmTime; //报警时间 - private String alarmPlace; //报警地点 - private String violateCarUrl; //违规车辆照片 - private String carPlate; //车牌 - private String violateType; //违规类型 + /** + * 报警时间 + */ + private String alarmTime; + /** + * 报警地点 + */ + private String alarmPlace; + /** + * 违规车辆照片 + */ + private String violateCarUrl; + /** + * 车牌 + */ + private String carPlate; + /** + * 违规类型 + */ + private String violateType; } diff --git a/src/main/java/com/objecteye/entity/VisualStatisticsMsg.java b/src/main/java/com/objecteye/entity/VisualStatisticsMsg.java index cd21b13..4f93ead 100644 --- a/src/main/java/com/objecteye/entity/VisualStatisticsMsg.java +++ b/src/main/java/com/objecteye/entity/VisualStatisticsMsg.java @@ -13,29 +13,55 @@ import java.util.Map; */ @AllArgsConstructor public class VisualStatisticsMsg { - private String vehicleCount; //处理过车总量 - private String monitorTotalDays; //监控总天数 - private int deviceCount; //卡口数 - private String deployCount; //布控总量 - private String alarmCount; //报警总数 - private String vehicleCountInMonth; //本月过车总数 - private String vehicleCountInWeek; //本周过车总数 - /*private List> violationTypeRanking;//违规类型排行 - private long muckCarCount; //本日渣土车数量 - private long dangerousChemicalsVehicleCount; //本日危化品车 - private long vehicleCountInDay; //本日过车总数 - private long violateCount; //本日违规总数 - private long alarmCountInDay; //本日报警总数 - private long plateAlarmCount;//车牌报警数 - private long vehicleAlarmCount; //车辆报警数 - private long personAlarmCount; //人员报警数*/ - - private Map areaEquipmentCount; //点位区域分布 - private List oneWeekVehicleCount; //七日过车总量 - private List oneWeekSpecialtyVehicleCount; //七日特殊品类车辆走势 - private List> vehicleCountByArea;//地图形式的车辆统计 - - private Map todayData; //今日相关数据 + /** + * 处理过车总量 + */ + private String vehicleCount; + /** + * 监控总天数 + */ + private String monitorTotalDays; + /** + * 卡口数 + */ + private int deviceCount; + /** + * 布控总量 + */ + private String deployCount; + /** + * 报警总数 + */ + private String alarmCount; + /** + * 本月过车总数 + */ + private String vehicleCountInMonth; + /** + * 本周过车总数 + */ + private String vehicleCountInWeek; + + /** + * 点位区域分布 + */ + private Map areaEquipmentCount; + /** + * 七日过车总量 + */ + private List oneWeekVehicleCount; + /** + * 七日特殊品类车辆走势 + */ + private List oneWeekSpecialtyVehicleCount; + /** + * 地图形式的车辆统计 + */ + private List> vehicleCountByArea; + /** + * 今日相关数据 + */ + private Map todayData; public VisualStatisticsMsg() { super(); @@ -96,69 +122,6 @@ public class VisualStatisticsMsg { public void setVehicleCountInWeek(String vehicleCountInWeek) { this.vehicleCountInWeek = vehicleCountInWeek; } - /*public long getMuckCarCount() { - return muckCarCount; - } - - public void setMuckCarCount(long muckCarCount) { - this.muckCarCount = muckCarCount; - } - - public long getDangerousChemicalsVehicleCount() { - return dangerousChemicalsVehicleCount; - } - - public void setDangerousChemicalsVehicleCount(long dangerousChemicalsVehicleCount) { - this.dangerousChemicalsVehicleCount = dangerousChemicalsVehicleCount; - } - - public long getVehicleCountInDay() { - return vehicleCountInDay; - } - - public void setVehicleCountInDay(long vehicleCountInDay) { - this.vehicleCountInDay = vehicleCountInDay; - } - - public long getViolateCount() { - return violateCount; - } - - public void setViolateCount(long violateCount) { - this.violateCount = violateCount; - } - - public long getAlarmCountInDay() { - return alarmCountInDay; - } - - public void setAlarmCountInDay(long alarmCountInDay) { - this.alarmCountInDay = alarmCountInDay; - } - - public long getPlateAlarmCount() { - return plateAlarmCount; - } - - public void setPlateAlarmCount(long plateAlarmCount) { - this.plateAlarmCount = plateAlarmCount; - } - - public long getVehicleAlarmCount() { - return vehicleAlarmCount; - } - - public void setVehicleAlarmCount(long vehicleAlarmCount) { - this.vehicleAlarmCount = vehicleAlarmCount; - } - - public long getPersonAlarmCount() { - return personAlarmCount; - } - - public void setPersonAlarmCount(long personAlarmCount) { - this.personAlarmCount = personAlarmCount; - }*/ public Map getAreaEquipmentCount() { return areaEquipmentCount; diff --git a/src/main/java/com/objecteye/entity/VpAnalysisParam.java b/src/main/java/com/objecteye/entity/VpAnalysisParam.java index 0c82a61..ecae1c4 100644 --- a/src/main/java/com/objecteye/entity/VpAnalysisParam.java +++ b/src/main/java/com/objecteye/entity/VpAnalysisParam.java @@ -11,6 +11,13 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class VpAnalysisParam { - VpInfoParam[] info; //单个人车车全部分析结果 - int count; //数量 + + /** + * 单个人车车全部分析结果 + */ + VpInfoParam[] info; + /** + * 数量 + */ + int count; } diff --git a/src/main/java/com/objecteye/entity/VpInfoParam.java b/src/main/java/com/objecteye/entity/VpInfoParam.java index cdc9f5c..94b5c94 100644 --- a/src/main/java/com/objecteye/entity/VpInfoParam.java +++ b/src/main/java/com/objecteye/entity/VpInfoParam.java @@ -10,6 +10,12 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @Data public class VpInfoParam { - private VehicleInfoParam vehicleInfoParam; //车型属性 - private FaceInfoParam faceInfoParam; // 人脸属性值 + /** + * 车型属性 + */ + private VehicleInfoParam vehicleInfoParam; + /** + * 人脸属性值 + */ + private FaceInfoParam faceInfoParam; } diff --git a/src/main/java/com/objecteye/entity/VvehicleFileDriverResult.java b/src/main/java/com/objecteye/entity/VvehicleFileDriverResult.java index dd260d6..9ed16dd 100644 --- a/src/main/java/com/objecteye/entity/VvehicleFileDriverResult.java +++ b/src/main/java/com/objecteye/entity/VvehicleFileDriverResult.java @@ -16,6 +16,7 @@ import java.io.Serializable; @NoArgsConstructor @Data public class VvehicleFileDriverResult implements Serializable { + private static final long serialVersionUID = 6982100273368794418L; @ApiModelProperty("id") diff --git a/src/main/java/com/objecteye/entity/VvehicleFilePlateNumberQueryResult.java b/src/main/java/com/objecteye/entity/VvehicleFilePlateNumberQueryResult.java index 3493d9d..68af690 100644 --- a/src/main/java/com/objecteye/entity/VvehicleFilePlateNumberQueryResult.java +++ b/src/main/java/com/objecteye/entity/VvehicleFilePlateNumberQueryResult.java @@ -14,6 +14,7 @@ import java.io.Serializable; @NoArgsConstructor @Data public class VvehicleFilePlateNumberQueryResult implements Serializable { + private static final long serialVersionUID = -4976703303856658754L; @ApiModelProperty("id") @@ -31,18 +32,12 @@ public class VvehicleFilePlateNumberQueryResult implements Serializable { @ApiModelProperty("车款") private String style; - /*@ApiModelProperty("车年份") - private String particularYear;*/ - @ApiModelProperty("车辆颜色") private String color; @ApiModelProperty("车辆类型") private String type; -/* @ApiModelProperty("车主信息") - private String masterMsg;*/ - @ApiModelProperty("经度") private String longitude; diff --git a/src/main/java/com/objecteye/entity/VvehicleFileQueryResult.java b/src/main/java/com/objecteye/entity/VvehicleFileQueryResult.java index 5b5b1cc..e79f0a9 100644 --- a/src/main/java/com/objecteye/entity/VvehicleFileQueryResult.java +++ b/src/main/java/com/objecteye/entity/VvehicleFileQueryResult.java @@ -14,6 +14,7 @@ import java.io.Serializable; @NoArgsConstructor @Data public class VvehicleFileQueryResult implements Serializable { + private static final long serialVersionUID = -3942635445087431499L; @ApiModelProperty("档案出现次数") diff --git a/src/main/java/com/objecteye/handle/Ftp2Mongo.java b/src/main/java/com/objecteye/handle/Ftp2Mongo.java deleted file mode 100644 index 4c0f8ed..0000000 --- a/src/main/java/com/objecteye/handle/Ftp2Mongo.java +++ /dev/null @@ -1,138 +0,0 @@ -package com.objecteye.handle; - -import com.alibaba.fastjson.JSON; -import com.objecteye.config.RabbitmqConfig; -import com.objecteye.entity.ResponseParam; -import com.objecteye.entity.SyEquipment; -import com.objecteye.entity.UploadVehicleResult; -import com.objecteye.entity.VpAnalysisParam; -import com.objecteye.service.EquipmentService; -import com.objecteye.utils.FtpUtil; -import com.objecteye.utils.GlobalUtil; -import com.objecteye.utils.TimeUtil; -import org.apache.commons.net.ftp.FTPClient; -import org.apache.commons.net.ftp.FTPFile; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.amqp.rabbit.core.RabbitTemplate; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.stereotype.Component; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.OutputStream; -import java.util.Map; - -@Component -public class Ftp2Mongo { - private Logger logger = LoggerFactory.getLogger(getClass()); - - @Autowired - private RedisTemplate redisTemplate; - @Autowired - private FtpUtil ftpUtil; - @Autowired - private RabbitTemplate rabbitTemplate; - @Autowired - private EquipmentService equipmentService; - - @Value("${picture.storePath}") - private String path2; - @Value("${picture.http}") - private String http; - @Value("${requestFile}") - private String url; - - - public void downloadFile() { - while (true) { - Map equipmentIpAndId = redisTemplate.opsForHash().entries("equipmentIpAndId"); - OutputStream os = null; - FTPClient ftp = ftpUtil.connect(); - if (ftp != null) { - String localpath = path2; - try { - Thread.sleep(500); - FTPFile[] ftpFiles = ftp.listDirectories(); - if (null == ftpFiles || ftpFiles.length == 0) { - Thread.sleep(1000); - } else { - for (FTPFile ftpFile : ftpFiles) { - String name = ftpFile.getName(); - if (equipmentIpAndId.containsKey(name)) { - FTPFile[] fs = ftp.listFiles(name); - for (FTPFile f : fs) { - String fileName = f.getName(); - File localFile = new File(localpath + "/" + fileName); - - if (localFile.exists()) { - ftp.deleteFile(name + "/" + fileName); - } - String picName = localpath + fileName; - os = new FileOutputStream(picName); - boolean b = ftp.retrieveFile(name + "/" + fileName, os); - int i = 0; - while (i <= 1000) { - if (b) { - long timeStamp = TimeUtil.getTimeStamp(fileName); - System.out.println(timeStamp); - String picFile = TimeUtil.getPicFile(fileName); - String picUrl = http + fileName; - Integer deviceId = equipmentIpAndId.get(picFile); - SyEquipment equipment = equipmentService.findOne(deviceId); - String latitude = equipment.getLatitude(); - String longitude = equipment.getLongitude(); - String equipmentName = equipment.getEquipmentName(); - - File file = new File(picName); - String body = GlobalUtil.httpExecute(url, file); - - ResponseParam responseParam = JSON.parseObject(body, ResponseParam.class); - String code = responseParam.getCode(); - if ("0".equals(code)) { - String s1 = JSON.toJSONString(responseParam.getResult()); - VpAnalysisParam vpAnalysisParam = JSON.parseObject(s1, VpAnalysisParam.class); - UploadVehicleResult uploadVehicleResult = new UploadVehicleResult(); - uploadVehicleResult.setCount(vpAnalysisParam.getCount()); - uploadVehicleResult.setInfo(vpAnalysisParam.getInfo()); - uploadVehicleResult.setPicName(fileName); - uploadVehicleResult.setDeviceId(deviceId); - uploadVehicleResult.setImageUrl(picUrl); - uploadVehicleResult.setEquipmentName(equipmentName); - uploadVehicleResult.setLatitude(latitude); - uploadVehicleResult.setLongitude(longitude); - - uploadVehicleResult.setCaptureTime(timeStamp); - String s = JSON.toJSONString(uploadVehicleResult); - rabbitTemplate.convertAndSend(RabbitmqConfig.EXCHANGE_TOPICS_INFORM, "inform.store", s); - } - ftp.deleteFile(name + "/" + fileName); - break; - } else { - Thread.sleep(100); - i += 100; - } - } - os.close(); - } - } - } - } - ftp.logout(); - } catch (Exception e) { - e.printStackTrace(); - } finally { - if (ftp.isConnected()) - try { - ftp.disconnect(); - } catch (IOException ioe) { - ioe.printStackTrace(); - } - } - } - } - } -} diff --git a/src/main/java/com/objecteye/handle/GlobalExceptionHandler.java b/src/main/java/com/objecteye/handle/GlobalExceptionHandler.java new file mode 100644 index 0000000..4807015 --- /dev/null +++ b/src/main/java/com/objecteye/handle/GlobalExceptionHandler.java @@ -0,0 +1,15 @@ +package com.objecteye.handle; + +import com.objecteye.common.CommonResult; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.RestControllerAdvice; + +import javax.servlet.http.HttpServletRequest; + +@RestControllerAdvice +public class GlobalExceptionHandler { + @ExceptionHandler(value = Exception.class) + public CommonResult globalExceptionHandler(HttpServletRequest httpServletRequest, Exception e) { + return CommonResult.success(504, e.getMessage(), ""); + } +} diff --git a/src/main/java/com/objecteye/handle/PictureHandle.java b/src/main/java/com/objecteye/handle/PictureHandle.java index 075db77..e7dad7e 100644 --- a/src/main/java/com/objecteye/handle/PictureHandle.java +++ b/src/main/java/com/objecteye/handle/PictureHandle.java @@ -2,10 +2,8 @@ package com.objecteye.handle; import com.alibaba.fastjson.JSON; import com.objecteye.entity.ResponseParam; -import com.objecteye.entity.SyEquipment; import com.objecteye.entity.UploadVehicleResult; import com.objecteye.entity.VpAnalysisParam; -import com.objecteye.service.EquipmentService; import com.objecteye.utils.GlobalUtil; import com.objecteye.utils.TimeUtil; import org.springframework.amqp.rabbit.core.RabbitTemplate; @@ -28,8 +26,6 @@ public class PictureHandle { private RedisTemplate redisTemplate; @Autowired private RabbitTemplate rabbitTemplate; - @Autowired - private EquipmentService equipmentService; @Value("${picture.storePath}") private String path2; @@ -46,11 +42,6 @@ public class PictureHandle { long timeStamp = TimeUtil.getTimeStamp(picPath); String picFile = TimeUtil.getPicFile(picPath); String picUrl = http + picPath; - Integer deviceId = equipmentIpAndId.get(picFile); - SyEquipment equipment = equipmentService.findOne(deviceId); - String latitude = equipment.getLatitude(); - String longitude = equipment.getLongitude(); - String equipmentName = equipment.getEquipmentName(); String path = path2 + picPath; File file = new File(path); @@ -65,15 +56,9 @@ public class PictureHandle { uploadVehicleResult.setCount(vpAnalysisParam.getCount()); uploadVehicleResult.setInfo(vpAnalysisParam.getInfo()); uploadVehicleResult.setPicName(path); - uploadVehicleResult.setDeviceId(deviceId); uploadVehicleResult.setImageUrl(picUrl); - uploadVehicleResult.setEquipmentName(equipmentName); - uploadVehicleResult.setLatitude(latitude); - uploadVehicleResult.setLongitude(longitude); uploadVehicleResult.setCaptureTime(timeStamp); String s = JSON.toJSONString(uploadVehicleResult); - System.out.println(s); - //rabbitTemplate.convertAndSend(RabbitmqConfig.EXCHANGE_TOPICS_INFORM, "inform.store.alarm", s); } } } diff --git a/src/main/java/com/objecteye/mapper/SyAreaEquipmentMapper.java b/src/main/java/com/objecteye/mapper/SyAreaEquipmentMapper.java deleted file mode 100644 index 2376633..0000000 --- a/src/main/java/com/objecteye/mapper/SyAreaEquipmentMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.objecteye.mapper; - -import com.objecteye.entity.SyAreaEquipment; -import com.objecteye.entity.SyAreaEquipmentExample; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -public interface SyAreaEquipmentMapper { - int countByExample(SyAreaEquipmentExample example); - - int deleteByExample(SyAreaEquipmentExample example); - - int deleteByPrimaryKey(Integer id); - - int insert(SyAreaEquipment record); - - int insertSelective(SyAreaEquipment record); - - List selectByExample(SyAreaEquipmentExample example); - - SyAreaEquipment selectByPrimaryKey(Integer id); - - int updateByExampleSelective(@Param("record") SyAreaEquipment record, @Param("example") SyAreaEquipmentExample example); - - int updateByExample(@Param("record") SyAreaEquipment record, @Param("example") SyAreaEquipmentExample example); - - int updateByPrimaryKeySelective(SyAreaEquipment record); - - int updateByPrimaryKey(SyAreaEquipment record); -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/mapper/SyDeployEquipmentMapper.java b/src/main/java/com/objecteye/mapper/SyDeployEquipmentMapper.java deleted file mode 100644 index 04c9d64..0000000 --- a/src/main/java/com/objecteye/mapper/SyDeployEquipmentMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.objecteye.mapper; - -import com.objecteye.entity.SyDeployEquipment; -import com.objecteye.entity.SyDeployEquipmentExample; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -public interface SyDeployEquipmentMapper { - int countByExample(SyDeployEquipmentExample example); - - int deleteByExample(SyDeployEquipmentExample example); - - int deleteByPrimaryKey(Integer id); - - int insert(SyDeployEquipment record); - - int insertSelective(SyDeployEquipment record); - - List selectByExample(SyDeployEquipmentExample example); - - SyDeployEquipment selectByPrimaryKey(Integer id); - - int updateByExampleSelective(@Param("record") SyDeployEquipment record, @Param("example") SyDeployEquipmentExample example); - - int updateByExample(@Param("record") SyDeployEquipment record, @Param("example") SyDeployEquipmentExample example); - - int updateByPrimaryKeySelective(SyDeployEquipment record); - - int updateByPrimaryKey(SyDeployEquipment record); -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/mapper/SyDeployFeatureMapper.java b/src/main/java/com/objecteye/mapper/SyDeployFeatureMapper.java deleted file mode 100644 index b475967..0000000 --- a/src/main/java/com/objecteye/mapper/SyDeployFeatureMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.objecteye.mapper; - -import com.objecteye.entity.SyDeployFeature; -import com.objecteye.entity.SyDeployFeatureExample; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -public interface SyDeployFeatureMapper { - int countByExample(SyDeployFeatureExample example); - - int deleteByExample(SyDeployFeatureExample example); - - int deleteByPrimaryKey(Integer id); - - int insert(SyDeployFeature record); - - int insertSelective(SyDeployFeature record); - - List selectByExample(SyDeployFeatureExample example); - - SyDeployFeature selectByPrimaryKey(Integer id); - - int updateByExampleSelective(@Param("record") SyDeployFeature record, @Param("example") SyDeployFeatureExample example); - - int updateByExample(@Param("record") SyDeployFeature record, @Param("example") SyDeployFeatureExample example); - - int updateByPrimaryKeySelective(SyDeployFeature record); - - int updateByPrimaryKey(SyDeployFeature record); -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/mapper/SyDeployMapper.java b/src/main/java/com/objecteye/mapper/SyDeployMapper.java deleted file mode 100644 index 54ffc71..0000000 --- a/src/main/java/com/objecteye/mapper/SyDeployMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.objecteye.mapper; - -import com.objecteye.entity.SyDeploy; -import com.objecteye.entity.SyDeployExample; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -public interface SyDeployMapper { - int countByExample(SyDeployExample example); - - int deleteByExample(SyDeployExample example); - - int deleteByPrimaryKey(Integer id); - - int insert(SyDeploy record); - - int insertSelective(SyDeploy record); - - List selectByExample(SyDeployExample example); - - SyDeploy selectByPrimaryKey(Integer id); - - int updateByExampleSelective(@Param("record") SyDeploy record, @Param("example") SyDeployExample example); - - int updateByExample(@Param("record") SyDeploy record, @Param("example") SyDeployExample example); - - int updateByPrimaryKeySelective(SyDeploy record); - - int updateByPrimaryKey(SyDeploy record); -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/mapper/SyEquipmentMapper.java b/src/main/java/com/objecteye/mapper/SyEquipmentMapper.java deleted file mode 100644 index 6c2bfd1..0000000 --- a/src/main/java/com/objecteye/mapper/SyEquipmentMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.objecteye.mapper; - -import com.objecteye.entity.SyEquipment; -import com.objecteye.entity.SyEquipmentExample; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -public interface SyEquipmentMapper { - int countByExample(SyEquipmentExample example); - - int deleteByExample(SyEquipmentExample example); - - int deleteByPrimaryKey(Integer id); - - int insert(SyEquipment record); - - int insertSelective(SyEquipment record); - - List selectByExample(SyEquipmentExample example); - - SyEquipment selectByPrimaryKey(Integer id); - - int updateByExampleSelective(@Param("record") SyEquipment record, @Param("example") SyEquipmentExample example); - - int updateByExample(@Param("record") SyEquipment record, @Param("example") SyEquipmentExample example); - - int updateByPrimaryKeySelective(SyEquipment record); - - int updateByPrimaryKey(SyEquipment record); -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/mapper/SyFeatureMapper.java b/src/main/java/com/objecteye/mapper/SyFeatureMapper.java deleted file mode 100644 index f95ee7a..0000000 --- a/src/main/java/com/objecteye/mapper/SyFeatureMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.objecteye.mapper; - -import com.objecteye.entity.SyFeature; -import com.objecteye.entity.SyFeatureExample; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -public interface SyFeatureMapper { - int countByExample(SyFeatureExample example); - - int deleteByExample(SyFeatureExample example); - - int deleteByPrimaryKey(Integer id); - - int insert(SyFeature record); - - int insertSelective(SyFeature record); - - List selectByExample(SyFeatureExample example); - - SyFeature selectByPrimaryKey(Integer id); - - int updateByExampleSelective(@Param("record") SyFeature record, @Param("example") SyFeatureExample example); - - int updateByExample(@Param("record") SyFeature record, @Param("example") SyFeatureExample example); - - int updateByPrimaryKeySelective(SyFeature record); - - int updateByPrimaryKey(SyFeature record); -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/mapper/SyPersonnelMapper.java b/src/main/java/com/objecteye/mapper/SyPersonnelMapper.java deleted file mode 100644 index 1a73b09..0000000 --- a/src/main/java/com/objecteye/mapper/SyPersonnelMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.objecteye.mapper; - -import com.objecteye.entity.SyPersonnel; -import com.objecteye.entity.SyPersonnelExample; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -public interface SyPersonnelMapper { - int countByExample(SyPersonnelExample example); - - int deleteByExample(SyPersonnelExample example); - - int deleteByPrimaryKey(Integer id); - - int insert(SyPersonnel record); - - int insertSelective(SyPersonnel record); - - List selectByExample(SyPersonnelExample example); - - SyPersonnel selectByPrimaryKey(Integer id); - - int updateByExampleSelective(@Param("record") SyPersonnel record, @Param("example") SyPersonnelExample example); - - int updateByExample(@Param("record") SyPersonnel record, @Param("example") SyPersonnelExample example); - - int updateByPrimaryKeySelective(SyPersonnel record); - - int updateByPrimaryKey(SyPersonnel record); -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/mapper/SyPrivilegeMapper.java b/src/main/java/com/objecteye/mapper/SyPrivilegeMapper.java deleted file mode 100644 index 7d00fc8..0000000 --- a/src/main/java/com/objecteye/mapper/SyPrivilegeMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.objecteye.mapper; - -import com.objecteye.entity.SyPrivilege; -import com.objecteye.entity.SyPrivilegeExample; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -public interface SyPrivilegeMapper { - int countByExample(SyPrivilegeExample example); - - int deleteByExample(SyPrivilegeExample example); - - int deleteByPrimaryKey(Integer id); - - int insert(SyPrivilege record); - - int insertSelective(SyPrivilege record); - - List selectByExample(SyPrivilegeExample example); - - SyPrivilege selectByPrimaryKey(Integer id); - - int updateByExampleSelective(@Param("record") SyPrivilege record, @Param("example") SyPrivilegeExample example); - - int updateByExample(@Param("record") SyPrivilege record, @Param("example") SyPrivilegeExample example); - - int updateByPrimaryKeySelective(SyPrivilege record); - - int updateByPrimaryKey(SyPrivilege record); -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/mapper/SyRoleMapper.java b/src/main/java/com/objecteye/mapper/SyRoleMapper.java deleted file mode 100644 index f7397ad..0000000 --- a/src/main/java/com/objecteye/mapper/SyRoleMapper.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.objecteye.mapper; - -import com.objecteye.entity.SyRole; -import com.objecteye.entity.SyRoleExample; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -public interface SyRoleMapper { - int countByExample(SyRoleExample example); - - int deleteByExample(SyRoleExample example); - - int deleteByPrimaryKey(Integer id); - - int insert(SyRole record); - - int insertSelective(SyRole record); - - List selectByExample(SyRoleExample example); - - SyRole selectByPrimaryKey(Integer id); - - int updateByExampleSelective(@Param("record") SyRole record, @Param("example") SyRoleExample example); - - int updateByExample(@Param("record") SyRole record, @Param("example") SyRoleExample example); - - int updateByPrimaryKeySelective(SyRole record); - - int updateByPrimaryKey(SyRole record); - - List selectRolePage(@Param("currentPage") int currentPage, @Param("pageVolum") int pageVolum); -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/mapper/SyRolePrivilegeMapper.java b/src/main/java/com/objecteye/mapper/SyRolePrivilegeMapper.java deleted file mode 100644 index ab4d460..0000000 --- a/src/main/java/com/objecteye/mapper/SyRolePrivilegeMapper.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.objecteye.mapper; - -import com.objecteye.entity.SyRolePrivilege; -import com.objecteye.entity.SyRolePrivilegeExample; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -public interface SyRolePrivilegeMapper { - int countByExample(SyRolePrivilegeExample example); - - int deleteByExample(SyRolePrivilegeExample example); - - int deleteByPrimaryKey(Integer id); - - int insert(SyRolePrivilege record); - - int insertSelective(SyRolePrivilege record); - - List selectByExample(SyRolePrivilegeExample example); - - List selectByRid(Integer rid); - - SyRolePrivilege selectByPrimaryKey(Integer id); - - int updateByExampleSelective(@Param("record") SyRolePrivilege record, @Param("example") SyRolePrivilegeExample example); - - int updateByExample(@Param("record") SyRolePrivilege record, @Param("example") SyRolePrivilegeExample example); - - int updateByPrimaryKeySelective(SyRolePrivilege record); - - int updateByPrimaryKey(SyRolePrivilege record); -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/mapper/SyUserMapper.java b/src/main/java/com/objecteye/mapper/SyUserMapper.java deleted file mode 100644 index 3e6dff8..0000000 --- a/src/main/java/com/objecteye/mapper/SyUserMapper.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.objecteye.mapper; - -import com.objecteye.entity.SyUser; -import com.objecteye.entity.SyUserExample; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -public interface SyUserMapper { - int countByExample(SyUserExample example); - - int deleteByExample(SyUserExample example); - - int deleteByPrimaryKey(Integer id); - - int insert(SyUser record); - - int insertSelective(SyUser record); - - List selectByExample(SyUserExample example); - - SyUser selectByPrimaryKey(Integer id); - - List selectUserPage(@Param("currentPage") int currentPage, @Param("pageVolum") int pageVolum); - - int updateByExampleSelective(@Param("record") SyUser record, @Param("example") SyUserExample example); - - int updateByExample(@Param("record") SyUser record, @Param("example") SyUserExample example); - - int updateByPrimaryKeySelective(SyUser record); - - int updateByPrimaryKey(SyUser record); - - /* 通过账户和密码进行搜索*/ - SyUser selectByUP(@Param("username") String username, @Param("password") String password); -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/mapper/SyVehicleDbMapper.java b/src/main/java/com/objecteye/mapper/SyVehicleDbMapper.java deleted file mode 100644 index 2a32868..0000000 --- a/src/main/java/com/objecteye/mapper/SyVehicleDbMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.objecteye.mapper; - -import com.objecteye.entity.SyVehicleDb; -import com.objecteye.entity.SyVehicleDbExample; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -public interface SyVehicleDbMapper { - int countByExample(SyVehicleDbExample example); - - int deleteByExample(SyVehicleDbExample example); - - int deleteByPrimaryKey(Integer id); - - int insert(SyVehicleDb record); - - int insertSelective(SyVehicleDb record); - - List selectByExample(SyVehicleDbExample example); - - SyVehicleDb selectByPrimaryKey(Integer id); - - int updateByExampleSelective(@Param("record") SyVehicleDb record, @Param("example") SyVehicleDbExample example); - - int updateByExample(@Param("record") SyVehicleDb record, @Param("example") SyVehicleDbExample example); - - int updateByPrimaryKeySelective(SyVehicleDb record); - - int updateByPrimaryKey(SyVehicleDb record); -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/mapper/SyVehicleForbidenTaskMapper.java b/src/main/java/com/objecteye/mapper/SyVehicleForbidenTaskMapper.java deleted file mode 100644 index e85274a..0000000 --- a/src/main/java/com/objecteye/mapper/SyVehicleForbidenTaskMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.objecteye.mapper; - -import com.objecteye.entity.SyVehicleForbidenTask; -import com.objecteye.entity.SyVehicleForbidenTaskExample; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -public interface SyVehicleForbidenTaskMapper { - int countByExample(SyVehicleForbidenTaskExample example); - - int deleteByExample(SyVehicleForbidenTaskExample example); - - int deleteByPrimaryKey(Integer id); - - int insert(SyVehicleForbidenTask record); - - int insertSelective(SyVehicleForbidenTask record); - - List selectByExample(SyVehicleForbidenTaskExample example); - - SyVehicleForbidenTask selectByPrimaryKey(Integer id); - - int updateByExampleSelective(@Param("record") SyVehicleForbidenTask record, @Param("example") SyVehicleForbidenTaskExample example); - - int updateByExample(@Param("record") SyVehicleForbidenTask record, @Param("example") SyVehicleForbidenTaskExample example); - - int updateByPrimaryKeySelective(SyVehicleForbidenTask record); - - int updateByPrimaryKey(SyVehicleForbidenTask record); -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/mapper/SyVehicleModelMapper.java b/src/main/java/com/objecteye/mapper/SyVehicleModelMapper.java deleted file mode 100644 index 16b6804..0000000 --- a/src/main/java/com/objecteye/mapper/SyVehicleModelMapper.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.objecteye.mapper; - -import com.objecteye.entity.SyVehicleModel; -import com.objecteye.entity.SyVehicleModelExample; -import com.objecteye.pojo.NameValue; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -public interface SyVehicleModelMapper { - int countByExample(SyVehicleModelExample example); - - int deleteByExample(SyVehicleModelExample example); - - int deleteByPrimaryKey(Integer id); - - int insert(SyVehicleModel record); - - int insertSelective(SyVehicleModel record); - - List selectByExample(SyVehicleModelExample example); - - SyVehicleModel selectByPrimaryKey(Integer id); - - int updateByExampleSelective(@Param("record") SyVehicleModel record, @Param("example") SyVehicleModelExample example); - - int updateByExample(@Param("record") SyVehicleModel record, @Param("example") SyVehicleModelExample example); - - int updateByPrimaryKeySelective(SyVehicleModel record); - - int updateByPrimaryKey(SyVehicleModel record); - - List selectDisplayForInitials(); - - List selectDisplayForBrand(@Param("initals") String initals); - - List selectDisplayForSubbrand(@Param("brand") String brand); - - List selectDisplayForBirthday(@Param("subbrand") String subbrand); - - List displayVehicleTypeList(); - - List displayVehicleColorList(); - - List displayVehiclePlateTypeList(); - - List displayVehicleNjbNumberList(); - -} \ No newline at end of file diff --git a/src/main/java/com/objecteye/pojo/FaceInfoParam.java b/src/main/java/com/objecteye/pojo/FaceInfoParam.java index 7ebb5e9..0b63284 100644 --- a/src/main/java/com/objecteye/pojo/FaceInfoParam.java +++ b/src/main/java/com/objecteye/pojo/FaceInfoParam.java @@ -5,6 +5,8 @@ import lombok.Data; import lombok.NoArgsConstructor; import lombok.ToString; +import java.io.Serializable; + /** * 人像特征类 */ @@ -12,20 +14,63 @@ import lombok.ToString; @NoArgsConstructor @AllArgsConstructor @ToString -public class FaceInfoParam { - private String id; //人像id - private String mattingData; //抠图的base64 - private FacePosition facePosition; //脸部位置 - private float facePosScore; //人脸框置信度 - private Integer quality; //质量评价 - private Integer clarity; //清晰度 0 - 100 - private Integer brightness; //亮度 0 - 255 - private float roll; //姿态角--float - private float yaw; //姿态角--float - private float pitch; //姿态角--float - private float score; //人脸置信度-float - private float[] fea; //人脸特征值 256位 - private String retrieveKey; //1vN检索key值 - private Integer label; //聚类下标 +public class FaceInfoParam implements Serializable { + private static final long serialVersionUID = -342929119292800828L; + /** + * 人像id + */ + private String id; + /** + * 抠图的base64 + */ + private String mattingData; + /** + * 脸部位置 + */ + private FacePosition facePosition; + /** + * 人脸框置信度 + */ + private float facePosScore; + /** + * 质量评价 + */ + private Integer quality; + /** + * 清晰度 0 - 100 + */ + private Integer clarity; + /** + * 亮度 0 - 255 + */ + private Integer brightness; + /** + * 姿态角--float + */ + private float roll; + /** + * 姿态角--float + */ + private float yaw; + /** + * 姿态角--float + */ + private float pitch; + /** + * 人脸置信度-float + */ + private float score; + /** + * 人脸特征值 256位 + */ + private float[] fea; + /** + * 1vN检索key值 + */ + private String retrieveKey; + /** + * 聚类下标 + */ + private Integer label; } diff --git a/src/main/java/com/objecteye/pojo/FacePosition.java b/src/main/java/com/objecteye/pojo/FacePosition.java index 018eef2..7ef0a0b 100644 --- a/src/main/java/com/objecteye/pojo/FacePosition.java +++ b/src/main/java/com/objecteye/pojo/FacePosition.java @@ -5,6 +5,8 @@ import lombok.Data; import lombok.NoArgsConstructor; import lombok.ToString; +import java.io.Serializable; + /** * 创建人脸位置类 */ @@ -12,9 +14,14 @@ import lombok.ToString; @NoArgsConstructor @AllArgsConstructor @ToString -public class FacePosition { +public class FacePosition implements Serializable { + private static final long serialVersionUID = -7198021817147613645L; + private Integer left; + private Integer top; + private Integer width; + private Integer heigth; } diff --git a/src/main/java/com/objecteye/pojo/NameValue.java b/src/main/java/com/objecteye/pojo/NameValue.java index 2e8f331..e33c310 100644 --- a/src/main/java/com/objecteye/pojo/NameValue.java +++ b/src/main/java/com/objecteye/pojo/NameValue.java @@ -12,6 +12,10 @@ import java.io.Serializable; @Data @ToString public class NameValue implements Serializable { + + private static final long serialVersionUID = -5150506626574398254L; + private String name; + private Integer value; } diff --git a/src/main/java/com/objecteye/pojo/PendantParams.java b/src/main/java/com/objecteye/pojo/PendantParams.java index 5c90901..c609d41 100644 --- a/src/main/java/com/objecteye/pojo/PendantParams.java +++ b/src/main/java/com/objecteye/pojo/PendantParams.java @@ -2,7 +2,9 @@ package com.objecteye.pojo; import java.util.Arrays; -//车辆装饰拼 +/** + * 车辆装饰拼 + */ public class PendantParams { private int index; private int[] syrectparam; diff --git a/src/main/java/com/objecteye/pojo/PicVehicleCompare.java b/src/main/java/com/objecteye/pojo/PicVehicleCompare.java index 92a0b8a..7a9f432 100644 --- a/src/main/java/com/objecteye/pojo/PicVehicleCompare.java +++ b/src/main/java/com/objecteye/pojo/PicVehicleCompare.java @@ -13,6 +13,9 @@ import java.io.Serializable; @NoArgsConstructor public class PicVehicleCompare implements Serializable { + private static final long serialVersionUID = 5902811482869851981L; + private RabbitMQVehicle rabbitMQVehicle; + private double similar; } diff --git a/src/main/java/com/objecteye/pojo/PicVehicleDataResult.java b/src/main/java/com/objecteye/pojo/PicVehicleDataResult.java index 6993dbc..6373f4d 100644 --- a/src/main/java/com/objecteye/pojo/PicVehicleDataResult.java +++ b/src/main/java/com/objecteye/pojo/PicVehicleDataResult.java @@ -13,6 +13,10 @@ import java.util.List; @AllArgsConstructor @NoArgsConstructor public class PicVehicleDataResult implements Serializable { + + private static final long serialVersionUID = -2401364380050462883L; + private Integer total; + private List row; } diff --git a/src/main/java/com/objecteye/pojo/PicVehicleRow.java b/src/main/java/com/objecteye/pojo/PicVehicleRow.java index 19e44a0..9fd969e 100644 --- a/src/main/java/com/objecteye/pojo/PicVehicleRow.java +++ b/src/main/java/com/objecteye/pojo/PicVehicleRow.java @@ -13,12 +13,21 @@ import java.io.Serializable; @ToString public class PicVehicleRow implements Serializable { + private static final long serialVersionUID = -4119208235411916854L; + private String id; + private int recordid; + private String hphm; + private String picurl; + private String snapshoturl; + private String similar; + private String site; + private String phototime; } diff --git a/src/main/java/com/objecteye/pojo/PlatePlateNumParams.java b/src/main/java/com/objecteye/pojo/PlatePlateNumParams.java index 2223621..398ed9f 100644 --- a/src/main/java/com/objecteye/pojo/PlatePlateNumParams.java +++ b/src/main/java/com/objecteye/pojo/PlatePlateNumParams.java @@ -4,6 +4,7 @@ package com.objecteye.pojo; public class PlatePlateNumParams { private double maxprob; + private String character; public PlatePlateNumParams() { diff --git a/src/main/java/com/objecteye/pojo/RabbitMQInfo.java b/src/main/java/com/objecteye/pojo/RabbitMQInfo.java index 58b78c8..fcc3db5 100644 --- a/src/main/java/com/objecteye/pojo/RabbitMQInfo.java +++ b/src/main/java/com/objecteye/pojo/RabbitMQInfo.java @@ -10,48 +10,144 @@ import lombok.ToString; @NoArgsConstructor @ToString public class RabbitMQInfo { - private String id; //车辆id - private String equipmentName; //设备名称 - private String longitude; //经度 - private String latitude; //纬度 - private String picurl; //图片的路径 - private Integer recordid; //车辆档案id - private String pictime; //抓拍时间 - private String flag; //是否报警 - private String tag; //是否确认 - private String personid; //人像id - private String vehicleplatetype; //车牌类型 - private Float vehicle_plate_numScore; //号牌可信度 - private String vehicle_color_index; //车辆颜色; - private String vehicle_special_type; //特殊品类车类型 - private String vehicle_illegal_driver_smoke_status; //主驾驶吸烟 - private String vehicle_illegal_driver_belt_status; //主驾驶安全带 - private String vehicle_illegal_driver_phone_status; //主驾驶打电话 - private String vehicle_illegal_driver_person_status; //主驾驶是否有人 - private String vehicle_illegal_copilot_smoke_status; //副驾驶吸烟 - private String vehicle_illegal_copilot_belt_status; //副驾驶安全带 - private String vehicle_illegal_copilot_phone_status; //副驾驶打电话 - private String vehicle_illegal_copilot_person_status; //副驾驶有人 - private String vehicle_recg_type; //车辆类型 - private String vehicle_recg_freight_ton; //吨数 - private Float vehicle_recg_name_score; //品牌可信度 - private String vehicle_plate_hphm; //车辆号牌 - private Integer vehicle_pendant_detect_njbnumber; //年检标数量 - private String vehicle_pendant_detect_gjexis; //是否存在挂件 0表示不存在 1表示存在 - //1.主驾驶遮阳板 + /** + * 车辆id + */ + private String id; + /** + * 设备名称 + */ + private String equipmentName; + /** + * 经度 + */ + private String longitude; + /** + * 纬度 + */ + private String latitude; + /** + * 图片的路径 + */ + private String picurl; + /** + * 车辆档案id + */ + private Integer recordid; + /** + * 抓拍时间 + */ + private String pictime; + /** + * 是否报警 + */ + private String flag; + /** + * 是否确认 + */ + private String tag; + /** + * 人像id + */ + private String personid; + /** + * 车牌类型 + */ + private String vehicleplatetype; + /** + * 号牌可信度 + */ + private Float vehicle_plate_numScore; + /** + * 车辆颜色; + */ + private String vehicle_color_index; + /** + * 特殊品类车类型 + */ + private String vehicle_special_type; + /** + * 主驾驶吸烟 + */ + private String vehicle_illegal_driver_smoke_status; + /** + * 主驾驶安全带 + */ + private String vehicle_illegal_driver_belt_status; + /** + * 主驾驶打电话 + */ + private String vehicle_illegal_driver_phone_status; + /** + * 主驾驶是否有人 + */ + private String vehicle_illegal_driver_person_status; + /** + * 副驾驶吸烟 + */ + private String vehicle_illegal_copilot_smoke_status; + /** + * 副驾驶安全带 + */ + private String vehicle_illegal_copilot_belt_status; + /** + * 副驾驶打电话 + */ + private String vehicle_illegal_copilot_phone_status; + /** + * 副驾驶有人 + */ + private String vehicle_illegal_copilot_person_status; + /** + * 车辆类型 + */ + private String vehicle_recg_type; + /** + * 吨数 + */ + private String vehicle_recg_freight_ton; + /** + * 品牌可信度 + */ + private Float vehicle_recg_name_score; + /** + * 车辆号牌 + */ + private String vehicle_plate_hphm; + /** + * 年检标数量 + */ + private Integer vehicle_pendant_detect_njbnumber; + /** + * 是否存在挂件 0表示不存在 1表示存在 + */ + private String vehicle_pendant_detect_gjexis; + /** + * 1.主驾驶遮阳板 + */ private String vehicle_pendant_driver_zyb; - //2.副驾遮阳板 + /** + * 2.副驾遮阳板 + */ private String vehicle_pendant_copilot_zyb; - //3.是否有纸巾盒 + /** + * 3.是否有纸巾盒 + */ private String vehicle_pendant_detect_zjh; - //4.是否有转经筒 + /** + * 4.是否有转经筒 + */ private String vehicle_pendant_detect_zjt; - //车牌状态 + /** + * 车牌状态 + */ private String vehicle_plate_status; - //车辆型号 + /** + * 车辆型号 + */ private String clxh; - //增加该车辆的抓拍图(为避免IO,此处使用base64) + /** + * 增加该车辆的抓拍图(为避免IO,此处使用base64) + */ private String snapshot; - - } diff --git a/src/main/java/com/objecteye/pojo/RabbitMQVehicle.java b/src/main/java/com/objecteye/pojo/RabbitMQVehicle.java index eff6dfb..0b4e0fc 100644 --- a/src/main/java/com/objecteye/pojo/RabbitMQVehicle.java +++ b/src/main/java/com/objecteye/pojo/RabbitMQVehicle.java @@ -12,22 +12,58 @@ import org.springframework.data.mongodb.core.mapping.Document; @NoArgsConstructor public class RabbitMQVehicle { + /** + * 车辆id + */ @Id - private String id; //车辆id - private int count;//在档案中的位置 - private int deviceid; //设备id + private String id; + /** + * 在档案中的位置 + */ + private int count; + /** + * 设备id + */ + private int deviceid; private String equipmentName; private String longitude; private String latitude; - private String picurl; //图片的路径 - private int recordid; //车辆档案id - private Long pictime; //抓拍时间 - private int flag; //是否报警 - private int tag; //是否确认 - private String personid; //人像id - private int[] vehicleplaterect; //车牌位置 - private double vehicleplatedetectscore; //车牌检测分数 - private int vehicleplatetype; //车牌类型 + /** + * 图片的路径 + */ + private String picurl; + /** + * 车辆档案id + */ + private int recordid; + /** + * 抓拍时间 + */ + private Long pictime; + /** + * 是否报警 + */ + private int flag; + /** + * 是否确认 + */ + private int tag; + /** + * 人像id + */ + private String personid; + /** + * 车牌位置 + */ + private int[] vehicleplaterect; + /** + * 车牌检测分数 + */ + private double vehicleplatedetectscore; + /** + * 车牌类型 + */ + private int vehicleplatetype; private double vehicle_plate_numScore; private double vehicle_color_score; private int vehicle_color_index; @@ -57,19 +93,33 @@ public class RabbitMQVehicle { private String vehicle_recg_brand; private String vehicle_recg_type; private String vehicle_recg_subbrand; - private String vehicle_recg_freight_ton; //吨数 + /** + * 吨数 + */ + private String vehicle_recg_freight_ton; private double vehicle_recg_name_score; private int vehicle_pendant_count; private double[] vehicle_fea_feature; private PendantParams[] vehicle_pendant_Params; private PlatePlateNumParams[] vehicle_plate_plateNumParams; private String vehicle_plate_hphm; - private Integer vehicle_pendant_detect_njbnumber; //年检标数量 - private Integer vehicle_pendant_detect_gjexis; //是否存在挂件 0表示不存在 1表示存在 - private Integer vehicle_pendant_detect_zybexis; //是否存在遮阳板 0表示不存在 1表示存在 + /** + * 年检标数量 + */ + private Integer vehicle_pendant_detect_njbnumber; + /** + * 是否存在挂件 0表示不存在 1表示存在 + */ + private Integer vehicle_pendant_detect_gjexis; + /** + * 是否存在遮阳板 0表示不存在 1表示存在 + */ + private Integer vehicle_pendant_detect_zybexis; private String personUrl; - //额外添加的snapshotUrl - private String snapshoturl; //快照图的路径 + /** + * 额外添加的snapshotUrl 快照图的路径 + */ + private String snapshoturl; public RabbitMQVehicle(int count, int deviceid, String equipmentName, String longitude, String latitude, String picurl, int recordid, Long pictime, int flag, int tag, String personid, int[] vehicleplaterect, double vehicleplatedetectscore, int vehicleplatetype, diff --git a/src/main/java/com/objecteye/pojo/RabbitMqVehicleViolation.java b/src/main/java/com/objecteye/pojo/RabbitMqVehicleViolation.java index 2599514..babc408 100644 --- a/src/main/java/com/objecteye/pojo/RabbitMqVehicleViolation.java +++ b/src/main/java/com/objecteye/pojo/RabbitMqVehicleViolation.java @@ -5,6 +5,7 @@ import lombok.Data; import lombok.NoArgsConstructor; import lombok.ToString; import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; import java.io.Serializable; @@ -17,6 +18,7 @@ import java.io.Serializable; @NoArgsConstructor @Data @ToString +@Document(collection = "rabbitMqVehicleViolation") public class RabbitMqVehicleViolation implements Serializable { private static final long serialVersionUID = 4861186612800576967L; diff --git a/src/main/java/com/objecteye/pojo/ResponseParamPerson.java b/src/main/java/com/objecteye/pojo/ResponseParamPerson.java index c05df70..a784cda 100644 --- a/src/main/java/com/objecteye/pojo/ResponseParamPerson.java +++ b/src/main/java/com/objecteye/pojo/ResponseParamPerson.java @@ -12,8 +12,18 @@ import java.util.List; @NoArgsConstructor @Data public class ResponseParamPerson { - private String code; //状态码 - private String msg; //提示消息 + /** + * 状态码 + */ + private String code; + /** + * 提示消息 + */ + private String msg; + private String count; - private List result; // 泛型类结果 + /** + * 泛型类结果 + */ + private List result; } diff --git a/src/main/java/com/objecteye/pojo/ResultMsg.java b/src/main/java/com/objecteye/pojo/ResultMsg.java index cdf03af..b293a33 100644 --- a/src/main/java/com/objecteye/pojo/ResultMsg.java +++ b/src/main/java/com/objecteye/pojo/ResultMsg.java @@ -6,5 +6,6 @@ import lombok.Data; public class ResultMsg { private String vehicle_color; + private String vehicle_brand; } diff --git a/src/main/java/com/objecteye/pojo/SearchDataFromRetrieveDb.java b/src/main/java/com/objecteye/pojo/SearchDataFromRetrieveDb.java index 10df3bd..eb99643 100644 --- a/src/main/java/com/objecteye/pojo/SearchDataFromRetrieveDb.java +++ b/src/main/java/com/objecteye/pojo/SearchDataFromRetrieveDb.java @@ -15,7 +15,12 @@ import java.util.List; @Data @ToString public class SearchDataFromRetrieveDb implements Serializable { + + private static final long serialVersionUID = -4736228070655593083L; + private String code; + private String msg; + private List result; } diff --git a/src/main/java/com/objecteye/pojo/SearchDataFromRetrieveDbResult.java b/src/main/java/com/objecteye/pojo/SearchDataFromRetrieveDbResult.java index 5408405..d203fff 100644 --- a/src/main/java/com/objecteye/pojo/SearchDataFromRetrieveDbResult.java +++ b/src/main/java/com/objecteye/pojo/SearchDataFromRetrieveDbResult.java @@ -12,6 +12,10 @@ import java.io.Serializable; @Data @ToString public class SearchDataFromRetrieveDbResult implements Serializable { + + private static final long serialVersionUID = -1735892887115310880L; + private String retrieveKey; + private double score; } diff --git a/src/main/java/com/objecteye/pojo/SearchPeopleOfHphmInfo.java b/src/main/java/com/objecteye/pojo/SearchPeopleOfHphmInfo.java index aafbe2e..84af7db 100644 --- a/src/main/java/com/objecteye/pojo/SearchPeopleOfHphmInfo.java +++ b/src/main/java/com/objecteye/pojo/SearchPeopleOfHphmInfo.java @@ -10,9 +10,14 @@ import lombok.ToString; @ToString @Data public class SearchPeopleOfHphmInfo { + private String id; + private String picTime; + private String equipmentName; + private String hphm; + private String personUrl; } diff --git a/src/main/java/com/objecteye/pojo/SearchPeopleOfHphmRequest.java b/src/main/java/com/objecteye/pojo/SearchPeopleOfHphmRequest.java index e423449..1be4004 100644 --- a/src/main/java/com/objecteye/pojo/SearchPeopleOfHphmRequest.java +++ b/src/main/java/com/objecteye/pojo/SearchPeopleOfHphmRequest.java @@ -13,11 +13,18 @@ import java.io.Serializable; @Data public class SearchPeopleOfHphmRequest implements Serializable { + private static final long serialVersionUID = 4119326929221046803L; + private Integer currentpage; + private Integer pagevolume; + private Long starttime; + private Long endtime; + private int[] customspass; + private String hphm; } diff --git a/src/main/java/com/objecteye/pojo/SearchPeopleOfhphmResult.java b/src/main/java/com/objecteye/pojo/SearchPeopleOfhphmResult.java index cbda3d7..a4016ff 100644 --- a/src/main/java/com/objecteye/pojo/SearchPeopleOfhphmResult.java +++ b/src/main/java/com/objecteye/pojo/SearchPeopleOfhphmResult.java @@ -12,7 +12,9 @@ import java.util.List; @ToString @Data public class SearchPeopleOfhphmResult { + private Integer total; + private List row; } diff --git a/src/main/java/com/objecteye/pojo/SearchVehicleFromPeopleInfo.java b/src/main/java/com/objecteye/pojo/SearchVehicleFromPeopleInfo.java index 1fc9596..830d3e7 100644 --- a/src/main/java/com/objecteye/pojo/SearchVehicleFromPeopleInfo.java +++ b/src/main/java/com/objecteye/pojo/SearchVehicleFromPeopleInfo.java @@ -10,11 +10,18 @@ import lombok.ToString; @Data @ToString public class SearchVehicleFromPeopleInfo { + private String id; + private String picTime; + private String equipmentName; + private String hphm; + private double driverSimilar; + private String picUrl; + private String snapshotUrl; } diff --git a/src/main/java/com/objecteye/pojo/SearchVehicleFromPeopleResult.java b/src/main/java/com/objecteye/pojo/SearchVehicleFromPeopleResult.java index 0afc6d2..7939366 100644 --- a/src/main/java/com/objecteye/pojo/SearchVehicleFromPeopleResult.java +++ b/src/main/java/com/objecteye/pojo/SearchVehicleFromPeopleResult.java @@ -12,6 +12,8 @@ import java.util.List; @Data @ToString public class SearchVehicleFromPeopleResult { + private int total; + private List row; } diff --git a/src/main/java/com/objecteye/pojo/VehicleCurrencyReques.java b/src/main/java/com/objecteye/pojo/VehicleCurrencyReques.java index 7a0838b..8908bca 100644 --- a/src/main/java/com/objecteye/pojo/VehicleCurrencyReques.java +++ b/src/main/java/com/objecteye/pojo/VehicleCurrencyReques.java @@ -14,19 +14,45 @@ import java.io.Serializable; @NoArgsConstructor @ToString public class VehicleCurrencyReques implements Serializable { + private String hphm; + private String cllx; + private Integer csys; - private String brand; //车辆品牌 - private String subbrand; //车辆子品牌 - private String birthday; //车辆生产日期 + /** + * 车辆品牌 + */ + private String brand; + /** + * 车辆子品牌 + */ + private String subbrand; + /** + * 车辆生产日期 + */ + private String birthday; + private Integer hplx; + private Integer njbgs; - private int[] condition; //复选框条件 - private int currentpage; //当前页 - private int pagevolume; //每页的数量 + /** + * 复选框条件 + */ + private int[] condition; + /** + * 当前页 + */ + private int currentpage; + /** + * 每页的数量 + */ + private int pagevolume; + private Long startTime; + private Long endTime; + private int[] customspass; diff --git a/src/main/java/com/objecteye/pojo/VehicleCurrencyResult.java b/src/main/java/com/objecteye/pojo/VehicleCurrencyResult.java index 859e78a..3e40085 100644 --- a/src/main/java/com/objecteye/pojo/VehicleCurrencyResult.java +++ b/src/main/java/com/objecteye/pojo/VehicleCurrencyResult.java @@ -17,22 +17,32 @@ import java.io.Serializable; @Document(collection = "rabbitMQVehicle") public class VehicleCurrencyResult implements Serializable { + private static final long serialVersionUID = 8322691867568823645L; + @Id private String id; + @Field("vehicle_plate_hphm") private String hphm; + @Field("equipmentName") private String site; + @Field("pictime") private String phototime; + @Field("recordid") private String recordid; + @Field("picurl") private String picurl; + @Field("snapshoturl") private String snapshoturl; + @Field("vehicle_detect_syRectParam") private int[] vehicle_detect_syRectParam; + private String snapshot; diff --git a/src/main/java/com/objecteye/pojo/VehicleData.java b/src/main/java/com/objecteye/pojo/VehicleData.java index b07af2c..09fd08c 100644 --- a/src/main/java/com/objecteye/pojo/VehicleData.java +++ b/src/main/java/com/objecteye/pojo/VehicleData.java @@ -3,6 +3,7 @@ package com.objecteye.pojo; public class VehicleData { private Integer total; + private VehiclePhotoInfo data; public VehicleData() { diff --git a/src/main/java/com/objecteye/pojo/VehicleDetails.java b/src/main/java/com/objecteye/pojo/VehicleDetails.java index 20d589c..4fde981 100644 --- a/src/main/java/com/objecteye/pojo/VehicleDetails.java +++ b/src/main/java/com/objecteye/pojo/VehicleDetails.java @@ -5,33 +5,107 @@ import java.util.Arrays; public class VehicleDetails implements Serializable { - private String id; //图片id - private String picurl; //图片路径 - private String vehicle_recg_type; //车辆类型 - private String vehicle_color; //车颜色 - private String vehicle_recg_brand; //车辆品牌型号(检测得到的车品牌、车子品牌、年份拼接而成) - private String vehicle_plate_type; //车牌类型 - private float vehicle_recg_name_score; //品牌可信度 - private float vehicle_plate_detectScore; //车牌可信度 - private String pictime; //抓拍时间(2019-09-24 15:46:12) - private String equipmentName;//设备名称 - private String longitude; //经度 - private String latitude; //纬度 - private String vehicle_plate_hphm; //车牌号码 - private String vehicle_illegal_driver_status; //主驾驶状态 - private String vehicle_illegal_copilot_status; //副驾驶状态 - private String specialty_vehicle_type; //特殊品类车辆类型 - private Double[] vehicle_fea_res_feature; //特征值 - - //车头信息 - private String vehicle_plate_status; //车牌状态 - private String vehicle_driver_sunvisor; //主驾遮阳板 - private String vehicle_copilot_sunvisor; //副驾遮阳板 - private String vehicle_annualInspectionStandard; //年检标 - private String vehicle_pendant; //挂件 - private String vehicle_tissuebox; //纸巾盒 - private String vehicle_prayerwheel;//转经筒 - //增加该车辆的抓拍图(为避免IO,此处使用base64) + private static final long serialVersionUID = -7223026803080514374L; + /** + * 图片id + */ + private String id; + /** + * 图片路径 + */ + private String picurl; + /** + * 车辆类型 + */ + private String vehicle_recg_type; + /** + * 车颜色 + */ + private String vehicle_color; + /** + * 车辆品牌型号(检测得到的车品牌、车子品牌、年份拼接而成) + */ + private String vehicle_recg_brand; + /** + * 车牌类型 + */ + private String vehicle_plate_type; + /** + * 品牌可信度 + */ + private float vehicle_recg_name_score; + /** + * 车牌可信度 + */ + private float vehicle_plate_detectScore; + /** + * 抓拍时间(2019-09-24 15:46:12) + */ + private String pictime; + /** + * 设备名称 + */ + private String equipmentName; + /** + * 经度 + */ + private String longitude; + /** + * 纬度 + */ + private String latitude; + /** + * 车牌号码 + */ + private String vehicle_plate_hphm; + /** + * 主驾驶状态 + */ + private String vehicle_illegal_driver_status; + /** + * 副驾驶状态 + */ + private String vehicle_illegal_copilot_status; + /** + * 特殊品类车辆类型 + */ + private String specialty_vehicle_type; + /** + * 特征值 + */ + private Double[] vehicle_fea_res_feature; + + /** + * 车牌状态 + */ + private String vehicle_plate_status; + /** + * 主驾遮阳板 + */ + private String vehicle_driver_sunvisor; + /** + * 副驾遮阳板 + */ + private String vehicle_copilot_sunvisor; + /** + * 年检标 + */ + private String vehicle_annualInspectionStandard; + /** + * 挂件 + */ + private String vehicle_pendant; + /** + * 纸巾盒 + */ + private String vehicle_tissuebox; + /** + * 转经筒 + */ + private String vehicle_prayerwheel; + /** + * 增加该车辆的抓拍图(为避免IO,此处使用base64) + */ private String snapshot; public String getId() { diff --git a/src/main/java/com/objecteye/pojo/VehicleInfoRes.java b/src/main/java/com/objecteye/pojo/VehicleInfoRes.java index b9578e5..0903bdf 100644 --- a/src/main/java/com/objecteye/pojo/VehicleInfoRes.java +++ b/src/main/java/com/objecteye/pojo/VehicleInfoRes.java @@ -7,7 +7,9 @@ import org.springframework.stereotype.Component; public class VehicleInfoRes { private Integer code; + private String message; + private VehicleData data; public VehicleInfoRes() { diff --git a/src/main/java/com/objecteye/pojo/VehicleMongo.java b/src/main/java/com/objecteye/pojo/VehicleMongo.java index 5a90e87..157717f 100644 --- a/src/main/java/com/objecteye/pojo/VehicleMongo.java +++ b/src/main/java/com/objecteye/pojo/VehicleMongo.java @@ -6,11 +6,17 @@ import org.springframework.stereotype.Component; @Component @Document("vehicleInfo") public class VehicleMongo { + private String vehicleid; + private Integer deviceid; + private String picurl; + private Integer vehiclerecordfieid; + private double[] characvalue; + private String pictime; } diff --git a/src/main/java/com/objecteye/pojo/VehiclePhotoInfo.java b/src/main/java/com/objecteye/pojo/VehiclePhotoInfo.java index 486d305..179e2f3 100644 --- a/src/main/java/com/objecteye/pojo/VehiclePhotoInfo.java +++ b/src/main/java/com/objecteye/pojo/VehiclePhotoInfo.java @@ -1,10 +1,15 @@ package com.objecteye.pojo; public class VehiclePhotoInfo { + private String id; + private String hphm; + private String site; + private Long phototime; + private String recordid; public VehiclePhotoInfo() { diff --git a/src/main/java/com/objecteye/service/AreaEquipmentService.java b/src/main/java/com/objecteye/service/AreaEquipmentService.java deleted file mode 100644 index 776c3b5..0000000 --- a/src/main/java/com/objecteye/service/AreaEquipmentService.java +++ /dev/null @@ -1,111 +0,0 @@ -package com.objecteye.service; - -import com.objecteye.entity.AreaEquipmentShow; -import com.objecteye.entity.PageResult; -import com.objecteye.entity.SyAreaEquipment; -import org.apache.ibatis.annotations.Mapper; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -/** - * 服务层接口 - * - * @author Administrator - */ -@Mapper -public interface AreaEquipmentService { - - /** - * 返回全部列表 - * - * @return - */ - public ArrayList findAll(); - - - /** - * 返回全部列表设备可操作性 - * - * @return - */ - public ArrayList findAllEquip(); - - /** - * 返回全部列表设备可操作性 - * - * @return - */ - public ArrayList findAllEquipAndArea(); - - /** - * 返回分页列表 - * - * @return - */ - public PageResult findPage(int pageNum, int pageSize); - - - /** - * 增加 - */ - public int add(SyAreaEquipment areaEquipment); - - - /** - * 修改 - */ - public int update(SyAreaEquipment areaEquipment); - - - /** - * 根据ID获取实体 - * - * @param id - * @return - */ - public SyAreaEquipment findOne(int id); - - - /** - * 批量删除 - * - * @param ids - */ - public void delete(int[] ids); - - /** - * 批量删除 - * - * @param typeId - */ - public int delete(int typeId); - - /** - * 分页 - * - * @param pageNum 当前页 码 - * @param pageSize 每页记录数 - * @return - */ - public PageResult findPage(SyAreaEquipment areaEquipment, int pageNum, int pageSize); - - /** - * 根据id查找所有的设备id - * - * @param id - * @return - */ - List findCaptureById(int id); - - /** - * 根据id查找所有的设备信息 - * - * @param id - * @return - */ - List> findCaptureMsgById(int id); - - -} diff --git a/src/main/java/com/objecteye/service/DeployEquipmentService.java b/src/main/java/com/objecteye/service/DeployEquipmentService.java deleted file mode 100644 index ba64e72..0000000 --- a/src/main/java/com/objecteye/service/DeployEquipmentService.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.objecteye.service; - -import com.objecteye.entity.PageResult; -import com.objecteye.entity.SyDeployEquipment; - -import java.util.List; - -/** - * 服务层接口 - * - * @author Administrator - */ -public interface DeployEquipmentService { - - /** - * 返回全部列表 - * - * @return - */ - public List findAll(); - - - /** - * 返回分页列表 - * - * @return - */ - public PageResult findPage(int pageNum, int pageSize); - - - /** - * 增加 - */ - public void add(SyDeployEquipment deployEquipment); - - - /** - * 修改 - */ - public void update(SyDeployEquipment deployEquipment); - - - /** - * 根据ID获取实体 - * - * @param id - * @return - */ - public SyDeployEquipment findOne(int id); - - - /** - * 批量删除 - * - * @param ids - */ - public void delete(int[] ids); - - /** - * 分页 - * - * @param pageNum 当前页 码 - * @param pageSize 每页记录数 - * @return - */ - public PageResult findPage(SyDeployEquipment deployEquipment, int pageNum, int pageSize); - - /** - * 根据布控id删除 - * - * @param id - */ - public void deleteByDeployId(int id); - - /** - * 根据布控id查找所有的设备 - */ - public List slectByDeployId(int deployId); - -} diff --git a/src/main/java/com/objecteye/service/DeployFeatureService.java b/src/main/java/com/objecteye/service/DeployFeatureService.java deleted file mode 100644 index ebf4e56..0000000 --- a/src/main/java/com/objecteye/service/DeployFeatureService.java +++ /dev/null @@ -1,82 +0,0 @@ -package com.objecteye.service; - -import com.objecteye.entity.PageResult; -import com.objecteye.entity.SyDeployFeature; - -import java.util.List; - -/** - * 服务层接口 - * - * @author Administrator - */ -public interface DeployFeatureService { - - /** - * 返回全部列表 - * - * @return - */ - public List findAll(); - - - /** - * 返回分页列表 - * - * @return - */ - public PageResult findPage(int pageNum, int pageSize); - - - /** - * 增加 - */ - public void add(SyDeployFeature deployFeature); - - - /** - * 修改 - */ - public void update(SyDeployFeature deployFeature); - - - /** - * 根据ID获取实体 - * - * @param id - * @return - */ - public SyDeployFeature findOne(int id); - - - /** - * 批量删除 - * - * @param ids - */ - public void delete(int[] ids); - - /** - * 分页 - * - * @param pageNum 当前页 码 - * @param pageSize 每页记录数 - * @return - */ - public PageResult findPage(SyDeployFeature deployFeature, int pageNum, int pageSize); - - /** - * 根据布控id删除 - * - * @param id - */ - public void deleteByDeployId(int id); - - - public List selectByFeatureId(int fid); - - - public List selectByDid(int did); - - -} diff --git a/src/main/java/com/objecteye/service/DeployService.java b/src/main/java/com/objecteye/service/DeployService.java index d13fd63..d6afad9 100644 --- a/src/main/java/com/objecteye/service/DeployService.java +++ b/src/main/java/com/objecteye/service/DeployService.java @@ -70,8 +70,10 @@ public interface DeployService { /** * 增加 + * + * @param syDeploy */ - void add(SyDeploy deploy); + void add(SyDeploy syDeploy); /** @@ -86,7 +88,7 @@ public interface DeployService { * @param id * @return */ - SyDeploy findOne(int id); + SyDeploy findOne(String id); /** @@ -94,7 +96,7 @@ public interface DeployService { * * @param ids */ - void delete(int[] ids); + void delete(String[] ids); /** * 布控任务查询列表- 分页 @@ -114,7 +116,7 @@ public interface DeployService { * @param pagevolume 页码容量 * @return 结果集 */ - PageResult findMonitorTaskDetail(Integer deployId, int currentpage, int pagevolume); + PageResult findMonitorTaskDetail(String deployId, int currentpage, int pagevolume); /** * 布控任务- 主列表查询 @@ -145,7 +147,7 @@ public interface DeployService { * @param deployType 布控类型 * @return 对应布控id */ - List getDeployListByLibAndDeployType(int libId, int deployType); + List getDeployListByLibAndDeployType(String libId, int deployType); /** * 获取底库的相关信息 diff --git a/src/main/java/com/objecteye/service/EquipmentService.java b/src/main/java/com/objecteye/service/EquipmentService.java deleted file mode 100644 index fcee12f..0000000 --- a/src/main/java/com/objecteye/service/EquipmentService.java +++ /dev/null @@ -1,92 +0,0 @@ -package com.objecteye.service; - -import com.objecteye.entity.PageResult; -import com.objecteye.entity.SyEquipment; - -import java.util.List; - -/** - * 服务层接口 - * - * @author Administrator - */ -public interface EquipmentService { - - /** - * 返回全部列表 - * - * @return - */ - public List findAll(); - - - /** - * 返回分页列表 - * - * @return - */ - public PageResult findPage(int pageNum, int pageSize); - - - /** - * 增加 - */ - public int add(SyEquipment equipment); - - - /** - * 修改 - */ - public int update(SyEquipment equipment); - - - /** - * 根据ID获取实体 - * - * @param id - * @return - */ - public SyEquipment findOne(int id); - - /** - * 根据ip获取实体 - * - * @param ip - * @return - */ - public SyEquipment findByIp(String ip); - - - public SyEquipment findByName(String name); - - public SyEquipment findByPort(String port); - - /** - * 批量删除 - * - * @param ids - */ - public void delete(int[] ids); - - /** - * 分页 - * - * @param pageNum 当前页码 - * @param pageSize 每页记录数 - * @return - */ - public PageResult findPage(SyEquipment equipment, int pageNum, int pageSize); - - /** - * 设备开关 - * - * @param id - * @return - */ - public int updateStatusById(int id); - - /** - * @return - */ - public List findAllId(); -} diff --git a/src/main/java/com/objecteye/service/FeatureService.java b/src/main/java/com/objecteye/service/FeatureService.java index 64bf7f5..7ddf11a 100644 --- a/src/main/java/com/objecteye/service/FeatureService.java +++ b/src/main/java/com/objecteye/service/FeatureService.java @@ -18,7 +18,7 @@ public interface FeatureService { * * @return */ - public List findAll(); + List findAll(); /** @@ -26,24 +26,23 @@ public interface FeatureService { * * @return */ - public PageResult findPage(int pageNum, int pageSize); + PageResult findPage(int pageNum, int pageSize); /** * 增加 + * + * @return */ - public int add(SyFeature feature); - - /** - * 增加 - */ - public int addSingle(SyFeature feature); + String add(SyFeature feature); /** * 修改 + * + * @return */ - public int update(SyFeature feature); + String update(SyFeature feature); /** @@ -52,7 +51,7 @@ public interface FeatureService { * @param id * @return */ - public SyFeature findOne(int id); + SyFeature findOne(String id); /** @@ -60,7 +59,7 @@ public interface FeatureService { * * @param ids */ - public void delete(int[] ids); + void delete(String[] ids); /** * 分页 @@ -69,15 +68,10 @@ public interface FeatureService { * @param pageSize 每页记录数 * @return */ - public PageResult findPage(SyFeature feature, int pageNum, int pageSize); - - - public int updateCountById(SyFeature feature); - - public List> findAllName(); - + PageResult findPage(SyFeature feature, int pageNum, int pageSize); - //public List findAllName(); + String updateCountById(SyFeature feature); + List> findAllName(); } diff --git a/src/main/java/com/objecteye/service/IUploadFileService.java b/src/main/java/com/objecteye/service/IUploadFileService.java new file mode 100644 index 0000000..9a7c786 --- /dev/null +++ b/src/main/java/com/objecteye/service/IUploadFileService.java @@ -0,0 +1,20 @@ +package com.objecteye.service; + +import com.alibaba.fastjson.JSONObject; +import org.springframework.web.multipart.MultipartFile; + +import java.io.IOException; + +/** + * 处理解析图片直接到mongo库代替ftp等功能 + */ +public interface IUploadFileService { + + /** + * 上传文件解析并保存到mongo, 代替ftp + * + * @param multipartFile 上传文件 + * @return 结果集 + */ + JSONObject uploadFile2Mongo(MultipartFile multipartFile) throws IOException; +} diff --git a/src/main/java/com/objecteye/service/PersonnelService.java b/src/main/java/com/objecteye/service/PersonnelService.java index a6db36b..5fe81d1 100644 --- a/src/main/java/com/objecteye/service/PersonnelService.java +++ b/src/main/java/com/objecteye/service/PersonnelService.java @@ -6,7 +6,6 @@ import com.objecteye.entity.SyPersonnel; import org.springframework.web.multipart.MultipartFile; import java.util.List; -import java.util.Map; /** * 服务层接口 @@ -23,7 +22,7 @@ public interface PersonnelService { * @return */ - public List findAll(); + List findAll(); /** @@ -32,21 +31,23 @@ public interface PersonnelService { * @return */ - public PageResult findPage(int pageNum, int pageSize); + PageResult findPage(int pageNum, int pageSize); /** * 增加 + * + * @return */ - public int add(SyPersonnel personnel); + String add(SyPersonnel personnel); /** * 修改 */ - public void update(SyPersonnel personnel); + void update(SyPersonnel personnel); /** @@ -56,7 +57,7 @@ public interface PersonnelService { * @return */ - public SyPersonnel findOne(int id); + SyPersonnel findOne(String id); /** @@ -65,7 +66,7 @@ public interface PersonnelService { * @param ids */ - public void delete(int[] ids); + void delete(String[] ids); /** @@ -76,48 +77,21 @@ public interface PersonnelService { * @return */ - public PageResult findPage(int fid, String name, int pageNum, int pageSize); - - /** - * 分页 - * - * @param pageNum 当前页 码 - * @param pageSize 每页记录数 - * @return - */ - - public PageResult findPageByNameOCard(SyPersonnel personnel, int pageNum, int pageSize); - - - /** - * @param similar - * @param file - * @param personId - * @return - */ - - public List> findByImage(float similar, MultipartFile file, int personId); + PageResult findPage(int fid, String name, int pageNum, int pageSize); /** * @param fid * @return */ - public Integer findPersonCountByFid(int fid); - - /** - * - * @param id - * @return - */ - //public AlarmMsgShow findAlarListByPersonId(int id); + long findPersonCountByFid(String fid); /** * @param fid * @return */ - public List findPersonIdByFid(int fid); + List findPersonIdByFid(String fid); /** @@ -127,6 +101,6 @@ public interface PersonnelService { * @param featureId * @return */ - String uploadFiles(MultipartFile[] multipartFile, int featureId); + String uploadFiles(MultipartFile[] multipartFile, String featureId); } diff --git a/src/main/java/com/objecteye/service/PreviewService.java b/src/main/java/com/objecteye/service/PreviewService.java deleted file mode 100644 index 8db9c36..0000000 --- a/src/main/java/com/objecteye/service/PreviewService.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.objecteye.service; - -import java.io.IOException; - -public interface PreviewService { - - String getRtmp(String userName, Integer deviceId) throws IOException; -} diff --git a/src/main/java/com/objecteye/service/RoleServices.java b/src/main/java/com/objecteye/service/RoleServices.java index bda5185..c48a976 100644 --- a/src/main/java/com/objecteye/service/RoleServices.java +++ b/src/main/java/com/objecteye/service/RoleServices.java @@ -5,13 +5,6 @@ import com.alibaba.fastjson.JSONObject; public interface RoleServices { /** - * 查询角色的总页数 - * - * @return - */ - int totalNum(); - - /** * 角色列表分页展示 * * @param currentpage diff --git a/src/main/java/com/objecteye/service/VehicleDbService.java b/src/main/java/com/objecteye/service/VehicleDbService.java index 7b76355..fcead8a 100644 --- a/src/main/java/com/objecteye/service/VehicleDbService.java +++ b/src/main/java/com/objecteye/service/VehicleDbService.java @@ -13,65 +13,66 @@ import java.util.Map; */ public interface VehicleDbService { - /** - * 返回全部列表 - * - * @return - */ - public List findAll(); - - - /** - * 返回分页列表 - * - * @return - */ - public PageResult findPage(int pageNum, int pageSize); - - - /** - * 增加 - */ - public Integer add(SyVehicleDb vehicleDb); - - - /** - * 修改 - */ - public Integer update(SyVehicleDb vehicleDb); - - - /** - * 根据ID获取实体 - * - * @param id - * @return - */ - public SyVehicleDb findOne(int id); - - - /** - * 批量删除 - * - * @param ids - */ - public void delete(int[] ids); - - /** - * 分页 - * - * @param pageNum 当前页 码 - * @param pageSize 每页记录数 - * @return - */ - public PageResult findPage(SyVehicleDb vehicleDb, int pageNum, int pageSize); - - - /** - * @param feature - * @return - */ - public int updateCountById(SyVehicleDb feature); - - public List> findAllName(); + /** + * 返回全部列表 + * + * @return + */ + List findAll(); + + + /** + * 返回分页列表 + * + * @return + */ + PageResult findPage(int pageNum, int pageSize); + + + /** + * 增加 + * + * @return + */ + String add(SyVehicleDb vehicleDb); + + + /** + * 修改 + */ + void update(SyVehicleDb vehicleDb); + + + /** + * 根据ID获取实体 + * + * @param id + * @return + */ + SyVehicleDb findOne(String id); + + + /** + * 批量删除 + * + * @param ids + */ + void delete(String[] ids); + + /** + * 分页 + * + * @param pageNum 当前页 码 + * @param pageSize 每页记录数 + * @return + */ + PageResult findPage(SyVehicleDb vehicleDb, int pageNum, int pageSize); + + + /** + * @param feature + */ + void updateCountById(SyVehicleDb feature); + + List> findAllName(); } diff --git a/src/main/java/com/objecteye/service/VehicleService.java b/src/main/java/com/objecteye/service/VehicleService.java index 2d08739..c70ec63 100644 --- a/src/main/java/com/objecteye/service/VehicleService.java +++ b/src/main/java/com/objecteye/service/VehicleService.java @@ -26,5 +26,5 @@ public interface VehicleService { List findByPicName(UploadVehicleDbResult uploadVehicleResult); - String uploadFiles(MultipartFile[] multipartFile, int vehicleId); + String uploadFiles(MultipartFile[] multipartFile, String vehicleId); } diff --git a/src/main/java/com/objecteye/service/impl/AreaEquipmentServiceImpl.java b/src/main/java/com/objecteye/service/impl/AreaEquipmentServiceImpl.java deleted file mode 100644 index 89a5c76..0000000 --- a/src/main/java/com/objecteye/service/impl/AreaEquipmentServiceImpl.java +++ /dev/null @@ -1,362 +0,0 @@ -package com.objecteye.service.impl; - -import com.github.pagehelper.Page; -import com.github.pagehelper.PageHelper; -import com.objecteye.entity.*; -import com.objecteye.mapper.SyAreaEquipmentMapper; -import com.objecteye.mapper.SyEquipmentMapper; -import com.objecteye.service.AreaEquipmentService; -import com.objecteye.service.EquipmentService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - - -/** - * 服务实现层 - * - * @author Administrator - */ -@Service -public class AreaEquipmentServiceImpl implements AreaEquipmentService { - - @Autowired - private SyAreaEquipmentMapper areaEquipmentMapper; - @Autowired - private SyEquipmentMapper equipmentMapper; - - private ArrayList captureList = new ArrayList<>(); - - @Autowired - private EquipmentService equipmentService; - - /** - * 查询全部 - */ - @Override - public ArrayList findAll() { - SyAreaEquipmentExample example = new SyAreaEquipmentExample(); - SyAreaEquipmentExample.Criteria criteria = example.createCriteria(); - criteria.andParentIdEqualTo(0); - return getAll(0); - } - - @Override - public ArrayList findAllEquip() { - SyAreaEquipmentExample example = new SyAreaEquipmentExample(); - SyAreaEquipmentExample.Criteria criteria = example.createCriteria(); - criteria.andParentIdEqualTo(0); - return getAllHandleEquip(0); - } - - @Override - public ArrayList findAllEquipAndArea() { - SyAreaEquipmentExample example = new SyAreaEquipmentExample(); - SyAreaEquipmentExample.Criteria criteria = example.createCriteria(); - criteria.andParentIdEqualTo(0); - return getAllHandleEquipAndArea(0); - } - - - /** - * 查询全部设备id - */ - @Override - public List findCaptureById(int id) { - captureList = new ArrayList<>(); - return getAllCapture(id); - } - - /** - * 查询全部设备id - */ - @Override - public List> findCaptureMsgById(int id) { - - List captureById = findCaptureById(id); - List> list = new ArrayList<>(); - if (captureById != null && captureById.size() > 0) { - - int size = captureById.size(); - for (int i = 0; i < size; i++) { - HashMap map = new HashMap<>(16); - Integer id1 = captureById.get(i); - SyEquipment equipment = equipmentService.findOne(id1); - map.put("id", id1); - map.put("name", equipment.getEquipmentName()); - map.put("status", equipment.getStatus()); - list.add(map); - } - return list; - } - return null; - } - - /** - * 按分页查询 - */ - @Override - public PageResult findPage(int pageNum, int pageSize) { - PageHelper.startPage(pageNum, pageSize); - Page page = (Page) areaEquipmentMapper.selectByExample(null); - return new PageResult(page.getPages(), page.getResult()); - } - - /** - * 增加 - */ - @Override - public int add(SyAreaEquipment areaEquipment) { - int insert = areaEquipmentMapper.insertSelective(areaEquipment); - return insert; - } - - /** - * 修改 - */ - @Override - public int update(SyAreaEquipment areaEquipment) { - return areaEquipmentMapper.updateByPrimaryKey(areaEquipment); - } - - /** - * 根据ID获取实体 - * - * @param id - * @return - */ - @Override - public SyAreaEquipment findOne(int id) { - return areaEquipmentMapper.selectByPrimaryKey(id); - } - - /** - * 批量删除 - */ - @Override - public void delete(int[] ids) { - - for (int id : ids) { - SyAreaEquipment syAreaEquipment = areaEquipmentMapper.selectByPrimaryKey(id); - if (syAreaEquipment.getParentId() == 0) { - throw new RuntimeException("不予许删除根目录"); - } - //得到所有子节点 - List list = getList(id); - //System.out.println(list); - int size = list.size(); - if (list != null || size > 0) { - for (int i = 0; i < size; i++) { - //删除设备树中设备 - SyAreaEquipment syAreaEquipment1 = list.get(i); - areaEquipmentMapper.deleteByPrimaryKey(syAreaEquipment1.getId()); - //删除设备表中设备 - Integer typeId = syAreaEquipment1.getTypeId(); - equipmentMapper.deleteByPrimaryKey(typeId); - } - } - //删除区域 - areaEquipmentMapper.deleteByPrimaryKey(id); - } - } - - @Override - public int delete(int typeId) { - SyAreaEquipmentExample example = new SyAreaEquipmentExample(); - SyAreaEquipmentExample.Criteria criteria = example.createCriteria(); - criteria.andTypeIdEqualTo(typeId); - return areaEquipmentMapper.deleteByExample(example); - } - - - @Override - public PageResult findPage(SyAreaEquipment areaEquipment, int pageNum, int pageSize) { - PageHelper.startPage(pageNum, pageSize); - - SyAreaEquipmentExample example = new SyAreaEquipmentExample(); - SyAreaEquipmentExample.Criteria criteria = example.createCriteria(); - - if (areaEquipment != null) { - if (areaEquipment.getName() != null && areaEquipment.getName().length() > 0) { - criteria.andNameLike("%" + areaEquipment.getName() + "%"); - } - } - Page page = (Page) areaEquipmentMapper.selectByExample(example); - return new PageResult(page.getPages(), page.getResult()); - } - - private List getList(int parentId) { - SyAreaEquipmentExample example = new SyAreaEquipmentExample(); - SyAreaEquipmentExample.Criteria criteria = example.createCriteria(); - criteria.andParentIdEqualTo(parentId); - return areaEquipmentMapper.selectByExample(example); - } - - private ArrayList getAllHandleEquip(int parentId) { - List list = getList(parentId); - int size = list.size(); - - ArrayList areaEquipmentShows = new ArrayList<>(); - if (size == 0) { - - SyAreaEquipment syAreaEquipment = areaEquipmentMapper.selectByPrimaryKey(parentId); - AreaEquipmentShow areaEquipmentShow = new AreaEquipmentShow(); - areaEquipmentShow.setId(syAreaEquipment.getId()); - - areaEquipmentShow.setParentId(syAreaEquipment.getParentId()); - areaEquipmentShow.setIsEquipment(syAreaEquipment.getIsEquipment()); - if (syAreaEquipment.getIsEquipment() == 0) { - areaEquipmentShow.setDisabled(true); - } else { - areaEquipmentShow.setDisabled(false); - } - areaEquipmentShow.setEquipmentNum(1); - areaEquipmentShow.setTitle(syAreaEquipment.getName()); - areaEquipmentShow.setTypeId(syAreaEquipment.getTypeId()); - - areaEquipmentShow.setChildren(null); - return null; - } - for (int i = 0; i < size; i++) { - captureList = new ArrayList<>(); - SyAreaEquipment syAreaEquipment = list.get(i); - AreaEquipmentShow areaEquipmentShow = new AreaEquipmentShow(); - areaEquipmentShow.setId(syAreaEquipment.getId()); - - areaEquipmentShow.setIsEquipment(syAreaEquipment.getIsEquipment()); - areaEquipmentShow.setParentId(syAreaEquipment.getParentId()); - if (syAreaEquipment.getIsEquipment() == 0) { - areaEquipmentShow.setDisabled(true); - } else { - areaEquipmentShow.setDisabled(false); - - } - List captureById = findCaptureById(syAreaEquipment.getId()); - if (captureById != null) { - areaEquipmentShow.setEquipmentNum(captureById.size()); - } - areaEquipmentShow.setTitle(syAreaEquipment.getName()); - areaEquipmentShow.setTypeId(syAreaEquipment.getTypeId()); - areaEquipmentShow.setChildren(getAllHandleEquip(syAreaEquipment.getId())); - areaEquipmentShows.add(areaEquipmentShow); - } - return areaEquipmentShows; - } - - private ArrayList getAllHandleEquipAndArea(int parentId) { - List list = getList(parentId); - int size = list.size(); - - ArrayList areaEquipmentShows = new ArrayList<>(); - if (size == 0) { - - SyAreaEquipment syAreaEquipment = areaEquipmentMapper.selectByPrimaryKey(parentId); - AreaEquipmentShow areaEquipmentShow = new AreaEquipmentShow(); - areaEquipmentShow.setId(syAreaEquipment.getId()); - - areaEquipmentShow.setParentId(syAreaEquipment.getParentId()); - areaEquipmentShow.setIsEquipment(syAreaEquipment.getIsEquipment()); - areaEquipmentShow.setEquipmentNum(1); - areaEquipmentShow.setTitle(syAreaEquipment.getName()); - areaEquipmentShow.setTypeId(syAreaEquipment.getTypeId()); - - areaEquipmentShow.setChildren(null); - return null; - } - for (int i = 0; i < size; i++) { - captureList = new ArrayList<>(); - SyAreaEquipment syAreaEquipment = list.get(i); - AreaEquipmentShow areaEquipmentShow = new AreaEquipmentShow(); - areaEquipmentShow.setId(syAreaEquipment.getId()); - - areaEquipmentShow.setIsEquipment(syAreaEquipment.getIsEquipment()); - areaEquipmentShow.setParentId(syAreaEquipment.getParentId()); - - List captureById = findCaptureById(syAreaEquipment.getId()); - if (captureById != null) { - areaEquipmentShow.setEquipmentNum(captureById.size()); - } - areaEquipmentShow.setTitle(syAreaEquipment.getName()); - areaEquipmentShow.setTypeId(syAreaEquipment.getTypeId()); - areaEquipmentShow.setChildren(getAllHandleEquipAndArea(syAreaEquipment.getId())); - areaEquipmentShows.add(areaEquipmentShow); - } - return areaEquipmentShows; - } - - private ArrayList getAll(int parentId) { - List list = getList(parentId); - int size = list.size(); - - ArrayList areaEquipmentShows = new ArrayList<>(); - if (size == 0) { - - SyAreaEquipment syAreaEquipment = areaEquipmentMapper.selectByPrimaryKey(parentId); - AreaEquipmentShow areaEquipmentShow = new AreaEquipmentShow(); - areaEquipmentShow.setId(syAreaEquipment.getId()); - - areaEquipmentShow.setParentId(syAreaEquipment.getParentId()); - areaEquipmentShow.setIsEquipment(syAreaEquipment.getIsEquipment()); - if (syAreaEquipment.getIsEquipment() == 0) { - areaEquipmentShow.setDisabled(false); - } else { - areaEquipmentShow.setDisabled(true); - } - areaEquipmentShow.setEquipmentNum(1); - areaEquipmentShow.setTitle(syAreaEquipment.getName()); - areaEquipmentShow.setTypeId(syAreaEquipment.getTypeId()); - - areaEquipmentShow.setChildren(null); - return null; - } - for (int i = 0; i < size; i++) { - captureList = new ArrayList<>(); - SyAreaEquipment syAreaEquipment = list.get(i); - AreaEquipmentShow areaEquipmentShow = new AreaEquipmentShow(); - areaEquipmentShow.setId(syAreaEquipment.getId()); - - areaEquipmentShow.setIsEquipment(syAreaEquipment.getIsEquipment()); - areaEquipmentShow.setParentId(syAreaEquipment.getParentId()); - if (syAreaEquipment.getIsEquipment() == 0) { - areaEquipmentShow.setDisabled(false); - } else { - areaEquipmentShow.setDisabled(true); - - } - List captureById = findCaptureById(syAreaEquipment.getId()); - if (captureById != null) { - areaEquipmentShow.setEquipmentNum(captureById.size()); - } - areaEquipmentShow.setTitle(syAreaEquipment.getName()); - areaEquipmentShow.setTypeId(syAreaEquipment.getTypeId()); - areaEquipmentShow.setChildren(getAll(syAreaEquipment.getId())); - areaEquipmentShows.add(areaEquipmentShow); - } - return areaEquipmentShows; - } - - private List getAllCapture(int parentId) { - List list = getList(parentId); - int size = list.size(); - if (size == 0) { - SyAreaEquipment syAreaEquipment = areaEquipmentMapper.selectByPrimaryKey(parentId); - if (syAreaEquipment != null) { - Integer isEquipment = syAreaEquipment.getIsEquipment(); - if (isEquipment == 1) { - captureList.add(syAreaEquipment.getTypeId()); - } - return captureList; - } - return null; - } - for (int i = 0; i < size; i++) { - SyAreaEquipment syAreaEquipment = list.get(i); - - getAllCapture(syAreaEquipment.getId()); - } - return captureList; - } -} diff --git a/src/main/java/com/objecteye/service/impl/DeployEquipmentServiceImpl.java b/src/main/java/com/objecteye/service/impl/DeployEquipmentServiceImpl.java deleted file mode 100644 index a05859e..0000000 --- a/src/main/java/com/objecteye/service/impl/DeployEquipmentServiceImpl.java +++ /dev/null @@ -1,127 +0,0 @@ -package com.objecteye.service.impl; - -import com.github.pagehelper.Page; -import com.github.pagehelper.PageHelper; -import com.objecteye.entity.PageResult; -import com.objecteye.entity.SyDeployEquipment; -import com.objecteye.entity.SyDeployEquipmentExample; -import com.objecteye.mapper.SyDeployEquipmentMapper; -import com.objecteye.service.DeployEquipmentService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.ArrayList; -import java.util.List; - - -/** - * 服务实现层 - * - * @author Administrator - */ -@Service -public class DeployEquipmentServiceImpl implements DeployEquipmentService { - - @Autowired - private SyDeployEquipmentMapper deployEquipmentMapper; - - /** - * 查询全部 - */ - @Override - public List findAll() { - return deployEquipmentMapper.selectByExample(null); - } - - /** - * 按分页查询 - */ - @Override - public PageResult findPage(int pageNum, int pageSize) { - PageHelper.startPage(pageNum, pageSize); - Page page = (Page) deployEquipmentMapper.selectByExample(null); - return new PageResult(page.getTotal(), page.getResult()); - } - - /** - * 增加 - */ - @Override - public void add(SyDeployEquipment deployEquipment) { - deployEquipment.setIsDelete(0); - deployEquipmentMapper.insert(deployEquipment); - } - - - /** - * 修改 - */ - @Override - public void update(SyDeployEquipment deployEquipment) { - deployEquipmentMapper.updateByPrimaryKey(deployEquipment); - } - - /** - * 根据ID获取实体 - * - * @param id - * @return - */ - @Override - public SyDeployEquipment findOne(int id) { - return deployEquipmentMapper.selectByPrimaryKey(id); - } - - /** - * 批量删除 - */ - @Override - public void delete(int[] ids) { - for (int id : ids) { - deployEquipmentMapper.deleteByPrimaryKey(id); - } - } - - @Override - public void deleteByDeployId(int id) { - SyDeployEquipmentExample syDeployEquipmentExample = new SyDeployEquipmentExample(); - SyDeployEquipmentExample.Criteria criteria = syDeployEquipmentExample.createCriteria(); - criteria.andDidEqualTo(id); - deployEquipmentMapper.deleteByExample(syDeployEquipmentExample); - } - - @Override - public List slectByDeployId(int deployId) { - SyDeployEquipmentExample syDeployEquipmentExample = new SyDeployEquipmentExample(); - SyDeployEquipmentExample.Criteria criteria = syDeployEquipmentExample.createCriteria(); - criteria.andEidEqualTo(deployId); - List integers = new ArrayList<>(); - List syDeployEquipments = deployEquipmentMapper.selectByExample(syDeployEquipmentExample); - if (syDeployEquipments != null && syDeployEquipments.size() > 0) { - int size = syDeployEquipments.size(); - for (int i = 0; i < size; i++) { - SyDeployEquipment syDeployEquipment = syDeployEquipments.get(i); - Integer eid = syDeployEquipment.getEid(); - integers.add(eid); - } - } - return integers; - } - - - @Override - public PageResult findPage(SyDeployEquipment deployEquipment, int pageNum, int pageSize) { - PageHelper.startPage(pageNum, pageSize); - - SyDeployEquipmentExample example = new SyDeployEquipmentExample(); - SyDeployEquipmentExample.Criteria criteria = example.createCriteria(); - - if (deployEquipment != null) { - - } - - Page page = (Page) deployEquipmentMapper.selectByExample(example); - return new PageResult(page.getTotal(), page.getResult()); - } - -} diff --git a/src/main/java/com/objecteye/service/impl/DeployFeatureServiceImpl.java b/src/main/java/com/objecteye/service/impl/DeployFeatureServiceImpl.java deleted file mode 100644 index 0e1a6a0..0000000 --- a/src/main/java/com/objecteye/service/impl/DeployFeatureServiceImpl.java +++ /dev/null @@ -1,142 +0,0 @@ -package com.objecteye.service.impl; - -import com.github.pagehelper.Page; -import com.github.pagehelper.PageHelper; -import com.objecteye.entity.PageResult; -import com.objecteye.entity.SyDeployFeature; -import com.objecteye.entity.SyDeployFeatureExample; -import com.objecteye.mapper.SyDeployFeatureMapper; -import com.objecteye.service.DeployFeatureService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.stereotype.Service; - -import java.util.ArrayList; -import java.util.List; - -/** - * 服务实现层 - * - * @author Administrator - */ -@Service -public class DeployFeatureServiceImpl implements DeployFeatureService { - - @Autowired - private SyDeployFeatureMapper deployFeatureMapper; - @Autowired - private RedisTemplate redisTemplate; - - /** - * 查询全部 - */ - @Override - public List findAll() { - return deployFeatureMapper.selectByExample(null); - } - - /** - * 按分页查询 - */ - @Override - public PageResult findPage(int pageNum, int pageSize) { - PageHelper.startPage(pageNum, pageSize); - Page page = (Page) deployFeatureMapper.selectByExample(null); - return new PageResult(page.getTotal(), page.getResult()); - } - - /** - * 增加 - */ - @Override - public void add(SyDeployFeature deployFeature) { - deployFeature.setIsDelete(0); - deployFeatureMapper.insert(deployFeature); - } - - - /** - * 修改 - */ - @Override - public void update(SyDeployFeature deployFeature) { - deployFeatureMapper.updateByPrimaryKey(deployFeature); - } - - /** - * 根据ID获取实体 - * - * @param id - * @return - */ - @Override - public SyDeployFeature findOne(int id) { - return deployFeatureMapper.selectByPrimaryKey(id); - } - - /** - * 批量删除 - */ - @Override - public void delete(int[] ids) { - for (int id : ids) { - deployFeatureMapper.deleteByPrimaryKey(id); - } - } - - @Override - public void deleteByDeployId(int id) { - SyDeployFeatureExample syDeployFeatureExample = new SyDeployFeatureExample(); - SyDeployFeatureExample.Criteria criteria1 = syDeployFeatureExample.createCriteria(); - criteria1.andDidEqualTo(id); - List syDeployFeatures = deployFeatureMapper.selectByExample(syDeployFeatureExample); - if (syDeployFeatures != null) { - int size = syDeployFeatures.size(); - for (int i = 0; i < size; i++) { - Integer fid = syDeployFeatures.get(i).getFid(); - String key = id + "|" + fid; - redisTemplate.delete(key); - } - } - deployFeatureMapper.deleteByExample(syDeployFeatureExample); - } - - @Override - public List selectByFeatureId(int fid) { - SyDeployFeatureExample syDeployFeatureExample = new SyDeployFeatureExample(); - SyDeployFeatureExample.Criteria criteria = syDeployFeatureExample.createCriteria(); - criteria.andFidEqualTo(fid); - ArrayList strings = new ArrayList<>(); - List syDeployFeatures = deployFeatureMapper.selectByExample(syDeployFeatureExample); - if (syDeployFeatures != null && syDeployFeatures.size() > 0) { - int size = syDeployFeatures.size(); - for (int i = 0; i < size; i++) { - SyDeployFeature syDeployFeature = syDeployFeatures.get(i); - strings.add(syDeployFeature.getDid()); - } - return strings; - } - return null; - } - - @Override - public List selectByDid(int did) { - SyDeployFeatureExample syDeployFeatureExample = new SyDeployFeatureExample(); - SyDeployFeatureExample.Criteria criteria = syDeployFeatureExample.createCriteria(); - criteria.andDidEqualTo(did); - return deployFeatureMapper.selectByExample(syDeployFeatureExample); - - } - - @Override - public PageResult findPage(SyDeployFeature deployFeature, int pageNum, int pageSize) { - PageHelper.startPage(pageNum, pageSize); - - SyDeployFeatureExample example = new SyDeployFeatureExample(); - SyDeployFeatureExample.Criteria criteria = example.createCriteria(); - - Page page = (Page) deployFeatureMapper.selectByExample(example); - return new PageResult(page.getTotal(), page.getResult()); - } - -} diff --git a/src/main/java/com/objecteye/service/impl/DeployServiceImpl.java b/src/main/java/com/objecteye/service/impl/DeployServiceImpl.java index bab9aa5..9b45ee6 100644 --- a/src/main/java/com/objecteye/service/impl/DeployServiceImpl.java +++ b/src/main/java/com/objecteye/service/impl/DeployServiceImpl.java @@ -4,26 +4,14 @@ import cn.hutool.core.date.DateTime; import cn.hutool.core.date.DateUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; -import com.github.pagehelper.Page; -import com.github.pagehelper.PageHelper; import com.objecteye.entity.*; -import com.objecteye.mapper.SyAreaEquipmentMapper; -import com.objecteye.mapper.SyDeployEquipmentMapper; -import com.objecteye.mapper.SyDeployMapper; import com.objecteye.pojo.RabbitMQInfo; import com.objecteye.pojo.RabbitMQVehicle; import com.objecteye.pojo.ResponseParamPerson; -import com.objecteye.service.AreaEquipmentService; -import com.objecteye.service.DeployEquipmentService; import com.objecteye.service.DeployService; import com.objecteye.service.PersonnelService; -import com.objecteye.utils.CompareDistance; -import com.objecteye.utils.GlobalUtil; -import com.objecteye.utils.VehicleDetailsUtils; -import com.objecteye.utils.VehicleEngine; -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; +import com.objecteye.utils.*; +import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Sort; import org.springframework.data.mongodb.core.MongoTemplate; @@ -48,23 +36,11 @@ import java.util.stream.Collectors; * @author Administrator */ @Service +@Slf4j public class DeployServiceImpl implements DeployService { - - private static Logger logger = LoggerFactory.getLogger(DeployServiceImpl.class); - - @Autowired - private SyDeployMapper deployMapper; - @Autowired - private SyDeployEquipmentMapper syDeployEquipmentMapper; - @Autowired - private SyDeployMapper syDeployMapper; @Autowired private RedisTemplate redisTemplate; @Autowired - private DeployEquipmentService deployEquipmentService; - @Autowired - private AreaEquipmentService areaEquipmentService; - @Autowired private MongoTemplate mongoTemplate; @Autowired private PersonnelService personnelService; @@ -72,31 +48,24 @@ public class DeployServiceImpl implements DeployService { private CompareDistance compareDistance; @Autowired private VehicleEngine vehicleEngine; - @Autowired - private SyAreaEquipmentMapper syAreaEquipmentMapper; /** * 查询全部 */ @Override public List findAll() { - SyDeployExample example = new SyDeployExample(); - SyDeployExample.Criteria criteria = example.createCriteria(); - criteria.andIsDeleteEqualTo(0); - - return deployMapper.selectByExample(example); + return mongoTemplate.find(Query.query(Criteria.where("isDelete").is(0)), SyDeploy.class); } @Override public Integer cancelOrReNewDeployTask(int deployId) { - SyDeploy syDeploy = deployMapper.selectByPrimaryKey(deployId); + SyDeploy syDeploy = mongoTemplate.findOne(Query.query(Criteria.where("id").is(deployId)), SyDeploy.class); Integer status = syDeploy.getStatus(); if (status == 0) { syDeploy.setStatus(1); - deployMapper.updateByPrimaryKeySelective(syDeploy); - redisTemplate.opsForHash().delete(GlobalUtil.DEPLOYID_STATRTIME, syDeploy.getId()); - redisTemplate.opsForHash().delete(GlobalUtil.DEPLOYIDANDENDTIME, syDeploy.getId()); - removeDeploysByDeploy(deployId); + mongoTemplate.save(syDeploy); + redisTemplate.opsForHash().delete(GlobalUtil.DEPLOYID_STATRTIME, deployId); + redisTemplate.opsForHash().delete(GlobalUtil.DEPLOYIDANDENDTIME, deployId); changeAllTaskDetailStatus(syDeploy, 1); } else if (status == 1) { String endTime = syDeploy.getEndTime(); @@ -107,11 +76,10 @@ public class DeployServiceImpl implements DeployService { throw new RuntimeException("布控结束时间过期"); } syDeploy.setStatus(0); - deployMapper.updateByPrimaryKeySelective(syDeploy); - addDeploysByDeploy(syDeploy.getId()); + mongoTemplate.save(syDeploy); changeAllTaskDetailStatus(syDeploy, 0); - redisTemplate.opsForHash().put(GlobalUtil.DEPLOYIDANDENDTIME, syDeploy.getId(), syDeploy.getEndTime()); - redisTemplate.opsForHash().put(GlobalUtil.DEPLOYID_STATRTIME, syDeploy.getId(), syDeploy.getStartTime()); + redisTemplate.opsForHash().put(GlobalUtil.DEPLOYIDANDENDTIME, deployId, syDeploy.getEndTime()); + redisTemplate.opsForHash().put(GlobalUtil.DEPLOYID_STATRTIME, deployId, syDeploy.getStartTime()); } return syDeploy.getStatus(); } @@ -206,15 +174,12 @@ public class DeployServiceImpl implements DeployService { */ @Override public PageResult findPage(int pageNum, int pageSize) { - PageHelper.startPage(pageNum, pageSize); - SyDeployExample example = new SyDeployExample(); - SyDeployExample.Criteria criteria = example.createCriteria(); - criteria.andIsDeleteEqualTo(0); - - Page page = (Page) deployMapper.selectByExample(example); - List result = page.getResult(); + List result = mongoTemplate + .find(Query.query(Criteria.where("isDelete").is(0)).limit(pageSize).skip((pageNum - 1) * pageSize), SyDeploy.class); + long count = mongoTemplate + .count(Query.query(Criteria.where("isDelete").is(0)), SyDeploy.class); List deployResultMsgs = new ArrayList<>(); - if (result != null && result.size() > 0) { + if (result.size() > 0) { for (SyDeploy deploy : result) { DeployResultMsg deployResultMsg = new DeployResultMsg(); deployResultMsg.setDeployName(deploy.getName()); @@ -223,53 +188,47 @@ public class DeployServiceImpl implements DeployService { deployResultMsgs.add(deployResultMsg); } } - return new PageResult<>(page.getPages(), deployResultMsgs); + return new PageResult<>(count, deployResultMsgs); } /** * 增加 + * + * @param syDeploy */ @Transactional(rollbackFor = Exception.class) @Override - public void add(SyDeploy deploy) { + public void add(SyDeploy syDeploy) { // 处理前端传递的时间戳 - makeTimeLongToTimeStr(deploy); + makeTimeLongToTimeStr(syDeploy); String now = DateUtil.now(); - if (DateUtil.parse(deploy.getStartTime()).getTime() <= System.currentTimeMillis()) { - deploy.setStartTime(now); - deploy.setStatus(0); + if (DateUtil.parse(syDeploy.getStartTime()).getTime() <= System.currentTimeMillis()) { + syDeploy.setStartTime(now); + syDeploy.setStatus(0); } else { - deploy.setStatus(1); + syDeploy.setStatus(1); } - String endTimeStr = deploy.getEndTime(); - deploy.setIsDelete(0); - deploy.setCreateDate(now); - deploy.setSinglemonitor(0); - int deployType = deploy.getDeployType(); - - deploy.setDeployType(deployType); - String featureIds = deploy.getDeployLib(); + String endTimeStr = syDeploy.getEndTime(); + syDeploy.setIsDelete(0); + syDeploy.setCreateDate(now); + syDeploy.setSinglemonitor(0); + int deployType = syDeploy.getDeployType(); + + syDeploy.setDeployType(deployType); + String featureIds = syDeploy.getDeployLib(); String[] split = featureIds.split(","); - deploy.setDeployLib(featureIds); - Set equipmens = getEquipmens(deploy); + syDeploy.setDeployLib(featureIds); - String equipIds = equipmens.stream().map(String::valueOf).collect(Collectors.joining(",")); - deploy.setSingleId(deploy.getDeployEquip()); - deploy.setDeployEquip(equipIds); - deployMapper.insert(deploy); - Integer deployId = deploy.getId(); + syDeploy.setSingleId(syDeploy.getDeployEquip()); + mongoTemplate.insert(syDeploy); + String deployId = syDeploy.getId(); // 布控库中每一条数据都放到redis中 makeLibRedisDetail(split, deployId, deployType); - for (Integer alleqid : equipmens) { - insertDeployEquip(deploy.getId(), alleqid); - findDeploysByEquipmentId(alleqid); - } - - redisTemplate.opsForHash().put(GlobalUtil.DEPLOYID_STATRTIME, deployId, deploy.getStartTime()); - if (deploy.getThresld() != null) { - redisTemplate.opsForHash().put(GlobalUtil.DEPLOYTHRESLD, deployId, deploy.getThresld()); + redisTemplate.opsForHash().put(GlobalUtil.DEPLOYID_STATRTIME, deployId, syDeploy.getStartTime()); + if (syDeploy.getThresld() != null) { + redisTemplate.opsForHash().put(GlobalUtil.DEPLOYTHRESLD, deployId, syDeploy.getThresld()); } redisTemplate.opsForHash().put(GlobalUtil.DEPLOY_LIB, deployId, featureIds); redisTemplate.opsForHash().put(GlobalUtil.DEPLOY_TYPE, deployId, deployType); @@ -293,26 +252,23 @@ public class DeployServiceImpl implements DeployService { * @param deployId 布控任务id * @param deployType 布控任务类型 */ - private void makeLibRedisDetail(String[] split, int deployId, int deployType) { + private void makeLibRedisDetail(String[] split, String deployId, int deployType) { for (String s : split) { s = s.trim(); if (deployType == 0) { redisTemplate.opsForHash().put(deployId + "|" + GlobalUtil.DEPLOY_PLATE_NUM, s, 0); } else if (deployType == 1) { - Integer integer = Integer.valueOf(s); - List vehicleId = mongoTemplate.find(Query.query(new Criteria("vehicleId").is(integer)), UploadVehicleDbResult.class); - String key = deployId + "|" + integer; + List vehicleId = mongoTemplate.find(Query.query(new Criteria("vehicleId").is(s)), UploadVehicleDbResult.class); + String key = deployId + "|" + s; for (UploadVehicleDbResult uploadVehicleDbResult : vehicleId) { String id = uploadVehicleDbResult.getId(); redisTemplate.opsForHash().put(key, id, 0); } } else if (deployType == 2) { - int integer = Integer.parseInt(s); - List personIdByFid = personnelService.findPersonIdByFid(integer); - String key = deployId + "|" + integer; + List personIdByFid = personnelService.findPersonIdByFid(s); + String key = deployId + "|" + s; for (SyPersonnel syPersonnel : personIdByFid) { - Integer id = syPersonnel.getId(); - redisTemplate.opsForHash().put(key, id, 0); + redisTemplate.opsForHash().put(key, syPersonnel.getId(), 0); } } } @@ -326,7 +282,7 @@ public class DeployServiceImpl implements DeployService { long l = System.currentTimeMillis(); String endTime = deploy.getEndTime(); long time = DateUtil.parse(endTime).getTime(); - Integer deployId = deploy.getId(); + String deployId = deploy.getId(); if (l > time) { deploy.setStatus(1); redisTemplate.opsForHash().delete(GlobalUtil.DEPLOYID_STATRTIME, deployId); @@ -336,10 +292,6 @@ public class DeployServiceImpl implements DeployService { } String deployLib = deploy.getDeployLib(); Integer deployType = deploy.getDeployType(); - Set equipments = getEquipmens(deploy); - - String equipIds = equipments.stream().map(String::valueOf).collect(Collectors.joining(",")); - deploy.setDeployEquip(equipIds); // 删除历史 deleteRedisWhenUpdateDeploy(deployId); @@ -348,17 +300,11 @@ public class DeployServiceImpl implements DeployService { makeLibRedisDetail(deployLib.split(","), deployId, deployType); } - deployEquipmentService.deleteByDeployId(deployId); - for (Integer alleqid : equipments) { - insertDeployEquip(deploy.getId(), alleqid); - findDeploysByEquipmentId(alleqid); - } - redisTemplate.opsForHash().put(GlobalUtil.DEPLOY_LIB, deployId, deployLib); redisTemplate.opsForHash().put(GlobalUtil.DEPLOY_TYPE, deployId, deployType); redisTemplate.opsForHash().put(GlobalUtil.DEPLOYIDANDENDTIME, deployId, endTime); - deployMapper.updateByPrimaryKeySelective(deploy); + mongoTemplate.save(deploy, "syDeploy"); } /** @@ -366,8 +312,8 @@ public class DeployServiceImpl implements DeployService { * * @param deployId 布控任务id */ - private void deleteRedisWhenUpdateDeploy(int deployId) { - SyDeploy oldSyDeploy = deployMapper.selectByPrimaryKey(deployId); + private void deleteRedisWhenUpdateDeploy(String deployId) { + SyDeploy oldSyDeploy = mongoTemplate.findOne(Query.query(Criteria.where("id").is(deployId)), SyDeploy.class); if (oldSyDeploy.getDeployType() == 0) { redisTemplate.delete(deployId + "|" + GlobalUtil.DEPLOY_PLATE_NUM); } else { @@ -388,22 +334,11 @@ public class DeployServiceImpl implements DeployService { * @return */ @Override - public SyDeploy findOne(int id) { - SyDeploy syDeploy = deployMapper.selectByPrimaryKey(id); + public SyDeploy findOne(String id) { + SyDeploy syDeploy = mongoTemplate.findOne(Query.query(Criteria.where("id").is(id)), SyDeploy.class); if (syDeploy != null) { syDeploy.setStartTime(String.valueOf(DateUtil.parse(syDeploy.getStartTime()).getTime())); syDeploy.setEndTime(String.valueOf(DateUtil.parse(syDeploy.getEndTime()).getTime())); - syDeploy.setDeployEquip(syDeploy.getSingleId()); - String areaIds = syDeploy.getSingleId(); - if (areaIds != null && !"".equals(areaIds)) { - List areaIdList = Arrays.stream(areaIds.split(",")).map(Integer::parseInt).collect(Collectors.toList()); - SyAreaEquipmentExample syAreaEquipmentExample = new SyAreaEquipmentExample(); - SyAreaEquipmentExample.Criteria criteria = syAreaEquipmentExample.createCriteria(); - criteria.andIdIn(areaIdList); - List syAreaEquipments = syAreaEquipmentMapper.selectByExample(syAreaEquipmentExample); - String areaNames = syAreaEquipments.stream().map(SyAreaEquipment::getName).collect(Collectors.joining(",")); - syDeploy.setAreaName(areaNames); - } } return syDeploy; } @@ -411,31 +346,21 @@ public class DeployServiceImpl implements DeployService { /** * 批量删除 + * + * @param ids */ @Override - public void delete(int[] ids) { - for (int id : ids) { - SyDeploy syDeploy = deployMapper.selectByPrimaryKey(id); + public void delete(String[] ids) { + for (String id : ids) { + SyDeploy syDeploy = mongoTemplate.findOne(Query.query(Criteria.where("id").is(id)), SyDeploy.class); syDeploy.setIsDelete(1); deleteRedisWhenUpdateDeploy(id); - deployMapper.updateByPrimaryKeySelective(syDeploy); + mongoTemplate.save(syDeploy); redisTemplate.opsForHash().delete(GlobalUtil.DEPLOY_LIB, id); redisTemplate.opsForHash().delete(GlobalUtil.DEPLOY_TYPE, id); redisTemplate.opsForHash().delete(GlobalUtil.DEPLOYIDANDENDTIME, id); redisTemplate.opsForHash().delete(GlobalUtil.DEPLOYID_STATRTIME, id); redisTemplate.opsForHash().delete(GlobalUtil.DEPLOYTHRESLD, id); - - SyDeployEquipmentExample syDeployEquipmentExample = new SyDeployEquipmentExample(); - SyDeployEquipmentExample.Criteria criteria = syDeployEquipmentExample.createCriteria(); - criteria.andDidEqualTo(id); - - List syDeployEquipments = syDeployEquipmentMapper.selectByExample(syDeployEquipmentExample); - for (SyDeployEquipment syDeployEquipment : syDeployEquipments) { - Integer id1 = syDeployEquipment.getId(); - syDeployEquipmentMapper.deleteByPrimaryKey(id1); - - findDeploysByEquipmentId(id); - } } } @@ -450,19 +375,16 @@ public class DeployServiceImpl implements DeployService { */ @Override public PageResult findPage(SyDeploy deploy, int pageNum, int pageSize) { - PageHelper.startPage(pageNum, pageSize); - - SyDeployExample example = new SyDeployExample(); - SyDeployExample.Criteria criteria = example.createCriteria(); Integer deployType = deploy.getDeployType(); - criteria.andDeployTypeEqualTo(deployType); - criteria.andIsDeleteEqualTo(0); - Page page = (Page) deployMapper.selectByExample(example); - List tempDeployList = page.getResult(); + List tempDeployList = mongoTemplate + .find(Query.query(Criteria.where("deployType").is(deployType).and("isDelete").is(0)) + .limit(pageSize).skip((pageNum - 1) * pageSize), SyDeploy.class); + long count = mongoTemplate + .count(Query.query(Criteria.where("deployType").is(deployType).and("isDelete").is(0)), SyDeploy.class); List resultInfos = new ArrayList<>(); // 查询出指定任务类型的所有任务报警次数 - Map deployIdWarningNumberMap = getDeployIdWarningNumberMap(deployType); + Map deployIdWarningNumberMap = getDeployIdWarningNumberMap(deployType); for (SyDeploy syDeploy : tempDeployList) { long warningNumber = deployIdWarningNumberMap.getOrDefault(syDeploy.getId(), 0L); MonitorTaskResultInfo monitorTaskResultInfo = new MonitorTaskResultInfo(); @@ -474,7 +396,7 @@ public class DeployServiceImpl implements DeployService { resultInfos.add(monitorTaskResultInfo); } - return new PageResult<>(page.getPages(), resultInfos); + return new PageResult<>((long) Math.ceil((double) count / pageSize), resultInfos); } /** @@ -483,7 +405,7 @@ public class DeployServiceImpl implements DeployService { * @param deployType 报警类型 * @return 结果集 */ - private Map getDeployIdWarningNumberMap(Integer deployType) { + private Map getDeployIdWarningNumberMap(Integer deployType) { Aggregation aggregation = Aggregation.newAggregation( Aggregation.match(Criteria.where("alarmType").is(deployType)), Aggregation.group("deployId").count().as("count"), @@ -491,12 +413,12 @@ public class DeployServiceImpl implements DeployService { ); AggregationResults aggregationResults = mongoTemplate.aggregate(aggregation, "plateAlarmMsg", JSONObject.class); List deviceIdsWarningNumberList = aggregationResults.getMappedResults(); - Map resultMap = new HashMap<>(16); + Map resultMap = new HashMap<>(16); for (JSONObject jsonObject : deviceIdsWarningNumberList) { if (jsonObject == null) { continue; } - resultMap.put(jsonObject.getIntValue("_id"), jsonObject.getLongValue("count")); + resultMap.put(jsonObject.getString("_id"), jsonObject.getLongValue("count")); } return resultMap; @@ -511,8 +433,8 @@ public class DeployServiceImpl implements DeployService { * @return 结果集 */ @Override - public PageResult findMonitorTaskDetail(Integer deployId, int currentpage, int pagevolume) { - SyDeploy syDeploy = syDeployMapper.selectByPrimaryKey(deployId); + public PageResult findMonitorTaskDetail(String deployId, int currentpage, int pagevolume) { + SyDeploy syDeploy = mongoTemplate.findOne(Query.query(Criteria.where("id").is(deployId)), SyDeploy.class); Integer deployType = syDeploy.getDeployType(); List resultInfos = new ArrayList<>(); if (null != deployType) { @@ -594,142 +516,36 @@ public class DeployServiceImpl implements DeployService { */ @Scheduled(fixedRate = 60 * 1000) public void monitorDeployState() { - Map map = redisTemplate.opsForHash().entries(GlobalUtil.DEPLOYID_STATRTIME); - Set integers = map.keySet(); - for (Integer integer : integers) { + Map map = redisTemplate.opsForHash().entries(GlobalUtil.DEPLOYID_STATRTIME); + Set integers = map.keySet(); + for (String integer : integers) { String endTime = (String) redisTemplate.opsForHash().get(GlobalUtil.DEPLOYIDANDENDTIME, integer); long currentTimeStamp = System.currentTimeMillis(); long deployEndTimeStamp = Objects.requireNonNull(DateUtil.parse(endTime)).getTime(); long deployStartTimeStamp = DateUtil.parse(map.get(integer)).getTime(); // 没有到开始时间的不做处理 if (currentTimeStamp >= deployStartTimeStamp && currentTimeStamp <= deployEndTimeStamp) { - SyDeploy syDeploy = deployMapper.selectByPrimaryKey(integer); + SyDeploy syDeploy = mongoTemplate.findOne(Query.query(Criteria.where("id").is(integer)), SyDeploy.class); if (syDeploy == null) { return; } if (1 == syDeploy.getStatus()) { syDeploy.setStatus(0); - deployMapper.updateByPrimaryKeySelective(syDeploy); - } - String[] split = syDeploy.getDeployEquip().split(","); - deployEquipmentService.deleteByDeployId(integer); - for (String equipmentId : split) { - insertDeployEquip(integer, Integer.parseInt(equipmentId)); - findDeploysByEquipmentId(Integer.parseInt(equipmentId)); + mongoTemplate.save(syDeploy); } } else if (currentTimeStamp > deployEndTimeStamp) { - SyDeploy syDeploy = deployMapper.selectByPrimaryKey(integer); + SyDeploy syDeploy = mongoTemplate.findOne(Query.query(Criteria.where("id").is(integer)), SyDeploy.class); if (syDeploy == null) { return; } syDeploy.setStatus(1); - deployMapper.updateByPrimaryKeySelective(syDeploy); - String[] split = syDeploy.getDeployEquip().split(","); - - deployEquipmentService.deleteByDeployId(integer); - for (String equipmentId : split) { - findDeploysByEquipmentId(Integer.parseInt(equipmentId)); - } + mongoTemplate.save(syDeploy); redisTemplate.opsForHash().delete(GlobalUtil.DEPLOYID_STATRTIME, integer); } } } /** - * 修改布控任务id和设备id 的是否关闭的状态 - * - * @param deployId 任务id - * @param equipmentId 设备id - * @return 操作结果 - */ - private Integer insertDeployEquip(int deployId, int equipmentId) { - - SyDeployEquipment syDeployEquipment = new SyDeployEquipment(); - syDeployEquipment.setEid(equipmentId); - syDeployEquipment.setDid(deployId); - syDeployEquipment.setIsDelete(0); - return syDeployEquipmentMapper.insert(syDeployEquipment); - } - - /** - * 根据设备id把所有的状态是未删除的所有任务id放到redis中 - * - * @param equipmentId 设备id - */ - private void findDeploysByEquipmentId(int equipmentId) { - SyDeployEquipmentExample example = new SyDeployEquipmentExample(); - SyDeployEquipmentExample.Criteria criteria = example.createCriteria(); - criteria.andEidEqualTo(equipmentId); - criteria.andIsDeleteEqualTo(0); - List syDeployEquipments = syDeployEquipmentMapper.selectByExample(example); - if (syDeployEquipments != null && syDeployEquipments.size() > 0) { - List list = new ArrayList<>(); - for (SyDeployEquipment syDeployEquipment : syDeployEquipments) { - list.add(syDeployEquipment.getDid()); - } - redisTemplate.opsForHash().put(GlobalUtil.IPWITHDEPLOYLIST, equipmentId, list); - } else { - redisTemplate.opsForHash().delete(GlobalUtil.IPWITHDEPLOYLIST, equipmentId); - } - } - - /** - * 通过区域id获取所有的设备id - * - * @param deploy 布控任务 - * @return 设备id集合 - */ - private Set getEquipmens(SyDeploy deploy) { - String areaIds = deploy.getDeployEquip(); - String[] equipmentIds = StringUtils.split(areaIds, ","); - - Set alleqids = new HashSet<>(); - for (int i = 0; i < equipmentIds.length; i++) { - Integer integer = Integer.valueOf(equipmentIds[i]); - List epids = areaEquipmentService.findCaptureById(integer); - alleqids.addAll(epids); - } - return alleqids; - } - - /** - * 删除布控任务和布控设备之间的关系 - * - * @param deployId 布控任务id - */ - private void removeDeploysByDeploy(int deployId) { - SyDeployEquipmentExample syDeployEquipmentExample = new SyDeployEquipmentExample(); - SyDeployEquipmentExample.Criteria criteria = syDeployEquipmentExample.createCriteria(); - criteria.andIsDeleteEqualTo(0); - criteria.andDidEqualTo(deployId); - List syDeployEquipments = syDeployEquipmentMapper.selectByExample(syDeployEquipmentExample); - for (SyDeployEquipment syDeployEquipment : syDeployEquipments) { - syDeployEquipment.setIsDelete(1); - syDeployEquipmentMapper.updateByPrimaryKeySelective(syDeployEquipment); - findDeploysByEquipmentId(deployId); - } - } - - /** - * 添加布控任务和布控设备之间的关系 - * - * @param deployId 布控任务id - */ - private void addDeploysByDeploy(int deployId) { - SyDeployEquipmentExample syDeployEquipmentExample = new SyDeployEquipmentExample(); - SyDeployEquipmentExample.Criteria criteria = syDeployEquipmentExample.createCriteria(); - criteria.andDidEqualTo(deployId); - List syDeployEquipments = syDeployEquipmentMapper.selectByExample(syDeployEquipmentExample); - for (SyDeployEquipment syDeployEquipment : syDeployEquipments) { - syDeployEquipment.setIsDelete(0); - syDeployEquipmentMapper.updateByPrimaryKeySelective(syDeployEquipment); - List lists = (List) redisTemplate.opsForHash().get(GlobalUtil.IPWITHDEPLOYLIST, syDeployEquipment.getEid()); - lists.add(deployId); - redisTemplate.opsForHash().put(GlobalUtil.IPWITHDEPLOYLIST, syDeployEquipment.getEid(), lists); - } - } - - /** * 布控任务- 主列表查询 * * @param monitorMainTableQueryInfo 请求参数 @@ -751,10 +567,6 @@ public class DeployServiceImpl implements DeployService { } else if (null != endTime) { criteria.and("picTime").lte(endTime); } - if (monitorMainTableQueryInfo.getCustomsPass() != null) { - List deviceIds = areaEquipmentService.findCaptureById(monitorMainTableQueryInfo.getCustomsPass()); - criteria.and("deviceId").in(deviceIds); - } if (monitorMainTableQueryInfo.getPlateNumber() != null) { String plateNumber = monitorMainTableQueryInfo.getPlateNumber().replaceAll("\\?", "\\\\S").replaceAll("\\*", ".*"); Pattern pattern = Pattern.compile(plateNumber, Pattern.CASE_INSENSITIVE); @@ -872,16 +684,11 @@ public class DeployServiceImpl implements DeployService { * @return 对应布控id */ @Override - public List getDeployListByLibAndDeployType(int libId, int deployType) { - SyDeployExample example = new SyDeployExample(); - SyDeployExample.Criteria criteria = example.createCriteria(); - criteria.andDeployTypeEqualTo(deployType); - criteria.andIsDeleteEqualTo(0); - List deployList = syDeployMapper.selectByExample(example); - - List list = new ArrayList<>(); + public List getDeployListByLibAndDeployType(String libId, int deployType) { + List deployList = mongoTemplate.find(Query.query(Criteria.where("deployType").is(deployType).and("isDelete").is(0)), SyDeploy.class); + List list = new ArrayList<>(); if (deployList != null) { - list = deployList.stream().filter(syDeploy -> Arrays.asList(syDeploy.getDeployLib().split(",")).contains(String.valueOf(libId))) + list = deployList.stream().filter(syDeploy -> Arrays.asList(syDeploy.getDeployLib().split(",")).contains(libId)) .map(SyDeploy::getId).collect(Collectors.toList()); } return list; @@ -1051,7 +858,7 @@ public class DeployServiceImpl implements DeployService { map.put("threadNum", 2); map.put("feature", fea); String s = vehicleEngine.searchDataFromDeployDb(map); - logger.info("searchDataFromDeployDb: " + s); + log.debug("searchDataFromDeployDb: " + s); ResponseParamPerson responseParamPerson = JSON.parseObject(s, ResponseParamPerson.class); String code = responseParamPerson.getCode(); if ("0".equals(code)) { @@ -1061,7 +868,7 @@ public class DeployServiceImpl implements DeployService { int size = result.size(); for (int i = 0; i < size; i++) { String retrieveKey = result.get(i).getRetrieveKey(); - logger.info("retrieveKey: " + retrieveKey); + log.debug("retrieveKey: " + retrieveKey); String[] split = retrieveKey.split("&"); String key = deployId + "|" + split[1]; String deployLib = (String) redisTemplate.opsForHash().get(GlobalUtil.DEPLOY_LIB, deployId); @@ -1074,7 +881,7 @@ public class DeployServiceImpl implements DeployService { .deviceId(deviceId).equipmentName(equipmentName).longitude(longitude).latitude(latitude).libId(split[0]) .libUrl(split[2]).picTime(captureTime).alarmTime(DateUtil.now()).snapshotUrl(url) .plateNum(null).alarmType(2).similarity(score).build(); - logger.info("plateAlarmMsg: " + plateAlarmMsg.toString()); + log.debug("plateAlarmMsg: " + plateAlarmMsg.toString()); plateAlarmMsgProducer(plateAlarmMsg); break; } else if (staus != null && Integer.parseInt(staus.toString()) == 1) { diff --git a/src/main/java/com/objecteye/service/impl/EquipmentServiceImpl.java b/src/main/java/com/objecteye/service/impl/EquipmentServiceImpl.java deleted file mode 100644 index 5226a00..0000000 --- a/src/main/java/com/objecteye/service/impl/EquipmentServiceImpl.java +++ /dev/null @@ -1,324 +0,0 @@ -package com.objecteye.service.impl; - -import cn.hutool.core.date.DateUtil; -import com.github.pagehelper.Page; -import com.github.pagehelper.PageHelper; -import com.objecteye.entity.*; -import com.objecteye.mapper.SyAreaEquipmentMapper; -import com.objecteye.mapper.SyEquipmentMapper; -import com.objecteye.service.DeployService; -import com.objecteye.service.EquipmentService; -import com.objecteye.service.IVehicleViolationsService; -import com.objecteye.utils.GlobalUtil; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.ArrayList; -import java.util.List; - -/** - * 服务实现层 - * - * @author Administrator - */ -@Service -public class EquipmentServiceImpl implements EquipmentService { - - @Autowired - private SyEquipmentMapper equipmentMapper; - @Autowired - private SyAreaEquipmentMapper syAreaEquipmentMapper; - @Autowired - private DeployService deployService; - @Autowired - private IVehicleViolationsService vehicleViolationsService; - - - @Autowired - private RedisTemplate redisTemplate; - - /** - * 查询全部 - */ - @Override - public List findAll() { - - SyEquipmentExample example = new SyEquipmentExample(); - SyEquipmentExample.Criteria criteria = example.createCriteria(); - criteria.andIsDeleteEqualTo(0); - List syEquipments = equipmentMapper.selectByExample(example); - - return syEquipments; - } - - /** - * 查询全部id - */ - @Override - public List findAllId() { - List all = findAll(); - ArrayList list = new ArrayList<>(); - if (all != null && all.size() > 0) { - int size = all.size(); - for (int i = 0; i < size; i++) { - Integer id = all.get(i).getId(); - list.add(id); - } - } - return list; - } - - - /** - * 按分页查询 - */ - @Override - public PageResult findPage(int pageNum, int pageSize) { - PageHelper.startPage(pageNum, pageSize); - SyEquipmentExample example = new SyEquipmentExample(); - SyEquipmentExample.Criteria criteria = example.createCriteria(); - criteria.andIsDeleteEqualTo(0); - Page page = (Page) equipmentMapper.selectByExample(example); - return new PageResult(page.getPages(), page.getResult()); - } - - /** - * 增加 - */ - @Override - public int add(SyEquipment equipment) { - String formatDate = DateUtil.now(); - equipment.setCreateDate(formatDate); - equipment.setUpdateDate(formatDate); - equipment.setIsDelete(0); - equipment.setStatus(0); - int insert = equipmentMapper.insertSelective(equipment); - if (insert != 0) { - SyAreaEquipment syAreaEquipment = new SyAreaEquipment(); - syAreaEquipment.setIsEquipment(1); - syAreaEquipment.setName(equipment.getEquipmentName()); - syAreaEquipment.setTypeId(equipment.getId()); - syAreaEquipment.setParentId(equipment.getAid()); - syAreaEquipmentMapper.insert(syAreaEquipment); - Integer id1 = equipment.getId(); - redisTemplate.opsForHash().put(GlobalUtil.EQUIPMENTIPANDID, equipment.getEquipmentIp(), id1); - } - return insert; - } - - /** - * 修改 - */ - @Override - @Transactional(rollbackFor = Exception.class) - public int update(SyEquipment equipment) { - - String now = DateUtil.now(); - equipment.setUpdateDate(now); - - SyEquipment equipment1 = findByName(equipment.getEquipmentName()); - SyEquipment equipment2 = findOne(equipment.getId()); - if (equipment1 != null) { - if (equipment.getEquipmentName().equals(equipment2.getEquipmentName())) { - return equipmentMapper.updateByPrimaryKeySelective(equipment); - } else { - return 0; - } - } else { - //同时更新区域设备树信息 - SyAreaEquipmentExample syAreaEquipmentExample = new SyAreaEquipmentExample(); - SyAreaEquipmentExample.Criteria criteria = syAreaEquipmentExample.createCriteria(); - criteria.andTypeIdEqualTo(equipment.getId()); - SyAreaEquipment sy = new SyAreaEquipment(); - sy.setName(equipment.getEquipmentName()); - syAreaEquipmentMapper.updateByExampleSelective(sy, syAreaEquipmentExample); - return equipmentMapper.updateByPrimaryKeySelective(equipment); - - } - } - - /** - * 根据ID获取实体 - * - * @param id - * @return - */ - @Override - public SyEquipment findOne(int id) { - SyEquipmentExample example = new SyEquipmentExample(); - SyEquipmentExample.Criteria criteria = example.createCriteria(); - criteria.andIsDeleteEqualTo(0); - criteria.andIdEqualTo(id); - List syEquipments = equipmentMapper.selectByExample(example); - if (null == syEquipments || syEquipments.size() == 0) { - return null; - } - return syEquipments.get(0); - } - - @Override - public SyEquipment findByIp(String ip) { - SyEquipmentExample example = new SyEquipmentExample(); - SyEquipmentExample.Criteria criteria = example.createCriteria(); - criteria.andIsDeleteEqualTo(0); - criteria.andEquipmentIpEqualTo(ip); - List syEquipments = equipmentMapper.selectByExample(example); - if (null == syEquipments || syEquipments.size() == 0) { - return null; - } - return syEquipments.get(0); - } - - @Override - public SyEquipment findByName(String name) { - SyEquipmentExample example = new SyEquipmentExample(); - SyEquipmentExample.Criteria criteria = example.createCriteria(); - criteria.andIsDeleteEqualTo(0); - criteria.andEquipmentNameEqualTo(name); - List syEquipments = equipmentMapper.selectByExample(example); - if (null == syEquipments || syEquipments.size() == 0) { - return null; - } - return syEquipments.get(0); - } - - - @Override - public SyEquipment findByPort(String port) { - SyEquipmentExample example = new SyEquipmentExample(); - SyEquipmentExample.Criteria criteria = example.createCriteria(); - criteria.andIsDeleteEqualTo(0); - criteria.andEquipmentPortEqualTo(port); - List syEquipments = equipmentMapper.selectByExample(example); - if (null == syEquipments || syEquipments.size() == 0) { - return null; - } - return syEquipments.get(0); - } - - - /** - * 批量删除 - */ - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(int[] ids) { - for (int id : ids) { - - SyEquipment syEquipment = equipmentMapper.selectByPrimaryKey(id); - syEquipment.setIsDelete(1); - equipmentMapper.deleteByPrimaryKey(id); - SyAreaEquipmentExample example = new SyAreaEquipmentExample(); - SyAreaEquipmentExample.Criteria criteria = example.createCriteria(); - criteria.andTypeIdEqualTo(id); - syAreaEquipmentMapper.deleteByExample(example); - // 布控预警删除 - if (redisTemplate.opsForHash().hasKey(GlobalUtil.IPWITHDEPLOYLIST, id)) { - List integers = (List) redisTemplate.opsForHash().get(GlobalUtil.IPWITHDEPLOYLIST, id); - int size = integers.size(); - for (int i = 0; i < size; i++) { - int[] deployId = {integers.get(i)}; - deployService.delete(deployId); - } - } - // 违规删除 - if (redisTemplate.opsForHash().hasKey(GlobalUtil.FORBIDDEN_TASK, id)) { - List syVehicleForbidenTasks = (List) redisTemplate.opsForHash().get(GlobalUtil.FORBIDDEN_TASK, id); - if (syVehicleForbidenTasks != null) { - vehicleViolationsService.forbiddenTaskDelete(syVehicleForbidenTasks.stream().map(syVehicleForbidenTask -> String.valueOf(syVehicleForbidenTask.getId())).toArray(String[]::new)); - } - } - redisTemplate.opsForHash().delete(GlobalUtil.EQUIPMENTIPANDID, syEquipment.getEquipmentIp()); - } - } - - /** - * 分页查询 - * - * @param equipment - * @param pageNum 当前页码 - * @param pageSize 每页记录数 - * @return - */ - - @Override - public PageResult findPage(SyEquipment equipment, int pageNum, int pageSize) { - PageHelper.startPage(pageNum, pageSize); - - SyEquipmentExample example = new SyEquipmentExample(); - SyEquipmentExample.Criteria criteria = example.createCriteria(); - criteria.andIsDeleteEqualTo(0); - - if (equipment != null) { - if (equipment.getEquipmentName() != null && equipment.getEquipmentName().length() > 0) { - criteria.andEquipmentNameLike("%" + equipment.getEquipmentName() + "%"); - } - if (equipment.getEquipmentIp() != null && equipment.getEquipmentIp().length() > 0) { - criteria.andEquipmentIpLike("%" + equipment.getEquipmentIp() + "%"); - } - if (equipment.getRtspUrl() != null && equipment.getRtspUrl().length() > 0) { - criteria.andRtspUrlLike("%" + equipment.getRtspUrl() + "%"); - } - if (equipment.getLongitude() != null && equipment.getLongitude().length() > 0) { - criteria.andLongitudeLike("%" + equipment.getLongitude() + "%"); - } - if (equipment.getLatitude() != null && equipment.getLatitude().length() > 0) { - criteria.andLatitudeLike("%" + equipment.getLatitude() + "%"); - } - if (equipment.getOrientation() != null && equipment.getOrientation().length() > 0) { - criteria.andOrientationLike("%" + equipment.getOrientation() + "%"); - } - if (equipment.getUsername() != null && equipment.getUsername().length() > 0) { - criteria.andUsernameLike("%" + equipment.getUsername() + "%"); - } - if (equipment.getPassword() != null && equipment.getPassword().length() > 0) { - criteria.andPasswordLike("%" + equipment.getPassword() + "%"); - } - if (equipment.getEquipmentPort() != null && equipment.getEquipmentPort().length() > 0) { - criteria.andEquipmentPortLike("%" + equipment.getEquipmentPort() + "%"); - } - if (equipment.getIntentPort() != null && equipment.getIntentPort().length() > 0) { - criteria.andIntentPortLike("%" + equipment.getIntentPort() + "%"); - } - if (equipment.getVendor() != null && equipment.getVendor().length() > 0) { - criteria.andVendorLike("%" + equipment.getVendor() + "%"); - } - if (equipment.getDescription() != null && equipment.getDescription().length() > 0) { - criteria.andDescriptionLike("%" + equipment.getDescription() + "%"); - } - if (equipment.getCreateDate() != null && equipment.getCreateDate().length() > 0) { - criteria.andCreateDateLike("%" + equipment.getCreateDate() + "%"); - } - if (equipment.getUpdateDate() != null && equipment.getUpdateDate().length() > 0) { - criteria.andUpdateDateLike("%" + equipment.getUpdateDate() + "%"); - } - if (equipment.getPlace() != null && equipment.getPlace().length() > 0) { - criteria.andPlaceLike("%" + equipment.getPlace() + "%"); - } - } - Page page = (Page) equipmentMapper.selectByExample(example); - return new PageResult(page.getTotal(), page.getResult()); - } - - @Override - public int updateStatusById(int id) { - SyEquipment equipment = equipmentMapper.selectByPrimaryKey(id); - if (equipment == null) { - return -1; - } else { - Integer status = equipment.getStatus(); - int i = 0; - if (status == 0) { - equipment.setStatus(1); - i = equipmentMapper.updateByPrimaryKeySelective(equipment); - } else { - equipment.setStatus(0); - i = equipmentMapper.updateByPrimaryKeySelective(equipment); - } - return i; - } - - } -} diff --git a/src/main/java/com/objecteye/service/impl/FeatureServiceImpl.java b/src/main/java/com/objecteye/service/impl/FeatureServiceImpl.java index 44c0f54..00d23af 100644 --- a/src/main/java/com/objecteye/service/impl/FeatureServiceImpl.java +++ b/src/main/java/com/objecteye/service/impl/FeatureServiceImpl.java @@ -1,15 +1,16 @@ package com.objecteye.service.impl; import cn.hutool.core.date.DateUtil; -import com.github.pagehelper.Page; -import com.github.pagehelper.PageHelper; -import com.objecteye.entity.*; -import com.objecteye.mapper.SyFeatureMapper; -import com.objecteye.mapper.SyPersonnelMapper; +import com.objecteye.entity.FeatureResultMsg; +import com.objecteye.entity.PageResult; +import com.objecteye.entity.SyFeature; +import com.objecteye.entity.SyPersonnel; import com.objecteye.service.DeployService; import com.objecteye.service.FeatureService; -import com.objecteye.service.PersonnelService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; @@ -27,24 +28,15 @@ import java.util.Map; public class FeatureServiceImpl implements FeatureService { @Autowired - private SyFeatureMapper featureMapper; - @Autowired - private SyPersonnelMapper syPersonnelMapper; - @Autowired - private PersonnelService personnelService; - @Autowired private DeployService deployService; @Autowired private RedisTemplate redisTemplate; + @Autowired + private MongoTemplate mongoTemplate; @Override public List findAll() { - SyFeatureExample example = new SyFeatureExample(); - SyFeatureExample.Criteria criteria = example.createCriteria(); - criteria.andIsDeleteEqualTo(0); - criteria.andIsSingleEqualTo(0); - - return featureMapper.selectByExample(example); + return mongoTemplate.find(Query.query(Criteria.where("isDelete").is(0).and("isSingle").is(0)), SyFeature.class); } /** @@ -52,94 +44,51 @@ public class FeatureServiceImpl implements FeatureService { */ @Override public PageResult findPage(int pageNum, int pageSize) { - PageHelper.startPage(pageNum, pageSize); - - SyFeatureExample example = new SyFeatureExample(); - SyFeatureExample.Criteria criteria = example.createCriteria(); - criteria.andIsDeleteEqualTo(0); - criteria.andIsSingleEqualTo(0); + List result = mongoTemplate.find(Query.query(Criteria.where("isDelete").is(0).and("isSingle").is(0)) + .limit(pageSize).skip((pageNum - 1) * pageSize), SyFeature.class); + long count = mongoTemplate.count(Query.query(Criteria.where("isDelete").is(0).and("isSingle").is(0)), SyFeature.class); - Page page = (Page) featureMapper.selectByExample(example); List featureResultMsgs = new ArrayList<>(); - - List result = page.getResult(); - if (result != null && result.size() > 0) { - int size = result.size(); - for (int i = 0; i < size; i++) { - FeatureResultMsg featureResultMsg = new FeatureResultMsg(); - SyFeature syFeature = result.get(i); - featureResultMsg.setId(syFeature.getId()); - featureResultMsg.setName(syFeature.getName()); - featureResultMsg.setCount(syFeature.getCount()); - featureResultMsg.setCreateDate(syFeature.getCreateDate()); - /*List integers = deployFeatureService.selectByFeatureId(syFeature.getId()); - List deployName = new ArrayList<>(); - if(integers != null && integers.size() > 0){ - int size1 = integers.size(); - for (int j = 0; j < size1; j++) { - Integer integer = integers.get(j); - SyDeploy deploy = deployService.findOne(integer); - deployName.add(deploy.getName()); - } - } - featureResultMsg.setDeplyNameList(deployName); - */ - featureResultMsgs.add(featureResultMsg); - } - return new PageResult(page.getPages(), featureResultMsgs); + for (SyFeature feature : result) { + FeatureResultMsg featureResultMsg = new FeatureResultMsg(); + featureResultMsg.setId(feature.getId()); + featureResultMsg.setName(feature.getName()); + featureResultMsg.setCount(feature.getCount()); + featureResultMsg.setCreateDate(feature.getCreateDate()); + featureResultMsgs.add(featureResultMsg); } - return null; + return new PageResult<>((long) Math.ceil((double) count / pageSize), featureResultMsgs); } /** * 增加 + * + * @return */ @Override - public int add(SyFeature feature) { - //Jedis conn = JedisUtil.getConn(); + public String add(SyFeature feature) { String strDate = DateUtil.now(); feature.setCount(0); feature.setCreateDate(strDate); feature.setUpdateDate(strDate); feature.setIsDelete(0); feature.setIsSingle(0); - /*String porlib = conn.get("LIBRARY_DB_PORLIB"); - if (null == porlib) { - GlobalUtil.createFaceLib("PORLIB","PORLIB","存放人像库"); - conn.set("PORLIB","PORLIB"); - }*/ - int insert = featureMapper.insert(feature); - return insert; - } - - @Override - public int addSingle(SyFeature feature) { - /*Jedis conn = JedisUtil.getConn(); - String strDate = DateUtil.now(); - feature.setCount(1); - feature.setCreateDate(strDate); - feature.setUpdateDate(strDate); - feature.setIsDelete(0); - feature.setIsSingle(1); - String porlib = conn.get("LIBRARY_DB_PORLIB"); - if (null == porlib) { - GlobalUtil.createFaceLib("PORLIB","PORLIB","存放人像库"); - conn.set("PORLIB","PORLIB"); - } - featureMapper.insert(feature);*/ - - return 0; + feature = mongoTemplate.insert(feature); + return feature.getId(); } /** * 修改 + * + * @return */ @Override - public int update(SyFeature feature) { + public String update(SyFeature feature) { String now = DateUtil.now(); feature.setUpdateDate(now); - return featureMapper.updateByPrimaryKeySelective(feature); + mongoTemplate.save(feature); + return feature.getId(); } /** @@ -149,70 +98,62 @@ public class FeatureServiceImpl implements FeatureService { * @return */ @Override - public SyFeature findOne(int id) { - return featureMapper.selectByPrimaryKey(id); + public SyFeature findOne(String id) { + return mongoTemplate.findOne(Query.query(Criteria.where("id").is(id)), SyFeature.class); } /** * 批量删除 + * + * @param ids */ @Override - public void delete(int[] ids) { - - for (int id : ids) { - List deployList = deployService.getDeployListByLibAndDeployType(id, 2); - SyFeature syFeature = featureMapper.selectByPrimaryKey(id); + public void delete(String[] ids) { + for (String id : ids) { + List deployList = deployService.getDeployListByLibAndDeployType(id, 2); + SyFeature syFeature = mongoTemplate.findOne(Query.query(Criteria.where("id").is(id)), SyFeature.class); syFeature.setIsDelete(1); - SyPersonnelExample example = new SyPersonnelExample(); - SyPersonnelExample.Criteria criteria = example.createCriteria(); - criteria.andFidEqualTo(id); - List syPersonnels = syPersonnelMapper.selectByExample(example); - if (syPersonnels != null && syPersonnels.size() > 0) { + List syPersonnels = mongoTemplate.find(Query.query(Criteria.where("fid").is(id)), SyPersonnel.class); + if (syPersonnels.size() > 0) { for (SyPersonnel syPersonnel : syPersonnels) { syPersonnel.setStatus(1); - syPersonnelMapper.updateByPrimaryKey(syPersonnel); + mongoTemplate.save(syPersonnel); redisTemplate.opsForHash().delete("personUrl", syPersonnel.getId()); } } if (deployList != null && deployList.size() > 0) { - int size = deployList.size(); - for (int i = 0; i < size; i++) { - Integer deployId = deployList.get(i); + for (String deployId : deployList) { String key = deployId + "|" + id; redisTemplate.opsForHash().delete(key); - int[] deploy = {deployId}; + String[] deploy = {deployId}; deployService.delete(deploy); } } - featureMapper.updateByPrimaryKeySelective(syFeature); + mongoTemplate.save(syFeature); } } @Override public PageResult findPage(SyFeature feature, int pageNum, int pageSize) { - PageHelper.startPage(pageNum, pageSize); - - SyFeatureExample example = new SyFeatureExample(); - SyFeatureExample.Criteria criteria = example.createCriteria(); - criteria.andIsDeleteEqualTo(0); - + Criteria criteria = Criteria.where("isDelete").is(0); if (feature != null) { if (feature.getName() != null && feature.getName().length() > 0) { - criteria.andNameLike("%" + feature.getName() + "%"); + criteria.and("name").regex(".*" + feature.getName() + ".*"); } if (feature.getCreateDate() != null && feature.getCreateDate().length() > 0) { - criteria.andCreateDateLike("%" + feature.getCreateDate() + "%"); + criteria.and("createDate").regex(".*" + feature.getCreateDate() + ".*"); } if (feature.getUpdateDate() != null && feature.getUpdateDate().length() > 0) { - criteria.andUpdateDateLike("%" + feature.getUpdateDate() + "%"); + criteria.and("updateDate").regex(".*" + feature.getUpdateDate() + ".*"); } if (feature.getDescription() != null && feature.getDescription().length() > 0) { - criteria.andDescriptionLike("%" + feature.getDescription() + "%"); + criteria.and("description").regex(".*" + feature.getDescription() + ".*"); } } - Page page = (Page) featureMapper.selectByExample(example); - return new PageResult(page.getTotal(), page.getResult()); + List syFeatures = mongoTemplate.find(Query.query(criteria).limit(pageSize).skip((pageNum - 1) * pageSize), SyFeature.class); + long total = mongoTemplate.count(Query.query(criteria), SyFeature.class); + return new PageResult<>((long) Math.ceil((double) total / pageSize), syFeatures); } /** @@ -220,28 +161,23 @@ public class FeatureServiceImpl implements FeatureService { * @return */ @Override - public int updateCountById(SyFeature feature) { - - return featureMapper.updateByPrimaryKeySelective(feature); + public String updateCountById(SyFeature feature) { + mongoTemplate.save(feature); + return feature.getId(); } @Override public List> findAllName() { List> list = new ArrayList<>(); List syFeatures = findAll(); - if (syFeatures != null) { - int size = syFeatures.size(); - for (int i = 0; i < size; i++) { - Map map = new HashMap<>(16); - SyFeature syFeature = syFeatures.get(i); - String name = syFeature.getName(); - int id = syFeature.getId(); - map.put("value", id + ""); - map.put("name", name); - list.add(map); - } - return list; + for (SyFeature feature : syFeatures) { + Map map = new HashMap<>(16); + String name = feature.getName(); + String id = feature.getId(); + map.put("value", id + ""); + map.put("name", name); + list.add(map); } - return null; + return list; } } diff --git a/src/main/java/com/objecteye/service/impl/HumanVehicleAssociationServiceImpl.java b/src/main/java/com/objecteye/service/impl/HumanVehicleAssociationServiceImpl.java index 2db8b25..f4d29f7 100644 --- a/src/main/java/com/objecteye/service/impl/HumanVehicleAssociationServiceImpl.java +++ b/src/main/java/com/objecteye/service/impl/HumanVehicleAssociationServiceImpl.java @@ -3,10 +3,7 @@ package com.objecteye.service.impl; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.objecteye.entity.PageResult; -import com.objecteye.entity.SyEquipment; -import com.objecteye.mapper.SyEquipmentMapper; import com.objecteye.pojo.*; -import com.objecteye.service.AreaEquipmentService; import com.objecteye.service.HumanVehicleAssociationService; import com.objecteye.utils.CompareDistance; import com.objecteye.utils.HttpClientUtils; @@ -36,8 +33,6 @@ import java.util.stream.Collectors; public class HumanVehicleAssociationServiceImpl implements HumanVehicleAssociationService { @Autowired - private SyEquipmentMapper syEquipmentMapper; - @Autowired private MongoTemplate mongoTemplate; @Autowired private HttpClientUtils httpClientUtils; @@ -45,8 +40,6 @@ public class HumanVehicleAssociationServiceImpl implements HumanVehicleAssociati private VehicleEngine vehicleEngine; @Autowired private CompareDistance compareDistance; - @Autowired - private AreaEquipmentService areaEquipmentService; @Value("${topN}") private int topN; @Value("${threadNum}") @@ -114,20 +107,7 @@ public class HumanVehicleAssociationServiceImpl implements HumanVehicleAssociati Map retrieveKeyDbResultMap = list.stream() .collect(Collectors.toMap(SearchDataFromRetrieveDbResult::getRetrieveKey, a -> a, (k1, k2) -> k1)); - //将用户传来的节点转换为List - List listCustomspass = Arrays.stream(customspass).boxed().collect(Collectors.toList()); - //获取到所有的用户请求的卡口集合 - Set alleqids = new HashSet<>(); - - for (Integer in : listCustomspass) { - List epids = areaEquipmentService.findCaptureById(in); - alleqids.addAll(epids); - } - Criteria criteria = new Criteria(); - if (alleqids.size() > 0) { - criteria.and("deviceid").in(alleqids); - } if (starttime == null) { if (endtime != null) { criteria.and("pictime").lte(endtime); @@ -143,11 +123,9 @@ public class HumanVehicleAssociationServiceImpl implements HumanVehicleAssociati primaryStepQuery.fields().include("id"); primaryStepQuery.fields().include("personid"); primaryStepQuery.fields().include("pictime"); - primaryStepQuery.fields().include("equipmentName"); primaryStepQuery.fields().include("vehicle_plate_hphm"); primaryStepQuery.fields().include("picurl"); primaryStepQuery.fields().include("personUrl"); - primaryStepQuery.fields().include("deviceid"); // 数据库过滤结果 List rabbitMqVehicles = mongoTemplate.find(primaryStepQuery, RabbitMQVehicle.class); @@ -185,17 +163,6 @@ public class HumanVehicleAssociationServiceImpl implements HumanVehicleAssociati list = new ArrayList(); //首先根据车辆号牌查询到相关的车辆 List byHphm = findByHphm(starttime, endtime, customspass, hphm, currentpage, pagevolume); - - //将用户传来的节点转换为List - List listCustomspass = Arrays.stream(customspass).boxed().collect(Collectors.toList()); - //获取到所有的用户请求的卡口集合 - Set alleqids = new HashSet<>(); - for (Integer in : listCustomspass) { - List epids = areaEquipmentService.findCaptureById(in); - for (int j = 0; j < epids.size(); j++) { - alleqids.add(epids.get(j)); - } - } for (RabbitMQVehicle rmqv : byHphm) { Long pictime = rmqv.getPictime(); @@ -207,11 +174,7 @@ public class HumanVehicleAssociationServiceImpl implements HumanVehicleAssociati SearchPeopleOfHphmInfo searchPeopleOfHphmInfo = new SearchPeopleOfHphmInfo(rmqv.getId(), simpleDateFormat.format(new Date(rmqv.getPictime())), rmqv.getEquipmentName(), rmqv.getVehicle_plate_hphm(), rmqv.getPersonUrl()); - int deviceid = rmqv.getDeviceid(); - //获取当前设备id - if (alleqids.contains(deviceid)) { - list.add(searchPeopleOfHphmInfo); - } + list.add(searchPeopleOfHphmInfo); } } searchPeopleOfhphmResult.setTotal((int) Math.ceil((double) list.size() / pagevolume)); @@ -408,10 +371,6 @@ public class HumanVehicleAssociationServiceImpl implements HumanVehicleAssociati String id = rabbitMQVehicle1.getId(); rowData.put("id", id); rowData.put("hphm", rabbitMQVehicle1.getVehicle_plate_hphm()); - //获取设备id,然后通过设备id查询到设备的名称 - int deviceid = rabbitMQVehicle1.getDeviceid(); - SyEquipment syEquipment = syEquipmentMapper.selectByPrimaryKey(deviceid); - rowData.put("site", syEquipment.getEquipmentName()); Long pictime = rabbitMQVehicle1.getPictime(); rowData.put("phototime", simpleDateFormat.format(new Date(pictime))); rowData.put("recordid", rabbitMQVehicle1.getRecordid()); diff --git a/src/main/java/com/objecteye/service/impl/LocusOrbitServiceImpl.java b/src/main/java/com/objecteye/service/impl/LocusOrbitServiceImpl.java index 78647d2..7c14ba3 100644 --- a/src/main/java/com/objecteye/service/impl/LocusOrbitServiceImpl.java +++ b/src/main/java/com/objecteye/service/impl/LocusOrbitServiceImpl.java @@ -8,11 +8,8 @@ import com.objecteye.entity.LocusOrbitQueryParams; import com.objecteye.entity.LocusOrbitResultParams; import com.objecteye.entity.PageResult; import com.objecteye.pojo.RabbitMQVehicle; -import com.objecteye.service.AreaEquipmentService; import com.objecteye.service.ILocusOrbitService; import com.objecteye.utils.GlobalUtil; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Sort; import org.springframework.data.mongodb.core.MongoTemplate; @@ -35,8 +32,6 @@ import java.util.List; @Service public class LocusOrbitServiceImpl implements ILocusOrbitService { - private final Logger logger = LoggerFactory.getLogger(LocusOrbitServiceImpl.class); - private final String URL = "http://192.168.10.4:10002/vehicle/analysisFile"; /** @@ -50,8 +45,6 @@ public class LocusOrbitServiceImpl implements ILocusOrbitService { private final Long DISTINCT_TIME_INTERVAL = 60000L; @Autowired - private AreaEquipmentService areaEquipmentService; - @Autowired private MongoTemplate mongoTemplate; /** @@ -128,11 +121,6 @@ public class LocusOrbitServiceImpl implements ILocusOrbitService { */ private Query locusOrbitQueryConditionDbHandle(LocusOrbitQueryParams locusOrbitQueryParams) { Criteria criteria = new Criteria(); - // 地区id - if (null != locusOrbitQueryParams.getCustomsPass()) { - List customsPass = areaEquipmentService.findCaptureById(locusOrbitQueryParams.getCustomsPass()); - criteria.and("deviceid").in(customsPass); - } // 车牌 criteria.and("vehicle_plate_hphm").is(locusOrbitQueryParams.getPlateNumber()); // 开始时间 @@ -155,7 +143,6 @@ public class LocusOrbitServiceImpl implements ILocusOrbitService { query.fields().include("pictime"); query.fields().include("longitude"); query.fields().include("latitude"); - query.fields().include("equipmentName"); query.fields().include("snapshoturl"); query.fields().include("vehicle_plate_hphm"); diff --git a/src/main/java/com/objecteye/service/impl/PersonnelServiceImpl.java b/src/main/java/com/objecteye/service/impl/PersonnelServiceImpl.java index 9915936..9a9a867 100644 --- a/src/main/java/com/objecteye/service/impl/PersonnelServiceImpl.java +++ b/src/main/java/com/objecteye/service/impl/PersonnelServiceImpl.java @@ -3,11 +3,10 @@ package com.objecteye.service.impl; import cn.hutool.core.date.DateUtil; import com.alibaba.fastjson.JSONObject; -import com.github.pagehelper.Page; -import com.github.pagehelper.PageHelper; -import com.objecteye.entity.*; -import com.objecteye.mapper.SyFeatureMapper; -import com.objecteye.mapper.SyPersonnelMapper; +import com.objecteye.entity.PageResult; +import com.objecteye.entity.PersonnelResultMsg; +import com.objecteye.entity.SyFeature; +import com.objecteye.entity.SyPersonnel; import com.objecteye.service.DeployService; import com.objecteye.service.FeatureService; import com.objecteye.service.PersonnelService; @@ -15,6 +14,9 @@ import com.objecteye.utils.GlobalUtil; import com.objecteye.utils.VehicleEngine; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -38,10 +40,6 @@ import java.util.Map; public class PersonnelServiceImpl implements PersonnelService { @Autowired - private SyPersonnelMapper personnelMapper; - @Autowired - private SyFeatureMapper syFeatureMapper; - @Autowired private FeatureService featureService; @Autowired private VehicleEngine vehicleEngine; @@ -49,6 +47,8 @@ public class PersonnelServiceImpl implements PersonnelService { private RedisTemplate redisTemplate; @Autowired private DeployService deployService; + @Autowired + private MongoTemplate mongoTemplate; @Value("${picture.url}") private String picIpAndPort; @@ -62,10 +62,7 @@ public class PersonnelServiceImpl implements PersonnelService { @Override public List findAll() { - SyPersonnelExample example = new SyPersonnelExample(); - SyPersonnelExample.Criteria criteria = example.createCriteria(); - criteria.andStatusEqualTo(0); - return personnelMapper.selectByExample(example); + return mongoTemplate.find(Query.query(Criteria.where("status").is(0)), SyPersonnel.class); } /** @@ -74,28 +71,28 @@ public class PersonnelServiceImpl implements PersonnelService { @Override public PageResult findPage(int pageNum, int pageSize) { - PageHelper.startPage(pageNum, pageSize); - - SyPersonnelExample example = new SyPersonnelExample(); - SyPersonnelExample.Criteria criteria = example.createCriteria(); - criteria.andStatusEqualTo(0); - Page page = (Page) personnelMapper.selectByExample(example); - return new PageResult(page.getPages(), page.getResult()); + List syPersonnels = mongoTemplate + .find(Query.query(Criteria.where("status").is(0)).limit(pageSize).skip((pageNum - 1) * pageSize), SyPersonnel.class); + long count = mongoTemplate.count(Query.query(Criteria.where("status").is(0)), SyPersonnel.class); + return new PageResult<>((long) Math.ceil((double) count / pageSize), syPersonnels); } /** * 增加 + * + * @return */ @Override - public int add(SyPersonnel personnel) { + public String add(SyPersonnel personnel) { String now = DateUtil.now(); personnel.setCreateDate(now); personnel.setUpdateDate(now); personnel.setStatus(0); personnel.setConreason(null); - return personnelMapper.insert(personnel); + personnel = mongoTemplate.insert(personnel); + return personnel.getId(); } @@ -108,8 +105,7 @@ public class PersonnelServiceImpl implements PersonnelService { String now = DateUtil.now(); personnel.setStatus(0); personnel.setUpdateDate(now); - personnelMapper.updateByPrimaryKey(personnel); - + mongoTemplate.save(personnel); } @@ -121,32 +117,33 @@ public class PersonnelServiceImpl implements PersonnelService { */ @Override - public SyPersonnel findOne(int id) { - return personnelMapper.selectByPrimaryKey(id); + public SyPersonnel findOne(String id) { + return mongoTemplate.findOne(Query.query(Criteria.where("id").is(id)), SyPersonnel.class); } /** * 批量删除 + * + * @param ids */ @Override @Transactional(rollbackFor = Exception.class) - public void delete(int[] ids) { - - for (int id : ids) { - SyPersonnel syPersonnel = personnelMapper.selectByPrimaryKey(id); + public void delete(String[] ids) { + for (String id : ids) { + SyPersonnel syPersonnel = mongoTemplate.findOne(Query.query(Criteria.where("id").is(id)), SyPersonnel.class); syPersonnel.setStatus(1); - personnelMapper.updateByPrimaryKey(syPersonnel); - Integer fid = syPersonnel.getFid(); - Integer personCountByFid = findPersonCountByFid(fid); - SyFeature syFeature = syFeatureMapper.selectByPrimaryKey(fid); - syFeature.setCount(personCountByFid); - syFeatureMapper.updateByPrimaryKeySelective(syFeature); - List deployListByLibAndDeployType = deployService.getDeployListByLibAndDeployType(fid, 2); + mongoTemplate.save(syPersonnel); + String fid = syPersonnel.getFid(); + long personCountByFid = findPersonCountByFid(fid); + SyFeature syFeature = mongoTemplate.findOne(Query.query(Criteria.where("id").is(fid)), SyFeature.class); + syFeature.setCount((int) personCountByFid); + mongoTemplate.save(syFeature); + List deployListByLibAndDeployType = deployService.getDeployListByLibAndDeployType(fid, 2); if (deployListByLibAndDeployType != null && deployListByLibAndDeployType.size() > 0) { - for (int i = 0; i < deployListByLibAndDeployType.size(); i++) { - String key = deployListByLibAndDeployType.get(i) + "|" + fid; + for (String s : deployListByLibAndDeployType) { + String key = s + "|" + fid; if (redisTemplate.opsForHash().hasKey(key, id)) { redisTemplate.opsForHash().delete(key, id); } @@ -157,102 +154,49 @@ public class PersonnelServiceImpl implements PersonnelService { HashMap map = new HashMap<>(); map.put("retrieveKey", key); redisTemplate.opsForHash().delete("personUrl", id); - String s = vehicleEngine.deleteDataFromDeployDb(map); - System.out.println("删除"); + vehicleEngine.deleteDataFromDeployDb(map); } } @Override public PageResult findPage(int fid, String name, int pageNum, int pageSize) { - PageHelper.startPage(pageNum, pageSize); ArrayList list = new ArrayList<>(); - - SyPersonnelExample example = new SyPersonnelExample(); - SyPersonnelExample.Criteria criteria = example.createCriteria(); - criteria.andStatusEqualTo(0); - criteria.andFidEqualTo(fid); - - /*if (name != null && name.length() > 0) { - criteria.andNameLike("%" + name + "%"); - }*/ + Criteria criteria = Criteria.where("status").is(0).and("fid").is(fid); if (!name.equals("")) { - criteria.andNameLike("%" + name + "%"); + criteria.and("name").regex(".*" + name + ".*"); } - SyPersonnelExample.Criteria criteria1 = example.createCriteria(); - criteria1.andStatusEqualTo(0); - criteria1.andFidEqualTo(fid); + Criteria criteria1 = Criteria.where("status").is(0).and("fid").is(fid); - /*if (name != null && name.length() > 0) { - criteria1.andCreateDateLike("%" + name + "%"); - }*/ if (!name.equals("")) { - criteria1.andCreateDateLike("%" + name + "%"); + criteria1.and("createDate").regex(".*" + name + ".*"); } - example.or(criteria1); + criteria.orOperator(criteria1); - Page page = (Page) personnelMapper.selectByExample(example); - List result = page.getResult(); + List result = mongoTemplate.find(Query.query(criteria).skip((pageNum - 1) * pageSize).limit(pageSize), SyPersonnel.class); + long count = mongoTemplate.count(Query.query(criteria), SyPersonnel.class); int size = result.size(); if (size > 0) { - for (int i = 0; i < size; i++) { - SyPersonnel syPersonnel = result.get(i); - Integer personnelId = syPersonnel.getId(); + for (SyPersonnel syPersonnel : result) { + String personnelId = syPersonnel.getId(); int alarmNum = 0; PersonnelResultMsg personnelResultMsg = new PersonnelResultMsg(personnelId, syPersonnel.getName(), syPersonnel.getCreateDate(), syPersonnel.getConreason(), alarmNum, syPersonnel.getImageUrl(), syPersonnel.getIndentity()); list.add(personnelResultMsg); } } - return new PageResult(page.getPages(), list); - } - - - @Override - public PageResult findPageByNameOCard(SyPersonnel personnel, int pageNum, int pageSize) { - PageHelper.startPage(pageNum, pageSize); - ArrayList list = new ArrayList<>(); - SyPersonnelExample example = new SyPersonnelExample(); - SyPersonnelExample.Criteria criteria = example.createCriteria(); - criteria.andStatusEqualTo(0); - - String name = personnel.getName(); - if (name != null && name.length() > 0) { - criteria.andNameLike("%" + name + "%"); - } - String indentity = personnel.getIndentity(); - if (indentity != null && indentity.length() > 0) { - criteria.andIndentityLike("%" + indentity + "%"); - } - Page page = (Page) personnelMapper.selectByExample(example); - return new PageResult(page.getPages(), page.getResult()); + return new PageResult<>((long) Math.ceil((double) count / pageSize), list); } @Override - public List> findByImage(float similarity, MultipartFile file, int featureId) { - return null; - } - - @Override - public Integer findPersonCountByFid(int fid) { - SyPersonnelExample syPersonnelExample = new SyPersonnelExample(); - SyPersonnelExample.Criteria criteria = syPersonnelExample.createCriteria(); - criteria.andStatusEqualTo(0); - criteria.andFidEqualTo(fid); - int count = personnelMapper.countByExample(syPersonnelExample); - - return count; + public long findPersonCountByFid(String fid) { + return mongoTemplate.count(Query.query(Criteria.where("status").is(0).and("fid").is(fid)), SyPersonnel.class); } @Override - public List findPersonIdByFid(int fid) { - SyPersonnelExample syPersonnelExample = new SyPersonnelExample(); - SyPersonnelExample.Criteria criteria = syPersonnelExample.createCriteria(); - criteria.andStatusEqualTo(0); - criteria.andFidEqualTo(fid); - - return personnelMapper.selectByExample(syPersonnelExample); + public List findPersonIdByFid(String fid) { + return mongoTemplate.find(Query.query(Criteria.where("status").is(0).and("fid").is(fid)), SyPersonnel.class); } /** @@ -264,17 +208,15 @@ public class PersonnelServiceImpl implements PersonnelService { */ @Override @Transactional(rollbackFor = Exception.class) - public String uploadFiles(MultipartFile[] uploadFiles, int featureId) { - + public String uploadFiles(MultipartFile[] uploadFiles, String featureId) { int count = 0; SyFeature one = featureService.findOne(featureId); System.out.println(one.getCreateDate()); - List deployListByLibAndDeployType = deployService.getDeployListByLibAndDeployType(featureId, 2); + List deployListByLibAndDeployType = deployService.getDeployListByLibAndDeployType(featureId, 2); - if (uploadFiles.length > 0 && one != null) { + if (uploadFiles.length > 0) { int len = uploadFiles.length; - for (int i = 0; i < len; i++) { - MultipartFile multipartFile = uploadFiles[i]; + for (MultipartFile multipartFile : uploadFiles) { String fileName = multipartFile.getOriginalFilename(); System.out.println(fileName); fileName = fileName.replaceAll("\\\\", "/"); @@ -297,27 +239,21 @@ public class PersonnelServiceImpl implements PersonnelService { syPersonnel.setIndentity(personIndentity); syPersonnel.setImageUrl(imageUrl); syPersonnel.setFid(featureId); - int add = add(syPersonnel); - Integer personnelId = syPersonnel.getId(); + String addId = add(syPersonnel); + String personnelId = syPersonnel.getId(); String key = personnelId + "&" + featureId + "&" + imageUrl; Map map = new HashMap<>(16); map.put("TPXX", imageUrl); map.put("retrieveKey", key); String s = vehicleEngine.addUrlToDeployDb(map); - if (deployListByLibAndDeployType.size() > 0) { - for (int j = 0; j < deployListByLibAndDeployType.size(); j++) { - Integer deployId = deployListByLibAndDeployType.get(j); - String key1 = deployId + "|" + featureId; - redisTemplate.opsForHash().put(key1, personnelId, 0); - } + for (String deployId : deployListByLibAndDeployType) { + String key1 = deployId + "|" + featureId; + redisTemplate.opsForHash().put(key1, personnelId, 0); } redisTemplate.opsForHash().put("personUrl", personnelId, imageUrl); - System.out.println("请求返回:" + s); String code = JSONObject.parseObject(s).getString("code"); - //ResponseParam responseParam = JSON.parseObject(s, ResponseParam.class); - //String code = responseParam.getCode(); if ("0".equals(code)) { - if (add > 0) { + if (addId != null) { count++; } } diff --git a/src/main/java/com/objecteye/service/impl/PreviewServiceImpl.java b/src/main/java/com/objecteye/service/impl/PreviewServiceImpl.java deleted file mode 100644 index 9c3c13f..0000000 --- a/src/main/java/com/objecteye/service/impl/PreviewServiceImpl.java +++ /dev/null @@ -1,72 +0,0 @@ -package com.objecteye.service.impl; - -import com.objecteye.entity.SyEquipment; -import com.objecteye.service.EquipmentService; -import com.objecteye.service.PreviewService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.io.IOException; -import java.net.InetAddress; -import java.util.concurrent.ConcurrentHashMap; - -@Service -public class PreviewServiceImpl implements PreviewService { - - @Autowired - static String ffmpegTnstructions; - private EquipmentService equipmentService; - - private static ConcurrentHashMap rtmpAndprocessMaps = new ConcurrentHashMap<>(); - - private static ConcurrentHashMap userAndrtmpMaps = new ConcurrentHashMap<>(); - - @Override - public String getRtmp(String userName, Integer deviceId) throws IOException { - - SyEquipment equipment = equipmentService.findOne(deviceId); - - String equipmentName = equipment.getEquipmentName(); - String rtspUrl = equipment.getRtspUrl(); - boolean rtmpStrIsVaild = false; - String address = InetAddress.getLocalHost().toString().split("/")[1]; - String rtmpStr = "rtmp://" + address + ":1935/hls/" + equipmentName + deviceId; - - if (rtmpAndprocessMaps.containsKey(rtmpStr)) { - if (userAndrtmpMaps.containsKey(userName)) { - userAndrtmpMaps.remove(userName); - } - userAndrtmpMaps.put(userName, rtmpStr); - } else { - Process process = null; - if (rtspUrl.contains("rtsp")) { - ffmpegTnstructions = "ffmpeg -re -stream_loop -1 -rtsp_transport tcp -i" + rtspUrl + "-vcodec copy -acodec copy -f flv -r 15 -s 1280x720 -an -y " + rtmpStr; - } else { - ffmpegTnstructions = "ffmpeg -re -stream_loop -1 -rtsp_transport tcp -i rtsp://" + equipmentName + ":" + equipment.getPassword() + "@" + equipment.getEquipmentIp() + ":" + equipment.getEquipmentPort() + "/h264/ch1/main/av_stream -vcodec copy -acodec copy -f flv -r 15 -s 1280x720 -an -y rtmp://" + address + ":1935/hls/" + equipmentName + deviceId; - } - process = Runtime.getRuntime().exec(ffmpegTnstructions); - rtmpAndprocessMaps.put(rtmpStr, process); - userAndrtmpMaps.put(userName, rtmpStr); - rtmpStrIsVaild = process.isAlive(); - /*if (rtmpStrIsVaild) { - System.out.println("转流进程正在运行"); - }*/ - } - for (String rtmpString : rtmpAndprocessMaps.keySet()) { - if (!userAndrtmpMaps.containsValue(rtmpString)) { - //System.out.println("当前转流进程未使用,停止rtsp转rtmp"); - Process detroyPro = rtmpAndprocessMaps.get(rtmpString); - if (detroyPro.isAlive()) { - detroyPro.destroy(); - } - rtmpAndprocessMaps.remove(rtmpString); - } - } - if (rtmpStrIsVaild) { - return rtmpStr; - } - return null; - } -} - - diff --git a/src/main/java/com/objecteye/service/impl/RoleServicesImpl.java b/src/main/java/com/objecteye/service/impl/RoleServicesImpl.java index 603cd9a..3115f45 100644 --- a/src/main/java/com/objecteye/service/impl/RoleServicesImpl.java +++ b/src/main/java/com/objecteye/service/impl/RoleServicesImpl.java @@ -5,36 +5,27 @@ import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.objecteye.entity.SyPrivilege; import com.objecteye.entity.SyRole; -import com.objecteye.entity.SyRoleExample; -import com.objecteye.mapper.SyPrivilegeMapper; -import com.objecteye.mapper.SyRoleMapper; -import com.objecteye.mapper.SyRolePrivilegeMapper; import com.objecteye.service.RoleServices; import com.objecteye.utils.UserTools; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.mongodb.core.MongoTemplate; +import org.springframework.data.mongodb.core.query.Criteria; +import org.springframework.data.mongodb.core.query.Query; import org.springframework.stereotype.Service; import java.util.List; +import java.util.stream.Collectors; @Service public class RoleServicesImpl implements RoleServices { @Autowired - public SyRoleMapper syRoleMapper; - @Autowired - public SyRolePrivilegeMapper syRolePrivilegeMapper; - @Autowired - public SyPrivilegeMapper syPrivilegeMapper; - - @Override - public int totalNum() { - return syRoleMapper.countByExample(new SyRoleExample()); - } + private MongoTemplate mongoTemplate; @Override public JSONObject rolePage(int currentpage, int pagevolume) { - int startPage = (currentpage - 1) * pagevolume; - List syRoles = syRoleMapper.selectRolePage(startPage, pagevolume); + List syRoles = mongoTemplate.find(new Query().limit(pagevolume).skip((currentpage - 1) * pagevolume), SyRole.class); + long count = mongoTemplate.count(new Query(), SyRole.class); JSONObject jsonObject = new JSONObject(); jsonObject.put("code", 200); jsonObject.put("message", "success"); @@ -42,12 +33,13 @@ public class RoleServicesImpl implements RoleServices { JSONArray rowNew = new JSONArray(); for (int i = 0; i < rowOld.size(); i++) { JSONObject jsonRole = rowOld.getJSONObject(i); - Integer id = jsonRole.getInteger("id"); + String id = jsonRole.getString("id"); /*通过id获取相应的权限*/ - List integers = syRolePrivilegeMapper.selectByRid(id); + List privilegeIdList = mongoTemplate.find(Query.query(Criteria.where("rid").is(id)), SyPrivilege.class) + .stream().map(SyPrivilege::getId).collect(Collectors.toList()); StringBuilder sb = new StringBuilder(); - for (Integer in : integers) { - SyPrivilege syPrivilege = syPrivilegeMapper.selectByPrimaryKey(in); + for (String in : privilegeIdList) { + SyPrivilege syPrivilege = mongoTemplate.findOne(Query.query(Criteria.where("id").is(in)), SyPrivilege.class); sb.append(syPrivilege.getPrivilegeName()).append(","); } String substring = sb.toString().substring(0, sb.length() - 1); @@ -61,7 +53,7 @@ public class RoleServicesImpl implements RoleServices { rowNew.add(jsonRole); } - int total = (int) Math.ceil(totalNum() / (double) pagevolume); + int total = (int) Math.ceil(count / (double) pagevolume); JSONObject data = new JSONObject(); data.put("total", total); data.put("row", rowNew); @@ -73,8 +65,8 @@ public class RoleServicesImpl implements RoleServices { public JSONObject roleDis() { JSONObject jsonObject = new JSONObject(); try { - List syRoles = syRoleMapper.selectByExample(new SyRoleExample()); - if (syRoles != null && syRoles.size() > 0) { + List syRoles = mongoTemplate.find(new Query(), SyRole.class); + if (syRoles.size() > 0) { jsonObject.put("code", 200); jsonObject.put("message", "success"); JSONArray array = new JSONArray(); diff --git a/src/main/java/com/objecteye/service/impl/SpecialtyServicesImpl.java b/src/main/java/com/objecteye/service/impl/SpecialtyServicesImpl.java index f63ed22..63052a0 100644 --- a/src/main/java/com/objecteye/service/impl/SpecialtyServicesImpl.java +++ b/src/main/java/com/objecteye/service/impl/SpecialtyServicesImpl.java @@ -6,10 +6,8 @@ import com.alibaba.fastjson.JSONObject; import com.objecteye.dao.MongoTemplates; import com.objecteye.entity.*; import com.objecteye.exception.CustomXException; -import com.objecteye.mapper.SyEquipmentMapper; import com.objecteye.pojo.*; import com.objecteye.service.SpecialtyServices; -import com.objecteye.utils.RelationMappingUtil; import com.objecteye.utils.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -48,8 +46,6 @@ public class SpecialtyServicesImpl implements SpecialtyServices { @Autowired private VehicleDetailsUtils vehicleDetailsUtils; @Autowired - private SyEquipmentMapper syEquipmentMapper; - @Autowired private RedisTemplate redisTemplate; @Autowired private RelationMappingUtil relationMappingUtil; diff --git a/src/main/java/com/objecteye/service/impl/UploadFileServiceImpl.java b/src/main/java/com/objecteye/service/impl/UploadFileServiceImpl.java new file mode 100644 index 0000000..1ae944a --- /dev/null +++ b/src/main/java/com/objecteye/service/impl/UploadFileServiceImpl.java @@ -0,0 +1,82 @@ +package com.objecteye.service.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.objecteye.config.RabbitmqConfig; +import com.objecteye.entity.ResponseParam; +import com.objecteye.entity.UploadVehicleResult; +import com.objecteye.entity.VpAnalysisParam; +import com.objecteye.service.IUploadFileService; +import com.objecteye.utils.GlobalUtil; +import org.springframework.amqp.rabbit.core.RabbitTemplate; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.stereotype.Component; +import org.springframework.web.multipart.MultipartFile; + +import java.io.File; +import java.io.IOException; + +@Component +public class UploadFileServiceImpl implements IUploadFileService { + @Autowired + private RedisTemplate redisTemplate; + @Autowired + private RabbitTemplate rabbitTemplate; + + @Value("${picture.storePath}") + private String path2; + @Value("${picture.http}") + private String http; + @Value("${requestFile}") + private String url; + + /** + * 上传文件解析并保存到mongo, 代替ftp + * + * @param multipartFile 上传文件 + * @return 结果集 + */ + @Override + public JSONObject uploadFile2Mongo(MultipartFile multipartFile) throws IOException { + // 格式化文件名由format开头, e.g. format-15321354564-12.12654_15.156567.jpg + String fileName = multipartFile.getOriginalFilename(); + String picPath = GlobalUtil.dbPath1() + File.separator + "picture" + File.separator + fileName; + File newFile = new File(picPath); + multipartFile.transferTo(newFile); + + String picUrl = http + fileName; + String latitude = null; + String longitude = null; + long captureTime = System.currentTimeMillis(); + if (fileName.startsWith("format")) { + String[] fileNameMsg = fileName.split("-"); + captureTime = Long.parseLong(fileNameMsg[1]); + String[] position = fileNameMsg[2].split("_"); + latitude = position[0]; + longitude = position[1]; + } + + String body = GlobalUtil.httpExecute(url, newFile); + ResponseParam responseParam = JSON.parseObject(body, ResponseParam.class); + String code = responseParam.getCode(); + if ("0".equals(code)) { + String s1 = JSON.toJSONString(responseParam.getResult()); + VpAnalysisParam vpAnalysisParam = JSON.parseObject(s1, VpAnalysisParam.class); + UploadVehicleResult uploadVehicleResult = new UploadVehicleResult(); + uploadVehicleResult.setCount(vpAnalysisParam.getCount()); + uploadVehicleResult.setInfo(vpAnalysisParam.getInfo()); + uploadVehicleResult.setPicName(fileName); + uploadVehicleResult.setImageUrl(picUrl); + uploadVehicleResult.setLatitude(latitude); + uploadVehicleResult.setLongitude(longitude); + uploadVehicleResult.setCaptureTime(captureTime); + String s = JSON.toJSONString(uploadVehicleResult); + rabbitTemplate.convertAndSend(RabbitmqConfig.EXCHANGE_TOPICS_INFORM, "inform.store", s); + } + + + return null; + } +} diff --git a/src/main/java/com/objecteye/service/impl/UserServicesImpl.java b/src/main/java/com/objecteye/service/impl/UserServicesImpl.java index f801cec..4bd4d1e 100644 --- a/src/main/java/com/objecteye/service/impl/UserServicesImpl.java +++ b/src/main/java/com/objecteye/service/impl/UserServicesImpl.java @@ -3,7 +3,6 @@ package com.objecteye.service.impl; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.objecteye.entity.PageResult; -import com.objecteye.mapper.SyUserMapper; import com.objecteye.pojo.UserDetailsMsg; import com.objecteye.service.UserServices; import com.objecteye.utils.UserTools; @@ -21,8 +20,6 @@ import java.util.Map; public class UserServicesImpl implements UserServices { @Autowired - public SyUserMapper syUserMapper; - @Autowired private MongoTemplate mongoTemplate; /** diff --git a/src/main/java/com/objecteye/service/impl/VehicleCurrencyServiceImpl.java b/src/main/java/com/objecteye/service/impl/VehicleCurrencyServiceImpl.java index 82ec584..f55ee3a 100644 --- a/src/main/java/com/objecteye/service/impl/VehicleCurrencyServiceImpl.java +++ b/src/main/java/com/objecteye/service/impl/VehicleCurrencyServiceImpl.java @@ -3,9 +3,10 @@ package com.objecteye.service.impl; import com.alibaba.fastjson.JSONObject; import com.objecteye.common.CommonResult; import com.objecteye.dao.MongoTemplates; -import com.objecteye.mapper.SyVehicleModelMapper; +import com.objecteye.entity.SyVehicleModel; +import com.objecteye.entity.SyVehicleNjbNumber; +import com.objecteye.entity.SyVehicleType; import com.objecteye.pojo.*; -import com.objecteye.service.AreaEquipmentService; import com.objecteye.service.VehicleCurrencyService; import com.objecteye.utils.*; import org.springframework.beans.factory.annotation.Autowired; @@ -18,18 +19,18 @@ import org.springframework.stereotype.Service; import org.springframework.web.multipart.MultipartFile; import java.text.SimpleDateFormat; -import java.util.*; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Vector; import java.util.concurrent.CountDownLatch; +import java.util.stream.Collectors; @Service public class VehicleCurrencyServiceImpl implements VehicleCurrencyService { @Autowired private MongoTemplate mongoTemplate; @Autowired - private SyVehicleModelMapper syVehicleModelMapper; - @Autowired - private AreaEquipmentService areaEquipmentService; - @Autowired public MongoTemplates mongoTemplates; @Autowired private RedisTemplate redisTemplate; @@ -41,6 +42,7 @@ public class VehicleCurrencyServiceImpl implements VehicleCurrencyService { public RabbitMQVehicleTools rabbitMQVehicleTools; @Autowired private CompareDistance compareDistance; + private SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); /** @@ -66,7 +68,6 @@ public class VehicleCurrencyServiceImpl implements VehicleCurrencyService { Long starttime = vehicleCurrencyReques.getStartTime(); Long endtime = vehicleCurrencyReques.getEndTime(); int[] condition = vehicleCurrencyReques.getCondition(); - int[] customspass = vehicleCurrencyReques.getCustomspass(); String cllx = vehicleCurrencyReques.getCllx(); Integer csys = vehicleCurrencyReques.getCsys(); String brand = vehicleCurrencyReques.getBrand(); @@ -176,25 +177,12 @@ public class VehicleCurrencyServiceImpl implements VehicleCurrencyService { } } } - - //卡口范围 - if (customspass != null && customspass.length > 0) { - Set alleqids = new HashSet<>(); - for (int value : customspass) { - List epids = areaEquipmentService.findCaptureById(value); - alleqids.addAll(epids); - } - //获取当前设备id - c.and("deviceid").in(alleqids); - } - query.addCriteria(c); long totalNumber = mongoTemplate.count(query, VehicleCurrencyResult.class, "rabbitMQVehicle"); //按时间进行排序 query.with(Sort.by(Sort.Order.desc("pictime"))); - -// 分页 + // 分页 query.skip((currentpage - 1) * pagevolume).limit(pagevolume); vehicleCurrencyResultList = mongoTemplate.find(query, VehicleCurrencyResult.class, "rabbitMQVehicle"); @@ -203,11 +191,6 @@ public class VehicleCurrencyServiceImpl implements VehicleCurrencyService { vehicleCurrencyResult.setPhototime(sdf.format(Long.parseLong(vehicleCurrencyResult.getPhototime()))); //改变原有的全景图为现在的快照图 此处返回快照图的绝对路径 vehicleCurrencyResult.setPicurl(vehicleCurrencyResult.getSnapshoturl()); - /*//获取抓拍图的base64 - int[] vehicle_detect_syRectParam = vehicleCurrencyResult.getVehicle_detect_syRectParam(); - String snapshotBase64 = vehicleDetailsUtils.picToSnapshot(vehicleCurrencyResult.getPicurl(), vehicle_detect_syRectParam[1], vehicle_detect_syRectParam[2], vehicle_detect_syRectParam[3], vehicle_detect_syRectParam[0]); - //将抓拍图的base64放入到返回结果中 - vehicleCurrencyResult.setSnapshot(snapshotBase64);*/ //此处是返回快照图的base64 } //根据总条数获取到总页数 totalPage = (int) Math.ceil(((double) totalNumber) / pagevolume); @@ -347,8 +330,8 @@ public class VehicleCurrencyServiceImpl implements VehicleCurrencyService { public CommonResult> selectDisplayForInitials() { CommonResult> commonResult = null; try { - List initialsArr = syVehicleModelMapper.selectDisplayForInitials(); - + List initialsArr = mongoTemplate.find(new Query(), SyVehicleModel.class).stream() + .map(SyVehicleModel::getInitials).distinct().collect(Collectors.toList()); commonResult = returnCommonResult(initialsArr); } catch (Exception e) { commonResult = CommonResult.success(null, "数据查询失败"); @@ -368,7 +351,8 @@ public class VehicleCurrencyServiceImpl implements VehicleCurrencyService { public CommonResult> selectDisplayForBrand(String initials) { CommonResult> commonResult = null; try { - List brandArr = syVehicleModelMapper.selectDisplayForBrand(initials); + List brandArr = mongoTemplate.find(Query.query(Criteria.where("initals").is(initials)), SyVehicleModel.class) + .stream().map(SyVehicleModel::getBrand).distinct().collect(Collectors.toList()); commonResult = returnCommonResult(brandArr); } catch (Exception e) { commonResult = CommonResult.success(null, "数据查询失败"); @@ -388,7 +372,8 @@ public class VehicleCurrencyServiceImpl implements VehicleCurrencyService { CommonResult> commonResult = null; try { - List subbrandArr = syVehicleModelMapper.selectDisplayForSubbrand(brand); + List subbrandArr = mongoTemplate.find(Query.query(Criteria.where("brand").is(brand)), SyVehicleModel.class) + .stream().map(SyVehicleModel::getSubbrand).distinct().collect(Collectors.toList()); commonResult = returnCommonResult(subbrandArr); } catch (Exception e) { commonResult = CommonResult.success(null, "数据查询失败"); @@ -407,7 +392,8 @@ public class VehicleCurrencyServiceImpl implements VehicleCurrencyService { public CommonResult> selectDisplayForBirthday(String subbrand) { CommonResult> commonResult = null; try { - List birthdayArr = syVehicleModelMapper.selectDisplayForBirthday(subbrand); + List birthdayArr = mongoTemplate.find(Query.query(Criteria.where("subbrand").is(subbrand)), SyVehicleModel.class) + .stream().map(SyVehicleModel::getBirthday).distinct().collect(Collectors.toList()); commonResult = returnCommonResult(birthdayArr); } catch (Exception e) { commonResult = CommonResult.success(null, "数据查询失败"); @@ -425,7 +411,8 @@ public class VehicleCurrencyServiceImpl implements VehicleCurrencyService { public CommonResult> displayVehicleTypeList() { CommonResult> commonResult = null; try { - List displayVehicleTypeList = syVehicleModelMapper.displayVehicleTypeList(); + List displayVehicleTypeList = mongoTemplate.find(new Query(), SyVehicleType.class) + .stream().map(SyVehicleType::getName).distinct().collect(Collectors.toList()); commonResult = returnCommonResult(displayVehicleTypeList); } catch (Exception e) { @@ -445,8 +432,8 @@ public class VehicleCurrencyServiceImpl implements VehicleCurrencyService { public CommonResult> displayVehicleColorList() { CommonResult> commonResult = null; try { - List displayVehicleColorList = syVehicleModelMapper.displayVehicleColorList(); - + List displayVehicleColorList = mongoTemplate.find(new Query(), NameValue.class, "syVehicleColor") + .stream().distinct().collect(Collectors.toList()); commonResult = returnCommonResult1(displayVehicleColorList); } catch (Exception e) { commonResult = CommonResult.success(null, "数据查询失败"); @@ -466,8 +453,8 @@ public class VehicleCurrencyServiceImpl implements VehicleCurrencyService { public CommonResult> displayVehiclePlateTypeList() { CommonResult> commonResult = null; try { - List displayVehiclePlateTypeList = syVehicleModelMapper.displayVehiclePlateTypeList(); - + List displayVehiclePlateTypeList = mongoTemplate + .find(new Query(), NameValue.class, "syVehiclePlateType").stream().distinct().collect(Collectors.toList()); commonResult = returnCommonResult1(displayVehiclePlateTypeList); } catch (Exception e) { commonResult = CommonResult.success(null, "数据查询失败"); @@ -486,8 +473,9 @@ public class VehicleCurrencyServiceImpl implements VehicleCurrencyService { public CommonResult> displayVehicleNjbNumberList() { CommonResult> commonResult = null; try { - List displayVehicleNjbNumberList = syVehicleModelMapper.displayVehicleNjbNumberList(); - + List displayVehicleNjbNumberList = mongoTemplate.find(new Query(), SyVehicleNjbNumber.class) + .stream().map(syVehicleNjbNumber -> String.valueOf(syVehicleNjbNumber.getNjbNumber())) + .distinct().collect(Collectors.toList()); commonResult = returnCommonResult(displayVehicleNjbNumberList); } catch (Exception e) { commonResult = CommonResult.success(null, "数据查询失败"); diff --git a/src/main/java/com/objecteye/service/impl/VehicleDbServiceImpl.java b/src/main/java/com/objecteye/service/impl/VehicleDbServiceImpl.java index e93d789..f98fdd4 100644 --- a/src/main/java/com/objecteye/service/impl/VehicleDbServiceImpl.java +++ b/src/main/java/com/objecteye/service/impl/VehicleDbServiceImpl.java @@ -1,13 +1,9 @@ package com.objecteye.service.impl; import cn.hutool.core.date.DateUtil; -import com.github.pagehelper.Page; -import com.github.pagehelper.PageHelper; import com.objecteye.entity.PageResult; import com.objecteye.entity.SyVehicleDb; -import com.objecteye.entity.SyVehicleDbExample; import com.objecteye.entity.UploadVehicleDbResult; -import com.objecteye.mapper.SyVehicleDbMapper; import com.objecteye.service.DeployService; import com.objecteye.service.VehicleDbService; import org.springframework.beans.factory.annotation.Autowired; @@ -30,166 +26,146 @@ import java.util.Map; @Service public class VehicleDbServiceImpl implements VehicleDbService { - @Autowired - private SyVehicleDbMapper vehicleDbMapper; - @Autowired - private MongoTemplate mongoTemplate; - @Autowired - private RedisTemplate redisTemplate; - @Autowired - private DeployService deployService; - - /** - * 查询全部 - */ - @Override - public List findAll() { - SyVehicleDbExample example = new SyVehicleDbExample(); - SyVehicleDbExample.Criteria criteria = example.createCriteria(); - criteria.andIsDeleteEqualTo(0); - - return vehicleDbMapper.selectByExample(example); - } - - /** - * 按分页查询 - */ - @Override - public PageResult findPage(int pageNum, int pageSize) { - PageHelper.startPage(pageNum, pageSize); - SyVehicleDbExample example = new SyVehicleDbExample(); - SyVehicleDbExample.Criteria criteria = example.createCriteria(); - criteria.andIsDeleteEqualTo(0); - - Page page = (Page) vehicleDbMapper.selectByExample(example); - return new PageResult(page.getPages(), page.getResult()); - } - - /** - * 增加 - */ - @Override - public Integer add(SyVehicleDb vehicleDb) { - String strDate = DateUtil.now(); - vehicleDb.setCount(0); - vehicleDb.setCreateDate(strDate); - vehicleDb.setUpdateDate(strDate); - vehicleDb.setIsDelete(0); - - return vehicleDbMapper.insert(vehicleDb); - } - - - /** - * 修改 - */ - @Override - public Integer update(SyVehicleDb vehicleDb) { - String now = DateUtil.now(); - vehicleDb.setUpdateDate(now); - - return vehicleDbMapper.updateByPrimaryKeySelective(vehicleDb); - } - - /** - * 根据ID获取实体 - * - * @param id - * @return - */ - @Override - public SyVehicleDb findOne(int id) { - return vehicleDbMapper.selectByPrimaryKey(id); - } - - /** - * 批量删除 - */ - @Override - public void delete(int[] ids) { - for (int id : ids) { - - List deployList = deployService.getDeployListByLibAndDeployType(id, 2); - - UploadVehicleDbResult uploadVehicleDbResult = mongoTemplate.findOne(Query.query(new Criteria("id").is(id)), UploadVehicleDbResult.class); - - if (uploadVehicleDbResult != null) { - String id1 = uploadVehicleDbResult.getId(); - String plateNum = uploadVehicleDbResult.getPlateNum(); - float plateScore = uploadVehicleDbResult.getPlateScore(); - if (plateScore > 0.9) { - redisTemplate.opsForHash().delete("vehicleId", plateNum); - } - redisTemplate.opsForHash().delete("vehicleId", id1); - redisTemplate.opsForHash().delete("vehicleUrl", id1); - mongoTemplate.remove(uploadVehicleDbResult); - if (deployList != null && deployList.size() > 0) { - int size = deployList.size(); - for (int i = 0; i < size; i++) { - Integer deployId = deployList.get(i); - int[] deploy = {deployId}; - deployService.delete(deploy); - } - } - } - SyVehicleDb syVehicleDb = vehicleDbMapper.selectByPrimaryKey(id); - syVehicleDb.setIsDelete(1); - vehicleDbMapper.updateByPrimaryKeySelective(syVehicleDb); - } - } - - - @Override - public PageResult findPage(SyVehicleDb vehicleDb, int pageNum, int pageSize) { - PageHelper.startPage(pageNum, pageSize); - - SyVehicleDbExample example = new SyVehicleDbExample(); - SyVehicleDbExample.Criteria criteria = example.createCriteria(); - - if (vehicleDb != null) { - if (vehicleDb.getVehicleName() != null && vehicleDb.getVehicleName().length() > 0) { - criteria.andVehicleNameLike("%" + vehicleDb.getVehicleName() + "%"); - } - if (vehicleDb.getCreateDate() != null && vehicleDb.getCreateDate().length() > 0) { - criteria.andCreateDateLike("%" + vehicleDb.getCreateDate() + "%"); - } - if (vehicleDb.getUpdateDate() != null && vehicleDb.getUpdateDate().length() > 0) { - criteria.andUpdateDateLike("%" + vehicleDb.getUpdateDate() + "%"); - } - if (vehicleDb.getDescription() != null && vehicleDb.getDescription().length() > 0) { - criteria.andDescriptionLike("%" + vehicleDb.getDescription() + "%"); - } - - } - - Page page = (Page) vehicleDbMapper.selectByExample(example); - return new PageResult(page.getTotal(), page.getResult()); - } - - @Override - public int updateCountById(SyVehicleDb feature) { - - return vehicleDbMapper.updateByPrimaryKeySelective(feature); - } - - @Override - public List> findAllName() { - List> list = new ArrayList<>(); - List syVehicleDbs = findAll(); - if (syVehicleDbs != null) { - int size = syVehicleDbs.size(); - for (int i = 0; i < size; i++) { - Map map = new HashMap<>(16); - SyVehicleDb syVehicleDb = syVehicleDbs.get(i); - String name = syVehicleDb.getVehicleName(); - int id = syVehicleDb.getId(); - map.put("value", id + ""); - map.put("name", name); - list.add(map); - } - return list; - } - return null; - } + @Autowired + private MongoTemplate mongoTemplate; + @Autowired + private RedisTemplate redisTemplate; + @Autowired + private DeployService deployService; + + /** + * 查询全部 + */ + @Override + public List findAll() { + return mongoTemplate.find(Query.query(Criteria.where("isDelete").is(0)), SyVehicleDb.class); + } + + /** + * 按分页查询 + */ + @Override + public PageResult findPage(int pageNum, int pageSize) { + List result = mongoTemplate.find(Query.query(Criteria.where("isDelete").is(0)) + .limit(pageSize).skip((pageNum - 1) * pageSize), SyVehicleDb.class); + long count = mongoTemplate.count(Query.query(Criteria.where("isDelete").is(0)), SyVehicleDb.class); + return new PageResult<>((long) Math.ceil((double) count / pageSize), result); + } + + /** + * 增加 + * + * @return + */ + @Override + public String add(SyVehicleDb vehicleDb) { + String strDate = DateUtil.now(); + vehicleDb.setCount(0); + vehicleDb.setCreateDate(strDate); + vehicleDb.setUpdateDate(strDate); + vehicleDb.setIsDelete(0); + vehicleDb = mongoTemplate.insert(vehicleDb); + return vehicleDb.getId(); + } + + /** + * 修改 + */ + @Override + public void update(SyVehicleDb vehicleDb) { + String now = DateUtil.now(); + vehicleDb.setUpdateDate(now); + mongoTemplate.save(vehicleDb); + } + + /** + * 根据ID获取实体 + * + * @param id + * @return + */ + @Override + public SyVehicleDb findOne(String id) { + return mongoTemplate.findOne(Query.query(Criteria.where("id").is(id)), SyVehicleDb.class); + } + + /** + * 批量删除 + * + * @param ids + */ + @Override + public void delete(String[] ids) { + for (String id : ids) { + List deployList = deployService.getDeployListByLibAndDeployType(id, 2); + UploadVehicleDbResult uploadVehicleDbResult = mongoTemplate.findOne(Query.query(new Criteria("id").is(id)), UploadVehicleDbResult.class); + if (uploadVehicleDbResult != null) { + String id1 = uploadVehicleDbResult.getId(); + String plateNum = uploadVehicleDbResult.getPlateNum(); + float plateScore = uploadVehicleDbResult.getPlateScore(); + if (plateScore > 0.9) { + redisTemplate.opsForHash().delete("vehicleId", plateNum); + } + redisTemplate.opsForHash().delete("vehicleId", id1); + redisTemplate.opsForHash().delete("vehicleUrl", id1); + mongoTemplate.remove(uploadVehicleDbResult); + if (deployList != null && deployList.size() > 0) { + int size = deployList.size(); + for (int i = 0; i < size; i++) { + String deployId = deployList.get(i); + String[] deploy = {deployId}; + deployService.delete(deploy); + } + } + } + SyVehicleDb syVehicleDb = mongoTemplate.findOne(Query.query(Criteria.where("id").is(id)), SyVehicleDb.class); + syVehicleDb.setIsDelete(1); + mongoTemplate.save(syVehicleDb); + } + } + + + @Override + public PageResult findPage(SyVehicleDb vehicleDb, int pageNum, int pageSize) { + Criteria criteria = new Criteria(); + if (vehicleDb != null) { + if (vehicleDb.getVehicleName() != null && vehicleDb.getVehicleName().length() > 0) { + criteria.and("vehicleName").regex(".*" + vehicleDb.getVehicleName() + ".*"); + } + if (vehicleDb.getCreateDate() != null && vehicleDb.getCreateDate().length() > 0) { + criteria.and("createDate").regex(".*" + vehicleDb.getCreateDate() + ".*"); + } + if (vehicleDb.getUpdateDate() != null && vehicleDb.getUpdateDate().length() > 0) { + criteria.and("updateDate").regex(".*" + vehicleDb.getUpdateDate() + ".*"); + } + if (vehicleDb.getDescription() != null && vehicleDb.getDescription().length() > 0) { + criteria.and("description").regex(".*" + vehicleDb.getDescription() + ".*"); + } + } + List resultList = mongoTemplate.find(Query.query(criteria) + .limit(pageSize).skip((pageNum - 1) * pageSize), SyVehicleDb.class); + long count = mongoTemplate.count(Query.query(criteria), SyVehicleDb.class); + return new PageResult<>((long) Math.ceil((double) count / pageSize), resultList); + } + + @Override + public void updateCountById(SyVehicleDb feature) { + mongoTemplate.save(feature); + } + + @Override + public List> findAllName() { + List> list = new ArrayList<>(); + List syVehicleDbs = findAll(); + for (SyVehicleDb vehicleDb : syVehicleDbs) { + Map map = new HashMap<>(16); + String name = vehicleDb.getVehicleName(); + String id = vehicleDb.getId(); + map.put("value", id + ""); + map.put("name", name); + list.add(map); + } + return list; + } } diff --git a/src/main/java/com/objecteye/service/impl/VehicleFileServiceImpl.java b/src/main/java/com/objecteye/service/impl/VehicleFileServiceImpl.java index 7a5c557..c85c1fe 100644 --- a/src/main/java/com/objecteye/service/impl/VehicleFileServiceImpl.java +++ b/src/main/java/com/objecteye/service/impl/VehicleFileServiceImpl.java @@ -10,6 +10,7 @@ import com.objecteye.service.IVehicleFileService; import com.objecteye.service.SpecialtyServices; import com.objecteye.utils.CompareDistance; import com.objecteye.utils.GlobalUtil; +import com.objecteye.utils.RelationMappingUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Sort; import org.springframework.data.mongodb.core.MongoTemplate; diff --git a/src/main/java/com/objecteye/service/impl/VehicleServiceImpl.java b/src/main/java/com/objecteye/service/impl/VehicleServiceImpl.java index 93da9e3..e9e908a 100644 --- a/src/main/java/com/objecteye/service/impl/VehicleServiceImpl.java +++ b/src/main/java/com/objecteye/service/impl/VehicleServiceImpl.java @@ -2,7 +2,6 @@ package com.objecteye.service.impl; import com.alibaba.fastjson.JSON; import com.objecteye.entity.*; -import com.objecteye.mapper.SyVehicleDbMapper; import com.objecteye.service.DeployService; import com.objecteye.service.VehicleDbService; import com.objecteye.service.VehicleService; @@ -37,8 +36,6 @@ public class VehicleServiceImpl implements VehicleService { @Autowired private MongoTemplate mongoTemplate; @Autowired - private SyVehicleDbMapper vehicleDbMapper; - @Autowired private RedisTemplate redisTemplate; @Autowired private DeployService deployService; @@ -84,7 +81,7 @@ public class VehicleServiceImpl implements VehicleService { @Override public void delete(String[] ids) { int length = ids.length; - int vehicleId = 0; + String vehicleId = null; for (int i = 0; i < length; i++) { String id = ids[i]; UploadVehicleDbResult uploadVehicleDbResult = mongoTemplate.findOne(Query.query(new Criteria("id").is(id)), UploadVehicleDbResult.class); @@ -94,7 +91,7 @@ public class VehicleServiceImpl implements VehicleService { if (plateScore > 0.9 && redisTemplate.opsForHash().hasKey("vehicleId", plateNum)) { redisTemplate.opsForHash().delete("vehicleId", plateNum); } - List deployListByLibAndDeployType = deployService.getDeployListByLibAndDeployType(vehicleId, 1); + List deployListByLibAndDeployType = deployService.getDeployListByLibAndDeployType(vehicleId, 1); if (deployListByLibAndDeployType != null && deployListByLibAndDeployType.size() > 0) { for (int j = 0; j < deployListByLibAndDeployType.size(); j++) { String key = deployListByLibAndDeployType.get(j) + "|" + vehicleId; @@ -107,9 +104,9 @@ public class VehicleServiceImpl implements VehicleService { redisTemplate.opsForHash().delete("vehicleUrl", id); mongoTemplate.remove(uploadVehicleDbResult); } - SyVehicleDb syVehicleDb = vehicleDbMapper.selectByPrimaryKey(vehicleId); + SyVehicleDb syVehicleDb = mongoTemplate.findOne(Query.query(Criteria.where("id").is(vehicleId)), SyVehicleDb.class); syVehicleDb.setCount(syVehicleDb.getCount() - length); - vehicleDbMapper.updateByPrimaryKeySelective(syVehicleDb); + mongoTemplate.save(syVehicleDb); } @Override @@ -134,10 +131,10 @@ public class VehicleServiceImpl implements VehicleService { } @Override - public String uploadFiles(MultipartFile[] uploadFiles, int vehicleId) { + public String uploadFiles(MultipartFile[] uploadFiles, String vehicleId) { int count = 0; - SyVehicleDb one = vehicleDbService.findOne(vehicleId); - List deployListByLibAndDeployType = deployService.getDeployListByLibAndDeployType(vehicleId, 1); + SyVehicleDb one = mongoTemplate.findOne(Query.query(Criteria.where("id").is(vehicleId)), SyVehicleDb.class); + List deployListByLibAndDeployType = deployService.getDeployListByLibAndDeployType(vehicleId, 1); if (uploadFiles.length > 0 && one != null) { int len = uploadFiles.length; @@ -198,7 +195,7 @@ public class VehicleServiceImpl implements VehicleService { } if (deployListByLibAndDeployType.size() > 0) { for (int j = 0; j < deployListByLibAndDeployType.size(); j++) { - Integer deployId = deployListByLibAndDeployType.get(j); + String deployId = deployListByLibAndDeployType.get(j); String key1 = deployId + "|" + vehicleId; redisTemplate.opsForHash().put(key1, id, 0); } diff --git a/src/main/java/com/objecteye/service/impl/VehicleViolationsServiceImpl.java b/src/main/java/com/objecteye/service/impl/VehicleViolationsServiceImpl.java index da063ff..ae83045 100644 --- a/src/main/java/com/objecteye/service/impl/VehicleViolationsServiceImpl.java +++ b/src/main/java/com/objecteye/service/impl/VehicleViolationsServiceImpl.java @@ -4,19 +4,11 @@ import cn.hutool.core.date.DateUnit; import cn.hutool.core.date.DateUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; -import com.github.pagehelper.PageHelper; -import com.github.pagehelper.PageInfo; import com.objecteye.entity.*; -import com.objecteye.mapper.SyAreaEquipmentMapper; -import com.objecteye.mapper.SyEquipmentMapper; -import com.objecteye.mapper.SyVehicleForbidenTaskMapper; import com.objecteye.pojo.RabbitMQVehicle; import com.objecteye.pojo.RabbitMqVehicleViolation; -import com.objecteye.service.AreaEquipmentService; import com.objecteye.service.IVehicleViolationsService; import com.objecteye.utils.GlobalUtil; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.data.mongodb.core.aggregation.Aggregation; @@ -38,19 +30,9 @@ import java.util.stream.Collectors; @Component public class VehicleViolationsServiceImpl implements IVehicleViolationsService { - private final Logger log = LoggerFactory.getLogger(VehicleViolationsServiceImpl.class); - - @Autowired - private SyVehicleForbidenTaskMapper syVehicleForbidenTaskMapper; - @Autowired - private SyEquipmentMapper syEquipmentMapper; - @Autowired - private SyAreaEquipmentMapper syAreaEquipmentMapper; @Autowired private RedisTemplate redisTemplate; @Autowired - private AreaEquipmentService areaEquipmentService; - @Autowired private MongoTemplate mongoTemplate; private static Map WEEK_MAP = new HashMap<>(); @@ -78,10 +60,7 @@ public class VehicleViolationsServiceImpl implements IVehicleViolationsService { * 同步还在激活状态的任务到redis */ private void syncForbiddenTask() { - SyVehicleForbidenTaskExample syVehicleForbidenTaskExample = new SyVehicleForbidenTaskExample(); - SyVehicleForbidenTaskExample.Criteria criteria = syVehicleForbidenTaskExample.createCriteria(); - criteria.andStatusNotEqualTo(0); - List forbiddenTasks = syVehicleForbidenTaskMapper.selectByExample(syVehicleForbidenTaskExample); + List forbiddenTasks = mongoTemplate.find(Query.query(Criteria.where("status").ne(0)), SyVehicleForbidenTask.class); Map> deviceIdTaskMap = new HashMap<>(); for (SyVehicleForbidenTask forbiddenTask : forbiddenTasks) { if (null == forbiddenTask || null == forbiddenTask.getDeviceId() || "".equals(forbiddenTask.getDeviceId())) { @@ -112,17 +91,14 @@ public class VehicleViolationsServiceImpl implements IVehicleViolationsService { */ @Override public PageResult forbiddenTaskQueryByPage(Integer currentpage, Integer pagevolume, String name) { - SyVehicleForbidenTaskExample syVehicleForbidenTaskExample = new SyVehicleForbidenTaskExample(); - SyVehicleForbidenTaskExample.Criteria criteria = syVehicleForbidenTaskExample.createCriteria(); - + Criteria criteria = new Criteria(); if (null != name && !"".equals(name)) { - criteria.andNameLike("%" + name + "%"); + criteria.and("name").regex(".*" + name + ".*"); } - PageInfo pageInfo = PageHelper.startPage(currentpage, pagevolume) - .doSelectPageInfo(() -> syVehicleForbidenTaskMapper.selectByExample(syVehicleForbidenTaskExample)); - - List tempList = pageInfo.getList(); + List tempList = mongoTemplate.find(Query.query(criteria) + .skip((currentpage - 1) * pagevolume).limit(pagevolume), SyVehicleForbidenTask.class); + long count = mongoTemplate.count(Query.query(criteria), SyVehicleForbidenTask.class); // 一次查询所有任务id对应的报警数 Aggregation aggregation = Aggregation.newAggregation( Aggregation.project("taskId"), @@ -163,10 +139,9 @@ public class VehicleViolationsServiceImpl implements IVehicleViolationsService { } String warningNumber = taskWarningNumMap.getOrDefault(String.valueOf(forbiddenTask.getId()), "0"); output.setWarningNumber(warningNumber); - output.setEquipment(getEquipmentNameByDeviceIds(forbiddenTask.getDeviceId())); resultList.add(output); } - return new PageResult<>(pageInfo.getPages(), resultList); + return new PageResult<>((long) Math.ceil((double) count / pagevolume), resultList); } /** @@ -177,20 +152,7 @@ public class VehicleViolationsServiceImpl implements IVehicleViolationsService { */ @Override public SyVehicleForbidenTask forbiddenTaskDetail(String id) { - SyVehicleForbidenTask forbidenTask = syVehicleForbidenTaskMapper.selectByPrimaryKey(Integer.valueOf(id)); - if (forbidenTask != null) { - String areaIds = forbidenTask.getAreaId(); - if (areaIds != null && !"".equals(areaIds)) { - List areaIdList = Arrays.stream(areaIds.split(",")).map(Integer::parseInt).collect(Collectors.toList()); - SyAreaEquipmentExample syAreaEquipmentExample = new SyAreaEquipmentExample(); - SyAreaEquipmentExample.Criteria criteria = syAreaEquipmentExample.createCriteria(); - criteria.andIdIn(areaIdList); - List syAreaEquipments = syAreaEquipmentMapper.selectByExample(syAreaEquipmentExample); - String areaNames = syAreaEquipments.stream().map(SyAreaEquipment::getName).collect(Collectors.joining(",")); - forbidenTask.setAreaName(areaNames); - } - } - return forbidenTask; + return mongoTemplate.findOne(Query.query(Criteria.where("id").is(id)), SyVehicleForbidenTask.class); } /** @@ -205,12 +167,9 @@ public class VehicleViolationsServiceImpl implements IVehicleViolationsService { if (syVehicleForbidenTask.getStatus() == null) { syVehicleForbidenTask.setStatus(1); } - if (null != syVehicleForbidenTask.getAreaId() && !"".equals(syVehicleForbidenTask.getAreaId())) { - syVehicleForbidenTask.setDeviceId(getDeviceIdsByAreaIds(syVehicleForbidenTask.getAreaId())); - } - int status = syVehicleForbidenTaskMapper.insertSelective(syVehicleForbidenTask); + mongoTemplate.insert(syVehicleForbidenTask); syncForbiddenTask(); - return status; + return 1; } /** @@ -221,42 +180,9 @@ public class VehicleViolationsServiceImpl implements IVehicleViolationsService { */ @Override public int forbiddenTaskUpdate(SyVehicleForbidenTask syVehicleForbidenTask) { - if (null != syVehicleForbidenTask.getAreaId() && !"".equals(syVehicleForbidenTask.getAreaId())) { - syVehicleForbidenTask.setDeviceId(getDeviceIdsByAreaIds(syVehicleForbidenTask.getAreaId())); - } - int status = syVehicleForbidenTaskMapper.updateByPrimaryKeySelective(syVehicleForbidenTask); + mongoTemplate.save(syVehicleForbidenTask); syncForbiddenTask(); - return status; - } - - /** - * 根据区域id获取对应的所有设备id - * - * @param areaIds 区域id 多个之间,间隔 - * @return 设备id字符串 - */ - private String getDeviceIdsByAreaIds(String areaIds) { - String[] areaIdArr = areaIds.split(","); - Set deviceIdSet = new HashSet<>(); - for (String areaId : areaIdArr) { - deviceIdSet.addAll(areaEquipmentService.findCaptureById(Integer.parseInt(areaId))); - } - return deviceIdSet.stream().map(String::valueOf).collect(Collectors.joining(",")); - } - - /** - * 根据设备id获取对应的设备名称 - * - * @param deviceIds 设备ids - * @return 名称 - */ - private String getEquipmentNameByDeviceIds(String deviceIds) { - List deviceIdList = Arrays.stream(deviceIds.split(",")).map(Integer::parseInt).collect(Collectors.toList()); - SyEquipmentExample syEquipmentExample = new SyEquipmentExample(); - SyEquipmentExample.Criteria criteria = syEquipmentExample.createCriteria(); - criteria.andIdIn(deviceIdList); - List syAreaEquipments = syEquipmentMapper.selectByExample(syEquipmentExample); - return syAreaEquipments.stream().map(SyEquipment::getEquipmentName).collect(Collectors.joining(",")); + return 1; } /** @@ -275,7 +201,7 @@ public class VehicleViolationsServiceImpl implements IVehicleViolationsService { // 删除历史数据 mongoTemplate.remove(Query.query(Criteria.where("taskId").is(id)), RabbitMqVehicleViolation.class); // 删除任务 - syVehicleForbidenTaskMapper.deleteByPrimaryKey(Integer.parseInt(id)); + mongoTemplate.remove(Query.query(Criteria.where("id").is(id)), SyVehicleForbidenTask.class); effectNum++; } syncForbiddenTask(); @@ -355,10 +281,6 @@ public class VehicleViolationsServiceImpl implements IVehicleViolationsService { boolean ifNoCheckStatus = true; Criteria criteria = new Criteria(); - if (null != params.getCustomsPass() && !"".equals(params.getCustomsPass())) { - List deviceIds = areaEquipmentService.findCaptureById(Integer.parseInt(params.getCustomsPass())); - criteria.and("deviceid").in(deviceIds); - } Long startTime = params.getStartTime(); Long endTime = params.getEndTime(); if (null == startTime) { diff --git a/src/main/java/com/objecteye/utils/RabbbitmqConsumer.java b/src/main/java/com/objecteye/utils/RabbbitmqConsumer.java index 61f8e4f..7ded3c9 100644 --- a/src/main/java/com/objecteye/utils/RabbbitmqConsumer.java +++ b/src/main/java/com/objecteye/utils/RabbbitmqConsumer.java @@ -54,13 +54,11 @@ public class RabbbitmqConsumer { if (vehicleWinScore < 0.7) { continue; } - int deviceid = rabbitMQVehicle.getDeviceid(); RabbitMQVehicle rabbitMQVehicle1 = mongoTemplates.insertData(rabbitMQVehicle); String s = JSON.toJSONString(rabbitMQVehicle1); - - redisTemplate.opsForList().leftPush(deviceid, s); - // 车辆的特征值归一化距离保存到redisx + redisTemplate.opsForList().leftPush("deviceId", s); + // 车辆的特征值归一化距离保存到Redis double dbFea = new CompareDistance().getDistance(rabbitMQVehicle1.getVehicle_fea_feature()); redisTemplate.opsForHash().put(GlobalUtil.VEHICLE_FEATURE_DISTANCE, rabbitMQVehicle1.getId(), dbFea); redisTemplate.opsForHash().put(GlobalUtil.VEHICLE_FEATURE, rabbitMQVehicle1.getId(), rabbitMQVehicle1.getVehicle_fea_feature()); @@ -69,8 +67,8 @@ public class RabbbitmqConsumer { if (vehicle_plate_numScore > 0.9) { redisTemplate.opsForHash().put("vehicleFilePlateNumber", vehicle_plate_hphm, s); } - rabbitTemplate.convertAndSend(RabbitmqConfig.EXCHANGE_TOPICS_INFORM, "inform.alarm", s); - rabbitTemplate.convertAndSend(RabbitmqConfig.EXCHANGE_TOPICS_INFORM, "inform.forbidden", s); +// rabbitTemplate.convertAndSend(RabbitmqConfig.EXCHANGE_TOPICS_INFORM, "inform.alarm", s); +// rabbitTemplate.convertAndSend(RabbitmqConfig.EXCHANGE_TOPICS_INFORM, "inform.forbidden", s); } } } catch (Exception e) { diff --git a/src/main/java/com/objecteye/utils/RabbitMQVehicleTools.java b/src/main/java/com/objecteye/utils/RabbitMQVehicleTools.java index 3b96083..26b9144 100644 --- a/src/main/java/com/objecteye/utils/RabbitMQVehicleTools.java +++ b/src/main/java/com/objecteye/utils/RabbitMQVehicleTools.java @@ -62,8 +62,6 @@ public class RabbitMQVehicleTools { if (null != uploadVehicleResult) { long captureTime = uploadVehicleResult.getCaptureTime(); String picurl = uploadVehicleResult.getImageUrl(); - int deviceId = uploadVehicleResult.getDeviceId(); - String equipmentName = uploadVehicleResult.getEquipmentName(); String latitude = uploadVehicleResult.getLatitude(); String longitude = uploadVehicleResult.getLongitude(); String retrieveKey = null; @@ -94,14 +92,8 @@ public class RabbitMQVehicleTools { vehicle_detect_syRectParam[3], vehicle_detect_syRectParam[0]); } rabbitMqVehicle.setSnapshoturl(snapshoturl); - if (deviceId != 0) { - rabbitMqVehicle.setDeviceid(deviceId); - rabbitMqVehicle.setEquipmentName(equipmentName); - rabbitMqVehicle.setLongitude(longitude); - rabbitMqVehicle.setLatitude(latitude); - } else { - rabbitMqVehicle.setDeviceid(0); - } + rabbitMqVehicle.setLongitude(longitude); + rabbitMqVehicle.setLatitude(latitude); rabbitMqVehicle.setPictime(captureTime); } } @@ -121,7 +113,7 @@ public class RabbitMQVehicleTools { GlobalUtil.generateImage(mattingData, path); - PersonMsg personMsg = new PersonMsg(null, deviceId, snapshoturl, captureTime, equipmentName, longitude, latitude, url, retrieveKey, fea); + PersonMsg personMsg = new PersonMsg(null, null, snapshoturl, captureTime, null, null, null, url, retrieveKey, fea); PersonMsg save = mongoTemplate.save(personMsg); String s = JSON.toJSONString(save); rabbitTemplate.convertAndSend(RabbitmqConfig.EXCHANGE_TOPICS_INFORM, "inform.person", s); diff --git a/src/main/java/com/objecteye/utils/RelationMappingUtil.java b/src/main/java/com/objecteye/utils/RelationMappingUtil.java index f71f60c..c6afe0b 100644 --- a/src/main/java/com/objecteye/utils/RelationMappingUtil.java +++ b/src/main/java/com/objecteye/utils/RelationMappingUtil.java @@ -1,11 +1,8 @@ package com.objecteye.utils; -import org.springframework.stereotype.Component; - -@Component("relationMapping") public class RelationMappingUtil { - public String getVehicleColor(int i) { + public static String getVehicleColor(int i) { switch (i) { case 0: return "棕"; @@ -41,7 +38,7 @@ public class RelationMappingUtil { } //号牌种类 - public String getVehiclePlateType(int i) { + public static String getVehiclePlateType(int i) { switch (i) { case 0: return "单排蓝色"; @@ -65,7 +62,7 @@ public class RelationMappingUtil { } //获取车辆属性 - public String getVehiclePendantParam(int i) { + public static String getVehiclePendantParam(int i) { switch (i) { case 0: return "司机"; @@ -97,7 +94,7 @@ public class RelationMappingUtil { } //获取车辆违法数据 - public String getVehicleIllegalStatus(int i) { + public static String getVehicleIllegalStatus(int i) { switch (i) { case 1000: return "违规"; @@ -115,7 +112,7 @@ public class RelationMappingUtil { } //获取车辆类型 - public String getVehicleSpecialType(int i) { + public static String getVehicleSpecialType(int i) { switch (i) { case -1: return "其他"; diff --git a/src/main/java/com/objecteye/utils/VehicleDetailsUtils.java b/src/main/java/com/objecteye/utils/VehicleDetailsUtils.java index a937af1..c6aed09 100644 --- a/src/main/java/com/objecteye/utils/VehicleDetailsUtils.java +++ b/src/main/java/com/objecteye/utils/VehicleDetailsUtils.java @@ -2,9 +2,7 @@ package com.objecteye.utils; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; -import com.objecteye.entity.RelationMappingUtil; import com.objecteye.pojo.VehicleDetails; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import sun.misc.BASE64Encoder; @@ -30,8 +28,6 @@ public class VehicleDetailsUtils { private float sdkThreshold = 0.7F; //sdk的阈值 private float cpsbThreshold = 0.9F; //车牌识别的阈值 private String errorMsg = "识别异常"; - @Autowired - private RelationMappingUtil relationMappingUtil; /** * 将SDK中的数据封装成VehicleDetails类 diff --git a/src/main/java/com/objecteye/websocket/MyWebSocketHandler.java b/src/main/java/com/objecteye/websocket/MyWebSocketHandler.java index 0edbe0b..2ea4ba9 100644 --- a/src/main/java/com/objecteye/websocket/MyWebSocketHandler.java +++ b/src/main/java/com/objecteye/websocket/MyWebSocketHandler.java @@ -1,10 +1,11 @@ package com.objecteye.websocket; import com.alibaba.fastjson.JSON; -import com.objecteye.entity.*; +import com.objecteye.entity.CountMsg; +import com.objecteye.entity.DeployAlarmMsg; +import com.objecteye.entity.PlateAlarmMsg; +import com.objecteye.entity.VisualStatisticsMsg; import com.objecteye.pojo.RabbitMQVehicle; -import com.objecteye.service.AreaEquipmentService; -import com.objecteye.service.EquipmentService; import net.sf.json.JSONObject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; @@ -31,13 +32,6 @@ public class MyWebSocketHandler extends TextWebSocketHandler { @Autowired private RedisTemplate redisTemplate; - - @Autowired - private EquipmentService equipmentService; - - @Autowired - private AreaEquipmentService areaEquipmentService; - @Autowired private SelectMongoData selectMongoData; @@ -112,47 +106,37 @@ public class MyWebSocketHandler extends TextWebSocketHandler { Object deployAlarmMsg = null; //对于流量统计和实时抓拍先判断设备是否有效 - SyAreaEquipment areaEquipment = areaEquipmentService.findOne(Integer.parseInt(deviceId)); - SyEquipment equipment = null; - Integer typeId = 0; - if (areaEquipment != null) { - typeId = areaEquipment.getTypeId(); //设备id - equipment = equipmentService.findOne(typeId); - if (equipment != null) { - //抓拍数据 - boolean havaIpKey = redisTemplate.hasKey(typeId); - if (havaIpKey) { - Long size = redisTemplate.opsForList().size(typeId); - if (size != 0) { - //从redis取数据(直接获取json字符串) - captureMsg = redisTemplate.opsForList().rightPop(typeId); - RabbitMQVehicle captureRedis = JSON.parseObject(captureMsg.toString(), RabbitMQVehicle.class); - String id = captureRedis.getId(); - String picurl = captureRedis.getPicurl(); - JSONObject object = new JSONObject(); - object.put("id", id); - object.put("picurl", picurl); - //VehicleDetails vehicleDetails = SdkToVehicleDetail.sdktodetail(captureRedis); - captureMsg = object.toString(); - } - } - - //流量统计 - CountMsg countMsg1 = new CountMsg(); - long vehicleCount = selectMongoData.getVehicleCountBydeviceId(typeId); - String strVehicleCount = selectMongoData.changeType(vehicleCount); - countMsg1.setVehicleCount(strVehicleCount); - long vehicleCountInHours = selectMongoData.getVehicleCountInHours(typeId); - String strVehicleCountInHours = selectMongoData.changeType(vehicleCountInHours); - countMsg1.setVehicleCountInHours(strVehicleCountInHours); - - long violateCountByDeviceId = selectMongoData.getViolateCountByDeviceId(typeId); - String strViolateCounts = selectMongoData.changeType(violateCountByDeviceId); - countMsg1.setViolateCount(strViolateCounts); - countMsg = JSON.toJSON(countMsg1); + //抓拍数据 + boolean havaIpKey = redisTemplate.hasKey("deviceId"); + if (havaIpKey) { + Long size = redisTemplate.opsForList().size("deviceId"); + if (size != 0) { + //从redis取数据(直接获取json字符串) + captureMsg = redisTemplate.opsForList().rightPop("deviceId"); + RabbitMQVehicle captureRedis = JSON.parseObject(captureMsg.toString(), RabbitMQVehicle.class); + String id = captureRedis.getId(); + String picurl = captureRedis.getPicurl(); + JSONObject object = new JSONObject(); + object.put("id", id); + object.put("picurl", picurl); + captureMsg = object.toString(); } } + //流量统计 + CountMsg countMsg1 = new CountMsg(); + long vehicleCount = selectMongoData.getVehicleCountBydeviceId(); + String strVehicleCount = selectMongoData.changeType(vehicleCount); + countMsg1.setVehicleCount(strVehicleCount); + long vehicleCountInHours = selectMongoData.getVehicleCountInHours(); + String strVehicleCountInHours = selectMongoData.changeType(vehicleCountInHours); + countMsg1.setVehicleCountInHours(strVehicleCountInHours); + + long violateCountByDeviceId = selectMongoData.getViolateCountByDeviceId(); + String strViolateCounts = selectMongoData.changeType(violateCountByDeviceId); + countMsg1.setViolateCount(strViolateCounts); + countMsg = JSON.toJSON(countMsg1); + //布控任务报警 boolean havedeployKey = redisTemplate.hasKey("ALARM"); if (havedeployKey) { @@ -222,8 +206,6 @@ public class MyWebSocketHandler extends TextWebSocketHandler { long monitorTotalDays = selectMongoData.getMonitorTotalDays(); String strMonitorTotalDays = selectMongoData.changeType(monitorTotalDays); visualStatisticsMsg.setMonitorTotalDays(strMonitorTotalDays); - int deviceCount = selectMongoData.getDeviceCount(); - visualStatisticsMsg.setDeviceCount(deviceCount); int deployCount = selectMongoData.getDeployCount(); String strDeployCount = selectMongoData.changeType(deployCount); visualStatisticsMsg.setDeployCount(strDeployCount); @@ -238,14 +220,10 @@ public class MyWebSocketHandler extends TextWebSocketHandler { visualStatisticsMsg.setVehicleCountInWeek(strVehicleCountInWeek); //区域和七日过车 - Map areaEquipmentCount = selectMongoData.getAreaEquipmentCount(); - visualStatisticsMsg.setAreaEquipmentCount(areaEquipmentCount); List oneWeekVehicleCount = selectMongoData.getOneWeekVehicleCount(); visualStatisticsMsg.setOneWeekVehicleCount(oneWeekVehicleCount); List oneWeekSpecialtyVehicleCount = selectMongoData.getOneWeekSpecialtyVehicleCount(); visualStatisticsMsg.setOneWeekSpecialtyVehicleCount(oneWeekSpecialtyVehicleCount); - List> vehicleCountByArea = selectMongoData.getVehicleCountByArea(); - visualStatisticsMsg.setVehicleCountByArea(vehicleCountByArea); //今日相关数据 Map todayData = selectMongoData.getTodayData(); visualStatisticsMsg.setTodayData(todayData); diff --git a/src/main/java/com/objecteye/websocket/SdkToVehicleDetail.java b/src/main/java/com/objecteye/websocket/SdkToVehicleDetail.java index 950aa73..8e7266c 100644 --- a/src/main/java/com/objecteye/websocket/SdkToVehicleDetail.java +++ b/src/main/java/com/objecteye/websocket/SdkToVehicleDetail.java @@ -1,10 +1,10 @@ package com.objecteye.websocket; -import com.objecteye.entity.RelationMappingUtil; import com.objecteye.pojo.PendantParams; import com.objecteye.pojo.PlatePlateNumParams; import com.objecteye.pojo.RabbitMQVehicle; import com.objecteye.pojo.VehicleDetails; +import com.objecteye.utils.RelationMappingUtil; import com.objecteye.utils.VehicleDetailsUtils; import java.text.SimpleDateFormat; diff --git a/src/main/java/com/objecteye/websocket/SelectMongoData.java b/src/main/java/com/objecteye/websocket/SelectMongoData.java index 69590be..9d5f0f2 100644 --- a/src/main/java/com/objecteye/websocket/SelectMongoData.java +++ b/src/main/java/com/objecteye/websocket/SelectMongoData.java @@ -2,11 +2,8 @@ package com.objecteye.websocket; import cn.hutool.core.date.DateTime; import cn.hutool.core.date.DateUtil; -import com.objecteye.entity.*; -import com.objecteye.mapper.SyAreaEquipmentMapper; -import com.objecteye.mapper.SyDeployMapper; -import com.objecteye.mapper.SyEquipmentMapper; -import com.objecteye.service.AreaEquipmentService; +import com.objecteye.entity.SyDeploy; +import com.objecteye.entity.SystemStartTime; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.data.mongodb.core.query.Criteria; @@ -23,20 +20,11 @@ public class SelectMongoData { @Autowired private MongoTemplate mongoTemplate; - @Autowired - private SyEquipmentMapper syEquipmentMapper; - @Autowired - private SyAreaEquipmentMapper areaEquipmentMapper; - @Autowired - private AreaEquipmentService areaEquipmentService; - @Autowired - private SyDeployMapper syDeployMapper; //处理过车总量 public long getVehicleCount() { Query query = new Query(); - long count = mongoTemplate.count(query, "rabbitMQVehicle"); - return count; + return mongoTemplate.count(query, "rabbitMQVehicle"); } //监控总天数(从系统接入的那天开始算起) @@ -47,8 +35,7 @@ public class SelectMongoData { DateTime now = DateUtil.date(); DateTime endOfDay = DateUtil.endOfDay(now); long endTime = endOfDay.getTime(); - long days = (endTime - startTime + 1) / (1000 * 60 * 60 * 24); - return days; + return (endTime - startTime + 1) / (1000 * 60 * 60 * 24); } //记录程序开始运行时间 @@ -67,29 +54,14 @@ public class SelectMongoData { } } - //卡口数 - public int getDeviceCount() { - SyEquipmentExample example = new SyEquipmentExample(); - SyEquipmentExample.Criteria criteria = example.createCriteria(); - criteria.andIsDeleteEqualTo(0); - int count = syEquipmentMapper.countByExample(example); - return count; - } - //布控车辆/排总数 public int getDeployCount() { - SyDeployExample example = new SyDeployExample(); - SyDeployExample.Criteria criteria = example.createCriteria(); - criteria.andIsDeleteEqualTo(0); - int count = syDeployMapper.countByExample(example); - return count; + return (int) mongoTemplate.count(Query.query(Criteria.where("isDelete").is(0)), SyDeploy.class); } //报警总数 public long getAlarmCount() { - Query query = new Query(); - long count = mongoTemplate.count(query, "plateAlarmMsg"); - return count; + return mongoTemplate.count(new Query(), "plateAlarmMsg"); } //本月过车总数 @@ -104,8 +76,7 @@ public class SelectMongoData { long endTime = date.getTime(); criteria.and("pictime").gte(startTime).lt(endTime); query.addCriteria(criteria); - long count = mongoTemplate.count(query, "rabbitMQVehicle"); - return count; + return mongoTemplate.count(query, "rabbitMQVehicle"); } //本周过车总数 @@ -120,8 +91,7 @@ public class SelectMongoData { long endTime = date.getTime(); criteria.and("pictime").gte(startTime).lt(endTime); query.addCriteria(criteria); - long count = mongoTemplate.count(query, "rabbitMQVehicle"); - return count; + return mongoTemplate.count(query, "rabbitMQVehicle"); } //本日主驾未系安全带 @@ -138,8 +108,7 @@ public class SelectMongoData { .and("vehicle_illegal_driver_belt_confidence").gt(sdkThreshold) .and("vehicle_illegal_driver_belt_status").is(1000); query.addCriteria(criteria); - long count = mongoTemplate.count(query, "rabbitMQVehicle"); - return count; + return mongoTemplate.count(query, "rabbitMQVehicle"); } //本日副驾驶未系安全带 @@ -156,8 +125,7 @@ public class SelectMongoData { .and("vehicle_illegal_copilot_belt_confidence").gt(sdkThreshold) .and("vehicle_illegal_copilot_belt_status").is(1000); query.addCriteria(criteria); - long count = mongoTemplate.count(query, "rabbitMQVehicle"); - return count; + return mongoTemplate.count(query, "rabbitMQVehicle"); } //本日主驾打电话 @@ -174,8 +142,7 @@ public class SelectMongoData { .and("vehicle_illegal_driver_phone_confidence").gt(sdkThreshold) .and("vehicle_illegal_driver_phone_status").is(1000); query.addCriteria(criteria); - long count = mongoTemplate.count(query, "rabbitMQVehicle"); - return count; + return mongoTemplate.count(query, "rabbitMQVehicle"); } //本日副驾打电话 @@ -190,8 +157,7 @@ public class SelectMongoData { .and("vehicle_illegal_copilot_phone_confidence").gt(sdkThreshold) .and("vehicle_illegal_copilot_phone_status").is(1000); query.addCriteria(criteria); - long count = mongoTemplate.count(query, "rabbitMQVehicle"); - return count; + return mongoTemplate.count(query, "rabbitMQVehicle"); } //本日主驾抽烟 @@ -208,8 +174,7 @@ public class SelectMongoData { .and("vehicle_illegal_driver_smoke_confidence").gt(sdkThreshold) .and("vehicle_illegal_driver_smoke_status").is(1000); query.addCriteria(criteria); - long count = mongoTemplate.count(query, "rabbitMQVehicle"); - return count; + return mongoTemplate.count(query, "rabbitMQVehicle"); } //本日副驾抽烟 @@ -226,15 +191,9 @@ public class SelectMongoData { .and("vehicle_illegal_copilot_smoke_confidence").gt(sdkThreshold) .and("vehicle_illegal_copilot_smoke_status").is(1000); query.addCriteria(criteria); - long count = mongoTemplate.count(query, "rabbitMQVehicle"); - return count; + return mongoTemplate.count(query, "rabbitMQVehicle"); } - //本日污损车牌 - - - //本日无车牌 - //本日违规类型排名 public List> getViolationTypeRanking() { List> list = new ArrayList<>(); @@ -262,21 +221,12 @@ public class SelectMongoData { map5.put("name", "无车牌"); map5.put("value", 0); list.add(map5); - Collections.sort(list, new Comparator>() { - @Override - public int compare(Map a, Map b) { - //默认flag值1,默认是升序,如果返回是为-flag则是降序 - String valueA = a.get("value").toString(); - String valueB = b.get("value").toString(); - int flag = Integer.parseInt(valueA) - Integer.parseInt(valueB); - if (flag < 0) { - return 1; - } - if (flag == 0) { - return 0; - } - return -1; - } + list.sort((a, b) -> { + //默认flag值1,默认是升序,如果返回是为-flag则是降序 + String valueA = a.get("value").toString(); + String valueB = b.get("value").toString(); + int flag = Integer.parseInt(valueA) - Integer.parseInt(valueB); + return Integer.compare(0, flag); }); return list; } @@ -293,8 +243,7 @@ public class SelectMongoData { .and("vehicle_special_score").gt(sdkThreshold) .and("vehicle_special_type").is(2); query.addCriteria(criteria); - long count = mongoTemplate.count(query, "rabbitMQVehicle"); - return count; + return mongoTemplate.count(query, "rabbitMQVehicle"); } //本日危化品车 @@ -309,8 +258,7 @@ public class SelectMongoData { .and("vehicle_special_score").gt(sdkThreshold) .and("vehicle_special_type").is(1); query.addCriteria(criteria); - long count = mongoTemplate.count(query, "rabbitMQVehicle"); - return count; + return mongoTemplate.count(query, "rabbitMQVehicle"); } //本日过车总数 @@ -325,14 +273,12 @@ public class SelectMongoData { long endTime = date.getTime(); criteria.and("pictime").gte(startTime).lt(endTime); query.addCriteria(criteria); - long count = mongoTemplate.count(query, "rabbitMQVehicle"); - return count; + return mongoTemplate.count(query, "rabbitMQVehicle"); } //本日违规总数 public long getViolateCountInDay() { - long count = getDriverBelt() + getCopilotBelt() + getDriverPhone() + getCopilotPhone() + getDriverSmoke() + getCopilotSmoke(); - return count; + return getDriverBelt() + getCopilotBelt() + getDriverPhone() + getCopilotPhone() + getDriverSmoke() + getCopilotSmoke(); } //本日报警总数 @@ -341,8 +287,7 @@ public class SelectMongoData { DateTime time = DateUtil.beginOfDay(date); long startTime = time.getTime(); long endTime = date.getTime(); - long count = mongoTemplate.count(Query.query(Criteria.where("picTime").gte(startTime).lt(endTime)), "plateAlarmMsg"); - return count; + return mongoTemplate.count(Query.query(Criteria.where("picTime").gte(startTime).lt(endTime)), "plateAlarmMsg"); } //本日车牌报警总数 @@ -351,8 +296,7 @@ public class SelectMongoData { DateTime time = DateUtil.beginOfDay(date); long startTime = time.getTime(); long endTime = date.getTime(); - long count = mongoTemplate.count(Query.query(Criteria.where("picTime").gte(startTime).lt(endTime).and("alarmType").is(0)), "plateAlarmMsg"); - return count; + return mongoTemplate.count(Query.query(Criteria.where("picTime").gte(startTime).lt(endTime).and("alarmType").is(0)), "plateAlarmMsg"); } //本日车辆报警总数 @@ -361,8 +305,7 @@ public class SelectMongoData { DateTime time = DateUtil.beginOfDay(date); long startTime = time.getTime(); long endTime = date.getTime(); - long count = mongoTemplate.count(Query.query(Criteria.where("picTime").gte(startTime).lt(endTime).and("alarmType").is(1)), "plateAlarmMsg"); - return count; + return mongoTemplate.count(Query.query(Criteria.where("picTime").gte(startTime).lt(endTime).and("alarmType").is(1)), "plateAlarmMsg"); } //本日人员报警总数 @@ -371,8 +314,7 @@ public class SelectMongoData { DateTime time = DateUtil.beginOfDay(date); long startTime = time.getTime(); long endTime = date.getTime(); - long count = mongoTemplate.count(Query.query(Criteria.where("picTime").gte(startTime).lt(endTime).and("alarmType").is(2)), "plateAlarmMsg"); - return count; + return mongoTemplate.count(Query.query(Criteria.where("picTime").gte(startTime).lt(endTime).and("alarmType").is(2)), "plateAlarmMsg"); } //本日相关数据 @@ -441,30 +383,6 @@ public class SelectMongoData { } - - //点位区域分布(只需返回区域名称和该区域下有多少设备即可) - public Map getAreaEquipmentCount() { - Map map = new HashMap<>(); - SyAreaEquipmentExample example = new SyAreaEquipmentExample(); - SyAreaEquipmentExample.Criteria criteria = example.createCriteria(); - criteria.andTypeIdEqualTo(0); - criteria.andParentIdNotEqualTo(0); - List syAreaEquipments = areaEquipmentMapper.selectByExample(example); - for (SyAreaEquipment i : syAreaEquipments) { - Integer id = i.getId(); - SyAreaEquipmentExample example1 = new SyAreaEquipmentExample(); - SyAreaEquipmentExample.Criteria criteria1 = example1.createCriteria(); - criteria1.andParentIdEqualTo(id); - int count = areaEquipmentMapper.countByExample(example1); - String name = i.getName(); - map.put(name, count); - } - if (map.size() > 0) { - return map; - } - return null; - } - //七日过车情况(近七天每天的过车总量) public List getOneWeekVehicleCount() { List list = new ArrayList<>(); @@ -493,8 +411,7 @@ public class SelectMongoData { long endTime = endOfDay.getTime(); criteria.and("pictime").gte(startTime).lt(endTime); query.addCriteria(criteria); - long count = mongoTemplate.count(query, "rabbitMQVehicle"); - return count; + return mongoTemplate.count(query, "rabbitMQVehicle"); } //七日特殊品类车辆走势(近七天每天渣土车、危化品车总数) @@ -528,8 +445,7 @@ public class SelectMongoData { .and("vehicle_special_score").gt(sdkThreshold) .and("vehicle_special_type").is(2); query.addCriteria(criteria); - long count = mongoTemplate.count(query, "rabbitMQVehicle"); - return count; + return mongoTemplate.count(query, "rabbitMQVehicle"); } //一天中危化品车总量 @@ -546,168 +462,98 @@ public class SelectMongoData { .and("vehicle_special_score").gt(sdkThreshold) .and("vehicle_special_type").is(1); query.addCriteria(criteria); - long count = mongoTemplate.count(query, "rabbitMQVehicle"); - return count; + return mongoTemplate.count(query, "rabbitMQVehicle"); } //获取卡口经过车辆数 - public long getVehicleCountBydeviceId(int deviceId) { + public long getVehicleCountBydeviceId() { Query query = new Query(); SystemStartTime one = mongoTemplate.findOne(query, SystemStartTime.class, "SystemStartTime"); long startTime = one.getStartTime(); DateTime now = DateUtil.date(); long endTime = now.getTime(); Criteria criteria = new Criteria(); - criteria.and("deviceid").is(deviceId); criteria.and("pictime").gte(startTime).lt(endTime); query.addCriteria(criteria); - long count = mongoTemplate.count(query, "rabbitMQVehicle"); - return count; + return mongoTemplate.count(query, "rabbitMQVehicle"); } //获取过去一小时卡口经过车辆数 - public long getVehicleCountInHours(int deviceId) { + public long getVehicleCountInHours() { Query query = new Query(); DateTime now = DateUtil.date(); //现在 DateTime offsetHour = DateUtil.offsetHour(now, -1); //一小时前 long startTime = offsetHour.getTime(); long endTime = now.getTime(); Criteria criteria = new Criteria(); - criteria.and("deviceid").is(deviceId); criteria.and("pictime").gte(startTime).lt(endTime); query.addCriteria(criteria); - long count = mongoTemplate.count(query, "rabbitMQVehicle"); - return count; - } - - //地图展示每个区的过车总数(经纬度、过车总数) - public List> getVehicleCountByArea() { - - List> list = new ArrayList<>(); - //获得所有区域 - SyAreaEquipmentExample example = new SyAreaEquipmentExample(); - SyAreaEquipmentExample.Criteria criteria = example.createCriteria(); - criteria.andTypeIdEqualTo(0); - criteria.andParentIdNotEqualTo(0); - List syAreaEquipments = areaEquipmentMapper.selectByExample(example); - //计算各区域过车总数 - for (SyAreaEquipment i : syAreaEquipments) { - Map map = new HashMap<>(16); - //获得节点id - Integer id = i.getId(); - //获得一个区域中所有的设备id - List deviceIds = areaEquipmentService.findCaptureById(id); - if (deviceIds.size() > 0) { - long count = 0; - for (int j = 0; j < deviceIds.size(); j++) { - - - //获得区域名称 - String name = i.getName(); - map.put("name", name); - //获得其中一个设备的经纬度 - Integer deviceId = deviceIds.get(j); - SyEquipment syEquipment = syEquipmentMapper.selectByPrimaryKey(deviceId); - String longitude = syEquipment.getLongitude(); - String latitude = syEquipment.getLatitude(); - map.put("longitude", longitude); - map.put("latitude", latitude); - //获得区域内一个设备的过车总数 - Query query = new Query(); - Criteria criteria1 = new Criteria(); - criteria1.and("deviceid").is(deviceId); - query.addCriteria(criteria1); - long count1 = mongoTemplate.count(query, "rabbitMQVehicle"); - count = count + count1; - } - map.put("count", count); - list.add(map); - } else { //一个区域没有设备,就不用返回 - continue; - } - } - if (list.size() > 0) { - return list; - } - return null; + return mongoTemplate.count(query, "rabbitMQVehicle"); } //限定设备,主驾未系安全带 - public long getDriverBeltByDeviceId(int deviceId) { + public long getDriverBeltByDeviceId() { Query query = new Query(); Criteria criteria = new Criteria(); - criteria.and("deviceId").is(deviceId) - .and("vehicle_illegal_driver_belt_confidence").gt(sdkThreshold) + criteria.and("vehicle_illegal_driver_belt_confidence").gt(sdkThreshold) .and("vehicle_illegal_driver_belt_status").is(1000); query.addCriteria(criteria); - long count = mongoTemplate.count(query, "rabbitMQVehicle"); - return count; + return mongoTemplate.count(query, "rabbitMQVehicle"); } //限定设备,副驾驶未系安全带 - public long getCopilotBeltByDeviceId(int deviceId) { + public long getCopilotBeltByDeviceId() { Query query = new Query(); Criteria criteria = new Criteria(); - criteria.and("deviceId").is(deviceId) - .and("vehicle_illegal_copilot_belt_confidence").gt(sdkThreshold) + criteria.and("vehicle_illegal_copilot_belt_confidence").gt(sdkThreshold) .and("vehicle_illegal_copilot_belt_status").is(1000); query.addCriteria(criteria); - long count = mongoTemplate.count(query, "rabbitMQVehicle"); - return count; + return mongoTemplate.count(query, "rabbitMQVehicle"); } //限定设备,主驾打电话 - public long getDriverPhoneByDeviceId(int deviceId) { + public long getDriverPhoneByDeviceId() { Query query = new Query(); Criteria criteria = new Criteria(); - criteria.and("deviceId").is(deviceId) - .and("vehicle_illegal_driver_phone_confidence").gt(sdkThreshold) + criteria.and("vehicle_illegal_driver_phone_confidence").gt(sdkThreshold) .and("vehicle_illegal_driver_phone_status").is(1000); query.addCriteria(criteria); - long count = mongoTemplate.count(query, "rabbitMQVehicle"); - return count; + return mongoTemplate.count(query, "rabbitMQVehicle"); } //限定设备,副驾打电话 - public long getCopilotPhoneByDeviceId(int deviceId) { + public long getCopilotPhoneByDeviceId() { Query query = new Query(); Criteria criteria = new Criteria(); - criteria.and("deviceId").is(deviceId) - .and("vehicle_illegal_copilot_phone_confidence").gt(sdkThreshold) + criteria.and("vehicle_illegal_copilot_phone_confidence").gt(sdkThreshold) .and("vehicle_illegal_copilot_phone_status").is(1000); query.addCriteria(criteria); - long count = mongoTemplate.count(query, "rabbitMQVehicle"); - return count; + return mongoTemplate.count(query, "rabbitMQVehicle"); } //限定设备,主驾抽烟 - public long getDriverSmokeByDeviceId(int deviceId) { + public long getDriverSmokeByDeviceId() { Query query = new Query(); Criteria criteria = new Criteria(); - criteria.and("deviceId").is(deviceId) - .and("vehicle_illegal_driver_smoke_confidence").gt(sdkThreshold) + criteria.and("vehicle_illegal_driver_smoke_confidence").gt(sdkThreshold) .and("vehicle_illegal_driver_smoke_status").is(1000); query.addCriteria(criteria); - long count = mongoTemplate.count(query, "rabbitMQVehicle"); - return count; + return mongoTemplate.count(query, "rabbitMQVehicle"); } //限定设备,副驾抽烟 - public long getCopilotSmokeByDeviceId(int deviceId) { + public long getCopilotSmokeByDeviceId() { Query query = new Query(); Criteria criteria = new Criteria(); - criteria.and("deviceId").is(deviceId) - .and("vehicle_illegal_copilot_smoke_confidence").gt(sdkThreshold) + criteria.and("vehicle_illegal_copilot_smoke_confidence").gt(sdkThreshold) .and("vehicle_illegal_copilot_smoke_status").is(1000); query.addCriteria(criteria); - long count = mongoTemplate.count(query, "rabbitMQVehicle"); - return count; + return mongoTemplate.count(query, "rabbitMQVehicle"); } //设备接入至现在的违规车辆数 - public long getViolateCountByDeviceId(int deviceId) { - long count = getDriverBeltByDeviceId(deviceId) + getDriverPhoneByDeviceId(deviceId) + getDriverSmokeByDeviceId(deviceId) + getCopilotBeltByDeviceId(deviceId) + getCopilotPhoneByDeviceId(deviceId) + getCopilotSmokeByDeviceId(deviceId); - return count; + public long getViolateCountByDeviceId() { + return getDriverBeltByDeviceId() + getDriverPhoneByDeviceId() + getDriverSmokeByDeviceId() + getCopilotBeltByDeviceId() + getCopilotPhoneByDeviceId() + getCopilotSmokeByDeviceId(); } //转换类型 diff --git a/src/main/resources/application-test.yml b/src/main/resources/application-test.yml index cccecb5..f60c2e9 100644 --- a/src/main/resources/application-test.yml +++ b/src/main/resources/application-test.yml @@ -1,8 +1,4 @@ spring: - datasource: - url: jdbc:mysql://192.168.10.39:3306/sy_vehicle?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai - username: root - password: 123456 data: mongodb: uri: mongodb://192.168.10.39:27017/vehicle diff --git a/src/main/resources/com.objecteye.mapper/SyAreaEquipmentMapper.xml b/src/main/resources/com.objecteye.mapper/SyAreaEquipmentMapper.xml deleted file mode 100644 index 865235e..0000000 --- a/src/main/resources/com.objecteye.mapper/SyAreaEquipmentMapper.xml +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, parent_id, name, type_id, is_equipment - - - - - delete - from sy_area_equipment - where id = #{id,jdbcType=INTEGER} - - - delete from sy_area_equipment - - - - - - - SELECT LAST_INSERT_ID() - - insert into sy_area_equipment (parent_id, name, type_id, - is_equipment) - values (#{parentId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{typeId,jdbcType=INTEGER}, - #{isEquipment,jdbcType=INTEGER}) - - - - SELECT LAST_INSERT_ID() - - insert into sy_area_equipment - - - parent_id, - - - name, - - - type_id, - - - is_equipment, - - - - - #{parentId,jdbcType=INTEGER}, - - - #{name,jdbcType=VARCHAR}, - - - #{typeId,jdbcType=INTEGER}, - - - #{isEquipment,jdbcType=INTEGER}, - - - - - - update sy_area_equipment - - - id = #{record.id,jdbcType=INTEGER}, - - - parent_id = #{record.parentId,jdbcType=INTEGER}, - - - name = #{record.name,jdbcType=VARCHAR}, - - - type_id = #{record.typeId,jdbcType=INTEGER}, - - - is_equipment = #{record.isEquipment,jdbcType=INTEGER}, - - - - - - - - update sy_area_equipment - set id = #{record.id,jdbcType=INTEGER}, - parent_id = #{record.parentId,jdbcType=INTEGER}, - name = #{record.name,jdbcType=VARCHAR}, - type_id = #{record.typeId,jdbcType=INTEGER}, - is_equipment = #{record.isEquipment,jdbcType=INTEGER} - - - - - - update sy_area_equipment - - - parent_id = #{parentId,jdbcType=INTEGER}, - - - name = #{name,jdbcType=VARCHAR}, - - - type_id = #{typeId,jdbcType=INTEGER}, - - - is_equipment = #{isEquipment,jdbcType=INTEGER}, - - - where id = #{id,jdbcType=INTEGER} - - - update sy_area_equipment - set name = #{name,jdbcType=VARCHAR} - where id = #{id,jdbcType=INTEGER} - - \ No newline at end of file diff --git a/src/main/resources/com.objecteye.mapper/SyDeployEquipmentMapper.xml b/src/main/resources/com.objecteye.mapper/SyDeployEquipmentMapper.xml deleted file mode 100644 index d01144b..0000000 --- a/src/main/resources/com.objecteye.mapper/SyDeployEquipmentMapper.xml +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, eid, did, is_delete - - - - - delete - from sy_deploy_equipment - where id = #{id,jdbcType=INTEGER} - - - delete from sy_deploy_equipment - - - - - - - SELECT LAST_INSERT_ID() - - insert into sy_deploy_equipment (eid, did, is_delete - ) - values (#{eid,jdbcType=INTEGER}, #{did,jdbcType=INTEGER}, #{isDelete,jdbcType=INTEGER} - ) - - - - SELECT LAST_INSERT_ID() - - insert into sy_deploy_equipment - - - eid, - - - did, - - - is_delete, - - - - - #{eid,jdbcType=INTEGER}, - - - #{did,jdbcType=INTEGER}, - - - #{isDelete,jdbcType=INTEGER}, - - - - - - update sy_deploy_equipment - - - id = #{record.id,jdbcType=INTEGER}, - - - eid = #{record.eid,jdbcType=INTEGER}, - - - did = #{record.did,jdbcType=INTEGER}, - - - is_delete = #{record.isDelete,jdbcType=INTEGER}, - - - - - - - - update sy_deploy_equipment - set id = #{record.id,jdbcType=INTEGER}, - eid = #{record.eid,jdbcType=INTEGER}, - did = #{record.did,jdbcType=INTEGER}, - is_delete = #{record.isDelete,jdbcType=INTEGER} - - - - - - update sy_deploy_equipment - - - eid = #{eid,jdbcType=INTEGER}, - - - did = #{did,jdbcType=INTEGER}, - - - is_delete = #{isDelete,jdbcType=INTEGER}, - - - where id = #{id,jdbcType=INTEGER} - - - update sy_deploy_equipment - set eid = #{eid,jdbcType=INTEGER}, - did = #{did,jdbcType=INTEGER}, - is_delete = #{isDelete,jdbcType=INTEGER} - where id = #{id,jdbcType=INTEGER} - - \ No newline at end of file diff --git a/src/main/resources/com.objecteye.mapper/SyDeployFeatureMapper.xml b/src/main/resources/com.objecteye.mapper/SyDeployFeatureMapper.xml deleted file mode 100644 index bc22447..0000000 --- a/src/main/resources/com.objecteye.mapper/SyDeployFeatureMapper.xml +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, did, fid, is_delete - - - - - delete from sy_deploy_feature - where id = #{id,jdbcType=INTEGER} - - - delete from sy_deploy_feature - - - - - - - SELECT LAST_INSERT_ID() - - insert into sy_deploy_feature (did, fid, is_delete - ) - values (#{did,jdbcType=INTEGER}, #{fid,jdbcType=INTEGER}, #{isDelete,jdbcType=INTEGER} - ) - - - - SELECT LAST_INSERT_ID() - - insert into sy_deploy_feature - - - did, - - - fid, - - - is_delete, - - - - - #{did,jdbcType=INTEGER}, - - - #{fid,jdbcType=INTEGER}, - - - #{isDelete,jdbcType=INTEGER}, - - - - - - update sy_deploy_feature - - - id = #{record.id,jdbcType=INTEGER}, - - - did = #{record.did,jdbcType=INTEGER}, - - - fid = #{record.fid,jdbcType=INTEGER}, - - - is_delete = #{record.isDelete,jdbcType=INTEGER}, - - - - - - - - update sy_deploy_feature - set id = #{record.id,jdbcType=INTEGER}, - did = #{record.did,jdbcType=INTEGER}, - fid = #{record.fid,jdbcType=INTEGER}, - is_delete = #{record.isDelete,jdbcType=INTEGER} - - - - - - update sy_deploy_feature - - - did = #{did,jdbcType=INTEGER}, - - - fid = #{fid,jdbcType=INTEGER}, - - - is_delete = #{isDelete,jdbcType=INTEGER}, - - - where id = #{id,jdbcType=INTEGER} - - - update sy_deploy_feature - set did = #{did,jdbcType=INTEGER}, - fid = #{fid,jdbcType=INTEGER}, - is_delete = #{isDelete,jdbcType=INTEGER} - where id = #{id,jdbcType=INTEGER} - - \ No newline at end of file diff --git a/src/main/resources/com.objecteye.mapper/SyDeployMapper.xml b/src/main/resources/com.objecteye.mapper/SyDeployMapper.xml deleted file mode 100644 index 8453f40..0000000 --- a/src/main/resources/com.objecteye.mapper/SyDeployMapper.xml +++ /dev/null @@ -1,356 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, name, start_time, end_time, thresld, description, deploy_equip, deploy_lib, deploy_type, - create_date, status, is_delete, singleMonitor, single_id - - - - - delete - from sy_deploy - where id = #{id,jdbcType=INTEGER} - - - delete from sy_deploy - - - - - - - SELECT LAST_INSERT_ID() - - insert into sy_deploy (name, start_time, end_time, - thresld, description, deploy_equip, - deploy_lib, deploy_type, create_date, - status, is_delete, singleMonitor, - single_id) - values (#{name,jdbcType=VARCHAR}, #{startTime,jdbcType=VARCHAR}, #{endTime,jdbcType=VARCHAR}, - #{thresld,jdbcType=REAL}, #{description,jdbcType=VARCHAR}, #{deployEquip,jdbcType=VARCHAR}, - #{deployLib,jdbcType=VARCHAR}, #{deployType,jdbcType=INTEGER}, #{createDate,jdbcType=VARCHAR}, - #{status,jdbcType=INTEGER}, #{isDelete,jdbcType=INTEGER}, #{singlemonitor,jdbcType=INTEGER}, - #{singleId,jdbcType=VARCHAR}) - - - - SELECT LAST_INSERT_ID() - - insert into sy_deploy - - - name, - - - start_time, - - - end_time, - - - thresld, - - - description, - - - deploy_equip, - - - deploy_lib, - - - deploy_type, - - - create_date, - - - status, - - - is_delete, - - - singleMonitor, - - - single_id, - - - - - #{name,jdbcType=VARCHAR}, - - - #{startTime,jdbcType=VARCHAR}, - - - #{endTime,jdbcType=VARCHAR}, - - - #{thresld,jdbcType=REAL}, - - - #{description,jdbcType=VARCHAR}, - - - #{deployEquip,jdbcType=VARCHAR}, - - - #{deployLib,jdbcType=VARCHAR}, - - - #{deployType,jdbcType=INTEGER}, - - - #{createDate,jdbcType=VARCHAR}, - - - #{status,jdbcType=INTEGER}, - - - #{isDelete,jdbcType=INTEGER}, - - - #{singlemonitor,jdbcType=INTEGER}, - - - #{singleId,jdbcType=VARCHAR}, - - - - - - update sy_deploy - - - id = #{record.id,jdbcType=INTEGER}, - - - name = #{record.name,jdbcType=VARCHAR}, - - - start_time = #{record.startTime,jdbcType=VARCHAR}, - - - end_time = #{record.endTime,jdbcType=VARCHAR}, - - - thresld = #{record.thresld,jdbcType=REAL}, - - - description = #{record.description,jdbcType=VARCHAR}, - - - deploy_equip = #{record.deployEquip,jdbcType=VARCHAR}, - - - deploy_lib = #{record.deployLib,jdbcType=VARCHAR}, - - - deploy_type = #{record.deployType,jdbcType=INTEGER}, - - - create_date = #{record.createDate,jdbcType=VARCHAR}, - - - status = #{record.status,jdbcType=INTEGER}, - - - is_delete = #{record.isDelete,jdbcType=INTEGER}, - - - singleMonitor = #{record.singlemonitor,jdbcType=INTEGER}, - - - single_id = #{record.singleId,jdbcType=VARCHAR}, - - - - - - - - update sy_deploy - set id = #{record.id,jdbcType=INTEGER}, - name = #{record.name,jdbcType=VARCHAR}, - start_time = #{record.startTime,jdbcType=VARCHAR}, - end_time = #{record.endTime,jdbcType=VARCHAR}, - thresld = #{record.thresld,jdbcType=REAL}, - description = #{record.description,jdbcType=VARCHAR}, - deploy_equip = #{record.deployEquip,jdbcType=VARCHAR}, - deploy_lib = #{record.deployLib,jdbcType=VARCHAR}, - deploy_type = #{record.deployType,jdbcType=INTEGER}, - create_date = #{record.createDate,jdbcType=VARCHAR}, - status = #{record.status,jdbcType=INTEGER}, - is_delete = #{record.isDelete,jdbcType=INTEGER}, - singleMonitor = #{record.singlemonitor,jdbcType=INTEGER}, - single_id = #{record.singleId,jdbcType=VARCHAR} - - - - - - update sy_deploy - - - name = #{name,jdbcType=VARCHAR}, - - - start_time = #{startTime,jdbcType=VARCHAR}, - - - end_time = #{endTime,jdbcType=VARCHAR}, - - - thresld = #{thresld,jdbcType=REAL}, - - - description = #{description,jdbcType=VARCHAR}, - - - deploy_equip = #{deployEquip,jdbcType=VARCHAR}, - - - deploy_lib = #{deployLib,jdbcType=VARCHAR}, - - - deploy_type = #{deployType,jdbcType=INTEGER}, - - - create_date = #{createDate,jdbcType=VARCHAR}, - - - status = #{status,jdbcType=INTEGER}, - - - is_delete = #{isDelete,jdbcType=INTEGER}, - - - singleMonitor = #{singlemonitor,jdbcType=INTEGER}, - - - single_id = #{singleId,jdbcType=VARCHAR}, - - - where id = #{id,jdbcType=INTEGER} - - - update sy_deploy - set name = #{name,jdbcType=VARCHAR}, - start_time = #{startTime,jdbcType=VARCHAR}, - end_time = #{endTime,jdbcType=VARCHAR}, - thresld = #{thresld,jdbcType=REAL}, - description = #{description,jdbcType=VARCHAR}, - deploy_equip = #{deployEquip,jdbcType=VARCHAR}, - deploy_lib = #{deployLib,jdbcType=VARCHAR}, - deploy_type = #{deployType,jdbcType=INTEGER}, - create_date = #{createDate,jdbcType=VARCHAR}, - status = #{status,jdbcType=INTEGER}, - is_delete = #{isDelete,jdbcType=INTEGER}, - singleMonitor = #{singlemonitor,jdbcType=INTEGER}, - single_id = #{singleId,jdbcType=VARCHAR} - where id = #{id,jdbcType=INTEGER} - - \ No newline at end of file diff --git a/src/main/resources/com.objecteye.mapper/SyEquipmentMapper.xml b/src/main/resources/com.objecteye.mapper/SyEquipmentMapper.xml deleted file mode 100644 index 495f81d..0000000 --- a/src/main/resources/com.objecteye.mapper/SyEquipmentMapper.xml +++ /dev/null @@ -1,446 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, equipment_name, equipment_ip, rtsp_url, longitude, latitude, orientation, username, - password, equipment_port, intent_port, vendor, description, create_date, update_date, - is_delete, equipment_type, status, aid, place - - - - - delete - from sy_equipment - where id = #{id,jdbcType=INTEGER} - - - delete from sy_equipment - - - - - - - SELECT LAST_INSERT_ID() - - insert into sy_equipment (equipment_name, equipment_ip, rtsp_url, - longitude, latitude, orientation, - username, password, equipment_port, - intent_port, vendor, description, - create_date, update_date, is_delete, - equipment_type, status, aid, - place) - values (#{equipmentName,jdbcType=VARCHAR}, #{equipmentIp,jdbcType=VARCHAR}, #{rtspUrl,jdbcType=VARCHAR}, - #{longitude,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR}, #{orientation,jdbcType=VARCHAR}, - #{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{equipmentPort,jdbcType=VARCHAR}, - #{intentPort,jdbcType=VARCHAR}, #{vendor,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, - #{createDate,jdbcType=VARCHAR}, #{updateDate,jdbcType=VARCHAR}, #{isDelete,jdbcType=INTEGER}, - #{equipmentType,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{aid,jdbcType=INTEGER}, - #{place,jdbcType=VARCHAR}) - - - - SELECT LAST_INSERT_ID() - - insert into sy_equipment - - - equipment_name, - - - equipment_ip, - - - rtsp_url, - - - longitude, - - - latitude, - - - orientation, - - - username, - - - password, - - - equipment_port, - - - intent_port, - - - vendor, - - - description, - - - create_date, - - - update_date, - - - is_delete, - - - equipment_type, - - - status, - - - aid, - - - place, - - - - - #{equipmentName,jdbcType=VARCHAR}, - - - #{equipmentIp,jdbcType=VARCHAR}, - - - #{rtspUrl,jdbcType=VARCHAR}, - - - #{longitude,jdbcType=VARCHAR}, - - - #{latitude,jdbcType=VARCHAR}, - - - #{orientation,jdbcType=VARCHAR}, - - - #{username,jdbcType=VARCHAR}, - - - #{password,jdbcType=VARCHAR}, - - - #{equipmentPort,jdbcType=VARCHAR}, - - - #{intentPort,jdbcType=VARCHAR}, - - - #{vendor,jdbcType=VARCHAR}, - - - #{description,jdbcType=VARCHAR}, - - - #{createDate,jdbcType=VARCHAR}, - - - #{updateDate,jdbcType=VARCHAR}, - - - #{isDelete,jdbcType=INTEGER}, - - - #{equipmentType,jdbcType=INTEGER}, - - - #{status,jdbcType=INTEGER}, - - - #{aid,jdbcType=INTEGER}, - - - #{place,jdbcType=VARCHAR}, - - - - - - update sy_equipment - - - id = #{record.id,jdbcType=INTEGER}, - - - equipment_name = #{record.equipmentName,jdbcType=VARCHAR}, - - - equipment_ip = #{record.equipmentIp,jdbcType=VARCHAR}, - - - rtsp_url = #{record.rtspUrl,jdbcType=VARCHAR}, - - - longitude = #{record.longitude,jdbcType=VARCHAR}, - - - latitude = #{record.latitude,jdbcType=VARCHAR}, - - - orientation = #{record.orientation,jdbcType=VARCHAR}, - - - username = #{record.username,jdbcType=VARCHAR}, - - - password = #{record.password,jdbcType=VARCHAR}, - - - equipment_port = #{record.equipmentPort,jdbcType=VARCHAR}, - - - intent_port = #{record.intentPort,jdbcType=VARCHAR}, - - - vendor = #{record.vendor,jdbcType=VARCHAR}, - - - description = #{record.description,jdbcType=VARCHAR}, - - - create_date = #{record.createDate,jdbcType=VARCHAR}, - - - update_date = #{record.updateDate,jdbcType=VARCHAR}, - - - is_delete = #{record.isDelete,jdbcType=INTEGER}, - - - equipment_type = #{record.equipmentType,jdbcType=INTEGER}, - - - status = #{record.status,jdbcType=INTEGER}, - - - aid = #{record.aid,jdbcType=INTEGER}, - - - place = #{record.place,jdbcType=VARCHAR}, - - - - - - - - update sy_equipment - set id = #{record.id,jdbcType=INTEGER}, - equipment_name = #{record.equipmentName,jdbcType=VARCHAR}, - equipment_ip = #{record.equipmentIp,jdbcType=VARCHAR}, - rtsp_url = #{record.rtspUrl,jdbcType=VARCHAR}, - longitude = #{record.longitude,jdbcType=VARCHAR}, - latitude = #{record.latitude,jdbcType=VARCHAR}, - orientation = #{record.orientation,jdbcType=VARCHAR}, - username = #{record.username,jdbcType=VARCHAR}, - password = #{record.password,jdbcType=VARCHAR}, - equipment_port = #{record.equipmentPort,jdbcType=VARCHAR}, - intent_port = #{record.intentPort,jdbcType=VARCHAR}, - vendor = #{record.vendor,jdbcType=VARCHAR}, - description = #{record.description,jdbcType=VARCHAR}, - create_date = #{record.createDate,jdbcType=VARCHAR}, - update_date = #{record.updateDate,jdbcType=VARCHAR}, - is_delete = #{record.isDelete,jdbcType=INTEGER}, - equipment_type = #{record.equipmentType,jdbcType=INTEGER}, - status = #{record.status,jdbcType=INTEGER}, - aid = #{record.aid,jdbcType=INTEGER}, - place = #{record.place,jdbcType=VARCHAR} - - - - - - update sy_equipment - - - equipment_name = #{equipmentName,jdbcType=VARCHAR}, - - - equipment_ip = #{equipmentIp,jdbcType=VARCHAR}, - - - rtsp_url = #{rtspUrl,jdbcType=VARCHAR}, - - - longitude = #{longitude,jdbcType=VARCHAR}, - - - latitude = #{latitude,jdbcType=VARCHAR}, - - - orientation = #{orientation,jdbcType=VARCHAR}, - - - username = #{username,jdbcType=VARCHAR}, - - - password = #{password,jdbcType=VARCHAR}, - - - equipment_port = #{equipmentPort,jdbcType=VARCHAR}, - - - intent_port = #{intentPort,jdbcType=VARCHAR}, - - - vendor = #{vendor,jdbcType=VARCHAR}, - - - description = #{description,jdbcType=VARCHAR}, - - - create_date = #{createDate,jdbcType=VARCHAR}, - - - update_date = #{updateDate,jdbcType=VARCHAR}, - - - is_delete = #{isDelete,jdbcType=INTEGER}, - - - equipment_type = #{equipmentType,jdbcType=INTEGER}, - - - status = #{status,jdbcType=INTEGER}, - - - aid = #{aid,jdbcType=INTEGER}, - - - place = #{place,jdbcType=VARCHAR}, - - - where id = #{id,jdbcType=INTEGER} - - - update sy_equipment - set equipment_name = #{equipmentName,jdbcType=VARCHAR}, - rtsp_url = #{rtspUrl,jdbcType=VARCHAR}, - longitude = #{longitude,jdbcType=VARCHAR}, - latitude = #{latitude,jdbcType=VARCHAR}, - orientation = #{orientation,jdbcType=VARCHAR}, - username = #{username,jdbcType=VARCHAR}, - password = #{password,jdbcType=VARCHAR}, - equipment_port = #{equipmentPort,jdbcType=VARCHAR}, - intent_port = #{intentPort,jdbcType=VARCHAR}, - vendor = #{vendor,jdbcType=VARCHAR}, - description = #{description,jdbcType=VARCHAR}, - update_date = #{updateDate,jdbcType=VARCHAR}, - equipment_type = #{equipmentType,jdbcType=INTEGER}, - place = #{place,jdbcType=VARCHAR} - where id = #{id,jdbcType=INTEGER} - - \ No newline at end of file diff --git a/src/main/resources/com.objecteye.mapper/SyFeatureMapper.xml b/src/main/resources/com.objecteye.mapper/SyFeatureMapper.xml deleted file mode 100644 index 3933033..0000000 --- a/src/main/resources/com.objecteye.mapper/SyFeatureMapper.xml +++ /dev/null @@ -1,256 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, name, description, count, is_delete, create_date, update_date, is_single - - - - - delete - from sy_feature - where id = #{id,jdbcType=INTEGER} - - - delete from sy_feature - - - - - - - SELECT LAST_INSERT_ID() - - insert into sy_feature (name, description, count, - is_delete, create_date, update_date, - is_single) - values (#{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{count,jdbcType=INTEGER}, - #{isDelete,jdbcType=INTEGER}, #{createDate,jdbcType=VARCHAR}, #{updateDate,jdbcType=VARCHAR}, - #{isSingle,jdbcType=INTEGER}) - - - - SELECT LAST_INSERT_ID() - - insert into sy_feature - - - name, - - - description, - - - count, - - - is_delete, - - - create_date, - - - update_date, - - - is_single, - - - - - #{name,jdbcType=VARCHAR}, - - - #{description,jdbcType=VARCHAR}, - - - #{count,jdbcType=INTEGER}, - - - #{isDelete,jdbcType=INTEGER}, - - - #{createDate,jdbcType=VARCHAR}, - - - #{updateDate,jdbcType=VARCHAR}, - - - #{isSingle,jdbcType=INTEGER}, - - - - - - update sy_feature - - - id = #{record.id,jdbcType=INTEGER}, - - - name = #{record.name,jdbcType=VARCHAR}, - - - description = #{record.description,jdbcType=VARCHAR}, - - - count = #{record.count,jdbcType=INTEGER}, - - - is_delete = #{record.isDelete,jdbcType=INTEGER}, - - - create_date = #{record.createDate,jdbcType=VARCHAR}, - - - update_date = #{record.updateDate,jdbcType=VARCHAR}, - - - is_single = #{record.isSingle,jdbcType=INTEGER}, - - - - - - - - update sy_feature - set id = #{record.id,jdbcType=INTEGER}, - name = #{record.name,jdbcType=VARCHAR}, - description = #{record.description,jdbcType=VARCHAR}, - count = #{record.count,jdbcType=INTEGER}, - is_delete = #{record.isDelete,jdbcType=INTEGER}, - create_date = #{record.createDate,jdbcType=VARCHAR}, - update_date = #{record.updateDate,jdbcType=VARCHAR}, - is_single = #{record.isSingle,jdbcType=INTEGER} - - - - - - update sy_feature - - - name = #{name,jdbcType=VARCHAR}, - - - description = #{description,jdbcType=VARCHAR}, - - - count = #{count,jdbcType=INTEGER}, - - - is_delete = #{isDelete,jdbcType=INTEGER}, - - - create_date = #{createDate,jdbcType=VARCHAR}, - - - update_date = #{updateDate,jdbcType=VARCHAR}, - - - is_single = #{isSingle,jdbcType=INTEGER}, - - - where id = #{id,jdbcType=INTEGER} - - - update sy_feature - set name = #{name,jdbcType=VARCHAR}, - update_date = #{updateDate,jdbcType=VARCHAR} - where id = #{id,jdbcType=INTEGER} - - \ No newline at end of file diff --git a/src/main/resources/com.objecteye.mapper/SyPersonnelMapper.xml b/src/main/resources/com.objecteye.mapper/SyPersonnelMapper.xml deleted file mode 100644 index 57ea1ee..0000000 --- a/src/main/resources/com.objecteye.mapper/SyPersonnelMapper.xml +++ /dev/null @@ -1,271 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, name, indentity, image_url, create_date, update_date, status, conreason, fid - - - - - delete - from sy_personnel - where id = #{id,jdbcType=INTEGER} - - - delete from sy_personnel - - - - - - - SELECT LAST_INSERT_ID() - - insert into sy_personnel (name, indentity, image_url, - create_date, update_date, status, - conreason, fid) - values (#{name,jdbcType=VARCHAR}, #{indentity,jdbcType=VARCHAR}, #{imageUrl,jdbcType=VARCHAR}, - #{createDate,jdbcType=VARCHAR}, #{updateDate,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, - #{conreason,jdbcType=VARCHAR}, #{fid,jdbcType=INTEGER}) - - - - SELECT LAST_INSERT_ID() - - insert into sy_personnel - - - name, - - - indentity, - - - image_url, - - - create_date, - - - update_date, - - - status, - - - conreason, - - - fid, - - - - - #{name,jdbcType=VARCHAR}, - - - #{indentity,jdbcType=VARCHAR}, - - - #{imageUrl,jdbcType=VARCHAR}, - - - #{createDate,jdbcType=VARCHAR}, - - - #{updateDate,jdbcType=VARCHAR}, - - - #{status,jdbcType=INTEGER}, - - - #{conreason,jdbcType=VARCHAR}, - - - #{fid,jdbcType=INTEGER}, - - - - - - update sy_personnel - - - id = #{record.id,jdbcType=INTEGER}, - - - name = #{record.name,jdbcType=VARCHAR}, - - - indentity = #{record.indentity,jdbcType=VARCHAR}, - - - image_url = #{record.imageUrl,jdbcType=VARCHAR}, - - - create_date = #{record.createDate,jdbcType=VARCHAR}, - - - update_date = #{record.updateDate,jdbcType=VARCHAR}, - - - status = #{record.status,jdbcType=INTEGER}, - - - conreason = #{record.conreason,jdbcType=VARCHAR}, - - - fid = #{record.fid,jdbcType=INTEGER}, - - - - - - - - update sy_personnel - set id = #{record.id,jdbcType=INTEGER}, - name = #{record.name,jdbcType=VARCHAR}, - indentity = #{record.indentity,jdbcType=VARCHAR}, - image_url = #{record.imageUrl,jdbcType=VARCHAR}, - create_date = #{record.createDate,jdbcType=VARCHAR}, - update_date = #{record.updateDate,jdbcType=VARCHAR}, - status = #{record.status,jdbcType=INTEGER}, - conreason = #{record.conreason,jdbcType=VARCHAR}, - fid = #{record.fid,jdbcType=INTEGER} - - - - - - update sy_personnel - - - name = #{name,jdbcType=VARCHAR}, - - - indentity = #{indentity,jdbcType=VARCHAR}, - - - image_url = #{imageUrl,jdbcType=VARCHAR}, - - - create_date = #{createDate,jdbcType=VARCHAR}, - - - update_date = #{updateDate,jdbcType=VARCHAR}, - - - status = #{status,jdbcType=INTEGER}, - - - conreason = #{conreason,jdbcType=VARCHAR}, - - - fid = #{fid,jdbcType=INTEGER}, - - - where id = #{id,jdbcType=INTEGER} - - - update sy_personnel - set name = #{name,jdbcType=VARCHAR}, - update_date = #{updateDate,jdbcType=VARCHAR}, - status = #{status,jdbcType=INTEGER} - where id = #{id,jdbcType=INTEGER} - - \ No newline at end of file diff --git a/src/main/resources/com.objecteye.mapper/SyPrivilegeMapper.xml b/src/main/resources/com.objecteye.mapper/SyPrivilegeMapper.xml deleted file mode 100644 index 18009b5..0000000 --- a/src/main/resources/com.objecteye.mapper/SyPrivilegeMapper.xml +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, privilege_name, is_delete, create_date - - - - - delete - from sy_privilege - where id = #{id,jdbcType=INTEGER} - - - delete from sy_privilege - - - - - - - SELECT LAST_INSERT_ID() - - insert into sy_privilege (privilege_name, is_delete, create_date - ) - values (#{privilegeName,jdbcType=VARCHAR}, #{isDelete,jdbcType=VARCHAR}, #{createDate,jdbcType=VARCHAR} - ) - - - - SELECT LAST_INSERT_ID() - - insert into sy_privilege - - - privilege_name, - - - is_delete, - - - create_date, - - - - - #{privilegeName,jdbcType=VARCHAR}, - - - #{isDelete,jdbcType=VARCHAR}, - - - #{createDate,jdbcType=VARCHAR}, - - - - - - update sy_privilege - - - id = #{record.id,jdbcType=INTEGER}, - - - privilege_name = #{record.privilegeName,jdbcType=VARCHAR}, - - - is_delete = #{record.isDelete,jdbcType=VARCHAR}, - - - create_date = #{record.createDate,jdbcType=VARCHAR}, - - - - - - - - update sy_privilege - set id = #{record.id,jdbcType=INTEGER}, - privilege_name = #{record.privilegeName,jdbcType=VARCHAR}, - is_delete = #{record.isDelete,jdbcType=VARCHAR}, - create_date = #{record.createDate,jdbcType=VARCHAR} - - - - - - update sy_privilege - - - privilege_name = #{privilegeName,jdbcType=VARCHAR}, - - - is_delete = #{isDelete,jdbcType=VARCHAR}, - - - create_date = #{createDate,jdbcType=VARCHAR}, - - - where id = #{id,jdbcType=INTEGER} - - - update sy_privilege - set privilege_name = #{privilegeName,jdbcType=VARCHAR}, - is_delete = #{isDelete,jdbcType=VARCHAR}, - create_date = #{createDate,jdbcType=VARCHAR} - where id = #{id,jdbcType=INTEGER} - - \ No newline at end of file diff --git a/src/main/resources/com.objecteye.mapper/SyRoleMapper.xml b/src/main/resources/com.objecteye.mapper/SyRoleMapper.xml deleted file mode 100644 index 6ed85c3..0000000 --- a/src/main/resources/com.objecteye.mapper/SyRoleMapper.xml +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, role_name, is_delete, create_date - - - - - delete - from sy_role - where id = #{id,jdbcType=INTEGER} - - - delete from sy_role - - - - - - - SELECT LAST_INSERT_ID() - - insert into sy_role (role_name, is_delete, create_date - ) - values (#{roleName,jdbcType=VARCHAR}, #{isDelete,jdbcType=INTEGER}, #{createDate,jdbcType=VARCHAR} - ) - - - - SELECT LAST_INSERT_ID() - - insert into sy_role - - - role_name, - - - is_delete, - - - create_date, - - - - - #{roleName,jdbcType=VARCHAR}, - - - #{isDelete,jdbcType=INTEGER}, - - - #{createDate,jdbcType=VARCHAR}, - - - - - - update sy_role - - - id = #{record.id,jdbcType=INTEGER}, - - - role_name = #{record.roleName,jdbcType=VARCHAR}, - - - is_delete = #{record.isDelete,jdbcType=INTEGER}, - - - create_date = #{record.createDate,jdbcType=VARCHAR}, - - - - - - - - update sy_role - set id = #{record.id,jdbcType=INTEGER}, - role_name = #{record.roleName,jdbcType=VARCHAR}, - is_delete = #{record.isDelete,jdbcType=INTEGER}, - create_date = #{record.createDate,jdbcType=VARCHAR} - - - - - - update sy_role - - - role_name = #{roleName,jdbcType=VARCHAR}, - - - is_delete = #{isDelete,jdbcType=INTEGER}, - - - create_date = #{createDate,jdbcType=VARCHAR}, - - - where id = #{id,jdbcType=INTEGER} - - - update sy_role - set role_name = #{roleName,jdbcType=VARCHAR}, - is_delete = #{isDelete,jdbcType=INTEGER}, - create_date = #{createDate,jdbcType=VARCHAR} - where id = #{id,jdbcType=INTEGER} - - - - - \ No newline at end of file diff --git a/src/main/resources/com.objecteye.mapper/SyRolePrivilegeMapper.xml b/src/main/resources/com.objecteye.mapper/SyRolePrivilegeMapper.xml deleted file mode 100644 index 8253fc7..0000000 --- a/src/main/resources/com.objecteye.mapper/SyRolePrivilegeMapper.xml +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, pid, rid - - - - - delete - from sy_role_privilege - where id = #{id,jdbcType=INTEGER} - - - delete from sy_role_privilege - - - - - - - SELECT LAST_INSERT_ID() - - insert into sy_role_privilege (pid, rid) - values (#{pid,jdbcType=INTEGER}, #{rid,jdbcType=INTEGER}) - - - - SELECT LAST_INSERT_ID() - - insert into sy_role_privilege - - - pid, - - - rid, - - - - - #{pid,jdbcType=INTEGER}, - - - #{rid,jdbcType=INTEGER}, - - - - - - - - update sy_role_privilege - - - id = #{record.id,jdbcType=INTEGER}, - - - pid = #{record.pid,jdbcType=INTEGER}, - - - rid = #{record.rid,jdbcType=INTEGER}, - - - - - - - - update sy_role_privilege - set id = #{record.id,jdbcType=INTEGER}, - pid = #{record.pid,jdbcType=INTEGER}, - rid = #{record.rid,jdbcType=INTEGER} - - - - - - update sy_role_privilege - - - pid = #{pid,jdbcType=INTEGER}, - - - rid = #{rid,jdbcType=INTEGER}, - - - where id = #{id,jdbcType=INTEGER} - - - update sy_role_privilege - set pid = #{pid,jdbcType=INTEGER}, - rid = #{rid,jdbcType=INTEGER} - where id = #{id,jdbcType=INTEGER} - - \ No newline at end of file diff --git a/src/main/resources/com.objecteye.mapper/SyUserMapper.xml b/src/main/resources/com.objecteye.mapper/SyUserMapper.xml deleted file mode 100644 index 02677a7..0000000 --- a/src/main/resources/com.objecteye.mapper/SyUserMapper.xml +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, username, password, user_role, create_date - - - - - - - - - - - delete - from sy_user - where id = #{id,jdbcType=INTEGER} - - - delete from sy_user - - - - - - - SELECT LAST_INSERT_ID() - - insert into sy_user (username, password, user_role, create_date) - values (#{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{userRole,jdbcType=VARCHAR}, - #{createDate,jdbcType=VARCHAR}) - - - - SELECT LAST_INSERT_ID() - - insert into sy_user - - - username, - - - password, - - - user_role, - - - create_date, - - - - - #{username,jdbcType=VARCHAR}, - - - #{password,jdbcType=VARCHAR}, - - - #{userRole,jdbcType=VARCHAR}, - - - #{createDate,jdbcType=VARCHAR}, - - - - - - update sy_user - - - id = #{record.id,jdbcType=INTEGER}, - - - username = #{record.username,jdbcType=VARCHAR}, - - - password = #{record.password,jdbcType=VARCHAR}, - - - user_role = #{record.userRole,jdbcType=VARCHAR}, - - - create_date = #{record.createDate,jdbcType=VARCHAR}, - - - - - - - - update sy_user - set id = #{record.id,jdbcType=INTEGER}, - username = #{record.username,jdbcType=VARCHAR}, - password = #{record.password,jdbcType=VARCHAR}, - user_role = #{record.userRole,jdbcType=VARCHAR}, - create_date = #{record.createDate,jdbcType=VARCHAR} - - - - - - update sy_user - - - username = #{username,jdbcType=VARCHAR}, - - - password = #{password,jdbcType=VARCHAR}, - - - user_role = #{userRole,jdbcType=VARCHAR}, - - - create_date = #{createDate,jdbcType=VARCHAR}, - - - where id = #{id,jdbcType=INTEGER} - - - update sy_user - set password = #{password,jdbcType=VARCHAR}, - user_role = #{userRole,jdbcType=VARCHAR} - where id = #{id,jdbcType=INTEGER} - - \ No newline at end of file diff --git a/src/main/resources/com.objecteye.mapper/SyVehicleDbMapper.xml b/src/main/resources/com.objecteye.mapper/SyVehicleDbMapper.xml deleted file mode 100644 index 3e621e4..0000000 --- a/src/main/resources/com.objecteye.mapper/SyVehicleDbMapper.xml +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, vehicle_name, create_date, update_date, description, is_delete, count - - - - - delete - from sy_vehicle_db - where id = #{id,jdbcType=INTEGER} - - - delete from sy_vehicle_db - - - - - - - SELECT LAST_INSERT_ID() - - insert into sy_vehicle_db (vehicle_name, create_date, update_date, - description, is_delete, count - ) - values (#{vehicleName,jdbcType=VARCHAR}, #{createDate,jdbcType=VARCHAR}, #{updateDate,jdbcType=VARCHAR}, - #{description,jdbcType=VARCHAR}, #{isDelete,jdbcType=INTEGER}, #{count,jdbcType=INTEGER} - ) - - - - SELECT LAST_INSERT_ID() - - insert into sy_vehicle_db - - - vehicle_name, - - - create_date, - - - update_date, - - - description, - - - is_delete, - - - count, - - - - - #{vehicleName,jdbcType=VARCHAR}, - - - #{createDate,jdbcType=VARCHAR}, - - - #{updateDate,jdbcType=VARCHAR}, - - - #{description,jdbcType=VARCHAR}, - - - #{isDelete,jdbcType=INTEGER}, - - - #{count,jdbcType=INTEGER}, - - - - - - update sy_vehicle_db - - - id = #{record.id,jdbcType=INTEGER}, - - - vehicle_name = #{record.vehicleName,jdbcType=VARCHAR}, - - - create_date = #{record.createDate,jdbcType=VARCHAR}, - - - update_date = #{record.updateDate,jdbcType=VARCHAR}, - - - description = #{record.description,jdbcType=VARCHAR}, - - - is_delete = #{record.isDelete,jdbcType=INTEGER}, - - - count = #{record.count,jdbcType=INTEGER}, - - - - - - - - update sy_vehicle_db - set id = #{record.id,jdbcType=INTEGER}, - vehicle_name = #{record.vehicleName,jdbcType=VARCHAR}, - create_date = #{record.createDate,jdbcType=VARCHAR}, - update_date = #{record.updateDate,jdbcType=VARCHAR}, - description = #{record.description,jdbcType=VARCHAR}, - is_delete = #{record.isDelete,jdbcType=INTEGER}, - count = #{record.count,jdbcType=INTEGER} - - - - - - update sy_vehicle_db - - - vehicle_name = #{vehicleName,jdbcType=VARCHAR}, - - - create_date = #{createDate,jdbcType=VARCHAR}, - - - update_date = #{updateDate,jdbcType=VARCHAR}, - - - description = #{description,jdbcType=VARCHAR}, - - - is_delete = #{isDelete,jdbcType=INTEGER}, - - - count = #{count,jdbcType=INTEGER}, - - - where id = #{id,jdbcType=INTEGER} - - - update sy_vehicle_db - set vehicle_name = #{vehicleName,jdbcType=VARCHAR}, - create_date = #{createDate,jdbcType=VARCHAR}, - update_date = #{updateDate,jdbcType=VARCHAR}, - description = #{description,jdbcType=VARCHAR}, - is_delete = #{isDelete,jdbcType=INTEGER}, - count = #{count,jdbcType=INTEGER} - where id = #{id,jdbcType=INTEGER} - - \ No newline at end of file diff --git a/src/main/resources/com.objecteye.mapper/SyVehicleForbidenTaskMapper.xml b/src/main/resources/com.objecteye.mapper/SyVehicleForbidenTaskMapper.xml deleted file mode 100644 index fbb635b..0000000 --- a/src/main/resources/com.objecteye.mapper/SyVehicleForbidenTaskMapper.xml +++ /dev/null @@ -1,295 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, area_id, name, description, device_id, vehicle_type, forbidden_detail_time, effect_start_time, effect_end_time, - status - - - - - delete - from sy_vehicle_forbiden_task - where id = #{id,jdbcType=INTEGER} - - - delete from sy_vehicle_forbiden_task - - - - - - - SELECT LAST_INSERT_ID() - - insert into sy_vehicle_forbiden_task (area_id, name, description, device_id, vehicle_type, - forbidden_detail_time, effect_start_time, effect_end_time, - status) - values (#{areaId,jdbcType=VARCHAR},#{name,jdbcType=VARCHAR},#{description,jdbcType=VARCHAR}, - #{deviceId,jdbcType=VARCHAR}, #{vehicleType,jdbcType=VARCHAR}, - #{forbiddenDetailTime,jdbcType=VARCHAR}, #{effectStartTime,jdbcType=BIGINT}, #{effectEndTime,jdbcType=BIGINT}, - #{status,jdbcType=INTEGER}) - - - - SELECT LAST_INSERT_ID() - - insert into sy_vehicle_forbiden_task - - - area_id, - - - name, - - - description, - - - device_id, - - - vehicle_type, - - - forbidden_detail_time, - - - effect_start_time, - - - effect_end_time, - - - status, - - - - - #{areaId,jdbcType=VARCHAR}, - - - #{name,jdbcType=VARCHAR}, - - - #{description,jdbcType=VARCHAR}, - - - #{deviceId,jdbcType=VARCHAR}, - - - #{vehicleType,jdbcType=VARCHAR}, - - - #{forbiddenDetailTime,jdbcType=VARCHAR}, - - - #{effectStartTime,jdbcType=BIGINT}, - - - #{effectEndTime,jdbcType=BIGINT}, - - - #{status,jdbcType=INTEGER}, - - - - - - update sy_vehicle_forbiden_task - - - id = #{record.id,jdbcType=INTEGER}, - - - area_id = #{record.areaId,jdbcType=VARCHAR}, - - - name = #{record.name,jdbcType=VARCHAR}, - - - description = #{record.description,jdbcType=VARCHAR}, - - - device_id = #{record.deviceId,jdbcType=VARCHAR}, - - - vehicle_type = #{record.vehicleType,jdbcType=VARCHAR}, - - - forbidden_detail_time = #{record.forbiddenDetailTime,jdbcType=VARCHAR}, - - - effect_start_time = #{record.effectStartTime,jdbcType=BIGINT}, - - - effect_end_time = #{record.effectEndTime,jdbcType=BIGINT}, - - - status = #{record.status,jdbcType=INTEGER}, - - - - - - - - update sy_vehicle_forbiden_task - set id = #{record.id,jdbcType=INTEGER}, - area_id = #{record.areaId,jdbcType=VARCHAR}, - name = #{record.name,jdbcType=VARCHAR}, - description = #{record.description,jdbcType=VARCHAR}, - device_id = #{record.deviceId,jdbcType=VARCHAR}, - vehicle_type = #{record.vehicleType,jdbcType=VARCHAR}, - forbidden_detail_time = #{record.forbiddenDetailTime,jdbcType=VARCHAR}, - effect_start_time = #{record.effectStartTime,jdbcType=BIGINT}, - effect_end_time = #{record.effectEndTime,jdbcType=BIGINT}, - status = #{record.status,jdbcType=INTEGER} - - - - - - update sy_vehicle_forbiden_task - - - area_id = #{areaId,jdbcType=VARCHAR}, - - - name = #{name,jdbcType=VARCHAR}, - - - description = #{description,jdbcType=VARCHAR}, - - - device_id = #{deviceId,jdbcType=VARCHAR}, - - - vehicle_type = #{vehicleType,jdbcType=VARCHAR}, - - - forbidden_detail_time = #{forbiddenDetailTime,jdbcType=VARCHAR}, - - - effect_start_time = #{effectStartTime,jdbcType=BIGINT}, - - - effect_end_time = #{effectEndTime,jdbcType=BIGINT}, - - - status = #{status,jdbcType=INTEGER}, - - - where id = #{id,jdbcType=INTEGER} - - - update sy_vehicle_forbiden_task - set area_id = #{areaId,jdbcType=VARCHAR}, - name = #{name,jdbcType=VARCHAR}, - description = #{description,jdbcType=VARCHAR}, - device_id = #{deviceId,jdbcType=VARCHAR}, - vehicle_type = #{vehicleType,jdbcType=VARCHAR}, - forbidden_detail_time = #{forbiddenDetailTime,jdbcType=VARCHAR}, - effect_start_time = #{effectStartTime,jdbcType=BIGINT}, - effect_end_time = #{effectEndTime,jdbcType=BIGINT}, - status = #{status,jdbcType=INTEGER} - where id = #{id,jdbcType=INTEGER} - - \ No newline at end of file diff --git a/src/main/resources/com.objecteye.mapper/SyVehicleModelMapper.xml b/src/main/resources/com.objecteye.mapper/SyVehicleModelMapper.xml deleted file mode 100644 index c9d868d..0000000 --- a/src/main/resources/com.objecteye.mapper/SyVehicleModelMapper.xml +++ /dev/null @@ -1,280 +0,0 @@ - - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - and ${criterion.condition} - - - and ${criterion.condition} #{criterion.value} - - - and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and ${criterion.condition} - - #{listItem} - - - - - - - - - - - id, initials, brand, subbrand, birthday - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - delete - from sy_vehicle_model - where id = #{id,jdbcType=INTEGER} - - - delete from sy_vehicle_model - - - - - - - SELECT LAST_INSERT_ID() - - insert into sy_vehicle_model (initials, brand, subbrand, - birthday) - values (#{initials,jdbcType=VARCHAR}, #{brand,jdbcType=VARCHAR}, #{subbrand,jdbcType=VARCHAR}, - #{birthday,jdbcType=VARCHAR}) - - - - SELECT LAST_INSERT_ID() - - insert into sy_vehicle_model - - - initials, - - - brand, - - - subbrand, - - - birthday, - - - - - #{initials,jdbcType=VARCHAR}, - - - #{brand,jdbcType=VARCHAR}, - - - #{subbrand,jdbcType=VARCHAR}, - - - #{birthday,jdbcType=VARCHAR}, - - - - - - update sy_vehicle_model - - - id = #{record.id,jdbcType=INTEGER}, - - - initials = #{record.initials,jdbcType=VARCHAR}, - - - brand = #{record.brand,jdbcType=VARCHAR}, - - - subbrand = #{record.subbrand,jdbcType=VARCHAR}, - - - birthday = #{record.birthday,jdbcType=VARCHAR}, - - - - - - - - update sy_vehicle_model - set id = #{record.id,jdbcType=INTEGER}, - initials = #{record.initials,jdbcType=VARCHAR}, - brand = #{record.brand,jdbcType=VARCHAR}, - subbrand = #{record.subbrand,jdbcType=VARCHAR}, - birthday = #{record.birthday,jdbcType=VARCHAR} - - - - - - update sy_vehicle_model - - - initials = #{initials,jdbcType=VARCHAR}, - - - brand = #{brand,jdbcType=VARCHAR}, - - - subbrand = #{subbrand,jdbcType=VARCHAR}, - - - birthday = #{birthday,jdbcType=VARCHAR}, - - - where id = #{id,jdbcType=INTEGER} - - - update sy_vehicle_model - set initials = #{initials,jdbcType=VARCHAR}, - brand = #{brand,jdbcType=VARCHAR}, - subbrand = #{subbrand,jdbcType=VARCHAR}, - birthday = #{birthday,jdbcType=VARCHAR} - where id = #{id,jdbcType=INTEGER} - - \ No newline at end of file