fix: 码全代码添加
This commit is contained in:
33
template/cvbp/cvbp-basic-info/.gitignore
vendored
Normal file
33
template/cvbp/cvbp-basic-info/.gitignore
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
HELP.md
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
75
template/cvbp/cvbp-basic-info/pom.xml
Normal file
75
template/cvbp/cvbp-basic-info/pom.xml
Normal file
@@ -0,0 +1,75 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>com.codvision</groupId>
|
||||
<artifactId>cvbp</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>cvbp-basic-info</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
<description>基础信息</description>
|
||||
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.codvision</groupId>
|
||||
<artifactId>cvbp-auth-center</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.persistence</groupId>
|
||||
<artifactId>persistence-api</artifactId>
|
||||
<version>1.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>dev</id>
|
||||
<properties>
|
||||
<profiles.active>dev</profiles.active>
|
||||
</properties>
|
||||
<activation>
|
||||
<!-- 默认环境 -->
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>prd</id>
|
||||
<properties>
|
||||
<profiles.active>prd</profiles.active>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<classifier>exec</classifier>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.codvision.basic;
|
||||
|
||||
import com.codvision.webcore.util.WebUtil;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
|
||||
/**
|
||||
* @author hxl
|
||||
*/
|
||||
@SpringBootApplication
|
||||
public class CvbpBasicInfoApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
ConfigurableApplicationContext application = SpringApplication.run(CvbpBasicInfoApplication.class, args);
|
||||
WebUtil.printWebUrl(application.getEnvironment());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.config;
|
||||
|
||||
import com.github.xiaoymin.swaggerbootstrapui.annotations.EnableSwaggerBootstrapUI;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||
import springfox.documentation.service.ApiInfo;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
|
||||
/**
|
||||
* swagger配置
|
||||
*
|
||||
* @author lingee
|
||||
* @date 2023/8/4
|
||||
*/
|
||||
@Configuration("BasicInfoSwaggerConfig")
|
||||
@EnableSwagger2
|
||||
@EnableSwaggerBootstrapUI
|
||||
public class SwaggerConfig {
|
||||
|
||||
@Bean
|
||||
public Docket workflowApiConfig() {
|
||||
return new Docket(DocumentationType.SWAGGER_2)
|
||||
.apiInfo(webApiInfo())
|
||||
.select()
|
||||
.apis(RequestHandlerSelectors.basePackage("com.codvision.basic"))
|
||||
.build().groupName("基础信息");
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建接口文档的具体信息,会显示在接口文档页面中
|
||||
*
|
||||
* @return ApiInfo
|
||||
*/
|
||||
private ApiInfo webApiInfo() {
|
||||
return new ApiInfoBuilder()
|
||||
// 文档标题
|
||||
.title("基础信息接口管理")
|
||||
// 文档描述
|
||||
.description("基础信息接口文档")
|
||||
// 版本
|
||||
.version("1.0")
|
||||
// 版权
|
||||
.license("Codvision")
|
||||
// 版权地址
|
||||
.licenseUrl("http://www.codvision.com")
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.constant;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
* @author hxl
|
||||
*/
|
||||
public class BasicConstant {
|
||||
|
||||
public static final Pattern PATTERN = Pattern.compile("[+-]?\\d+");
|
||||
public static final String BIRTHDAY_REGEX = "((19|20)\\d{2})-(0[1-9]|1[012])-(0[1-9]|[12]\\d|3[01])";
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.Address;
|
||||
import com.codvision.basic.entity.vo.AddressVO;
|
||||
import com.codvision.basic.entity.vo.BatchAddressVO;
|
||||
import com.codvision.basic.service.AddressService;
|
||||
import com.codvision.commoncore.common.ResponseEntity;
|
||||
import com.codvision.commoncore.exception.BusinessException;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/address")
|
||||
@Api(tags = "地址/房屋信息")
|
||||
public class AddressController {
|
||||
|
||||
private final AddressService service;
|
||||
|
||||
@PostMapping("/getPageResult")
|
||||
@ApiOperation("分页列表")
|
||||
public ResponseEntity<IPage<AddressVO>> getPageResult(@RequestBody QueryPage<Map<String, Object>> queryPage) {
|
||||
return new ResponseEntity<IPage<AddressVO>>().data(service.getPageResult(queryPage));
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("添加")
|
||||
public ResponseEntity<String> add(@Validated @RequestBody Address address) {
|
||||
service.add(address);
|
||||
return new ResponseEntity<String>().ok();
|
||||
}
|
||||
|
||||
@PostMapping("/addList")
|
||||
@ApiOperation("小区下批量建楼幢")
|
||||
public ResponseEntity<String> addList(@RequestBody BatchAddressVO batchAddressVO) {
|
||||
service.addList(batchAddressVO);
|
||||
return new ResponseEntity<String>().ok();
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@ApiOperation("编辑")
|
||||
public ResponseEntity<String> update(@RequestBody Address address) {
|
||||
ResponseEntity<String> responseEntity = new ResponseEntity<>();
|
||||
if (address.getId() == null) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
service.updateAddress(address);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
|
||||
@PostMapping("/details")
|
||||
@ApiOperation("详情")
|
||||
public ResponseEntity<AddressVO> details(@ApiParam(value = "地址id", required = true) @RequestParam(value = "id") Integer id) {
|
||||
return new ResponseEntity<AddressVO>().data(service.details(id));
|
||||
}
|
||||
|
||||
@PostMapping("/getAddressHouseListByCode")
|
||||
@ApiOperation("根据楼幢地址编码查询楼幢下房屋信息")
|
||||
public ResponseEntity<IPage<AddressVO>> getAddressHouseListByCode(@RequestBody QueryPage<Map<String, Object>> queryPage) {
|
||||
return new ResponseEntity<IPage<AddressVO>>().data(service.getAddressHouseListByCode(queryPage));
|
||||
}
|
||||
|
||||
@PostMapping("/getAddressBuildingListByCode")
|
||||
@ApiOperation("根据小区地址编码查询小区下楼幢信息")
|
||||
public ResponseEntity<IPage<AddressVO>> getAddressBuildingListByCode(@RequestBody QueryPage<Map<String, Object>> queryPage) {
|
||||
return new ResponseEntity<IPage<AddressVO>>().data(service.getAddressBuildingListByCode(queryPage));
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@ApiOperation("删除地址信息")
|
||||
public ResponseEntity<String> delete(@RequestBody List<Integer> addressIds) {
|
||||
if (CollectionUtils.isEmpty(addressIds)) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
service.batchLogicDel(addressIds);
|
||||
return new ResponseEntity<String>().ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.Enterprise;
|
||||
import com.codvision.basic.entity.vo.EnterpriseVO;
|
||||
import com.codvision.basic.service.EnterpriseService;
|
||||
import com.codvision.commoncore.common.ResponseEntity;
|
||||
import com.codvision.commoncore.exception.BusinessException;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/enterprise")
|
||||
@Api(tags = "企业单位(经济组织)")
|
||||
public class EnterpriseController {
|
||||
|
||||
private final EnterpriseService service;
|
||||
|
||||
@PostMapping("/getPageResult")
|
||||
@ApiOperation("分页列表")
|
||||
public ResponseEntity<IPage<EnterpriseVO>> getPageResult(@RequestBody QueryPage<Map<String, Object>> queryPage) {
|
||||
return new ResponseEntity<IPage<EnterpriseVO>>().data(service.getPageResult(queryPage));
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("添加")
|
||||
public ResponseEntity<String> add(@Validated @RequestBody Enterprise enterprise) {
|
||||
service.addEnterprise(enterprise);
|
||||
return new ResponseEntity<String>().ok();
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@ApiOperation("编辑")
|
||||
public ResponseEntity<String> update(@RequestBody Enterprise enterprise) {
|
||||
ResponseEntity<String> responseEntity = new ResponseEntity<>();
|
||||
if (enterprise.getId() == null) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
service.updateEnterprise(enterprise);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@ApiOperation("删除企业单位信息")
|
||||
public ResponseEntity<String> delete(@RequestBody List<Integer> ids) {
|
||||
ResponseEntity<String> responseEntity = new ResponseEntity<>();
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
service.removeBatchByIds(ids);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.PersonAddressRelation;
|
||||
import com.codvision.basic.entity.dto.PersonAddressRelationDTO;
|
||||
import com.codvision.basic.entity.vo.PersonAddressRelationVO;
|
||||
import com.codvision.basic.service.PersonAddressRelationService;
|
||||
import com.codvision.commoncore.common.ResponseEntity;
|
||||
import com.codvision.commoncore.exception.BusinessException;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/personAddressRelation")
|
||||
@Api(tags = "人房关系")
|
||||
public class PersonAddressRelationController {
|
||||
|
||||
private final PersonAddressRelationService service;
|
||||
|
||||
|
||||
@PostMapping("/getPageResult")
|
||||
@ApiOperation("分页列表")
|
||||
public ResponseEntity<IPage<PersonAddressRelationVO>> getPageResult(@RequestBody QueryPage<Map<String, Object>> queryPage) {
|
||||
return new ResponseEntity<IPage<PersonAddressRelationVO>>().data(service.getPageResult(queryPage));
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("添加")
|
||||
public ResponseEntity<String> add(@Validated @RequestBody PersonAddressRelationDTO personAddressRelationDto) {
|
||||
service.add(personAddressRelationDto);
|
||||
return new ResponseEntity<String>().ok();
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@ApiOperation("编辑")
|
||||
public ResponseEntity<String> update(@RequestBody PersonAddressRelation personAddressRelation) {
|
||||
ResponseEntity<String> responseEntity = new ResponseEntity<>();
|
||||
if (personAddressRelation.getId() == null) {
|
||||
throw new BusinessException(3002);
|
||||
}
|
||||
|
||||
service.updateById(personAddressRelation);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@ApiOperation("删除")
|
||||
public ResponseEntity<String> delete(@ApiParam(value = "关联id", required = true) @RequestBody List<Integer> ids) {
|
||||
ResponseEntity<String> responseEntity = new ResponseEntity<>();
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
throw new BusinessException(3002);
|
||||
}
|
||||
service.removeBatchByIds(ids);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
|
||||
@PostMapping("/moveOut")
|
||||
@ApiOperation("迁出")
|
||||
public ResponseEntity<String> moveOut(@ApiParam(value = "关联id", required = true) @RequestBody List<Integer> ids) {
|
||||
ResponseEntity<String> responseEntity = new ResponseEntity<>();
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
throw new BusinessException(3002);
|
||||
}
|
||||
|
||||
service.moveOut(ids);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,173 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.auth.entity.excel.PersonExcel;
|
||||
import com.codvision.auth.support.UserContext;
|
||||
import com.codvision.base.support.EasyExcelUtil;
|
||||
import com.codvision.basic.entity.Person;
|
||||
import com.codvision.basic.entity.vo.PersonCountVO;
|
||||
import com.codvision.basic.entity.vo.PersonPortraitVO;
|
||||
import com.codvision.basic.entity.vo.PersonVO;
|
||||
import com.codvision.basic.service.PersonService;
|
||||
import com.codvision.commoncore.common.ResponseEntity;
|
||||
import com.codvision.commoncore.exception.BusinessException;
|
||||
import com.codvision.webcore.annotation.ApiSecret;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/person")
|
||||
@Api(tags = "人员信息")
|
||||
public class PersonController {
|
||||
|
||||
private final PersonService service;
|
||||
|
||||
@PostMapping("/getPageResult")
|
||||
@ApiOperation("分页列表")
|
||||
public ResponseEntity<IPage<PersonVO>> getPageResult(@RequestBody QueryPage<Map<String, Object>> queryPage) {
|
||||
return new ResponseEntity<IPage<PersonVO>>().data(service.getPageResult(queryPage));
|
||||
}
|
||||
|
||||
@PostMapping("/getPersonCount")
|
||||
@ApiOperation("根据地址Code统计人员数")
|
||||
public ResponseEntity<PersonCountVO> getPersonCount(@ApiParam(value = "地址Code", required = true) @RequestParam(value = "addressCode") String addressCode,
|
||||
@ApiParam(value = "地址类型:ADDRESS_TYPE,1-楼幢;0-户室;4-小区/园区", required = true) @RequestParam(value = "addressType") String addressType) {
|
||||
return new ResponseEntity<PersonCountVO>().data(service.getPersonCount(addressCode, addressType));
|
||||
}
|
||||
|
||||
@PostMapping("/getPersonListByAddressCode")
|
||||
@ApiOperation("根据地址编码查询人员信息")
|
||||
public ResponseEntity<IPage<PersonVO>> getPersonListByAddressCode(@RequestBody QueryPage<Map<String, Object>> queryPage) {
|
||||
return new ResponseEntity<IPage<PersonVO>>().data(service.getPersonListByAddressCode(queryPage));
|
||||
}
|
||||
|
||||
@PostMapping("/details")
|
||||
@ApiOperation("详情")
|
||||
public ResponseEntity<PersonVO> details(@ApiParam(value = "主键id", required = true) @RequestParam(value = "id") Integer id) {
|
||||
return new ResponseEntity<PersonVO>().data(service.details(id));
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("添加")
|
||||
public ResponseEntity<String> add(@Validated @RequestBody Person person) {
|
||||
service.add(person);
|
||||
return new ResponseEntity<String>().ok();
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@ApiOperation("编辑")
|
||||
public ResponseEntity<String> update(@RequestBody Person person) {
|
||||
ResponseEntity<String> responseEntity = new ResponseEntity<>();
|
||||
if (person.getId() == null) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
|
||||
service.updateById(person);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@ApiOperation("删除人员信息")
|
||||
public ResponseEntity<String> del(@RequestBody List<Integer> personIds) {
|
||||
ResponseEntity<String> responseEntity = new ResponseEntity<>();
|
||||
if (CollectionUtils.isEmpty(personIds)) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
|
||||
service.batchLogicDel(personIds);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
|
||||
@PostMapping("/getPersonPortrait")
|
||||
@ApiOperation("群体画像")
|
||||
public ResponseEntity<List<PersonPortraitVO>> getPersonPortrait(@RequestBody List<Integer> personIds) {
|
||||
ResponseEntity<List<PersonPortraitVO>> responseEntity = new ResponseEntity<>();
|
||||
if (CollectionUtils.isEmpty(personIds)) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
|
||||
return responseEntity.data(service.getPersonPortrait(personIds));
|
||||
}
|
||||
|
||||
@ApiSecret(ignore = true)
|
||||
@ApiOperation("下载人员信息导入模板")
|
||||
@GetMapping("/downloadTemplate")
|
||||
public void downloadTemplate(HttpServletResponse response) {
|
||||
EasyExcelUtil.downloadTemplate("人员信息模板表", "人员信息", PersonExcel.class, response);
|
||||
}
|
||||
|
||||
@ApiSecret(ignore = true)
|
||||
@ApiOperation("人员信息导入")
|
||||
@PostMapping("/import")
|
||||
public ResponseEntity<String> excelImport(@RequestPart("file") MultipartFile file) {
|
||||
return new ResponseEntity<String>().data(service.excelImport(file));
|
||||
}
|
||||
|
||||
@ApiSecret(ignore = true)
|
||||
@PostMapping("/export")
|
||||
@ApiOperation("人员信息导出")
|
||||
public ResponseEntity<String> export(@ApiParam(value = "关键字(姓名,手机号,证件号)") @RequestParam(required = false) String keyword,
|
||||
@ApiParam(value = "证件类型") @RequestParam(value = "idType", required = false) String idType,
|
||||
@ApiParam(value = "性别") @RequestParam(value = "sex", required = false) String sex,
|
||||
@ApiParam(value = "人口类型") @RequestParam(value = "personType", required = false) String personType,
|
||||
@ApiParam(value = "人员标签") @RequestParam(value = "personTags", required = false) String personTags,
|
||||
@ApiParam(value = "开始年龄") @RequestParam(value = "startAge", required = false) Integer startAge,
|
||||
@ApiParam(value = "结束年龄") @RequestParam(value = "endAge", required = false) Integer endAge,
|
||||
@ApiParam(value = "是否关联:0-否;1-是") @RequestParam(value = "flagRelated", required = false) String flagRelated,
|
||||
@ApiParam(value = "组织id") @RequestParam(value = "oid", required = false) Integer oid) {
|
||||
Map<String, Object> paramMap = new HashMap<>(16);
|
||||
if (StringUtils.isNotEmpty(keyword)) {
|
||||
paramMap.put("keyword", keyword);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(idType)) {
|
||||
paramMap.put("idType", idType);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(sex)) {
|
||||
paramMap.put("sex", sex);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(personType)) {
|
||||
paramMap.put("personType", personType);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(personTags)) {
|
||||
paramMap.put("personTags", personTags);
|
||||
}
|
||||
if (startAge != null) {
|
||||
paramMap.put("startAge", startAge);
|
||||
}
|
||||
if (endAge != null) {
|
||||
paramMap.put("endAge", endAge);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(flagRelated)) {
|
||||
paramMap.put("flagRelated", flagRelated);
|
||||
}
|
||||
if (oid != null) {
|
||||
paramMap.put("oid", oid);
|
||||
} else {
|
||||
paramMap.put("oid", UserContext.get().getActiveOid());
|
||||
}
|
||||
service.excelExport(paramMap);
|
||||
return new ResponseEntity<String>().ok();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.SocialOrg;
|
||||
import com.codvision.basic.entity.vo.SocialOrgVO;
|
||||
import com.codvision.basic.service.SocialOrgService;
|
||||
import com.codvision.commoncore.common.ResponseEntity;
|
||||
import com.codvision.commoncore.exception.BusinessException;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/socialOrg")
|
||||
@Api(tags = "社会组织")
|
||||
public class SocialOrgController {
|
||||
|
||||
private final SocialOrgService service;
|
||||
|
||||
@PostMapping("/getPageResult")
|
||||
@ApiOperation("分页列表")
|
||||
public ResponseEntity<IPage<SocialOrgVO>> getPageResult(@RequestBody QueryPage<Map<String, Object>> queryPage) {
|
||||
return new ResponseEntity<IPage<SocialOrgVO>>().data(service.getPageResult(queryPage));
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("添加")
|
||||
public ResponseEntity<String> add(@Validated @RequestBody SocialOrg socialorg) {
|
||||
service.addSocialOrg(socialorg);
|
||||
return new ResponseEntity<String>().ok();
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@ApiOperation("编辑")
|
||||
public ResponseEntity<String> update(@RequestBody SocialOrg socialorg) {
|
||||
ResponseEntity<String> responseEntity = new ResponseEntity<>();
|
||||
if (socialorg.getId() == null) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
service.updateSocialOrg(socialorg);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@ApiOperation("删除社会组织信息")
|
||||
public ResponseEntity<String> delete(@RequestBody List<Integer> ids) {
|
||||
ResponseEntity<String> responseEntity = new ResponseEntity<>();
|
||||
if (CollectionUtils.isEmpty(ids)) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
service.removeBatchByIds(ids);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.controller.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.inspection.InspectionChecklist;
|
||||
import com.codvision.basic.service.inspection.InspectionChecklistService;
|
||||
import com.codvision.commoncore.common.ResponseEntity;
|
||||
import com.codvision.commoncore.exception.BusinessException;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/InspectionChecklist")
|
||||
@Api(tags = "检查-条目")
|
||||
@RequiredArgsConstructor
|
||||
public class InspectionChecklistController {
|
||||
|
||||
private final InspectionChecklistService service;
|
||||
|
||||
@PostMapping("/getPageResult")
|
||||
@ApiOperation("分页列表")
|
||||
public ResponseEntity<IPage<InspectionChecklist>> getPageResult(@RequestBody QueryPage<Map<String, Object>> queryPage) {
|
||||
return new ResponseEntity<IPage<InspectionChecklist>>().data(service.getPageResult(queryPage));
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value = "添加(点击 Model 可以查看具体详情)")
|
||||
public ResponseEntity<InspectionChecklist> add(@ApiParam(value = "对象") @RequestBody InspectionChecklist inspectionChecklist) {
|
||||
service.save(inspectionChecklist);
|
||||
return new ResponseEntity<InspectionChecklist>().data(inspectionChecklist);
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@ApiOperation(value = "更新: 注意此更新只会更新不会NUll的数据, 若要不展示可置为空字符")
|
||||
public ResponseEntity<InspectionChecklist> update(@ApiParam(value = "对象") @RequestBody InspectionChecklist inspectionChecklist) {
|
||||
ResponseEntity<InspectionChecklist> responseEntity = new ResponseEntity<>();
|
||||
if (inspectionChecklist.getId() == null) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
service.updateById(inspectionChecklist);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@ApiOperation(value = "删除")
|
||||
public ResponseEntity<InspectionChecklist> delete(@ApiParam(value = "主键") @RequestParam(value = "key") Integer key) {
|
||||
ResponseEntity<InspectionChecklist> responseEntity = new ResponseEntity<>();
|
||||
if (key == null) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
service.removeById(key);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.controller.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.inspection.InspectionInventory;
|
||||
import com.codvision.basic.entity.vo.inspection.InspectionInventoryVO;
|
||||
import com.codvision.basic.service.inspection.InspectionInventoryService;
|
||||
import com.codvision.commoncore.common.ResponseEntity;
|
||||
import com.codvision.commoncore.exception.BusinessException;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/InspectionInventory")
|
||||
@Api(tags = "检查清单")
|
||||
@RequiredArgsConstructor
|
||||
public class InspectionInventoryController {
|
||||
|
||||
private final InspectionInventoryService service;
|
||||
|
||||
@PostMapping("/getPageResult")
|
||||
@ApiOperation("分页列表")
|
||||
public ResponseEntity<IPage<InspectionInventoryVO>> getPageResult(@RequestBody QueryPage<Map<String, Object>> queryPage) {
|
||||
return new ResponseEntity<IPage<InspectionInventoryVO>>().data(service.getPageResult(queryPage));
|
||||
}
|
||||
|
||||
@PostMapping("/getInspectionClassByTaskId")
|
||||
@ApiOperation(value = "获取任务对应检查项检查")
|
||||
public ResponseEntity<List<InspectionInventoryVO>> getInspectionClassByTaskId(@ApiParam(value = "关键字") @RequestParam(required = false) String keyword,
|
||||
@ApiParam(value = "检查任务id") @RequestParam(required = false) Integer taskId) {
|
||||
return new ResponseEntity<List<InspectionInventoryVO>>().data(service.getInspectionClassByTaskId(keyword, taskId));
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value = "添加(点击 Model 可以查看具体详情)")
|
||||
public ResponseEntity<InspectionInventory> add(@ApiParam(value = "对象") @RequestBody InspectionInventory inspectionInventory) {
|
||||
service.save(inspectionInventory);
|
||||
return new ResponseEntity<InspectionInventory>().data(inspectionInventory);
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@ApiOperation(value = "更新: 注意此更新只会更新不会NUll的数据, 若要不展示可置为空字符")
|
||||
public ResponseEntity<InspectionInventory> update(@ApiParam(value = "对象") @RequestBody InspectionInventory inspectionInventory) {
|
||||
ResponseEntity<InspectionInventory> responseEntity = new ResponseEntity<>();
|
||||
if (inspectionInventory.getId() == null) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
|
||||
service.updateById(inspectionInventory);
|
||||
return responseEntity.data(inspectionInventory);
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@ApiOperation(value = "删除")
|
||||
public ResponseEntity<InspectionInventory> delete(@ApiParam(value = "主键") @RequestParam(value = "key") Integer key) {
|
||||
ResponseEntity<InspectionInventory> responseEntity = new ResponseEntity<>();
|
||||
if (key == null) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
|
||||
service.removeById(key);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.controller.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.codvision.auth.entity.vo.SysUserVO;
|
||||
import com.codvision.auth.support.UserContext;
|
||||
import com.codvision.basic.entity.inspection.InspectionRecord;
|
||||
import com.codvision.basic.entity.inspection.InspectionTask;
|
||||
import com.codvision.basic.entity.vo.inspection.InspectionRecordVO;
|
||||
import com.codvision.basic.service.inspection.InspectionRecordService;
|
||||
import com.codvision.basic.service.inspection.InspectionTaskService;
|
||||
import com.codvision.commoncore.common.ResponseEntity;
|
||||
import com.codvision.commoncore.exception.BusinessException;
|
||||
import com.codvision.commoncore.utils.DateUtil;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/InspectionRecord")
|
||||
@Api(tags = "检查-记录")
|
||||
@RequiredArgsConstructor
|
||||
public class InspectionRecordController {
|
||||
|
||||
private final InspectionRecordService service;
|
||||
private final InspectionTaskService inspectionTaskService;
|
||||
|
||||
@PostMapping("/getPageResult")
|
||||
@ApiOperation("分页列表")
|
||||
public ResponseEntity<IPage<InspectionRecordVO>> getPageResult(@RequestBody QueryPage<Map<String, Object>> queryPage) {
|
||||
return new ResponseEntity<IPage<InspectionRecordVO>>().data(service.getPageResult(queryPage));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "添加检查记录", notes = "添加检查记录")
|
||||
@PostMapping(value = "/addInspectRecord")
|
||||
public ResponseEntity<InspectionRecord> addInspectRecord(@RequestParam(value = "refCode") String refCode,
|
||||
@RequestParam(value = "refName") String refName,
|
||||
@RequestParam(value = "inspectionId") Integer inspectionId,
|
||||
@RequestParam(value = "taskId") Integer taskId,
|
||||
@ApiParam(value = "数据来源") @RequestParam(value = "source") String source,
|
||||
@ApiParam(value = "整改时限(天)") @RequestParam(value = "rectifyDeadline") Integer rectifyDeadline,
|
||||
@RequestParam(value = "issueNumber", defaultValue = "0") int issueNumber,
|
||||
@RequestParam(value = "inspectLng", defaultValue = "0") Double inspectLng,
|
||||
@RequestParam(value = "inspectLat", defaultValue = "0") Double inspectLat,
|
||||
@RequestParam(value = "checklist", required = false) String checklist) {
|
||||
ResponseEntity<InspectionRecord> responseEntity = new ResponseEntity<>();
|
||||
SysUserVO loginUser = UserContext.get();
|
||||
if (null == loginUser) {
|
||||
throw new BusinessException(10002);
|
||||
}
|
||||
InspectionTask task = inspectionTaskService.getOne(Wrappers.<InspectionTask>lambdaQuery().eq(InspectionTask::getId, taskId));
|
||||
if (task == null) {
|
||||
throw new BusinessException(10003, "该检查任务不存在!");
|
||||
}
|
||||
if (new Date().before(DateUtil.toDate(task.getStartTime()))) {
|
||||
throw new BusinessException(10003, "该检查任务暂未开始!");
|
||||
}
|
||||
if (new Date().after(DateUtil.toDate(task.getEndTime()))) {
|
||||
throw new BusinessException(10003, "该检查任务已结束!");
|
||||
}
|
||||
|
||||
InspectionRecord record = InspectionRecord.builder().inspectionId(inspectionId).refCode(refCode)
|
||||
.issueNumber(issueNumber).creatorId(loginUser.getId()).creator(loginUser.getName()).inspectLng(inspectLng).inspectLat(inspectLat)
|
||||
.source(source).rectifyDeadline(rectifyDeadline).category(task.getCategory()).taskId(taskId).refName(refName).build();
|
||||
if (issueNumber != 0) {
|
||||
record.setStatus("0");
|
||||
} else {
|
||||
record.setStatus("2");
|
||||
}
|
||||
|
||||
service.addInspectRecord(record, checklist);
|
||||
return responseEntity.data(record);
|
||||
}
|
||||
|
||||
@PostMapping("/getById")
|
||||
@ApiOperation(value = "通过主键查询")
|
||||
public ResponseEntity<InspectionRecordVO> getById(@RequestParam(value = "id") Integer id) {
|
||||
return new ResponseEntity<InspectionRecordVO>().data(service.getById(id));
|
||||
}
|
||||
|
||||
@PostMapping("/statByTask")
|
||||
@ApiOperation(value = "统计(任务)")
|
||||
public ResponseEntity statByTask(@RequestParam(required = false) Integer oid) {
|
||||
Map<String, Object> params = new HashMap<>(16);
|
||||
SysUserVO user = UserContext.get();
|
||||
if (null != oid) {
|
||||
params.put("oid", oid);
|
||||
} else {
|
||||
params.put("oid", user.getActiveOid());
|
||||
}
|
||||
return new ResponseEntity(service.statByTask(params));
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value = "添加(点击 Model 可以查看具体详情)")
|
||||
public ResponseEntity<InspectionRecord> add(@ApiParam(value = "对象") @RequestBody InspectionRecord inspectionRecord) {
|
||||
service.save(inspectionRecord);
|
||||
return new ResponseEntity<InspectionRecord>().data(inspectionRecord);
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@ApiOperation(value = "更新: 注意此更新只会更新不会NUll的数据, 若要不展示可置为空字符")
|
||||
public ResponseEntity<InspectionRecord> update(@ApiParam(value = "对象") @RequestBody InspectionRecord inspectionRecord) {
|
||||
ResponseEntity<InspectionRecord> responseEntity = new ResponseEntity<>();
|
||||
if (inspectionRecord.getId() == null) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
|
||||
service.updateById(inspectionRecord);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@ApiOperation(value = "删除")
|
||||
public ResponseEntity<InspectionRecord> delete(@ApiParam(value = "主键") @RequestParam(value = "key") Integer key) {
|
||||
service.removeById(key);
|
||||
return new ResponseEntity<InspectionRecord>().ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.controller.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.inspection.InspectionRecordItem;
|
||||
import com.codvision.basic.service.inspection.InspectionRecordItemService;
|
||||
import com.codvision.commoncore.common.ResponseEntity;
|
||||
import com.codvision.commoncore.exception.BusinessException;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/InspectionRecordItem")
|
||||
@Api(tags = "检查-记录条目关联")
|
||||
@RequiredArgsConstructor
|
||||
public class InspectionRecordItemController {
|
||||
|
||||
private final InspectionRecordItemService service;
|
||||
|
||||
@PostMapping("/getPageResult")
|
||||
@ApiOperation("分页列表")
|
||||
public ResponseEntity<IPage<InspectionRecordItem>> getPageResult(@RequestBody QueryPage<Map<String, Object>> queryPage) {
|
||||
return new ResponseEntity<IPage<InspectionRecordItem>>().data(service.getPageResult(queryPage));
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value = "添加(点击 Model 可以查看具体详情)")
|
||||
public ResponseEntity<InspectionRecordItem> add(@ApiParam(value = "对象") @RequestBody InspectionRecordItem inspectionRecordItem) {
|
||||
service.save(inspectionRecordItem);
|
||||
return new ResponseEntity<InspectionRecordItem>().data(inspectionRecordItem);
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@ApiOperation(value = "更新: 注意此更新只会更新不会NUll的数据, 若要不展示可置为空字符")
|
||||
public ResponseEntity<InspectionRecordItem> update(@ApiParam(value = "对象") @RequestBody InspectionRecordItem inspectionRecordItem) {
|
||||
ResponseEntity<InspectionRecordItem> responseEntity = new ResponseEntity<>();
|
||||
if (inspectionRecordItem.getId() == null) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
|
||||
service.updateById(inspectionRecordItem);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@ApiOperation(value = "删除")
|
||||
public ResponseEntity<InspectionRecordItem> delete(@ApiParam(value = "主键") @RequestParam(value = "key") Integer key) {
|
||||
ResponseEntity<InspectionRecordItem> responseEntity = new ResponseEntity<>();
|
||||
if (key == null) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
|
||||
service.removeById(key);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.controller.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.inspection.InspectionTarget;
|
||||
import com.codvision.basic.entity.vo.inspection.InspectionTargetVO;
|
||||
import com.codvision.basic.service.inspection.InspectionTargetService;
|
||||
import com.codvision.commoncore.common.ResponseEntity;
|
||||
import com.codvision.commoncore.exception.BusinessException;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/inspectionTarget")
|
||||
@Api(tags = "检查-对象")
|
||||
public class InspectionTargetController {
|
||||
|
||||
private final InspectionTargetService service;
|
||||
|
||||
@PostMapping("/getPageResult")
|
||||
@ApiOperation("分页列表")
|
||||
public ResponseEntity<IPage<InspectionTargetVO>> getPageResult(@RequestBody QueryPage<Map<String, Object>> queryPage) {
|
||||
return new ResponseEntity<IPage<InspectionTargetVO>>().data(service.getPageResult(queryPage));
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("添加")
|
||||
public ResponseEntity<String> add(@Validated @RequestBody InspectionTarget inspectiontarget) {
|
||||
inspectiontarget.setDataSource("0");
|
||||
service.save(inspectiontarget);
|
||||
return new ResponseEntity<String>().ok();
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@ApiOperation("编辑")
|
||||
public ResponseEntity<String> update(@RequestBody InspectionTarget inspectiontarget) {
|
||||
ResponseEntity<String> responseEntity = new ResponseEntity<>();
|
||||
if (inspectiontarget.getId() == null) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
|
||||
service.updateById(inspectiontarget);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@ApiOperation(value = "删除")
|
||||
public ResponseEntity<InspectionTarget> delete(@ApiParam(value = "主键") @RequestParam(value = "key") Integer key) {
|
||||
ResponseEntity<InspectionTarget> responseEntity = new ResponseEntity<>();
|
||||
if (key == null) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
|
||||
service.removeById(key);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.controller.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.dto.InspectionTaskDTO;
|
||||
import com.codvision.basic.entity.inspection.InspectionTask;
|
||||
import com.codvision.basic.entity.vo.inspection.InspectionTargetVO;
|
||||
import com.codvision.basic.entity.vo.inspection.InspectionTaskVO;
|
||||
import com.codvision.basic.service.inspection.InspectionTaskService;
|
||||
import com.codvision.commoncore.common.ResponseEntity;
|
||||
import com.codvision.commoncore.exception.BusinessException;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/InspectionTask")
|
||||
@Api(tags = "检查-任务")
|
||||
@RequiredArgsConstructor
|
||||
public class InspectionTaskController {
|
||||
|
||||
private final InspectionTaskService service;
|
||||
|
||||
@PostMapping("/getPageResult")
|
||||
@ApiOperation("分页列表")
|
||||
public ResponseEntity<IPage<InspectionTaskVO>> getPageResult(@RequestBody QueryPage<Map<String, Object>> queryPage) {
|
||||
return new ResponseEntity<IPage<InspectionTaskVO>>().data(service.getPageResult(queryPage));
|
||||
}
|
||||
|
||||
@PostMapping("/getTargetCount")
|
||||
@ApiOperation(value = "检查对象统计")
|
||||
public ResponseEntity<Map<String, Integer>> getTargetCount(@ApiParam(value = "任务编号") @RequestParam(value = "taskId") Integer taskId,
|
||||
@RequestParam(required = false) String checkTag,
|
||||
@ApiParam(value = "权限oid") @RequestParam(value = "oid", required = false) String oid) {
|
||||
return new ResponseEntity<Map<String, Integer>>().data(service.getTargetCount(taskId, checkTag, oid));
|
||||
}
|
||||
|
||||
@PostMapping("/getTaskCount")
|
||||
@ApiOperation(value = "获取检查任务统计")
|
||||
public ResponseEntity<Map<String, Integer>> getTaskCount() {
|
||||
return new ResponseEntity<Map<String, Integer>>().data(service.getTaskCount());
|
||||
}
|
||||
|
||||
@PostMapping("/getTargets")
|
||||
@ApiOperation(value = "获取检查对象")
|
||||
public ResponseEntity<IPage<InspectionTargetVO>> getTargets(@RequestBody QueryPage<Map<String, Object>> queryPage) {
|
||||
return new ResponseEntity<IPage<InspectionTargetVO>>().data(service.getTargets(queryPage));
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value = "添加(点击 Model 可以查看具体详情)")
|
||||
public ResponseEntity<InspectionTaskDTO> add(@ApiParam(value = "对象") @RequestBody InspectionTaskDTO inspectionTaskDTO) {
|
||||
service.add(inspectionTaskDTO);
|
||||
return new ResponseEntity<InspectionTaskDTO>().ok();
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@ApiOperation(value = "更新: 注意此更新只会更新不会NUll的数据, 若要不展示可置为空字符")
|
||||
public ResponseEntity<InspectionTaskDTO> update(@ApiParam(value = "对象") @RequestBody InspectionTaskDTO inspectionTaskDTO) {
|
||||
ResponseEntity<InspectionTaskDTO> responseEntity = new ResponseEntity<>();
|
||||
if (inspectionTaskDTO.getId() == null) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
service.updateTask(inspectionTaskDTO);
|
||||
return responseEntity.data(inspectionTaskDTO);
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@ApiOperation(value = "删除")
|
||||
public ResponseEntity<InspectionTask> delete(@ApiParam(value = "主键") @RequestParam(value = "key") Integer key) {
|
||||
ResponseEntity<InspectionTask> responseEntity = new ResponseEntity<>();
|
||||
if (key == null) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
|
||||
service.removeById(key);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.controller.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.inspection.InspectionTaskInventoryMapper;
|
||||
import com.codvision.basic.service.inspection.InspectionTaskInventoryMapperService;
|
||||
import com.codvision.commoncore.common.ResponseEntity;
|
||||
import com.codvision.commoncore.exception.BusinessException;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/InspectionTaskInventoryMapper")
|
||||
@Api(tags = "检查任务清单关联")
|
||||
@RequiredArgsConstructor
|
||||
public class InspectionTaskInventoryMapperController {
|
||||
|
||||
private final InspectionTaskInventoryMapperService service;
|
||||
|
||||
@PostMapping("/getPageResult")
|
||||
@ApiOperation("分页列表")
|
||||
public ResponseEntity<IPage<InspectionTaskInventoryMapper>> getPageResult(@RequestBody QueryPage<Map<String, Object>> queryPage) {
|
||||
return new ResponseEntity<IPage<InspectionTaskInventoryMapper>>().data(service.getPageResult(queryPage));
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation(value = "添加(点击 Model 可以查看具体详情)")
|
||||
public ResponseEntity<InspectionTaskInventoryMapper> add(@ApiParam(value = "对象") @RequestBody InspectionTaskInventoryMapper inspectionTaskInventoryMapper) {
|
||||
service.save(inspectionTaskInventoryMapper);
|
||||
return new ResponseEntity<InspectionTaskInventoryMapper>().ok();
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@ApiOperation(value = "更新: 注意此更新只会更新不会NUll的数据, 若要不展示可置为空字符")
|
||||
public ResponseEntity<InspectionTaskInventoryMapper> update(@ApiParam(value = "对象") @RequestBody InspectionTaskInventoryMapper inspectionTaskInventoryMapper) {
|
||||
ResponseEntity<InspectionTaskInventoryMapper> responseEntity = new ResponseEntity<>();
|
||||
if (inspectionTaskInventoryMapper.getId() == null) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
|
||||
service.updateById(inspectionTaskInventoryMapper);
|
||||
return responseEntity.data(inspectionTaskInventoryMapper);
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@ApiOperation(value = "删除")
|
||||
public ResponseEntity<InspectionTaskInventoryMapper> delete(@ApiParam(value = "主键") @RequestParam(value = "key") Integer key) {
|
||||
ResponseEntity<InspectionTaskInventoryMapper> responseEntity = new ResponseEntity<>();
|
||||
if (key == null) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
|
||||
service.removeById(key);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.codvision.basic.controller.patrol;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.patrol.PatrolClock;
|
||||
import com.codvision.basic.entity.vo.patrol.PatrolClockVO;
|
||||
import com.codvision.basic.service.patrol.PatrolClockService;
|
||||
import com.codvision.commoncore.common.ResponseEntity;
|
||||
import com.codvision.commoncore.exception.BusinessException;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/patrolClock")
|
||||
@Api(tags = "巡查--打卡")
|
||||
public class PatrolClockController {
|
||||
|
||||
private final PatrolClockService service;
|
||||
|
||||
|
||||
@PostMapping("/getPageResult")
|
||||
@ApiOperation("分页列表")
|
||||
public ResponseEntity<IPage<PatrolClockVO>> getPageResult(@RequestBody QueryPage<Map<String, Object>> queryPage) {
|
||||
return new ResponseEntity<IPage<PatrolClockVO>>().data(service.getPageResult(queryPage));
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("添加")
|
||||
public ResponseEntity<String> add(@Validated @RequestBody PatrolClock patrolclock) {
|
||||
service.add(patrolclock);
|
||||
return new ResponseEntity<String>().ok();
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@ApiOperation("编辑")
|
||||
public ResponseEntity<String> update(@RequestBody PatrolClock patrolclock) {
|
||||
ResponseEntity<String> responseEntity = new ResponseEntity<>();
|
||||
if (patrolclock.getId() == null) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
service.updateById(patrolclock);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.codvision.basic.controller.patrol;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.patrol.PatrolClue;
|
||||
import com.codvision.basic.entity.vo.patrol.PatrolClueVO;
|
||||
import com.codvision.basic.service.patrol.PatrolClueService;
|
||||
import com.codvision.commoncore.common.ResponseEntity;
|
||||
import com.codvision.commoncore.exception.BusinessException;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/patrolClue")
|
||||
@Api(tags = "巡查--线索")
|
||||
public class PatrolClueController {
|
||||
|
||||
private final PatrolClueService service;
|
||||
|
||||
@PostMapping("/getPageResult")
|
||||
@ApiOperation("分页列表")
|
||||
public ResponseEntity<IPage<PatrolClueVO>> getPageResult(@RequestBody QueryPage<Map<String, Object>> queryPage) {
|
||||
return new ResponseEntity<IPage<PatrolClueVO>>().data(service.getPageResult(queryPage));
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("添加")
|
||||
public ResponseEntity<String> add(@Validated @RequestBody PatrolClue patrolclue) {
|
||||
service.save(patrolclue);
|
||||
return new ResponseEntity<String>().ok();
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@ApiOperation("编辑")
|
||||
public ResponseEntity<String> update(@RequestBody PatrolClue patrolclue) {
|
||||
ResponseEntity<String> responseEntity = new ResponseEntity<>();
|
||||
if (patrolclue.getId() == null) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
service.updateById(patrolclue);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
package com.codvision.basic.controller.patrol;
|
||||
|
||||
|
||||
import com.codvision.basic.entity.patrol.PatrolClueType;
|
||||
import com.codvision.basic.entity.vo.patrol.PatrolClueTypeVO;
|
||||
import com.codvision.basic.service.patrol.PatrolClueTypeService;
|
||||
import com.codvision.commoncore.common.ResponseEntity;
|
||||
import com.codvision.commoncore.exception.BusinessException;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/patrolClueType")
|
||||
public class PatrolClueTypeController {
|
||||
|
||||
private final PatrolClueTypeService service;
|
||||
|
||||
@PostMapping("/findAll")
|
||||
@ApiOperation("通用查询")
|
||||
public ResponseEntity<List<PatrolClueTypeVO>> findAll() {
|
||||
return new ResponseEntity<List<PatrolClueTypeVO>>().data(service.findAll(new HashMap<>(2)));
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("添加")
|
||||
public ResponseEntity<String> add(@Validated @RequestBody PatrolClueType patrolcluetype) {
|
||||
service.save(patrolcluetype);
|
||||
return new ResponseEntity<String>().ok();
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@ApiOperation("编辑")
|
||||
public ResponseEntity<String> update(@RequestBody PatrolClueType patrolcluetype) {
|
||||
ResponseEntity<String> responseEntity = new ResponseEntity<>();
|
||||
if (patrolcluetype.getId() == null) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
service.updateById(patrolcluetype);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.codvision.basic.controller.patrol;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.patrol.PatrolPoint;
|
||||
import com.codvision.basic.entity.vo.patrol.PatrolPointVO;
|
||||
import com.codvision.basic.service.patrol.PatrolPointService;
|
||||
import com.codvision.commoncore.common.ResponseEntity;
|
||||
import com.codvision.commoncore.exception.BusinessException;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/patrolPoint")
|
||||
@Api(tags = "巡查--点位")
|
||||
public class PatrolPointController {
|
||||
|
||||
private final PatrolPointService service;
|
||||
|
||||
@PostMapping("/getPageResult")
|
||||
@ApiOperation("分页列表")
|
||||
public ResponseEntity<IPage<PatrolPoint>> getPageResult(@RequestBody QueryPage<Map<String, Object>> queryPage) {
|
||||
return new ResponseEntity<IPage<PatrolPoint>>().data(service.getPageResult(queryPage));
|
||||
}
|
||||
|
||||
@PostMapping("/getPointByRecordId")
|
||||
@ApiOperation("根据记录获取点位列表")
|
||||
public ResponseEntity<List<PatrolPointVO>> getPointByRecordId(@ApiParam(value = "记录id", required = true) @RequestParam(value = "recordId") Integer recordId,
|
||||
@ApiParam(value = "路线id") @RequestParam(value = "routeId", required = false) Integer routeId) {
|
||||
ResponseEntity<List<PatrolPointVO>> responseEntity = new ResponseEntity<>();
|
||||
if (recordId == null) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
|
||||
return responseEntity.data(service.getPointByRecordId(recordId, routeId));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("添加")
|
||||
public ResponseEntity<String> add(@Validated @RequestBody PatrolPoint patrolpoint) {
|
||||
service.save(patrolpoint);
|
||||
return new ResponseEntity<String>().ok();
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
@ApiOperation("编辑")
|
||||
public ResponseEntity<String> update(@RequestBody PatrolPoint patrolpoint) {
|
||||
ResponseEntity<String> responseEntity = new ResponseEntity<>();
|
||||
if (patrolpoint.getId() == null) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
service.updateById(patrolpoint);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@ApiOperation("删除巡查点位信息")
|
||||
public ResponseEntity<String> delete(@RequestBody List<Integer> pointIds) {
|
||||
ResponseEntity<String> responseEntity = new ResponseEntity<>();
|
||||
if (CollectionUtils.isEmpty(pointIds)) {
|
||||
throw new BusinessException(30002);
|
||||
}
|
||||
service.batchDel(pointIds);
|
||||
return responseEntity.ok();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
package com.codvision.basic.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
@TableName("tbl_address")
|
||||
public class Address implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("单元索引")
|
||||
private String unitSlot;
|
||||
|
||||
@ApiModelProperty("楼层索引")
|
||||
private String floorSlot;
|
||||
|
||||
@ApiModelProperty("标准地址编码")
|
||||
private String standardAddressCode;
|
||||
|
||||
@ApiModelProperty("房屋所在区域-字典(HOUSE_REGION)")
|
||||
private String houseRegion;
|
||||
|
||||
@ApiModelProperty("房间索引")
|
||||
private String roomSlot;
|
||||
|
||||
@ApiModelProperty("城市")
|
||||
private String city;
|
||||
|
||||
@ApiModelProperty("区县")
|
||||
private String county;
|
||||
|
||||
@ApiModelProperty("楼幢编码")
|
||||
private String buildingCode;
|
||||
|
||||
@ApiModelProperty("房屋性质-字典(HOUSE_NATURE)")
|
||||
private String houseNature;
|
||||
|
||||
@ApiModelProperty("房屋用途-字典(HOUSE_USE)")
|
||||
private String houseUse;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("组织id")
|
||||
private Integer oid;
|
||||
|
||||
@ApiModelProperty("网格编码")
|
||||
private String gridCode;
|
||||
|
||||
@ApiModelProperty("建筑物(如:富邦星座商业楼)")
|
||||
private String building;
|
||||
|
||||
@ApiModelProperty("是否多种地址0-否;1-是")
|
||||
private Integer flagMulti;
|
||||
|
||||
@ApiModelProperty("地址全称")
|
||||
private String sourceAddress;
|
||||
|
||||
@ApiModelProperty("不动产登记情况-字典(REGISTER_SITUATION)")
|
||||
private String registerSituation;
|
||||
|
||||
@ApiModelProperty("房屋类型-字典(HOUSE_TYPE)")
|
||||
private String houseType;
|
||||
|
||||
@ApiModelProperty("自然村")
|
||||
private String village;
|
||||
|
||||
@ApiModelProperty("楼层")
|
||||
private String floor;
|
||||
|
||||
@ApiModelProperty("房屋层数分类-字典(HOUSE_FLOOR_CLASS)")
|
||||
private String houseFloorClass;
|
||||
|
||||
@ApiModelProperty("纬度")
|
||||
private String lat;
|
||||
|
||||
@ApiModelProperty("自然组")
|
||||
private String naturalGroup;
|
||||
|
||||
@ApiModelProperty("小区/园区")
|
||||
private String park;
|
||||
|
||||
@ApiModelProperty("地址编码")
|
||||
private String addressCode;
|
||||
|
||||
@TableLogic
|
||||
@ApiModelProperty("删除标记,1-已删除,0:正常")
|
||||
private Integer delFlag;
|
||||
|
||||
@ApiModelProperty("经度")
|
||||
private String lng;
|
||||
|
||||
@ApiModelProperty("镇街")
|
||||
private String town;
|
||||
|
||||
@ApiModelProperty("地址类型:ADDRESS_TYPE,1-楼幢;0-户室;4-小区/园区")
|
||||
private String addressType;
|
||||
|
||||
@ApiModelProperty("社区")
|
||||
private String community;
|
||||
|
||||
@ApiModelProperty("房屋使用情况-字典(HOUSE_USE_SITUATION)")
|
||||
private String houseUseSituation;
|
||||
|
||||
@ApiModelProperty("房屋临时管理属性-字典(HOUSE_TEMPORARY_MANAGE)")
|
||||
private String houseTemporaryManage;
|
||||
|
||||
@ApiModelProperty("房间")
|
||||
private String room;
|
||||
|
||||
@ApiModelProperty("数据来源-字典(ADDRESS_DATA_SOURCE)")
|
||||
private String dataSource;
|
||||
|
||||
@ApiModelProperty("单元")
|
||||
private String unit;
|
||||
|
||||
@ApiModelProperty("房屋管理方式-字典(HOUSE_MANAGE_STYLE)")
|
||||
private String houseManageStyle;
|
||||
|
||||
@ApiModelProperty("网格")
|
||||
private String grid;
|
||||
|
||||
@ApiModelProperty("房屋危险性鉴定等级-字典(HOUSE_PERIL_GRADE)")
|
||||
private String housePerilGrade;
|
||||
|
||||
@ApiModelProperty("地址标签(重点场所用途)")
|
||||
private String addressTags;
|
||||
|
||||
@ApiModelProperty("楼幢号")
|
||||
private String buildingNumber;
|
||||
|
||||
@ApiModelProperty("小区/园区、楼幢区域信息")
|
||||
private String wkt;
|
||||
|
||||
@ApiModelProperty("门牌号")
|
||||
private String houseNumber;
|
||||
|
||||
@ApiModelProperty("街路巷")
|
||||
private String street;
|
||||
|
||||
@ApiModelProperty("街路号")
|
||||
private String streetNumber;
|
||||
|
||||
@ApiModelProperty("小区园区编码(15位网格编码+2位顺序码+1位校验码)")
|
||||
private String parkCode;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,193 @@
|
||||
package com.codvision.basic.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("tbl_enterprise")
|
||||
public class Enterprise implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("企业类型(字典:ENTERPRISE_TYPE)")
|
||||
private String enterpriseType;
|
||||
|
||||
@ApiModelProperty("登记机关(字典:ENTERPRISE_REGISTRATION_AUTHORITY)")
|
||||
private String registrationAuthority;
|
||||
|
||||
@ApiModelProperty("区县")
|
||||
private String county;
|
||||
|
||||
@ApiModelProperty("网格编码")
|
||||
private String gridCode;
|
||||
|
||||
@ApiModelProperty("经营异常行为(字典:BUSINESS_ABNORMAL_BEHAVIOR)")
|
||||
private String businessAbnormalBehavior;
|
||||
|
||||
@ApiModelProperty("统一社会信用代码")
|
||||
private String creditCode;
|
||||
|
||||
@ApiModelProperty("纬度")
|
||||
private String lat;
|
||||
|
||||
@ApiModelProperty("行政处罚机关(字典:ENTERPRISE_ADMINISTRATIVE_PENALTY_AUTHORITY)")
|
||||
private String administrativePenaltyAuthority;
|
||||
|
||||
@TableLogic
|
||||
@ApiModelProperty("删除标记,1:已删除,0:正常")
|
||||
private Integer delFlag;
|
||||
|
||||
@ApiModelProperty("核准日期")
|
||||
private String approvalDate;
|
||||
|
||||
@ApiModelProperty("镇街")
|
||||
private String town;
|
||||
|
||||
@ApiModelProperty("经度")
|
||||
private String lng;
|
||||
|
||||
@ApiModelProperty("经营状态(字典:BUSINESS_STATUS)")
|
||||
private String businessStatus;
|
||||
|
||||
@ApiModelProperty("社区")
|
||||
private String community;
|
||||
|
||||
@ApiModelProperty("伤亡人数")
|
||||
private String casualties;
|
||||
|
||||
@ApiModelProperty("成立日期")
|
||||
private String establishmentDate;
|
||||
|
||||
@ApiModelProperty("严重违法失信行为(字典:ILLEGALITY_DISHONESTY_BEHAVIOR)")
|
||||
private String illegalityDishonestyBehavior;
|
||||
|
||||
@ApiModelProperty("经营范围")
|
||||
private String businessScope;
|
||||
|
||||
@ApiModelProperty("经营场所")
|
||||
private String businessPlace;
|
||||
|
||||
@ApiModelProperty("是否为消防安全重点单位")
|
||||
private String flagFireSafety;
|
||||
|
||||
@ApiModelProperty("企业名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("列入拖欠农民工工资黑名单日期")
|
||||
private String wageArrearsDate;
|
||||
|
||||
@ApiModelProperty("注册资本币种")
|
||||
private String registeredCurrency;
|
||||
|
||||
@ApiModelProperty("经营截至日期")
|
||||
private String businessEndDate;
|
||||
|
||||
@ApiModelProperty("城市")
|
||||
private String city;
|
||||
|
||||
@ApiModelProperty("经营起始日期")
|
||||
private String businessStartDate;
|
||||
|
||||
@ApiModelProperty("行政处罚种类(字典:ENTERPRISE_ADMINISTRATIVE_PENALTY_TYPE)")
|
||||
private String administrativePenaltyType;
|
||||
|
||||
@ApiModelProperty("是否列入严重违法失信名单(黑名单)")
|
||||
private String flagIllegalityDishonesty;
|
||||
|
||||
@ApiModelProperty("法定代表人联系方式")
|
||||
private String legalPersonPhone;
|
||||
|
||||
@ApiModelProperty("行业类型(字典:INDUSTRY_TYPE)")
|
||||
private String industryType;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("组织id")
|
||||
private Integer oid;
|
||||
|
||||
@ApiModelProperty("个体工商户组成形式(字典:INDIVIDUAL_BUSINESS_COMPOSE)")
|
||||
private String individualBusinessCompose;
|
||||
|
||||
@ApiModelProperty("列入异常名录时间")
|
||||
private String businessAbnormalDate;
|
||||
|
||||
@ApiModelProperty("是否发生生产安全事故")
|
||||
private String flagProductionSafety;
|
||||
|
||||
@ApiModelProperty("法定代表人证件类型(字典:ID_TYPE)")
|
||||
private String legalPersonIdType;
|
||||
|
||||
@ApiModelProperty("是否列入拖欠农民工工资黑名单")
|
||||
private String flagWageArrears;
|
||||
|
||||
@ApiModelProperty("是否为应急管理重点单位")
|
||||
private String flagContingencyManagement;
|
||||
|
||||
@ApiModelProperty("是否列入经营异常名录")
|
||||
private String flagBusinessAbnormal;
|
||||
|
||||
@ApiModelProperty("企业标签(其他信息)")
|
||||
private String enterpriseTags;
|
||||
|
||||
@ApiModelProperty("统一地址代码")
|
||||
private String addressCode;
|
||||
|
||||
@ApiModelProperty("列入严重违法失信名单日期")
|
||||
private String illegalityDishonestyDate;
|
||||
|
||||
@ApiModelProperty("统一地址")
|
||||
private String sourceAddress;
|
||||
|
||||
@ApiModelProperty("生产安全发生日期")
|
||||
private String productionSafetyDate;
|
||||
|
||||
@ApiModelProperty("是否收到行政处罚决定")
|
||||
private String flagAdministrativePenalty;
|
||||
|
||||
@ApiModelProperty("注册资本(万元)")
|
||||
private String registeredCapital;
|
||||
|
||||
@ApiModelProperty("法定代表人证件号码")
|
||||
private String legalPersonIdCard;
|
||||
|
||||
@ApiModelProperty("是否为交通运输重点单位")
|
||||
private String flagTransportation;
|
||||
|
||||
@ApiModelProperty("行政处罚日期")
|
||||
private String administrativePenaltyDate;
|
||||
|
||||
@ApiModelProperty("网格")
|
||||
private String grid;
|
||||
|
||||
@ApiModelProperty("法定代表人姓名")
|
||||
private String legalPersonName;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
package com.codvision.basic.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@ApiModel
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("tbl_person")
|
||||
public class Person implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("出生日期")
|
||||
private String birthday;
|
||||
|
||||
@ApiModelProperty("宗教信仰-字典(RELIGIOUS)")
|
||||
private String religious;
|
||||
|
||||
@ApiModelProperty("文化程度-字典(EDUCATION)")
|
||||
private String education;
|
||||
|
||||
@ApiModelProperty("民族-字典(NATION)")
|
||||
private String nation;
|
||||
|
||||
@ApiModelProperty("兵役状况-字典(MILITARY_STATUS)")
|
||||
private String militaryStatus;
|
||||
|
||||
@ApiModelProperty("人口类型-字典(PERSON_TYPE)")
|
||||
private String personType;
|
||||
|
||||
@ApiModelProperty("证件号码")
|
||||
private String idCard;
|
||||
|
||||
@ApiModelProperty("户籍地编码")
|
||||
private String residenceCode;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("现住地详址")
|
||||
private String inhabitedAddress;
|
||||
|
||||
@ApiModelProperty("现住地编码")
|
||||
private String inhabitedCode;
|
||||
|
||||
@ApiModelProperty("证件类型-字典(ID_TYPE)")
|
||||
private String idType;
|
||||
|
||||
@ApiModelProperty("曾用名")
|
||||
private String usedName;
|
||||
|
||||
@ApiModelProperty("人员标签(,逗号隔开)")
|
||||
private String personTags;
|
||||
|
||||
@TableLogic
|
||||
@ApiModelProperty("删除标记,1:已删除,0:正常")
|
||||
private Integer delFlag;
|
||||
|
||||
@ApiModelProperty("性别-字典(PERSON_SEX)")
|
||||
private String sex;
|
||||
|
||||
@ApiModelProperty("户籍地详址")
|
||||
private String residenceAddress;
|
||||
|
||||
@ApiModelProperty("籍贯")
|
||||
private String nativePlace;
|
||||
|
||||
@ApiModelProperty("婚姻状况-字典(MARITAL_STATUS)")
|
||||
private String maritalStatus;
|
||||
|
||||
@ApiModelProperty("国籍-字典(NATIONALITY)")
|
||||
private String nationality;
|
||||
|
||||
@ApiModelProperty("联系电话")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("政治面貌-字典(POLITIC_FACE)")
|
||||
private String politicFace;
|
||||
|
||||
@ApiModelProperty("年龄")
|
||||
private Integer age;
|
||||
|
||||
@ApiModelProperty("组织id")
|
||||
private Integer oid;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.codvision.basic.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("tbl_person_address_relation")
|
||||
public class PersonAddressRelation implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("房屋id")
|
||||
private Integer addressId;
|
||||
|
||||
@ApiModelProperty("人员id")
|
||||
private Integer personId;
|
||||
|
||||
@ApiModelProperty("人房关系-字典(PERSON_ADDRESS_RELATION)")
|
||||
private String personAddressRelation;
|
||||
|
||||
@ApiModelProperty("人房关系-字典(HOUSEHOLDER_RELATION)")
|
||||
private String householderRelation;
|
||||
|
||||
@ApiModelProperty("是否关联:0-否;1-是")
|
||||
private String flagRelated;
|
||||
|
||||
@TableLogic
|
||||
@ApiModelProperty("删除标记,1:已删除,0:正常")
|
||||
private Integer delFlag;
|
||||
|
||||
@ApiModelProperty("证件类型-字典(ID_TYPE)")
|
||||
private String idType;
|
||||
|
||||
@ApiModelProperty("证件号码")
|
||||
private String idCard;
|
||||
|
||||
@ApiModelProperty("地址编码")
|
||||
private String addressCode;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
package com.codvision.basic.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@TableName("tbl_social_org")
|
||||
public class SocialOrg implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("登记机关(字典:SOCIAL_REGISTRATION_AUTHORITY)")
|
||||
private String registrationAuthority;
|
||||
|
||||
@ApiModelProperty("发证日期")
|
||||
private String issuanceDate;
|
||||
|
||||
@ApiModelProperty("是否有境外背景")
|
||||
private String flagOverseasBackground;
|
||||
|
||||
@ApiModelProperty("有效期限(yyyy-MM-dd至yyyy-MM-dd)")
|
||||
private String validPeriod;
|
||||
|
||||
@ApiModelProperty("城市")
|
||||
private String city;
|
||||
|
||||
@ApiModelProperty("行政处罚种类(字典:SOCIAL_ADMINISTRATIVE_PENALTY_TYPE)")
|
||||
private String administrativePenaltyType;
|
||||
|
||||
@ApiModelProperty("区县")
|
||||
private String county;
|
||||
|
||||
@ApiModelProperty("是否列入严重违法失信名单")
|
||||
private String flagIllegalityDishonesty;
|
||||
|
||||
@ApiModelProperty("法定代表人联系方式")
|
||||
private String legalPersonPhone;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("列入活动异常名录日期")
|
||||
private String activityAbnormalDate;
|
||||
|
||||
@ApiModelProperty("网格编码")
|
||||
private String gridCode;
|
||||
|
||||
@ApiModelProperty("社会组织标签(其他信息)")
|
||||
private String socialOrgTags;
|
||||
|
||||
@ApiModelProperty("是否为已取缔非法社会组织")
|
||||
private String flagBanningNoSocial;
|
||||
|
||||
@ApiModelProperty("法定代表人证件类型(字典:ID_TYPE)")
|
||||
private String legalPersonIdType;
|
||||
|
||||
@ApiModelProperty("是否列入活动异常名录")
|
||||
private String flagActivityAbnormal;
|
||||
|
||||
@ApiModelProperty("列入活动异常名录事由(字典:ACTIVITY_ABNORMAL_REASON)")
|
||||
private String activityAbnormalReason;
|
||||
|
||||
@ApiModelProperty("统一社会信用代码")
|
||||
private String creditCode;
|
||||
|
||||
@ApiModelProperty("住所")
|
||||
private String residence;
|
||||
|
||||
@ApiModelProperty("纬度")
|
||||
private String lat;
|
||||
|
||||
@ApiModelProperty("行政处罚机关(字典:SOCIAL_ADMINISTRATIVE_PENALTY_AUTHORITY)")
|
||||
private String administrativePenaltyAuthority;
|
||||
|
||||
@ApiModelProperty("统一地址代码")
|
||||
private String addressCode;
|
||||
|
||||
@TableLogic
|
||||
@ApiModelProperty("删除标记,1:已删除,0:正常")
|
||||
private Integer delFlag;
|
||||
|
||||
@ApiModelProperty("列入严重违法失信名单日期")
|
||||
private String illegalityDishonestyDate;
|
||||
|
||||
@ApiModelProperty("统一地址")
|
||||
private String sourceAddress;
|
||||
|
||||
@ApiModelProperty("镇街")
|
||||
private String town;
|
||||
|
||||
@ApiModelProperty("经度")
|
||||
private String lng;
|
||||
|
||||
@ApiModelProperty("是否收到行政处罚决定")
|
||||
private String flagAdministrativePenalty;
|
||||
|
||||
@ApiModelProperty("社区")
|
||||
private String community;
|
||||
|
||||
@ApiModelProperty("注册资金、开办资金(万元)")
|
||||
private String registeredCapital;
|
||||
|
||||
@ApiModelProperty("列入严重违法失信名单事由(字典:ILLEGALITY_DISHONESTY_REASON)")
|
||||
private String illegalityDishonestyReason;
|
||||
|
||||
@ApiModelProperty("社会组织类型(字典:SOCIAL_ORG_TYPE)")
|
||||
private String socialOrgType;
|
||||
|
||||
@ApiModelProperty("业务范围")
|
||||
private String businessScope;
|
||||
|
||||
@ApiModelProperty("法定代表人证件号码")
|
||||
private String legalPersonIdCard;
|
||||
|
||||
@ApiModelProperty("业务主管单位(字典:SUPERVISORY_UNIT)")
|
||||
private String supervisoryUnit;
|
||||
|
||||
@ApiModelProperty("是否进行年检")
|
||||
private String flagInspectAnnually;
|
||||
|
||||
@ApiModelProperty("行政处罚日期")
|
||||
private String administrativePenaltyDate;
|
||||
|
||||
@ApiModelProperty("网格")
|
||||
private String grid;
|
||||
|
||||
@ApiModelProperty("法定代表人")
|
||||
private String legalPersonName;
|
||||
|
||||
@ApiModelProperty("资金来源(字典:CAPITAL_SOURCE)")
|
||||
private String capitalSource;
|
||||
|
||||
@ApiModelProperty("社会组织名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("注册资本币种")
|
||||
private String registeredCurrency;
|
||||
|
||||
@ApiModelProperty("状态(字典:SOCIAL_ORG_STATUS)")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("取缔日期")
|
||||
private String banningDate;
|
||||
|
||||
@ApiModelProperty("组织id")
|
||||
private Integer oid;
|
||||
|
||||
@ApiModelProperty("是否为涉嫌非法社会组织")
|
||||
private String flagIllegalSocietyOrg;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.entity.dto;
|
||||
|
||||
import com.codvision.basic.entity.inspection.InspectionTask;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
* @date 2023/6/7 10:38
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@ApiModel(description = "检查任务输出类")
|
||||
public class InspectionTaskDTO extends InspectionTask {
|
||||
|
||||
@ApiModelProperty(value = "检查清单id集合")
|
||||
private String inventoryList;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.codvision.basic.entity.dto;
|
||||
|
||||
|
||||
import com.codvision.basic.entity.patrol.PatrolPointRouteRelation;
|
||||
import com.codvision.basic.entity.patrol.PatrolRoute;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
* @date 2023/7/12 15:38
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PatrolRouteDTO extends PatrolRoute {
|
||||
|
||||
@ApiModelProperty("点位路线关系")
|
||||
List<PatrolPointRouteRelation> pointRouteRelationList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.codvision.basic.entity.dto;
|
||||
|
||||
|
||||
import com.codvision.basic.entity.PersonAddressRelation;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
* @date 2023/5/12 13:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PersonAddressRelationDTO extends PersonAddressRelation {
|
||||
|
||||
@ApiModelProperty("联系电话")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty("姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("性别-字典(PERSON_SEX)")
|
||||
private String sex;
|
||||
|
||||
@ApiModelProperty("人员标签(,逗号隔开)")
|
||||
private String personTags;
|
||||
|
||||
@ApiModelProperty("人口类型-字典(PERSON_TYPE)")
|
||||
private String personType;
|
||||
|
||||
@ApiModelProperty("籍贯")
|
||||
private String nativePlace;
|
||||
|
||||
@ApiModelProperty("所属组织")
|
||||
private Integer oid;
|
||||
|
||||
@ApiModelProperty("年龄")
|
||||
private Integer age;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.entity.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("tbl_inspection_checklist")
|
||||
@ApiModel(description = "tbl_inspection_checklist--对表的描述")
|
||||
public class InspectionChecklist implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "检查大类id")
|
||||
private Integer inspectionId;
|
||||
|
||||
@ApiModelProperty(value = "检查类型内容")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "角色id")
|
||||
private String roleId;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.entity.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("tbl_inspection_inventory")
|
||||
@ApiModel(description = "检查清单")
|
||||
public class InspectionInventory implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "检查类型名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "是否启用,0系统模板,1启用,2停用")
|
||||
private Integer active;
|
||||
|
||||
@ApiModelProperty(value = "描述")
|
||||
private String description;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.entity.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("tbl_inspection_record")
|
||||
@ApiModel(description = "检查记录")
|
||||
public class InspectionRecord implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "检查人员")
|
||||
private String creator;
|
||||
|
||||
@ApiModelProperty(value = "检查位置纬度")
|
||||
private Double inspectLat;
|
||||
|
||||
@ApiModelProperty(value = "检查位置经度")
|
||||
private Double inspectLng;
|
||||
|
||||
@ApiModelProperty(value = "检查对象主键(身份证号、社会统一信用代码)")
|
||||
private String refCode;
|
||||
|
||||
@ApiModelProperty(value = "所属任务id")
|
||||
private Integer taskId;
|
||||
|
||||
@ApiModelProperty(value = "隐患数")
|
||||
private Integer issueNumber;
|
||||
|
||||
@ApiModelProperty(value = "检查id")
|
||||
private Integer inspectionId;
|
||||
|
||||
@ApiModelProperty(value = "检查人员id")
|
||||
private Integer creatorId;
|
||||
|
||||
@ApiModelProperty(value = "1人员,2房屋,3企业")
|
||||
private String category;
|
||||
|
||||
@ApiModelProperty(value = "检查情况1已复查已整改,0待复查")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty(value = "检查对象名称")
|
||||
private String refName;
|
||||
private String source;
|
||||
private Integer rectifyDeadline;
|
||||
private String rectifyContent;
|
||||
private String rectifyFile;
|
||||
private Integer rectifyUserId;
|
||||
private String rectifyTime;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.entity.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.Transient;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@TableName("tbl_inspection_record_item")
|
||||
@ApiModel(description = "tbl_inspection_record_item--对表的描述")
|
||||
public class InspectionRecordItem implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "检查记录id")
|
||||
private Integer recordId;
|
||||
|
||||
@ApiModelProperty(value = "检查项id")
|
||||
private Integer checkItemId;
|
||||
|
||||
@ApiModelProperty(value = "照片")
|
||||
private String photos;
|
||||
|
||||
@ApiModelProperty(value = "内容")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "是否危险项(是否生成预警事件)(0正常,1异常)")
|
||||
private Integer isDanger;
|
||||
|
||||
@Transient
|
||||
@ApiModelProperty(value = "检查项文本(回显)")
|
||||
private String checkList;
|
||||
|
||||
@ApiModelProperty(value = "是否传成事件,事件id")
|
||||
private Integer eventId;
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.entity.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("tbl_inspection_target")
|
||||
public class InspectionTarget implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("对象地址")
|
||||
private String targetAddress;
|
||||
|
||||
@ApiModelProperty("对象编码")
|
||||
private String targetCode;
|
||||
|
||||
@ApiModelProperty("名称")
|
||||
private String targetName;
|
||||
|
||||
@ApiModelProperty("经度")
|
||||
private Float lng;
|
||||
|
||||
@ApiModelProperty("监管部门")
|
||||
private String superviseDept;
|
||||
|
||||
@ApiModelProperty("负责人联系电话")
|
||||
private String legalPersonPhone;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty("所属村社")
|
||||
private Integer oid;
|
||||
|
||||
@ApiModelProperty("对象标签")
|
||||
private String tagIdList;
|
||||
|
||||
@ApiModelProperty("别名")
|
||||
private String targetAlias;
|
||||
|
||||
@ApiModelProperty("日常管理人姓名")
|
||||
private String managerName;
|
||||
|
||||
@ApiModelProperty("日常管理人电话")
|
||||
private String managerPhone;
|
||||
|
||||
@ApiModelProperty("负责人")
|
||||
private String legalPersonName;
|
||||
|
||||
@ApiModelProperty("启用状态")
|
||||
private Integer flagActive;
|
||||
|
||||
@ApiModelProperty("纬度")
|
||||
private Float lat;
|
||||
|
||||
@ApiModelProperty("类型(字典:INSPECTION_CATEGORY)")
|
||||
private String category;
|
||||
|
||||
@ApiModelProperty("联系方式")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty("数据来源:0-系统录入;1-基础信息自动添加")
|
||||
private String dataSource;
|
||||
|
||||
@ApiModelProperty("检查任务id")
|
||||
private Integer taskId;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.entity.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
@Builder
|
||||
@TableName("tbl_inspection_target_config")
|
||||
public class InspectionTargetConfig implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty("标签id")
|
||||
private String tagIdList;
|
||||
|
||||
@ApiModelProperty("类型(字典:INSPECTION_CATEGORY)")
|
||||
private String category;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.entity.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@TableName("tbl_inspection_task")
|
||||
@ApiModel(description = "检查任务")
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class InspectionTask implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "任务开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "检查标签")
|
||||
private String checkTag;
|
||||
|
||||
@ApiModelProperty(value = "检查任务名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "任务结束时间")
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty(value = "类别,字典:INSPECTION_CATEGORY,PERSON人员,ADDRESS房屋,ENTERPRISE企业")
|
||||
private String category;
|
||||
|
||||
@ApiModelProperty(value = "检查频率(天)")
|
||||
private Integer frequency;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.entity.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.Transient;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("tbl_inspection_task_inventory_mapper")
|
||||
@ApiModel(description = "检查任务、清单关联")
|
||||
public class InspectionTaskInventoryMapper implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "检查清单id")
|
||||
private Integer inventoryId;
|
||||
|
||||
@ApiModelProperty(value = "检查任务id")
|
||||
private Integer taskId;
|
||||
|
||||
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@Transient
|
||||
private InspectionInventory inspectionInventory;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.codvision.basic.entity.patrol;
|
||||
|
||||
|
||||
import com.codvision.webcore.bean.BasicEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
@Table(name = "tbl_patrol_clock")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PatrolClock extends BasicEntity {
|
||||
|
||||
@ApiModelProperty("巡查记录id")
|
||||
private Integer recordId;
|
||||
|
||||
@ApiModelProperty("巡查点位id")
|
||||
private Integer pointId;
|
||||
|
||||
@ApiModelProperty("经度")
|
||||
private String lng;
|
||||
|
||||
@ApiModelProperty("打卡时间")
|
||||
private String clockTime;
|
||||
|
||||
@ApiModelProperty("点位地址")
|
||||
private String pointAddress;
|
||||
|
||||
@ApiModelProperty("巡查点位名称")
|
||||
private String pointName;
|
||||
|
||||
@ApiModelProperty("纬度")
|
||||
private String lat;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.codvision.basic.entity.patrol;
|
||||
|
||||
import com.codvision.webcore.bean.BasicEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
@Table(name = "tbl_patrol_clue")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PatrolClue extends BasicEntity {
|
||||
|
||||
@ApiModelProperty("巡查点位id")
|
||||
private Integer pointId;
|
||||
|
||||
@ApiModelProperty("经度")
|
||||
private String lng;
|
||||
|
||||
@ApiModelProperty("是否解决")
|
||||
private String flagSolved;
|
||||
|
||||
@ApiModelProperty("线索人员(json字符串存储)")
|
||||
private String cluePerson;
|
||||
|
||||
@ApiModelProperty("线索地址")
|
||||
private String clueAddress;
|
||||
|
||||
@ApiModelProperty("线索上报时间(发生时间)")
|
||||
private String clueTime;
|
||||
|
||||
@ApiModelProperty("组织id")
|
||||
private Integer oid;
|
||||
|
||||
@ApiModelProperty("巡查点位名称")
|
||||
private String pointName;
|
||||
|
||||
@ApiModelProperty("线索图片")
|
||||
private String clueImage;
|
||||
|
||||
@ApiModelProperty("结果")
|
||||
private String result;
|
||||
|
||||
@ApiModelProperty("巡查记录id")
|
||||
private Integer recordId;
|
||||
|
||||
@ApiModelProperty("线索类型id")
|
||||
private Integer clueType;
|
||||
|
||||
@ApiModelProperty("点位地址")
|
||||
private String pointAddress;
|
||||
|
||||
@ApiModelProperty("线索描述")
|
||||
private String clueDescription;
|
||||
|
||||
@ApiModelProperty("纬度")
|
||||
private String lat;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.codvision.basic.entity.patrol;
|
||||
|
||||
import com.codvision.webcore.bean.BasicEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
@Table(name = "tbl_patrol_clue_type")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PatrolClueType extends BasicEntity {
|
||||
|
||||
@ApiModelProperty("类型层级")
|
||||
private Integer categoryLevel;
|
||||
|
||||
@ApiModelProperty("类型编码(四平台)")
|
||||
private String categoryCode;
|
||||
|
||||
@ApiModelProperty("类型名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("父id")
|
||||
private Integer pid;
|
||||
|
||||
@ApiModelProperty("排序")
|
||||
private Integer sortNumber;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.codvision.basic.entity.patrol;
|
||||
|
||||
import com.codvision.webcore.bean.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
@Table(name = "tbl_patrol_point")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PatrolPoint extends BaseEntity {
|
||||
|
||||
@ApiModelProperty("点位类型(POINT_TYPE,普通点位、重点点位)")
|
||||
private String pointType;
|
||||
|
||||
@ApiModelProperty("点位详细地址")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty("经度")
|
||||
private String lng;
|
||||
|
||||
@ApiModelProperty("点位二维码")
|
||||
private String qrcode;
|
||||
|
||||
@ApiModelProperty("点位名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("组织id")
|
||||
private Integer oid;
|
||||
|
||||
@ApiModelProperty("纬度")
|
||||
private String lat;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.codvision.basic.entity.patrol;
|
||||
|
||||
import com.codvision.webcore.bean.BasicEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
@Table(name = "tbl_patrol_point_route_relation")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PatrolPointRouteRelation extends BasicEntity {
|
||||
|
||||
@ApiModelProperty("点位id")
|
||||
private Integer pointId;
|
||||
|
||||
@ApiModelProperty("路线id")
|
||||
private Integer routeId;
|
||||
|
||||
@ApiModelProperty("排序号")
|
||||
private Integer sortNumber;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.codvision.basic.entity.patrol;
|
||||
|
||||
import com.codvision.webcore.bean.BasicEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
@Table(name = "tbl_patrol_record")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PatrolRecord extends BasicEntity {
|
||||
|
||||
@ApiModelProperty("巡查开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty("巡查路线id")
|
||||
private Integer routeId;
|
||||
|
||||
@ApiModelProperty("用户id")
|
||||
private Integer uid;
|
||||
|
||||
@ApiModelProperty("巡查路线名称")
|
||||
private String routeName;
|
||||
|
||||
@ApiModelProperty("用户姓名")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty("巡查结束时间")
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty("巡查状态(PATROL_STATUS)")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("用户手机号")
|
||||
private String userPhone;
|
||||
|
||||
@ApiModelProperty("巡查类型(字典:PATROL_TYPE)")
|
||||
private String patrolType;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.codvision.basic.entity.patrol;
|
||||
|
||||
import com.codvision.webcore.bean.BasicEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
@Table(name = "tbl_patrol_route")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PatrolRoute extends BasicEntity {
|
||||
|
||||
@ApiModelProperty("路线名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty("路线描述")
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty("组织id")
|
||||
private Integer oid;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.entity.vo;
|
||||
|
||||
import com.codvision.base.entity.SysTag;
|
||||
import com.codvision.basic.entity.Address;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class AddressVO extends Address {
|
||||
|
||||
@ApiModelProperty(value = "标签列表")
|
||||
private List<SysTag> sysTagList;
|
||||
|
||||
@ApiModelProperty(value = "人员列表")
|
||||
private List<PersonVO> personVoList;
|
||||
|
||||
@ApiModelProperty(value = "楼幢/户室列表")
|
||||
private List<AddressVO> addressVoList;
|
||||
|
||||
@ApiModelProperty(value = "楼幢数")
|
||||
private Integer buildingNum;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.codvision.basic.entity.vo;
|
||||
|
||||
|
||||
import com.codvision.basic.entity.Address;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class BatchAddressVO {
|
||||
|
||||
@ApiModelProperty("楼幢地址列表")
|
||||
private List<Address> buildAddressList;
|
||||
|
||||
@ApiModelProperty("户室地址列表")
|
||||
private List<Address> houseRoomAddressList;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.codvision.basic.entity.vo;
|
||||
|
||||
import com.codvision.base.entity.SysTag;
|
||||
import com.codvision.basic.entity.Enterprise;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
* @date 2023/7/5 14:57
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class EnterpriseVO extends Enterprise {
|
||||
|
||||
@ApiModelProperty(value = "标签列表")
|
||||
private List<SysTag> sysTagList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.codvision.basic.entity.vo;
|
||||
|
||||
import com.codvision.basic.entity.PersonAddressRelation;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
* @date 2023/5/12 11:49
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PersonAddressRelationVO extends PersonAddressRelation {
|
||||
|
||||
@ApiModelProperty("人员信息")
|
||||
public PersonVO personVo;
|
||||
|
||||
@ApiModelProperty("房屋信息")
|
||||
public AddressVO addressVo;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.codvision.basic.entity.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
* @date 2023/5/12 15:26
|
||||
*/
|
||||
@Data
|
||||
public class PersonCountVO {
|
||||
|
||||
@ApiModelProperty("户籍人口数")
|
||||
private Integer residenceNum;
|
||||
|
||||
@ApiModelProperty("流动人口数")
|
||||
private Integer flowNum;
|
||||
|
||||
@ApiModelProperty("境外人口数")
|
||||
private Integer abroadNum;
|
||||
|
||||
@ApiModelProperty("其他人口数")
|
||||
private Integer otherNum;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.codvision.basic.entity.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
* @date 2023/5/15 19:41
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PersonPortraitVO {
|
||||
|
||||
@ApiModelProperty("类型")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty("类型label")
|
||||
private String label;
|
||||
|
||||
@ApiModelProperty("数量")
|
||||
private Integer num;
|
||||
|
||||
@ApiModelProperty("画像值")
|
||||
private List<PersonPortraitVO> personPortraitVoList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.entity.vo;
|
||||
|
||||
import com.codvision.base.entity.SysTag;
|
||||
import com.codvision.basic.entity.Person;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PersonVO extends Person {
|
||||
|
||||
@ApiModelProperty(value = "标签列表")
|
||||
private List<SysTag> sysTagList;
|
||||
|
||||
@ApiModelProperty(value = "关联房屋列表")
|
||||
private List<AddressVO> addressVoList;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.codvision.basic.entity.vo;
|
||||
|
||||
|
||||
import com.codvision.base.entity.SysTag;
|
||||
import com.codvision.basic.entity.SocialOrg;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
* @date 2023/7/5 14:59
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class SocialOrgVO extends SocialOrg {
|
||||
|
||||
@ApiModelProperty(value = "标签列表")
|
||||
private List<SysTag> sysTagList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.entity.vo.inspection;
|
||||
|
||||
import com.codvision.basic.entity.inspection.InspectionChecklist;
|
||||
import com.codvision.basic.entity.inspection.InspectionInventory;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
* @date 2023/6/7 17:23
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(description = "检查大类-输出类")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class InspectionInventoryVO extends InspectionInventory {
|
||||
|
||||
@ApiModelProperty(value = "检查条目")
|
||||
private List<InspectionChecklist> inspectionChecklists;
|
||||
|
||||
private Integer taskId;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.entity.vo.inspection;
|
||||
|
||||
import com.codvision.basic.entity.inspection.InspectionRecord;
|
||||
import com.codvision.basic.entity.inspection.InspectionRecordItem;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
* @date 2023/6/7 17:30
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(description = "检查记录-输出类")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class InspectionRecordVO extends InspectionRecord {
|
||||
|
||||
@ApiModelProperty(value = "检查人员roleid")
|
||||
private Integer creatorRoleId;
|
||||
|
||||
@ApiModelProperty(value = "检查清单名称(回显)")
|
||||
private String inventoryName;
|
||||
|
||||
@ApiModelProperty(value = "是否超时未整改;0-未超时,1-超时未整改")
|
||||
private Integer flagRectifyDeadline;
|
||||
|
||||
@ApiModelProperty(value = "检查条目")
|
||||
private List<InspectionRecordItem> items;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.entity.vo.inspection;
|
||||
|
||||
import com.codvision.auth.entity.vo.OrgVO;
|
||||
import com.codvision.base.entity.SysTag;
|
||||
import com.codvision.basic.entity.inspection.InspectionTarget;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
* @date 2023/6/7 9:39
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(description = "检查对象-输出类")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class InspectionTargetVO extends InspectionTarget {
|
||||
|
||||
@ApiModelProperty(value = "标签列表")
|
||||
private List<SysTag> sysTagList;
|
||||
|
||||
@ApiModelProperty(value = "最近检查时间")
|
||||
private String lastCheckTime;
|
||||
|
||||
@ApiModelProperty(value = "最近检查状态")
|
||||
private String lastCheckStatus;
|
||||
|
||||
|
||||
private Integer flagEvent;
|
||||
|
||||
|
||||
private Integer rectifyDeadline;
|
||||
|
||||
private OrgVO org;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.entity.vo.inspection;
|
||||
|
||||
import com.codvision.base.entity.SysTag;
|
||||
import com.codvision.basic.entity.inspection.InspectionInventory;
|
||||
import com.codvision.basic.entity.inspection.InspectionTask;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
* @date 2023/6/7 10:09
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@ApiModel(description = "检查任务输出类")
|
||||
public class InspectionTaskVO extends InspectionTask {
|
||||
|
||||
@ApiModelProperty(value = "关联清单列表")
|
||||
private List<InspectionInventory> inspectionInventoryList;
|
||||
|
||||
@ApiModelProperty(value = "检查项集合")
|
||||
private String inventoryList;
|
||||
|
||||
private Integer all;
|
||||
|
||||
private Integer checked;
|
||||
|
||||
private Integer unChecked;
|
||||
|
||||
@ApiModelProperty(value = "标签列表")
|
||||
private List<SysTag> sysTagList;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.codvision.basic.entity.vo.patrol;
|
||||
|
||||
|
||||
import com.codvision.basic.entity.patrol.PatrolClock;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
* @date 2023/7/15 14:22
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PatrolClockVO extends PatrolClock {
|
||||
|
||||
@ApiModelProperty(value = "打卡用户姓名")
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty(value = "用户手机号")
|
||||
private String userPhone;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.codvision.basic.entity.vo.patrol;
|
||||
|
||||
import com.codvision.basic.entity.patrol.PatrolClueType;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
* @date 2023/7/14 17:22
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PatrolClueTypeVO extends PatrolClueType {
|
||||
|
||||
@ApiModelProperty(value = "下级线索类型")
|
||||
private List<PatrolClueTypeVO> nextLevelList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.codvision.basic.entity.vo.patrol;
|
||||
|
||||
|
||||
import com.codvision.basic.entity.patrol.PatrolClue;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
* @date 2023/7/14 17:42
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PatrolClueVO extends PatrolClue {
|
||||
|
||||
@ApiModelProperty(value = "线索类型名称")
|
||||
private String clueTypeName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.codvision.basic.entity.vo.patrol;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
* @date 2023/7/17 10:40
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PatrolCountVO {
|
||||
|
||||
@ApiModelProperty(value = "累计时长")
|
||||
private String countTime;
|
||||
|
||||
@ApiModelProperty(value = "累计打卡数据")
|
||||
private Integer clockNum;
|
||||
|
||||
@ApiModelProperty(value = "累计线索数量")
|
||||
private Integer clueNum;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.codvision.basic.entity.vo.patrol;
|
||||
|
||||
|
||||
import com.codvision.basic.entity.patrol.PatrolPointRouteRelation;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
* @date 2023/7/13 15:17
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PatrolPointRouteRelationVO extends PatrolPointRouteRelation {
|
||||
|
||||
@ApiModelProperty("点位名称")
|
||||
private String pointName;
|
||||
|
||||
@ApiModelProperty("经度")
|
||||
private String lng;
|
||||
|
||||
@ApiModelProperty("纬度")
|
||||
private String lat;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.codvision.basic.entity.vo.patrol;
|
||||
|
||||
|
||||
import com.codvision.basic.entity.patrol.PatrolPoint;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
* @date 2023/7/20 9:22
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PatrolPointVO extends PatrolPoint {
|
||||
|
||||
@ApiModelProperty(value = "巡查记录id")
|
||||
private Integer recordId;
|
||||
|
||||
@ApiModelProperty(value = "是否已打卡")
|
||||
private Integer flagClock;
|
||||
|
||||
@ApiModelProperty(value = "路线id")
|
||||
private Integer routeId;
|
||||
|
||||
@ApiModelProperty("排序号")
|
||||
private Integer sortNumber;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.codvision.basic.entity.vo.patrol;
|
||||
|
||||
|
||||
import com.codvision.basic.entity.patrol.PatrolRecord;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
* @date 2023/7/14 9:37
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PatrolRecordVO extends PatrolRecord {
|
||||
|
||||
@ApiModelProperty(value = "巡查数(按人员查询)")
|
||||
private Integer patrolNum;
|
||||
|
||||
@ApiModelProperty(value = "巡查路线点位列表")
|
||||
private List<PatrolPointRouteRelationVO> patrolPointRouteRelationVOList;
|
||||
|
||||
@ApiModelProperty(value = "打卡数")
|
||||
private Integer clockNum;
|
||||
|
||||
@ApiModelProperty(value = "线索数")
|
||||
private Integer clueNum;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.codvision.basic.entity.vo.patrol;
|
||||
|
||||
|
||||
import com.codvision.basic.entity.patrol.PatrolRoute;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
* @date 2023/7/13 15:19
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class PatrolRouteVO extends PatrolRoute {
|
||||
|
||||
@ApiModelProperty("点位路线关系")
|
||||
List<PatrolPointRouteRelationVO> pointRouteRelationList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.codvision.basic.entity.vo.patrol;
|
||||
|
||||
|
||||
import com.codvision.basic.entity.patrol.PatrolPoint;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
* @date 2023/7/14 11:05
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PatrolVO {
|
||||
|
||||
@ApiModelProperty(value = "信息类型(字典:PATROL_INFO_TYPE)")
|
||||
private String patrolInfoType;
|
||||
|
||||
@ApiModelProperty(value = "标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "创建时间(时间线)")
|
||||
private String createTime;
|
||||
|
||||
@ApiModelProperty(value = "线索id")
|
||||
private Integer clueId;
|
||||
|
||||
@ApiModelProperty(value = "线索信息详情")
|
||||
private PatrolClueVO patrolClueVO;
|
||||
|
||||
@ApiModelProperty(value = "线索类型id")
|
||||
private Integer clueType;
|
||||
|
||||
@ApiModelProperty(value = "线索类型名称")
|
||||
private String clueTypeName;
|
||||
|
||||
@ApiModelProperty(value = "所属区域oid")
|
||||
private Integer oid;
|
||||
|
||||
@ApiModelProperty(value = "线索发生时间")
|
||||
private String clueTime;
|
||||
|
||||
@ApiModelProperty(value = "线索地址")
|
||||
private String clueAddress;
|
||||
|
||||
@ApiModelProperty(value = "线索图片")
|
||||
private String clueImage;
|
||||
|
||||
@ApiModelProperty(value = "线索描述")
|
||||
private String clueDescription;
|
||||
|
||||
@ApiModelProperty(value = "点位id")
|
||||
private Integer pointId;
|
||||
|
||||
@ApiModelProperty(value = "点位详情")
|
||||
private PatrolPoint patrolPoint;
|
||||
|
||||
@ApiModelProperty(value = "打卡时间")
|
||||
private String clockTime;
|
||||
|
||||
@ApiModelProperty(value = "点位名称")
|
||||
private String pointName;
|
||||
|
||||
@ApiModelProperty(value = "点位地址")
|
||||
private String pointAddress;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.Address;
|
||||
import com.codvision.basic.entity.vo.AddressVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
*/
|
||||
public interface AddressMapper extends BaseMapper<Address> {
|
||||
|
||||
/**
|
||||
* 分页通用查询
|
||||
* @param page 分页对象
|
||||
* @param paraMap 查询条件
|
||||
* @return 列表
|
||||
*/
|
||||
IPage<AddressVO> getPageResult(IPage<Map<String, Object>> page, @Param("query") Map<String, Object> paraMap);
|
||||
|
||||
/**
|
||||
* 获取组织下最大地址编码
|
||||
* @param address 地址信息
|
||||
* @return String 地址编码
|
||||
*/
|
||||
String getMaxAddressCode(Address address);
|
||||
|
||||
/**
|
||||
* 统计楼幢地址
|
||||
* @param address 地址信息
|
||||
* @return int
|
||||
*/
|
||||
int countBuilding(Address address);
|
||||
|
||||
/**
|
||||
* 统计房屋数
|
||||
* @param address 地址信息
|
||||
* @return int
|
||||
*/
|
||||
int countHouse(Address address);
|
||||
|
||||
/**
|
||||
* 获取楼幢编码
|
||||
* @param parkCode 园区编码
|
||||
* @param buildingNumber 楼幢编号
|
||||
* @return 楼幢编码
|
||||
*/
|
||||
String getBuildingCode(@Param("parkCode") String parkCode, @Param("buildingNumber") String buildingNumber);
|
||||
|
||||
/**
|
||||
* 根据人员id查询关联房屋信息
|
||||
* @param personId 人员id
|
||||
* @return 地址信息
|
||||
*/
|
||||
List<AddressVO> getRelationAddress(Integer personId);
|
||||
|
||||
|
||||
AddressVO getAddressAndTag(int id);
|
||||
|
||||
/**
|
||||
* 详情
|
||||
* @param id 地址id
|
||||
* @return 地址信息
|
||||
*/
|
||||
AddressVO details(int id);
|
||||
|
||||
/**
|
||||
* 根据楼幢编码查询房屋信息
|
||||
* @param buildingCode 楼幢编码
|
||||
* @return 房屋信息
|
||||
*/
|
||||
List<AddressVO> getAddressHouseListByBuildingCode(String buildingCode);
|
||||
|
||||
/**
|
||||
* 根据楼幢编码查询房屋地址列表
|
||||
* @param page 分页对象
|
||||
* @param paraMap 查询条件
|
||||
* @return 列表
|
||||
*/
|
||||
IPage<AddressVO> getAddressHouseListByCode(IPage<Map<String, Object>> page, @Param("query") Map<String, Object> paraMap);
|
||||
|
||||
/**
|
||||
* 获取楼幢下所有房屋列表
|
||||
* @param page 分页对象
|
||||
* @param paraMap 查询条件
|
||||
* @return 列表
|
||||
*/
|
||||
IPage<AddressVO> getAddressBuildingListByCode(IPage<Map<String, Object>> page, @Param("query") Map<String, Object> paraMap);
|
||||
|
||||
/**
|
||||
* 通过楼幢或小区编码查询房屋地址id
|
||||
* @param buildingCode 楼幢编码
|
||||
* @param parkCode 小区编码
|
||||
* @return 地址id列表
|
||||
*/
|
||||
List<Integer> getAddressIdList(@Param("buildingCode") String buildingCode, @Param("parkCode") String parkCode);
|
||||
|
||||
/**
|
||||
* 根据标签查询符合地址信息
|
||||
* @param oid 组织id
|
||||
* @param tagIdList 标签ids
|
||||
* @return List<Address>
|
||||
*/
|
||||
List<Address> getAddressInspectionTarget(@Param("oid") Integer oid, @Param("tagIdList") String tagIdList);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.Enterprise;
|
||||
import com.codvision.basic.entity.vo.EnterpriseVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
*/
|
||||
public interface EnterpriseMapper extends BaseMapper<Enterprise> {
|
||||
|
||||
/**
|
||||
* 分页通用查询
|
||||
* @param page 分页对象
|
||||
* @param paraMap 查询条件
|
||||
* @return 列表
|
||||
*/
|
||||
IPage<EnterpriseVO> getPageResult(IPage<Map<String, Object>> page, @Param("query") Map<String, Object> paraMap);
|
||||
|
||||
/**
|
||||
* 校验该统一社会信用代码是否存在
|
||||
* @param enterprise 企业信息
|
||||
* @return 统计数
|
||||
*/
|
||||
int countEnterpriseByCreditCode(@Param("enterprise") Enterprise enterprise);
|
||||
|
||||
/**
|
||||
* 根据标签查询符合企业信息
|
||||
* @param oid 组织id
|
||||
* @param tagIdList 标签ids
|
||||
* @return List<Enterprise>
|
||||
*/
|
||||
List<Enterprise> getEnterpriseInspectionTarget(@Param("oid") Integer oid, @Param("tagIdList") String tagIdList);
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.PersonAddressRelation;
|
||||
import com.codvision.basic.entity.vo.PersonAddressRelationVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
*/
|
||||
public interface PersonAddressRelationMapper extends BaseMapper<PersonAddressRelation> {
|
||||
|
||||
/**
|
||||
* 分页通用查询
|
||||
* @param page 分页对象
|
||||
* @param paraMap 查询条件
|
||||
* @return 列表
|
||||
*/
|
||||
IPage<PersonAddressRelationVO> getPageResult(IPage<Map<String, Object>> page, @Param("query") Map<String, Object> paraMap);
|
||||
|
||||
/**
|
||||
* 人员、房屋迁出
|
||||
* @param ids 主键集合
|
||||
*/
|
||||
void moveOut(List<Integer> ids);;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.auth.entity.excel.PersonExcel;
|
||||
import com.codvision.basic.entity.Person;
|
||||
import com.codvision.basic.entity.vo.PersonCountVO;
|
||||
import com.codvision.basic.entity.vo.PersonPortraitVO;
|
||||
import com.codvision.basic.entity.vo.PersonVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
*/
|
||||
public interface PersonMapper extends BaseMapper<Person> {
|
||||
|
||||
|
||||
/**
|
||||
* 分页通用查询
|
||||
* @param page 分页对象
|
||||
* @param paraMap 查询条件
|
||||
* @return 列表
|
||||
*/
|
||||
IPage<PersonVO> getPageResult(IPage<Map<String, Object>> page, @Param("query") Map<String, Object> paraMap);
|
||||
|
||||
/**
|
||||
* 根据房屋Code统计人员数
|
||||
* @param addressCode 地址编码
|
||||
* @return 人员数
|
||||
*/
|
||||
PersonCountVO getPersonCountByPark(String addressCode);
|
||||
|
||||
/**
|
||||
* 根据房屋Code统计人员数
|
||||
* @param addressCode 地址编码
|
||||
* @return 人员数
|
||||
*/
|
||||
PersonCountVO getPersonCountByBuilding(String addressCode);
|
||||
|
||||
/**
|
||||
* 根据房屋Code统计人员数
|
||||
* @param addressCode 地址编码
|
||||
* @return 人员数
|
||||
*/
|
||||
PersonCountVO getPersonCountByHouse(String addressCode);
|
||||
|
||||
/**
|
||||
* 根据地址编码查询人员列表
|
||||
* @param page 分页对象
|
||||
* @param addressCodes 地址编码
|
||||
* @return 人员列表
|
||||
*/
|
||||
IPage<PersonVO> getPersonListByAddressCode(IPage<Map<String, Object>> page, @Param("addressCodes") String addressCodes);
|
||||
|
||||
/**
|
||||
* 获取关联人员
|
||||
* @param addressId 地址id
|
||||
* @return 人员列表
|
||||
*/
|
||||
List<PersonVO> getRelationPerson(int addressId);
|
||||
|
||||
/**
|
||||
* 获取人员详情
|
||||
* @param id 人员id
|
||||
* @return 人员详情
|
||||
*/
|
||||
PersonVO details(int id);
|
||||
|
||||
/**
|
||||
* 统计性别画像
|
||||
* @param personIds 人员id
|
||||
* @return 性别画像
|
||||
*/
|
||||
List<PersonPortraitVO> getSexCount(List<Integer> personIds);
|
||||
|
||||
/**
|
||||
* 统计年龄画像
|
||||
* @param personIds 人员id
|
||||
* @return 年龄画像
|
||||
*/
|
||||
Map<String, Object> getAgeCount(List<Integer> personIds);
|
||||
|
||||
/**
|
||||
* 统计文化程度画像
|
||||
* @param personIds 人员id
|
||||
* @return 文化程度画像
|
||||
*/
|
||||
List<PersonPortraitVO> getEducationCount(List<Integer> personIds);
|
||||
|
||||
/**
|
||||
* 统计婚姻状况画像
|
||||
* @param personIds 人员id
|
||||
* @return 婚姻状况画像
|
||||
*/
|
||||
List<PersonPortraitVO> getMaritalCount(List<Integer> personIds);
|
||||
|
||||
/**
|
||||
* 统计人口类型画像
|
||||
* @param personIds 人员id
|
||||
* @return 人口类型画像
|
||||
*/
|
||||
List<PersonPortraitVO> getPersonTypeCount(List<Integer> personIds);
|
||||
|
||||
/**
|
||||
* 统计人口类型画像
|
||||
* @param personIds 人员id
|
||||
* @return 人口类型画像
|
||||
*/
|
||||
List<PersonPortraitVO> getPersonTagCount(List<Integer> personIds);
|
||||
|
||||
/**
|
||||
* 导出Excel
|
||||
* @param paraMap 查询条件
|
||||
* @return 人员列表
|
||||
*/
|
||||
IPage<PersonExcel> excelExport(IPage<Object> page, @Param("query")Map<String, Object> paraMap);
|
||||
|
||||
/**
|
||||
* 获取人员详情
|
||||
* @param id 人员id
|
||||
* @return 人员详情
|
||||
*/
|
||||
PersonVO getPersonAndTag(int id);
|
||||
|
||||
/**
|
||||
* 根据标签查询符合条件人员信息
|
||||
* @param oid 组织id
|
||||
* @param tagIdList 标签ids
|
||||
* @return List<Person>
|
||||
*/
|
||||
List<Person> getPersonInspectionTarget(@Param("oid") Integer oid, @Param("tagIdList") String tagIdList);
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.SocialOrg;
|
||||
import com.codvision.basic.entity.vo.SocialOrgVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
*/
|
||||
public interface SocialOrgMapper extends BaseMapper<SocialOrg> {
|
||||
|
||||
/**
|
||||
* 分页通用查询
|
||||
* @param page 分页对象
|
||||
* @param paraMap 查询条件
|
||||
* @return 列表
|
||||
*/
|
||||
IPage<SocialOrgVO> getPageResult(IPage<Map<String, Object>> page, @Param("query") Map<String, Object> paraMap);
|
||||
|
||||
/**
|
||||
* 校验该统一社会信用代码是否存在
|
||||
* @param socialOrg 社会组织信息
|
||||
* @return int
|
||||
*/
|
||||
int countEnterpriseByCreditCode(@Param("socialOrg") SocialOrg socialOrg);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.mapper.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.inspection.InspectionChecklist;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
public interface InspectionChecklistMapper extends BaseMapper<InspectionChecklist> {
|
||||
|
||||
/**
|
||||
* 分页通用查询
|
||||
* @param page 分页对象
|
||||
* @param paraMap 查询条件
|
||||
* @return 列表
|
||||
*/
|
||||
IPage<InspectionChecklist> getPageResult(IPage<Map<String, Object>> page, @Param("query") Map<String, Object> paraMap);
|
||||
|
||||
List<InspectionChecklist> getByInspectionId(Integer inspectionId);
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.mapper.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.inspection.InspectionInventory;
|
||||
import com.codvision.basic.entity.vo.inspection.InspectionInventoryVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
public interface InspectionInventoryMapper extends BaseMapper<InspectionInventory> {
|
||||
|
||||
/**
|
||||
* 分页通用查询
|
||||
* @param page 分页对象
|
||||
* @param paraMap 查询条件
|
||||
* @return 列表
|
||||
*/
|
||||
IPage<InspectionInventoryVO> getPageResult(IPage<Map<String, Object>> page, @Param("query") Map<String, Object> paraMap);
|
||||
|
||||
|
||||
List<InspectionInventoryVO> getInspectionInventoryByTaskId(@Param("query") Map<String, Object> paraMap);
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.mapper.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.inspection.InspectionRecordItem;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
public interface InspectionRecordItemMapper extends BaseMapper<InspectionRecordItem> {
|
||||
|
||||
/**
|
||||
* 分页通用查询
|
||||
* @param page 分页对象
|
||||
* @param paraMap 查询条件
|
||||
* @return 列表
|
||||
*/
|
||||
IPage<InspectionRecordItem> getPageResult(IPage<Map<String, Object>> page, @Param("query") Map<String, Object> paraMap);
|
||||
|
||||
List<InspectionRecordItem> getByRecordId(Integer rid);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.mapper.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.inspection.InspectionRecord;
|
||||
import com.codvision.basic.entity.vo.inspection.InspectionRecordVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
public interface InspectionRecordMapper extends BaseMapper<InspectionRecord> {
|
||||
|
||||
/**
|
||||
* 分页通用查询
|
||||
* @param page 分页对象
|
||||
* @param paraMap 查询条件
|
||||
* @return 列表
|
||||
*/
|
||||
IPage<InspectionRecordVO> getPageResult(IPage<Map<String, Object>> page, @Param("query") Map<String, Object> paraMap);
|
||||
|
||||
InspectionRecordVO getById(Integer key);
|
||||
|
||||
List<Map> statByTask(@Param("query") Map<String, Object> params);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.mapper.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.codvision.basic.entity.inspection.InspectionTargetConfig;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
public interface InspectionTargetConfigMapper extends BaseMapper<InspectionTargetConfig> {
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.mapper.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.inspection.InspectionTarget;
|
||||
import com.codvision.basic.entity.vo.inspection.InspectionTargetVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
public interface InspectionTargetMapper extends BaseMapper<InspectionTarget> {
|
||||
|
||||
/**
|
||||
* 分页通用查询
|
||||
* @param page 分页对象
|
||||
* @param paraMap 查询条件
|
||||
* @return 列表
|
||||
*/
|
||||
IPage<InspectionTargetVO> getPageResult(IPage<Map<String, Object>> page, @Param("query") Map<String, Object> paraMap);
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.mapper.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.inspection.InspectionInventory;
|
||||
import com.codvision.basic.entity.inspection.InspectionTaskInventoryMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
public interface InspectionTaskInventoryMapperMapper extends BaseMapper<InspectionTaskInventoryMapper> {
|
||||
|
||||
/**
|
||||
* 分页通用查询
|
||||
* @param page 分页对象
|
||||
* @param paraMap 查询条件
|
||||
* @return 列表
|
||||
*/
|
||||
IPage<InspectionTaskInventoryMapper> getPageResult(IPage<Map<String, Object>> page, @Param("query") Map<String, Object> paraMap);
|
||||
|
||||
List<InspectionInventory> getByTaskId(Integer taskId);
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.mapper.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.inspection.InspectionTask;
|
||||
import com.codvision.basic.entity.vo.inspection.InspectionTargetVO;
|
||||
import com.codvision.basic.entity.vo.inspection.InspectionTaskVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author codvison
|
||||
*/
|
||||
public interface InspectionTaskMapper extends BaseMapper<InspectionTask> {
|
||||
|
||||
/**
|
||||
* 分页通用查询
|
||||
* @param page 分页对象
|
||||
* @param paraMap 查询条件
|
||||
* @return 列表
|
||||
*/
|
||||
IPage<InspectionTaskVO> getPageResult(IPage<Map<String, Object>> page, @Param("query") Map<String, Object> paraMap);
|
||||
|
||||
Map<String, Integer> getTargetCount(@Param("query") Map<String, Object> params);
|
||||
|
||||
Map<String, Integer> getTaskCount();
|
||||
|
||||
IPage<InspectionTargetVO> getTargets(IPage<Map<String, Object>> page, @Param("query") Map<String, Object> paraMap);
|
||||
|
||||
/**
|
||||
* 通过类型和标签获取任务
|
||||
* @param category 类型
|
||||
* @param checkTag 标签
|
||||
* @return InspectionTask
|
||||
*/
|
||||
List<InspectionTask> getTaskByCheckTag(@Param("category") String category, @Param("checkTag") String checkTag);
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.mapper.patrol;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.patrol.PatrolClock;
|
||||
import com.codvision.basic.entity.vo.patrol.PatrolClockVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
public interface PatrolClockMapper extends BaseMapper<PatrolClock> {
|
||||
|
||||
/**
|
||||
* 分页通用查询
|
||||
* @param page 分页对象
|
||||
* @param paraMap 查询条件
|
||||
* @return 列表
|
||||
*/
|
||||
IPage<PatrolClockVO> getPageResult(IPage<Map<String, Object>> page, @Param("query") Map<String, Object> paraMap);
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.mapper.patrol;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.patrol.PatrolClue;
|
||||
import com.codvision.basic.entity.vo.patrol.PatrolClueVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
public interface PatrolClueMapper extends BaseMapper<PatrolClue> {
|
||||
|
||||
/**
|
||||
* 分页通用查询
|
||||
* @param page 分页对象
|
||||
* @param paraMap 查询条件
|
||||
* @return 列表
|
||||
*/
|
||||
IPage<PatrolClueVO> getPageResult(IPage<Map<String, Object>> page, @Param("query") Map<String, Object> paraMap);
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.mapper.patrol;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.codvision.basic.entity.patrol.PatrolClueType;
|
||||
import com.codvision.basic.entity.vo.patrol.PatrolClueTypeVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
public interface PatrolClueTypeMapper extends BaseMapper<PatrolClueType> {
|
||||
|
||||
/**
|
||||
* 通用查询
|
||||
* @param paraMap 参数
|
||||
* @return 列表
|
||||
*/
|
||||
List<PatrolClueTypeVO> findAll(@Param("query") Map<String, Object> paraMap);
|
||||
|
||||
/**
|
||||
* 查询下级线索类型
|
||||
* @param pid pid
|
||||
* @return List<PatrolClueTypeVO>
|
||||
*/
|
||||
List<PatrolClueTypeVO> getNextLevel(@Param("pid") int pid);
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.mapper.patrol;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.codvision.basic.entity.patrol.PatrolPoint;
|
||||
import com.codvision.basic.entity.vo.patrol.PatrolPointVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
public interface PatrolPointMapper extends BaseMapper<PatrolPoint> {
|
||||
|
||||
/**
|
||||
* 分页通用查询
|
||||
* @param page 分页对象
|
||||
* @param paraMap 查询条件
|
||||
* @return 列表
|
||||
*/
|
||||
IPage<PatrolPoint> getPageResult(IPage<Map<String, Object>> page, @Param("query") Map<String, Object> paraMap);
|
||||
|
||||
List<PatrolPointVO> getPointByRecordIdAndRouteId(@Param("recordId") Integer recordId, @Param("routeId") Integer routeId);
|
||||
|
||||
List<PatrolPointVO> getPointByRecordId(@Param("recordId") Integer recordId, @Param("oid") Integer oid);
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.mapper.patrol;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.codvision.basic.entity.patrol.PatrolPointRouteRelation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
public interface PatrolPointRouteRelationMapper extends BaseMapper<PatrolPointRouteRelation> {
|
||||
|
||||
int countByPointIds(List<Integer> pointIds);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.mapper.patrol;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.codvision.basic.entity.patrol.PatrolRecord;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
public interface PatrolRecordMapper extends BaseMapper<PatrolRecord> {
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.mapper.patrol;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.codvision.basic.entity.patrol.PatrolRoute;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
public interface PatrolRouteMapper extends BaseMapper<PatrolRoute> {
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.codvision.basic.entity.Address;
|
||||
import com.codvision.basic.entity.vo.AddressVO;
|
||||
import com.codvision.basic.entity.vo.BatchAddressVO;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
*/
|
||||
public interface AddressService extends IService<Address> {
|
||||
|
||||
/**
|
||||
* 分页列表
|
||||
* @param queryPage 查询条件
|
||||
* @return 列表
|
||||
*/
|
||||
IPage<AddressVO> getPageResult(QueryPage<Map<String, Object>> queryPage);
|
||||
|
||||
/**
|
||||
* 添加
|
||||
* @param address 地址信息
|
||||
*/
|
||||
void add(Address address);
|
||||
|
||||
/**
|
||||
* 更新
|
||||
* @param address 地址信息
|
||||
*/
|
||||
void updateAddress(Address address);
|
||||
|
||||
/**
|
||||
* 批量建楼幢
|
||||
* @param batchAddressVO 批量添加参数
|
||||
*/
|
||||
void addList(BatchAddressVO batchAddressVO);
|
||||
|
||||
/**
|
||||
* 详情
|
||||
* @param id 主键
|
||||
* @return 详情
|
||||
*/
|
||||
AddressVO details(int id);
|
||||
|
||||
/**
|
||||
* 根据楼幢编码查询房屋地址列表
|
||||
* @param queryPage 分页对象
|
||||
* @return 地址信息列表
|
||||
*/
|
||||
IPage<AddressVO> getAddressHouseListByCode(QueryPage<Map<String, Object>> queryPage);
|
||||
|
||||
/**
|
||||
* 获取楼幢下所有房屋列表
|
||||
* @param queryPage 分页对象
|
||||
* @return 地址信息列表
|
||||
*/
|
||||
IPage<AddressVO> getAddressBuildingListByCode(QueryPage<Map<String, Object>> queryPage);
|
||||
|
||||
/**
|
||||
* 批量逻辑删除
|
||||
* @param addressIds 地址id列表
|
||||
*/
|
||||
void batchLogicDel(List<Integer> addressIds);
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.codvision.basic.entity.Enterprise;
|
||||
import com.codvision.basic.entity.vo.EnterpriseVO;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
*/
|
||||
public interface EnterpriseService extends IService<Enterprise> {
|
||||
|
||||
/**
|
||||
* 分页列表
|
||||
* @param queryPage 查询条件
|
||||
* @return 列表
|
||||
*/
|
||||
IPage<EnterpriseVO> getPageResult(QueryPage<Map<String, Object>> queryPage);
|
||||
|
||||
/**
|
||||
* 添加企业单位
|
||||
* @param enterprise 企业单位
|
||||
*/
|
||||
void addEnterprise(Enterprise enterprise);
|
||||
|
||||
/**
|
||||
* 编辑企业单位
|
||||
* @param enterprise 企业单位
|
||||
*/
|
||||
void updateEnterprise(Enterprise enterprise);
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.codvision.basic.entity.PersonAddressRelation;
|
||||
import com.codvision.basic.entity.dto.PersonAddressRelationDTO;
|
||||
import com.codvision.basic.entity.vo.PersonAddressRelationVO;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
*/
|
||||
public interface PersonAddressRelationService extends IService<PersonAddressRelation> {
|
||||
|
||||
/**
|
||||
* 分页列表
|
||||
* @param queryPage 查询条件
|
||||
* @return 列表
|
||||
*/
|
||||
IPage<PersonAddressRelationVO> getPageResult(QueryPage<Map<String, Object>> queryPage);
|
||||
|
||||
/**
|
||||
* 添加
|
||||
* @param personAddressRelationDto 添加参数
|
||||
*/
|
||||
void add(PersonAddressRelationDTO personAddressRelationDto);
|
||||
|
||||
/**
|
||||
* 人员、房屋迁出
|
||||
* @param ids 主键集合
|
||||
*/
|
||||
void moveOut(List<Integer> ids);
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.codvision.basic.entity.Person;
|
||||
import com.codvision.basic.entity.vo.PersonCountVO;
|
||||
import com.codvision.basic.entity.vo.PersonPortraitVO;
|
||||
import com.codvision.basic.entity.vo.PersonVO;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
*/
|
||||
public interface PersonService extends IService<Person> {
|
||||
|
||||
/**
|
||||
* 分页列表
|
||||
* @param queryPage 查询条件
|
||||
* @return 列表
|
||||
*/
|
||||
IPage<PersonVO> getPageResult(QueryPage<Map<String, Object>> queryPage);
|
||||
|
||||
/**
|
||||
* 根据地址Code统计人员数
|
||||
* @param addressCode 地址编码
|
||||
* @param addressType 地址类型
|
||||
* @return 人口统计
|
||||
*/
|
||||
PersonCountVO getPersonCount(String addressCode, String addressType);
|
||||
|
||||
/**
|
||||
* 根据地址编码查询人员列表
|
||||
* @param queryPage 查询条件
|
||||
* @return 人员列表
|
||||
*/
|
||||
IPage<PersonVO> getPersonListByAddressCode(QueryPage<Map<String, Object>> queryPage);
|
||||
|
||||
/**
|
||||
* 人员详情
|
||||
* @param id 人员id
|
||||
* @return 人员详情
|
||||
*/
|
||||
PersonVO details(Integer id);
|
||||
|
||||
/**
|
||||
* 新增人员
|
||||
* @param person 人员信息
|
||||
*/
|
||||
void add(Person person);
|
||||
|
||||
/**
|
||||
* 批量逻辑删除
|
||||
* @param personIds 人员id列表
|
||||
*/
|
||||
void batchLogicDel(List<Integer> personIds);
|
||||
|
||||
/**
|
||||
* 群体画像
|
||||
* @param personIds 人员id
|
||||
* @return 群体画像
|
||||
*/
|
||||
List<PersonPortraitVO> getPersonPortrait(List<Integer> personIds);
|
||||
|
||||
/**
|
||||
* 导入
|
||||
* @param file 文件
|
||||
* @return 请求序列号
|
||||
*/
|
||||
String excelImport(MultipartFile file);
|
||||
|
||||
/**
|
||||
* 导出
|
||||
* @param paramMap 参数
|
||||
*/
|
||||
void excelExport(Map<String, Object> paramMap);
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.codvision.basic.entity.SocialOrg;
|
||||
import com.codvision.basic.entity.vo.SocialOrgVO;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
*/
|
||||
public interface SocialOrgService extends IService<SocialOrg> {
|
||||
|
||||
/**
|
||||
* 分页列表
|
||||
* @param queryPage 查询条件
|
||||
* @return 列表
|
||||
*/
|
||||
IPage<SocialOrgVO> getPageResult(QueryPage<Map<String, Object>> queryPage);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param socialOrg 实体
|
||||
*/
|
||||
void addSocialOrg(SocialOrg socialOrg);
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param socialOrg 实体
|
||||
*/
|
||||
void updateSocialOrg(SocialOrg socialOrg);
|
||||
}
|
||||
@@ -0,0 +1,290 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ReUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.codvision.authcore.bean.SysUserBean;
|
||||
import com.codvision.authcore.util.AuthUtil;
|
||||
import com.codvision.basic.entity.Address;
|
||||
import com.codvision.basic.entity.PersonAddressRelation;
|
||||
import com.codvision.basic.entity.inspection.InspectionTarget;
|
||||
import com.codvision.basic.entity.inspection.InspectionTask;
|
||||
import com.codvision.basic.entity.vo.AddressVO;
|
||||
import com.codvision.basic.entity.vo.BatchAddressVO;
|
||||
import com.codvision.basic.mapper.AddressMapper;
|
||||
import com.codvision.basic.mapper.PersonAddressRelationMapper;
|
||||
import com.codvision.basic.mapper.inspection.InspectionTargetMapper;
|
||||
import com.codvision.basic.mapper.inspection.InspectionTaskMapper;
|
||||
import com.codvision.basic.service.AddressService;
|
||||
import com.codvision.basic.util.AddressCheckCodeUtil;
|
||||
import com.codvision.commoncore.exception.BusinessException;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import com.codvision.webcore.util.QueryPageUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.codvision.basic.constant.BasicConstant.PATTERN;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class AddressServiceImpl extends ServiceImpl<AddressMapper, Address> implements AddressService {
|
||||
|
||||
private final PersonAddressRelationMapper relationMapper;
|
||||
private final InspectionTargetMapper inspectionTargetMapper;
|
||||
private final InspectionTaskMapper inspectionTaskMapper;
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("all")
|
||||
public IPage<AddressVO> getPageResult(QueryPage<Map<String, Object>> queryPage) {
|
||||
SysUserBean currentUser = AuthUtil.getCurrentUser();
|
||||
Map<String, Object> paraMap = QueryPageUtil.queryMap(queryPage);
|
||||
if (!paraMap.containsKey("oid") || paraMap.get("oid") == null) {
|
||||
paraMap.put("oid", currentUser.getActiveOid());
|
||||
}
|
||||
|
||||
return getBaseMapper().getPageResult(queryPage.getPage(), paraMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void add(Address address) {
|
||||
if (StringUtils.isEmpty(address.getGridCode())) {
|
||||
throw new BusinessException("所选组织网格编码为空,请联系管理员完善!");
|
||||
}
|
||||
|
||||
int count = getBaseMapper().countBuilding(address);
|
||||
if ("4".equals(address.getAddressType()) && count > 0) {
|
||||
throw new BusinessException("该组织下此小区/园区地址已存在,请勿重复添加");
|
||||
}
|
||||
if ("1".equals(address.getAddressType()) && count > 0) {
|
||||
throw new BusinessException("该组织下此楼幢地址已存在,请勿重复添加!");
|
||||
}
|
||||
if ("0".equals(address.getAddressType()) && getBaseMapper().countHouse(address) > 0) {
|
||||
throw new BusinessException("该组织下此房屋地址已存在,请勿重复添加!");
|
||||
}
|
||||
|
||||
insertAddress(address);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateAddress(Address address) {
|
||||
int count = getBaseMapper().countBuilding(address);
|
||||
if ("4".equals(address.getAddressType()) && count > 0) {
|
||||
throw new BusinessException("该组织下此小区/园区地址已存在,请勿重复添加");
|
||||
}
|
||||
if ("1".equals(address.getAddressType()) && count > 0) {
|
||||
throw new BusinessException("该组织下此楼幢地址已存在,不可重复添加!");
|
||||
}
|
||||
if ("0".equals(address.getAddressType()) && getBaseMapper().countHouse(address) > 0) {
|
||||
throw new BusinessException("该组织下此房屋地址已存在,不可重复添加!");
|
||||
}
|
||||
if (address.getAddressType().compareTo("4") > 0 && count > 0) {
|
||||
throw new BusinessException("该组织下此建筑地址已存在,不可重复添加!");
|
||||
}
|
||||
getAddressSlot(address);
|
||||
addInspectionTarget(address);
|
||||
getBaseMapper().updateById(address);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void addList(BatchAddressVO batchAddressVO) {
|
||||
for (Address address : batchAddressVO.getBuildAddressList()) {
|
||||
insertAddress(address);
|
||||
}
|
||||
|
||||
for (Address address : batchAddressVO.getHouseRoomAddressList()) {
|
||||
String buildingCode = getBaseMapper().getBuildingCode(address.getParkCode(), address.getBuildingNumber());
|
||||
address.setBuildingCode(buildingCode);
|
||||
insertAddress(address);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AddressVO details(int id) {
|
||||
return getBaseMapper().details(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("all")
|
||||
public IPage<AddressVO> getAddressHouseListByCode(QueryPage<Map<String, Object>> queryPage) {
|
||||
Map<String, Object> paraMap = QueryPageUtil.queryMap(queryPage);
|
||||
if (!paraMap.containsKey("addressCode") || StringUtils.isBlank((String) paraMap.get("addressCode"))) {
|
||||
throw new BusinessException("地址编码为空,请检查!");
|
||||
}
|
||||
return getBaseMapper().getAddressHouseListByCode(queryPage.getPage(), paraMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("all")
|
||||
public IPage<AddressVO> getAddressBuildingListByCode(QueryPage<Map<String, Object>> queryPage) {
|
||||
Map<String, Object> paraMap = QueryPageUtil.queryMap(queryPage);
|
||||
if (!paraMap.containsKey("addressCode") || StringUtils.isBlank((String) paraMap.get("addressCode"))) {
|
||||
throw new BusinessException("地址编码为空,请检查!");
|
||||
}
|
||||
return getBaseMapper().getAddressBuildingListByCode(queryPage.getPage(), paraMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void batchLogicDel(List<Integer> addressIds) {
|
||||
// 删除房屋关联
|
||||
for (Integer addressId : addressIds) {
|
||||
Address address = getBaseMapper().selectById(addressId);
|
||||
if ("4".equals(address.getAddressType())) {
|
||||
// 删除小区下户室关联
|
||||
List<Integer> addressIdList = getBaseMapper().getAddressIdList(null, address.getParkCode());
|
||||
if (CollectionUtils.isNotEmpty(addressIdList)) {
|
||||
relationMapper.deleteBatchIds(addressIdList);
|
||||
}
|
||||
|
||||
// 删除小区下楼幢和户室
|
||||
getBaseMapper().delete(Wrappers.<Address>lambdaQuery().eq(Address::getParkCode, address.getParkCode()));
|
||||
} else if ("1".equals(address.getAddressType())) {
|
||||
// 删除楼幢下户室的关联
|
||||
List<Integer> addressIdList = getBaseMapper().getAddressIdList(address.getBuildingCode(), null);
|
||||
if (CollectionUtils.isNotEmpty(addressIdList)) {
|
||||
relationMapper.deleteBatchIds(addressIdList);
|
||||
}
|
||||
|
||||
// 如果是楼幢地址同步删除楼幢下户室
|
||||
getBaseMapper().delete(Wrappers.<Address>lambdaQuery().eq(Address::getBuildingCode, address.getBuildingCode()));
|
||||
} else {
|
||||
relationMapper.delete(Wrappers.<PersonAddressRelation>lambdaQuery().eq(PersonAddressRelation::getAddressId, addressId));
|
||||
}
|
||||
}
|
||||
getBaseMapper().deleteBatchIds(addressIds);
|
||||
}
|
||||
|
||||
public void insertAddress(Address address) {
|
||||
// 获取最大编码
|
||||
String maxAddressCode = getBaseMapper().getMaxAddressCode(address);
|
||||
// 获取新编码
|
||||
String addressCode = getAddressCode(address, maxAddressCode);
|
||||
if ("4".equals(address.getAddressType())) {
|
||||
address.setParkCode(addressCode);
|
||||
} else if ("1".equals(address.getAddressType())) {
|
||||
address.setBuildingCode(addressCode);
|
||||
}
|
||||
address.setAddressCode(addressCode);
|
||||
getAddressSlot(address);
|
||||
addInspectionTarget(address);
|
||||
getBaseMapper().insert(address);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取地址房屋索引
|
||||
* @param address 地址信息
|
||||
*/
|
||||
private void getAddressSlot(Address address) {
|
||||
if ("0".equals(address.getAddressType())) {
|
||||
// 获取单元、楼层、房间号中的数字类型字符串作为索引
|
||||
address.setUnitSlot(ReUtil.getGroup0(PATTERN, address.getUnit()));
|
||||
address.setFloorSlot(ReUtil.getGroup0(PATTERN, address.getFloor()));
|
||||
address.setRoomSlot(ReUtil.getGroup0(PATTERN, address.getRoom()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取下一个地址信息
|
||||
*
|
||||
* @param address 地址信息
|
||||
* @param maxAddressCode 最大地址编码
|
||||
* @return String
|
||||
*/
|
||||
private String getAddressCode(Address address, String maxAddressCode) {
|
||||
// 小区(室外)、楼幢五位顺序位,户室六位顺序位
|
||||
int number;
|
||||
// 网格/楼幢编码
|
||||
StringBuilder addressCode;
|
||||
if ("1".equals(address.getAddressType())) {
|
||||
addressCode = new StringBuilder(address.getGridCode());
|
||||
if (StringUtils.isEmpty(maxAddressCode)) {
|
||||
number = 1;
|
||||
} else {
|
||||
// 如果在楼幢5位顺序码上加一。
|
||||
String str = maxAddressCode.substring(maxAddressCode.length() - 6, maxAddressCode.length() - 1);
|
||||
number = Integer.parseInt(str) + 1;
|
||||
}
|
||||
addressCode.append(String.format("%05d", number));
|
||||
} else if("0".equals(address.getAddressType())){
|
||||
// 去除楼幢编码最后一位校验位
|
||||
addressCode = new StringBuilder(address.getBuildingCode());
|
||||
addressCode.deleteCharAt(addressCode.length() -1);
|
||||
if (StringUtils.isEmpty(maxAddressCode)) {
|
||||
number = 1;
|
||||
} else {
|
||||
String str = maxAddressCode.substring(maxAddressCode.length() - 7, maxAddressCode.length() - 1);
|
||||
number = Integer.parseInt(str) + 1;
|
||||
}
|
||||
// 楼幢编码为6位顺序码
|
||||
addressCode.append(String.format("%06d", number));
|
||||
} else {
|
||||
/*
|
||||
社会治理要素统一地址规范:室外地址编码规范为50001-99999
|
||||
小区地址编码顺序位为:40001-49999
|
||||
*/
|
||||
addressCode = new StringBuilder(address.getGridCode());
|
||||
if (StringUtils.isEmpty(maxAddressCode)) {
|
||||
number = 1;
|
||||
} else {
|
||||
String str = maxAddressCode.substring(maxAddressCode.length() - 5, maxAddressCode.length() - 1);
|
||||
number = Integer.parseInt(str) + 1;
|
||||
}
|
||||
addressCode.append(address.getAddressType()).append(String.format("%04d", number));
|
||||
}
|
||||
return AddressCheckCodeUtil.getAddressCode(addressCode.toString());
|
||||
}
|
||||
|
||||
/**
|
||||
* 断是否新增检查对象
|
||||
* @param address 地址信息
|
||||
*/
|
||||
private void addInspectionTarget(Address address) {
|
||||
if (StringUtils.isEmpty(address.getAddressTags())) {
|
||||
return;
|
||||
}
|
||||
for (InspectionTask inspectionTask : inspectionTaskMapper.getTaskByCheckTag("ADDRESS", address.getAddressTags())) {
|
||||
InspectionTarget exist = inspectionTargetMapper.selectOne(Wrappers.<InspectionTarget>lambdaQuery().eq(InspectionTarget::getTargetCode, address.getAddressCode()).eq(InspectionTarget::getTaskId, inspectionTask.getId()));
|
||||
if (exist == null) {
|
||||
InspectionTarget inspectionTarget = new InspectionTarget();
|
||||
inspectionTarget = updateInspectionTarget(inspectionTarget, address);
|
||||
inspectionTarget.setTaskId(inspectionTask.getId());
|
||||
inspectionTargetMapper.insert(inspectionTarget);
|
||||
} else {
|
||||
exist = updateInspectionTarget(exist, address);
|
||||
exist.setTaskId(inspectionTask.getId());
|
||||
inspectionTargetMapper.updateById(exist);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private InspectionTarget updateInspectionTarget(InspectionTarget inspectionTarget, Address address) {
|
||||
inspectionTarget.setFlagActive(1);
|
||||
inspectionTarget.setCategory("ADDRESS");
|
||||
inspectionTarget.setDataSource("1");
|
||||
inspectionTarget.setTargetName(address.getSourceAddress());
|
||||
inspectionTarget.setTargetAddress(address.getSourceAddress());
|
||||
inspectionTarget.setTargetCode(address.getAddressCode());
|
||||
inspectionTarget.setTargetAlias(address.getSourceAddress());
|
||||
inspectionTarget.setOid(address.getOid());
|
||||
inspectionTarget.setRemark(address.getRemark());
|
||||
inspectionTarget.setTagIdList(address.getAddressTags());
|
||||
return inspectionTarget;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.codvision.auth.entity.vo.OrgVO;
|
||||
import com.codvision.auth.mapper.OrgMapper;
|
||||
import com.codvision.authcore.bean.SysUserBean;
|
||||
import com.codvision.authcore.util.AuthUtil;
|
||||
import com.codvision.basic.entity.Enterprise;
|
||||
import com.codvision.basic.entity.inspection.InspectionTarget;
|
||||
import com.codvision.basic.entity.inspection.InspectionTask;
|
||||
import com.codvision.basic.entity.vo.EnterpriseVO;
|
||||
import com.codvision.basic.mapper.EnterpriseMapper;
|
||||
import com.codvision.basic.mapper.inspection.InspectionTargetMapper;
|
||||
import com.codvision.basic.mapper.inspection.InspectionTaskMapper;
|
||||
import com.codvision.basic.service.EnterpriseService;
|
||||
import com.codvision.commoncore.exception.BusinessException;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import com.codvision.webcore.util.QueryPageUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class EnterpriseServiceImpl extends ServiceImpl<EnterpriseMapper, Enterprise> implements EnterpriseService {
|
||||
|
||||
private final OrgMapper orgMapper;
|
||||
private final InspectionTaskMapper inspectionTaskMapper;
|
||||
private final InspectionTargetMapper inspectionTargetMapper;
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("all")
|
||||
public IPage<EnterpriseVO> getPageResult(QueryPage<Map<String, Object>> queryPage) {
|
||||
SysUserBean currentUser = AuthUtil.getCurrentUser();
|
||||
Map<String, Object> paraMap = QueryPageUtil.queryMap(queryPage);
|
||||
if (!paraMap.containsKey("oid") || paraMap.get("oid") == null) {
|
||||
paraMap.put("oid", currentUser.getActiveOid());
|
||||
}
|
||||
return getBaseMapper().getPageResult(queryPage.getPage(), paraMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void addEnterprise(Enterprise enterprise) {
|
||||
if (getBaseMapper().countEnterpriseByCreditCode(enterprise) > 0) {
|
||||
throw new BusinessException("该统一社会信用代码已存在,请勿重复录入!");
|
||||
}
|
||||
updateDistrict(enterprise);
|
||||
addInspectionTarget(enterprise);
|
||||
getBaseMapper().insert(enterprise);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateEnterprise(Enterprise enterprise) {
|
||||
if (getBaseMapper().countEnterpriseByCreditCode(enterprise) > 0) {
|
||||
throw new BusinessException("该统一社会信用代码已存在,请勿重复录入!");
|
||||
}
|
||||
updateDistrict(enterprise);
|
||||
addInspectionTarget(enterprise);
|
||||
getBaseMapper().updateById(enterprise);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据所选组织查询行政区划编码,更新行政地区信息
|
||||
* @param enterprise 企业信息
|
||||
*/
|
||||
public void updateDistrict(Enterprise enterprise) {
|
||||
OrgVO orgVO = orgMapper.getByOid(enterprise.getOid());
|
||||
if (orgVO == null || StringUtils.isEmpty(orgVO.getDistrictCode())) {
|
||||
return;
|
||||
}
|
||||
String[] split = orgVO.getPath().split("/");
|
||||
if (orgVO.getDistrictCode().length() == 15) {
|
||||
// 网格级别
|
||||
enterprise.setGridCode(orgVO.getDistrictCode());
|
||||
for (int i = split.length - 1; i >= 0; i--) {
|
||||
if (i == split.length - 1) {
|
||||
enterprise.setGrid(split[i]);
|
||||
} else if (i == split.length - 2) {
|
||||
enterprise.setCommunity(split[i]);
|
||||
} else if (i == split.length - 3) {
|
||||
enterprise.setTown(split[i]);
|
||||
} else if (i == split.length - 4) {
|
||||
enterprise.setCounty(split[i]);
|
||||
} else if (i == split.length - 5) {
|
||||
enterprise.setCity(split[i]);
|
||||
}
|
||||
}
|
||||
} else if (orgVO.getDistrictCode().length() == 12) {
|
||||
// 社区
|
||||
for (int i = split.length - 1; i >= 0; i--) {
|
||||
if (i == split.length - 1) {
|
||||
enterprise.setCommunity(split[i]);
|
||||
} else if (i == split.length - 2) {
|
||||
enterprise.setTown(split[i]);
|
||||
} else if (i == split.length - 3) {
|
||||
enterprise.setCounty(split[i]);
|
||||
} else if (i == split.length - 4) {
|
||||
enterprise.setCity(split[i]);
|
||||
}
|
||||
}
|
||||
} else if (orgVO.getDistrictCode().length() == 9) {
|
||||
// 镇街
|
||||
for (int i = split.length - 1; i >= 0; i--) {
|
||||
if (i == split.length - 1) {
|
||||
enterprise.setTown(split[i]);
|
||||
} else if (i == split.length - 2) {
|
||||
enterprise.setCounty(split[i]);
|
||||
} else if (i == split.length - 3) {
|
||||
enterprise.setCity(split[i]);
|
||||
}
|
||||
}
|
||||
} else if (orgVO.getDistrictCode().length() == 6) {
|
||||
// 区县
|
||||
for (int i = split.length - 1; i >= 0; i--) {
|
||||
if (i == split.length - 1) {
|
||||
enterprise.setCounty(split[i]);
|
||||
} else if (i == split.length - 2) {
|
||||
enterprise.setCity(split[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否新增检查对象
|
||||
* @param enterprise 企业信息
|
||||
*/
|
||||
private void addInspectionTarget(Enterprise enterprise) {
|
||||
if (StringUtils.isEmpty(enterprise.getEnterpriseTags())) {
|
||||
return;
|
||||
}
|
||||
for (InspectionTask inspectionTask : inspectionTaskMapper.getTaskByCheckTag("ENTERPRISE", enterprise.getEnterpriseTags())) {
|
||||
InspectionTarget exist = inspectionTargetMapper.selectOne(Wrappers.<InspectionTarget>lambdaQuery().eq(InspectionTarget::getTaskId, inspectionTask.getId()).eq(InspectionTarget::getTargetCode, enterprise.getCreditCode()));
|
||||
if (exist == null) {
|
||||
InspectionTarget inspectionTarget = new InspectionTarget();
|
||||
inspectionTarget = updateInspectionTarget(inspectionTarget, enterprise);
|
||||
inspectionTarget.setTaskId(inspectionTask.getId());
|
||||
inspectionTargetMapper.insert(inspectionTarget);
|
||||
} else {
|
||||
exist = updateInspectionTarget(exist, enterprise);
|
||||
exist.setTaskId(inspectionTask.getId());
|
||||
inspectionTargetMapper.updateById(exist);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public InspectionTarget updateInspectionTarget(InspectionTarget inspectionTarget, Enterprise enterprise) {
|
||||
inspectionTarget.setFlagActive(1);
|
||||
inspectionTarget.setCategory("ENTERPRISE");
|
||||
inspectionTarget.setDataSource("1");
|
||||
inspectionTarget.setTargetName(enterprise.getName());
|
||||
inspectionTarget.setTargetCode(enterprise.getCreditCode());
|
||||
inspectionTarget.setTargetAddress(enterprise.getSourceAddress());
|
||||
inspectionTarget.setTargetAlias(enterprise.getName());
|
||||
inspectionTarget.setOid(enterprise.getOid());
|
||||
inspectionTarget.setRemark(enterprise.getRemark());
|
||||
inspectionTarget.setTagIdList(enterprise.getEnterpriseTags());
|
||||
inspectionTarget.setLegalPersonName(enterprise.getLegalPersonName());
|
||||
inspectionTarget.setLegalPersonPhone(enterprise.getLegalPersonPhone());
|
||||
return inspectionTarget;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.codvision.basic.entity.Person;
|
||||
import com.codvision.basic.entity.PersonAddressRelation;
|
||||
import com.codvision.basic.entity.dto.PersonAddressRelationDTO;
|
||||
import com.codvision.basic.entity.vo.PersonAddressRelationVO;
|
||||
import com.codvision.basic.mapper.PersonAddressRelationMapper;
|
||||
import com.codvision.basic.mapper.PersonMapper;
|
||||
import com.codvision.basic.service.PersonAddressRelationService;
|
||||
import com.codvision.commoncore.utils.Preconditions;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import com.codvision.webcore.util.QueryPageUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class PersonAddressRelationServiceImpl extends ServiceImpl<PersonAddressRelationMapper, PersonAddressRelation> implements PersonAddressRelationService {
|
||||
|
||||
private final PersonMapper personMapper;
|
||||
|
||||
@Override
|
||||
public IPage<PersonAddressRelationVO> getPageResult(QueryPage<Map<String, Object>> queryPage) {
|
||||
Map<String, Object> paraMap = QueryPageUtil.queryMap(queryPage);
|
||||
String flagRelated = (String) paraMap.get("flagRelated");
|
||||
if (StringUtils.isBlank(flagRelated)) {
|
||||
paraMap.put("flagRelated", "1");
|
||||
}
|
||||
return getBaseMapper().getPageResult(queryPage.getPage(), paraMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void add(PersonAddressRelationDTO personAddressRelationDto) {
|
||||
if (personAddressRelationDto.getPersonId() == null) {
|
||||
// 如果人员未新增需要先新增人员
|
||||
Person person = Person.builder().idType(personAddressRelationDto.getIdType()).idCard(personAddressRelationDto.getIdCard())
|
||||
.phone(personAddressRelationDto.getPhone()).name(personAddressRelationDto.getName())
|
||||
.sex(personAddressRelationDto.getSex()).personTags(personAddressRelationDto.getPersonTags())
|
||||
.personType(personAddressRelationDto.getPersonType()).oid(personAddressRelationDto.getOid())
|
||||
.age(personAddressRelationDto.getAge())
|
||||
.nativePlace(personAddressRelationDto.getNativePlace()).build();
|
||||
personMapper.insert(person);
|
||||
personAddressRelationDto.setPersonId(person.getId());
|
||||
}
|
||||
|
||||
Long count = getBaseMapper().selectCount(Wrappers.<PersonAddressRelation>lambdaQuery()
|
||||
.eq(PersonAddressRelation::getPersonId, personAddressRelationDto.getPersonId())
|
||||
.eq(PersonAddressRelation::getAddressId, personAddressRelationDto.getAddressId())
|
||||
.eq(PersonAddressRelation::getFlagRelated, '1'));
|
||||
Preconditions.checkArgument(count <= 0, "该人员和该户室已绑定,请勿重复绑定!");
|
||||
|
||||
PersonAddressRelation personAddressRelation = PersonAddressRelation.builder().addressId(personAddressRelationDto.getAddressId())
|
||||
.personId(personAddressRelationDto.getPersonId()).householderRelation(personAddressRelationDto.getHouseholderRelation())
|
||||
.personAddressRelation(personAddressRelationDto.getPersonAddressRelation()).flagRelated("1")
|
||||
.addressCode(personAddressRelationDto.getAddressCode()).idType(personAddressRelationDto.getIdType())
|
||||
.idCard(personAddressRelationDto.getIdCard()).build();
|
||||
getBaseMapper().insert(personAddressRelation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void moveOut(List<Integer> ids) {
|
||||
getBaseMapper().moveOut(ids);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,412 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.service.impl;
|
||||
|
||||
import cn.hutool.core.lang.Validator;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.extra.spring.SpringUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.excel.EasyExcel;
|
||||
import com.alibaba.excel.context.AnalysisContext;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
|
||||
import com.codvision.auth.entity.Org;
|
||||
import com.codvision.auth.entity.excel.PersonExcel;
|
||||
import com.codvision.auth.mapper.OrgMapper;
|
||||
import com.codvision.authcore.bean.SysUserBean;
|
||||
import com.codvision.authcore.util.AuthUtil;
|
||||
import com.codvision.base.config.excel.AbstractExportClass;
|
||||
import com.codvision.base.config.excel.ExcelDataReadListener;
|
||||
import com.codvision.base.entity.ExcelCheck;
|
||||
import com.codvision.base.entity.ExcelErrorRecord;
|
||||
import com.codvision.base.entity.SysDictItem;
|
||||
import com.codvision.base.entity.SysTag;
|
||||
import com.codvision.base.mapper.SysDictItemMapper;
|
||||
import com.codvision.base.mapper.SysTagMapper;
|
||||
import com.codvision.basic.entity.Person;
|
||||
import com.codvision.basic.entity.PersonAddressRelation;
|
||||
import com.codvision.basic.entity.inspection.InspectionTarget;
|
||||
import com.codvision.basic.entity.inspection.InspectionTask;
|
||||
import com.codvision.basic.entity.vo.PersonCountVO;
|
||||
import com.codvision.basic.entity.vo.PersonPortraitVO;
|
||||
import com.codvision.basic.entity.vo.PersonVO;
|
||||
import com.codvision.basic.mapper.PersonAddressRelationMapper;
|
||||
import com.codvision.basic.mapper.PersonMapper;
|
||||
import com.codvision.basic.mapper.inspection.InspectionTargetMapper;
|
||||
import com.codvision.basic.mapper.inspection.InspectionTaskMapper;
|
||||
import com.codvision.basic.service.PersonService;
|
||||
import com.codvision.commoncore.exception.BusinessException;
|
||||
import com.codvision.commoncore.utils.Preconditions;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import com.codvision.webcore.util.QueryPageUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.SneakyThrows;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import static com.codvision.basic.constant.BasicConstant.BIRTHDAY_REGEX;
|
||||
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class PersonServiceImpl extends ServiceImpl<PersonMapper, Person> implements PersonService {
|
||||
|
||||
private final OrgMapper orgMapper;
|
||||
private final SysTagMapper sysTagMapper;
|
||||
private final SysDictItemMapper sysDictItemMapper;
|
||||
private final PersonAddressRelationMapper relationMapper;
|
||||
private final InspectionTaskMapper inspectionTaskMapper;
|
||||
private final InspectionTargetMapper inspectionTargetMapper;
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("all")
|
||||
public IPage<PersonVO> getPageResult(QueryPage<Map<String, Object>> queryPage) {
|
||||
SysUserBean currentUser = AuthUtil.getCurrentUser();
|
||||
Map<String, Object> paraMap = QueryPageUtil.queryMap(queryPage);
|
||||
if (!paraMap.containsKey("oid") || paraMap.get("oid") == null) {
|
||||
paraMap.put("oid", currentUser.getActiveOid());
|
||||
}
|
||||
return getBaseMapper().getPageResult(queryPage.getPage(), paraMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PersonVO details(Integer id) {
|
||||
return getBaseMapper().details(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(Person person) {
|
||||
LambdaQueryWrapper<Person> queryWrapper = Wrappers.<Person>lambdaQuery().eq(Person::getIdType, person.getIdType()).eq(Person::getIdCard, person.getIdCard());
|
||||
Long count = getBaseMapper().selectCount(queryWrapper);
|
||||
Preconditions.checkArgument(count <= 0, "该人员已录入请勿重复录入!");
|
||||
addInspectionTarget(person);
|
||||
getBaseMapper().insert(person);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateById(Person entity) {
|
||||
addInspectionTarget(entity);
|
||||
return SqlHelper.retBool(getBaseMapper().updateById(entity));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void batchLogicDel(List<Integer> personIds) {
|
||||
// 根据人员删除关系
|
||||
for (Integer personId : personIds) {
|
||||
relationMapper.delete(Wrappers.<PersonAddressRelation>lambdaQuery().eq(PersonAddressRelation::getPersonId, personId));
|
||||
}
|
||||
|
||||
getBaseMapper().deleteBatchIds(personIds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PersonCountVO getPersonCount(String addressCode, String addressType) {
|
||||
if ("4".equals(addressType)) {
|
||||
return getBaseMapper().getPersonCountByPark(addressCode);
|
||||
} else if ("1".equals(addressType)) {
|
||||
return getBaseMapper().getPersonCountByBuilding(addressCode);
|
||||
}
|
||||
return getBaseMapper().getPersonCountByHouse(addressCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<PersonVO> getPersonListByAddressCode(QueryPage<Map<String, Object>> queryPage) {
|
||||
Map<String, Object> paraMap = QueryPageUtil.queryMap(queryPage);
|
||||
String addressCodes = (String) paraMap.get("addressCodes");
|
||||
return getBaseMapper().getPersonListByAddressCode(queryPage.getPage(), addressCodes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 群体画像
|
||||
*
|
||||
* @param personIds 人员id
|
||||
* @return List<PersonPortraitVo>
|
||||
*/
|
||||
@Override
|
||||
public List<PersonPortraitVO> getPersonPortrait(List<Integer> personIds) {
|
||||
List<PersonPortraitVO> personPortraitVoList = new ArrayList<>();
|
||||
// 性别统计
|
||||
PersonPortraitVO sexPortrait = PersonPortraitVO.builder().type("PERSON_SEX").label("性别")
|
||||
.personPortraitVoList(getBaseMapper().getSexCount(personIds)).build();
|
||||
personPortraitVoList.add(sexPortrait);
|
||||
// 年龄统计
|
||||
Map<String, Object> sexAndAge = getBaseMapper().getAgeCount(personIds);
|
||||
List<PersonPortraitVO> agePortraitVoList = new ArrayList<>();
|
||||
agePortraitVoList.add(PersonPortraitVO.builder().type("AGE").label("0-10").num(Integer.parseInt(sexAndAge.get("age_zero_ten").toString())).build());
|
||||
agePortraitVoList.add(PersonPortraitVO.builder().type("AGE").label("10-20").num(Integer.parseInt(sexAndAge.get("age_ten_twenty").toString())).build());
|
||||
agePortraitVoList.add(PersonPortraitVO.builder().type("AGE").label("20-30").num(Integer.parseInt(sexAndAge.get("age_twenty_thirty").toString())).build());
|
||||
agePortraitVoList.add(PersonPortraitVO.builder().type("AGE").label("30-40").num(Integer.parseInt(sexAndAge.get("age_thirty_forty").toString())).build());
|
||||
agePortraitVoList.add(PersonPortraitVO.builder().type("AGE").label("40-50").num(Integer.parseInt(sexAndAge.get("age_forty_fifty").toString())).build());
|
||||
agePortraitVoList.add(PersonPortraitVO.builder().type("AGE").label("50-60").num(Integer.parseInt(sexAndAge.get("age_fifty_sixty").toString())).build());
|
||||
agePortraitVoList.add(PersonPortraitVO.builder().type("AGE").label("60-70").num(Integer.parseInt(sexAndAge.get("age_sixty_seventy").toString())).build());
|
||||
agePortraitVoList.add(PersonPortraitVO.builder().type("AGE").label("70-80").num(Integer.parseInt(sexAndAge.get("age_seventy_eighty").toString())).build());
|
||||
agePortraitVoList.add(PersonPortraitVO.builder().type("AGE").label("80-90").num(Integer.parseInt(sexAndAge.get("age_eighty_ninety").toString())).build());
|
||||
agePortraitVoList.add(PersonPortraitVO.builder().type("AGE").label("90-100").num(Integer.parseInt(sexAndAge.get("age_ninety_hundred").toString())).build());
|
||||
PersonPortraitVO agePortrait = PersonPortraitVO.builder().type("AGE").label("年龄")
|
||||
.personPortraitVoList(agePortraitVoList).build();
|
||||
personPortraitVoList.add(agePortrait);
|
||||
// 文化程度统计
|
||||
PersonPortraitVO educationPortrait = PersonPortraitVO.builder().type("EDUCATION").label("文化程度")
|
||||
.personPortraitVoList(getBaseMapper().getEducationCount(personIds)).build();
|
||||
personPortraitVoList.add(educationPortrait);
|
||||
// 婚姻状况
|
||||
PersonPortraitVO maritalPortrait = PersonPortraitVO.builder().type("MARITAL_STATUS").label("婚姻状况")
|
||||
.personPortraitVoList(getBaseMapper().getMaritalCount(personIds)).build();
|
||||
personPortraitVoList.add(maritalPortrait);
|
||||
// 人口类型
|
||||
PersonPortraitVO personTypePortrait = PersonPortraitVO.builder().type("PERSON_TYPE").label("人口类型")
|
||||
.personPortraitVoList(getBaseMapper().getPersonTypeCount(personIds)).build();
|
||||
personPortraitVoList.add(personTypePortrait);
|
||||
|
||||
// 人员标签
|
||||
PersonPortraitVO personTagPortrait = PersonPortraitVO.builder().type("PERSON_TAGS").label("人员标签")
|
||||
.personPortraitVoList(getBaseMapper().getPersonTagCount(personIds)).build();
|
||||
personPortraitVoList.add(personTagPortrait);
|
||||
|
||||
return personPortraitVoList;
|
||||
}
|
||||
|
||||
@SneakyThrows
|
||||
@Override
|
||||
public String excelImport(MultipartFile file) {
|
||||
String reqNo = IdUtil.fastSimpleUUID();
|
||||
ExcelDataReadListener<PersonExcel> listener = new ExcelDataReadListener<PersonExcel>(SpringUtil.getBean(PersonServiceImpl.class)::excelSave) {
|
||||
@Override
|
||||
protected void validator(PersonExcel personExcel, ExcelCheck<PersonExcel> check, AnalysisContext context) {
|
||||
checkOne(reqNo, personExcel, check, context.readRowHolder().getRowIndex());
|
||||
}
|
||||
};
|
||||
EasyExcel.read(file.getInputStream(), PersonExcel.class, listener).sheet().doRead();
|
||||
if (listener.isHeadAbnormal()) {
|
||||
throw new BusinessException("文件格式错误,请检查导入模板");
|
||||
}
|
||||
|
||||
return listener.existErrorData() ? reqNo : null;
|
||||
}
|
||||
|
||||
private void checkOne(String reqNo, PersonExcel personExcel, ExcelCheck<PersonExcel> check, Integer rowIndex) {
|
||||
Map<String, Object> fieldsErrorMap = new HashMap<>(16);
|
||||
if (StringUtils.isBlank(personExcel.getName())) {
|
||||
fieldsErrorMap.put("name", "姓名必填");
|
||||
}
|
||||
if (StringUtils.isBlank(personExcel.getOrgPath())) {
|
||||
fieldsErrorMap.put("orgPath", "所属组织必填");
|
||||
} else {
|
||||
Org org = orgMapper.getOrgByPath(personExcel.getOrgPath());
|
||||
if (org == null) {
|
||||
fieldsErrorMap.put("orgPath", "系统内无相关组织信息");
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(personExcel.getSex())) {
|
||||
fieldsErrorMap.put("sex", "性别必填");
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(personExcel.getAge())) {
|
||||
fieldsErrorMap.put("age", "年龄必填");
|
||||
} else {
|
||||
if (!NumberUtil.isNumber(personExcel.getAge())) {
|
||||
fieldsErrorMap.put("age", "年龄输入不正确");
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(personExcel.getPhone())) {
|
||||
fieldsErrorMap.put("phone", "联系电话必填");
|
||||
} else {
|
||||
if (!Validator.isMobile(personExcel.getPhone())) {
|
||||
fieldsErrorMap.put("phone", "联系电话格式不正确");
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(personExcel.getIdType())) {
|
||||
fieldsErrorMap.put("idType", "证件类型必填");
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(personExcel.getIdCard())) {
|
||||
fieldsErrorMap.put("idCard", "证件号码必填");
|
||||
}
|
||||
|
||||
// 校验是否已存在
|
||||
if (StringUtils.isNotEmpty(personExcel.getIdType()) && StringUtils.isNotEmpty(personExcel.getIdCard())) {
|
||||
LambdaQueryWrapper<SysDictItem> wrapper = Wrappers.<SysDictItem>lambdaQuery()
|
||||
.eq(SysDictItem::getDictType, "ID_TYPE").eq(SysDictItem::getLabel, personExcel.getIdType());
|
||||
SysDictItem idType = sysDictItemMapper.selectOne(wrapper);
|
||||
LambdaQueryWrapper<Person> queryWrapper = Wrappers.<Person>lambdaQuery().eq(Person::getIdType, idType.getItemValue()).eq(Person::getIdCard, personExcel.getIdCard());
|
||||
Long count = getBaseMapper().selectCount(queryWrapper);
|
||||
if (count > 0) {
|
||||
fieldsErrorMap.put("idCard", "该人员已存在系统,请勿重复录入");
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(personExcel.getPersonType())) {
|
||||
fieldsErrorMap.put("personType", "人口类型必填");
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(personExcel.getNativePlace())) {
|
||||
fieldsErrorMap.put("nativePlace", "籍贯必填");
|
||||
}
|
||||
|
||||
if (StringUtils.isNotEmpty(personExcel.getBirthday()) && !Pattern.compile(BIRTHDAY_REGEX).matcher(personExcel.getBirthday()).matches()) {
|
||||
fieldsErrorMap.put("birthday", "出生日期格式不正确,应为yyyy-MM-dd格式");
|
||||
}
|
||||
|
||||
if (fieldsErrorMap.isEmpty()) {
|
||||
check.getCacheList().add(personExcel);
|
||||
} else {
|
||||
ExcelErrorRecord record = new ExcelErrorRecord();
|
||||
record.setReqNo(reqNo);
|
||||
record.setRowIndex(rowIndex);
|
||||
record.setOriginalJsonValue(JSONUtil.toJsonStr(personExcel));
|
||||
record.setErrorMsgJson(JSONUtil.toJsonStr(fieldsErrorMap));
|
||||
record.setTargetObject(personExcel.getClass().getName());
|
||||
check.getErrorList().add(record);
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void excelSave(List<PersonExcel> cachedDataList) {
|
||||
if (CollectionUtils.isNotEmpty(cachedDataList)) {
|
||||
for (PersonExcel personExcel : cachedDataList) {
|
||||
|
||||
// 校验是否已存在/过滤掉同一个excel中存在证件类型和证件号码相同的人员信息
|
||||
if (StringUtils.isNotEmpty(personExcel.getIdType()) && StringUtils.isNotEmpty(personExcel.getIdCard())) {
|
||||
LambdaQueryWrapper<SysDictItem> wrapper = Wrappers.<SysDictItem>lambdaQuery()
|
||||
.eq(SysDictItem::getDictType, "ID_TYPE").eq(SysDictItem::getLabel, personExcel.getIdType());
|
||||
SysDictItem idType = sysDictItemMapper.selectOne(wrapper);
|
||||
LambdaQueryWrapper<Person> queryWrapper = Wrappers.<Person>lambdaQuery().eq(Person::getIdType, idType.getItemValue()).eq(Person::getIdCard, personExcel.getIdCard());
|
||||
Long count = getBaseMapper().selectCount(queryWrapper);
|
||||
if (count > 0) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
Org org = orgMapper.getOrgByPath(personExcel.getOrgPath());
|
||||
SysDictItem personSex = sysDictItemMapper.selectOne(Wrappers.<SysDictItem>lambdaQuery().eq(SysDictItem::getDictType, "PERSON_SEX").eq(SysDictItem::getLabel, personExcel.getSex()));
|
||||
SysDictItem idType = sysDictItemMapper.selectOne(Wrappers.<SysDictItem>lambdaQuery().eq(SysDictItem::getDictType, "ID_TYPE").eq(SysDictItem::getLabel, personExcel.getIdType()));
|
||||
SysDictItem personType = sysDictItemMapper.selectOne(Wrappers.<SysDictItem>lambdaQuery().eq(SysDictItem::getDictType, "PERSON_TYPE").eq(SysDictItem::getLabel, personExcel.getPersonType()));
|
||||
|
||||
Person person = Person.builder().name(personExcel.getName()).usedName(personExcel.getUsedName()).oid(org.getOid())
|
||||
.sex(personSex.getItemValue()).age(Integer.parseInt(personExcel.getAge()))
|
||||
.phone(personExcel.getPhone()).idType(idType.getItemValue()).idCard(personExcel.getIdCard())
|
||||
.personType(personType.getItemValue()).nativePlace(personExcel.getNativePlace())
|
||||
.birthday(personExcel.getBirthday()).inhabitedAddress(personExcel.getInhabitedAddress())
|
||||
.residenceAddress(personExcel.getResidenceAddress()).remark(personExcel.getRemark()).build();
|
||||
// 民族
|
||||
if (StringUtils.isNotEmpty(personExcel.getNation())) {
|
||||
SysDictItem nation = sysDictItemMapper.selectOne(Wrappers.<SysDictItem>lambdaQuery().eq(SysDictItem::getDictType, "NATION").eq(SysDictItem::getLabel, personExcel.getNation()));
|
||||
person.setNation(nation.getItemValue());
|
||||
}
|
||||
// 文化程度
|
||||
if (StringUtils.isNotEmpty(personExcel.getEducation())) {
|
||||
SysDictItem education = sysDictItemMapper.selectOne(Wrappers.<SysDictItem>lambdaQuery().eq(SysDictItem::getDictType, "EDUCATION").eq(SysDictItem::getLabel, personExcel.getEducation()));
|
||||
person.setEducation(education.getItemValue());
|
||||
}
|
||||
// 人员标签
|
||||
if (StringUtils.isNotEmpty(personExcel.getPersonTags())) {
|
||||
SysTag personTag = sysTagMapper.selectOne(Wrappers.<SysTag>lambdaQuery().eq(SysTag::getTagName, personExcel.getPersonTags()).eq(SysTag::getDictItemValue, "PERSON"));
|
||||
person.setPersonTags(String.valueOf(personTag.getId()));
|
||||
}
|
||||
// 国籍
|
||||
if (StringUtils.isNotEmpty(personExcel.getNationality())) {
|
||||
SysDictItem nationality = sysDictItemMapper.selectOne(Wrappers.<SysDictItem>lambdaQuery().eq(SysDictItem::getDictType, "NATIONALITY").eq(SysDictItem::getLabel, personExcel.getNationality()));
|
||||
person.setNationality(nationality.getItemValue());
|
||||
}
|
||||
// 婚姻状况
|
||||
if (StringUtils.isNotEmpty(personExcel.getMaritalStatus())) {
|
||||
SysDictItem maritalStatus = sysDictItemMapper.selectOne(Wrappers.<SysDictItem>lambdaQuery().eq(SysDictItem::getDictType, "MARITAL_STATUS").eq(SysDictItem::getLabel, personExcel.getMaritalStatus()));
|
||||
person.setMaritalStatus(maritalStatus.getItemValue());
|
||||
}
|
||||
// 政治面貌
|
||||
if (StringUtils.isNotEmpty(personExcel.getPoliticFace())) {
|
||||
SysDictItem politicFace = sysDictItemMapper.selectOne(Wrappers.<SysDictItem>lambdaQuery().eq(SysDictItem::getDictType, "POLITIC_FACE").eq(SysDictItem::getLabel, personExcel.getPoliticFace()));
|
||||
person.setPoliticFace(politicFace.getItemValue());
|
||||
}
|
||||
// 兵役状况
|
||||
if (StringUtils.isNotEmpty(personExcel.getMilitaryStatus())) {
|
||||
SysDictItem militaryStatus = sysDictItemMapper.selectOne(Wrappers.<SysDictItem>lambdaQuery().eq(SysDictItem::getDictType, "MILITARY_STATUS").eq(SysDictItem::getLabel, personExcel.getMilitaryStatus()));
|
||||
person.setMilitaryStatus(militaryStatus.getItemValue());
|
||||
}
|
||||
// 宗教信仰
|
||||
if (StringUtils.isNotEmpty(personExcel.getReligious())) {
|
||||
SysDictItem religious = sysDictItemMapper.selectOne(Wrappers.<SysDictItem>lambdaQuery().eq(SysDictItem::getDictType, "RELIGIOUS").eq(SysDictItem::getLabel, personExcel.getReligious()));
|
||||
person.setReligious(religious.getItemValue());
|
||||
}
|
||||
getBaseMapper().insert(person);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出人员信息
|
||||
*
|
||||
* @param paramMap 查询条件
|
||||
*/
|
||||
@Override
|
||||
public void excelExport(Map<String, Object> paramMap) {
|
||||
new AbstractExportClass<PersonExcel, Object>() {
|
||||
@Override
|
||||
protected List<PersonExcel> getList(QueryPage<Object> queryPage, Object queryBean) {
|
||||
IPage<PersonExcel> personExcelIPage = getBaseMapper().excelExport(queryPage.getPage(), paramMap);
|
||||
return personExcelIPage.getRecords();
|
||||
}
|
||||
}.excelUser("人员信息表", null, PersonExcel.class);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否新增检查对象
|
||||
* @param person 人员信息
|
||||
*/
|
||||
private void addInspectionTarget(Person person) {
|
||||
if (StringUtils.isEmpty(person.getPersonTags())) {
|
||||
return;
|
||||
}
|
||||
for (InspectionTask inspectionTask : inspectionTaskMapper.getTaskByCheckTag("PERSON", person.getPersonTags())) {
|
||||
InspectionTarget exist = inspectionTargetMapper.selectOne(Wrappers.<InspectionTarget>lambdaQuery().eq(InspectionTarget::getTargetCode, person.getIdCard()).eq(InspectionTarget::getTaskId, inspectionTask.getId()));
|
||||
if (exist == null) {
|
||||
InspectionTarget inspectionTarget = new InspectionTarget();
|
||||
inspectionTarget = updateInspectionTarget(inspectionTarget, person);
|
||||
inspectionTargetMapper.insert(inspectionTarget);
|
||||
} else {
|
||||
exist = updateInspectionTarget(exist, person);
|
||||
exist.setTaskId(inspectionTask.getId());
|
||||
inspectionTargetMapper.updateById(exist);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public InspectionTarget updateInspectionTarget(InspectionTarget inspectionTarget, Person person) {
|
||||
inspectionTarget.setFlagActive(1);
|
||||
inspectionTarget.setCategory("PERSON");
|
||||
inspectionTarget.setDataSource("1");
|
||||
inspectionTarget.setTargetName(person.getName());
|
||||
inspectionTarget.setTargetCode(person.getIdCard());
|
||||
inspectionTarget.setTargetAddress(person.getInhabitedAddress());
|
||||
inspectionTarget.setTargetAlias(person.getUsedName());
|
||||
inspectionTarget.setOid(person.getOid());
|
||||
inspectionTarget.setRemark(person.getRemark());
|
||||
inspectionTarget.setMobile(person.getPhone());
|
||||
inspectionTarget.setTagIdList(person.getPersonTags());
|
||||
return inspectionTarget;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.codvision.auth.entity.vo.OrgVO;
|
||||
import com.codvision.auth.mapper.OrgMapper;
|
||||
import com.codvision.authcore.bean.SysUserBean;
|
||||
import com.codvision.authcore.util.AuthUtil;
|
||||
import com.codvision.basic.entity.SocialOrg;
|
||||
import com.codvision.basic.entity.vo.SocialOrgVO;
|
||||
import com.codvision.basic.mapper.SocialOrgMapper;
|
||||
import com.codvision.basic.service.SocialOrgService;
|
||||
import com.codvision.commoncore.exception.BusinessException;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import com.codvision.webcore.util.QueryPageUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author KX
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class SocialOrgServiceImpl extends ServiceImpl<SocialOrgMapper, SocialOrg> implements SocialOrgService {
|
||||
|
||||
private final OrgMapper orgMapper;
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("all")
|
||||
public IPage<SocialOrgVO> getPageResult(QueryPage<Map<String, Object>> queryPage) {
|
||||
SysUserBean currentUser = AuthUtil.getCurrentUser();
|
||||
Map<String, Object> paraMap = QueryPageUtil.queryMap(queryPage);
|
||||
if (!paraMap.containsKey("oid") || paraMap.get("oid") == null) {
|
||||
paraMap.put("oid", currentUser.getActiveOid());
|
||||
}
|
||||
return getBaseMapper().getPageResult(queryPage.getPage(), paraMap);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addSocialOrg(SocialOrg socialOrg) {
|
||||
if (getBaseMapper().countEnterpriseByCreditCode(socialOrg) > 0) {
|
||||
throw new BusinessException("该统一社会信用代码已存在,请勿重复录入!");
|
||||
}
|
||||
updateDistrict(socialOrg);
|
||||
getBaseMapper().insert(socialOrg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSocialOrg(SocialOrg socialOrg) {
|
||||
if (getBaseMapper().countEnterpriseByCreditCode(socialOrg) > 0) {
|
||||
throw new BusinessException("该统一社会信用代码已存在,请勿重复录入!");
|
||||
}
|
||||
updateDistrict(socialOrg);
|
||||
getBaseMapper().updateById(socialOrg);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据所选组织查询行政区划编码,更新行政地区信息
|
||||
*
|
||||
* @param socialOrg 社会组织信息
|
||||
*/
|
||||
public void updateDistrict(SocialOrg socialOrg) {
|
||||
OrgVO orgVO = orgMapper.getByOid(socialOrg.getOid());
|
||||
if (orgVO == null || StringUtils.isEmpty(orgVO.getDistrictCode())) {
|
||||
return;
|
||||
}
|
||||
String[] split = orgVO.getPath().split("/");
|
||||
if (orgVO.getDistrictCode().length() == 15) {
|
||||
// 网格级别
|
||||
socialOrg.setGridCode(orgVO.getDistrictCode());
|
||||
for (int i = split.length - 1; i >= 0; i--) {
|
||||
if (i == split.length - 1) {
|
||||
socialOrg.setGrid(split[i]);
|
||||
} else if (i == split.length - 2) {
|
||||
socialOrg.setCommunity(split[i]);
|
||||
} else if (i == split.length - 3) {
|
||||
socialOrg.setTown(split[i]);
|
||||
} else if (i == split.length - 4) {
|
||||
socialOrg.setCounty(split[i]);
|
||||
} else if (i == split.length - 5) {
|
||||
socialOrg.setCity(split[i]);
|
||||
}
|
||||
}
|
||||
} else if (orgVO.getDistrictCode().length() == 12) {
|
||||
// 社区
|
||||
for (int i = split.length - 1; i >= 0; i--) {
|
||||
if (i == split.length - 1) {
|
||||
socialOrg.setCommunity(split[i]);
|
||||
} else if (i == split.length - 2) {
|
||||
socialOrg.setTown(split[i]);
|
||||
} else if (i == split.length - 3) {
|
||||
socialOrg.setCounty(split[i]);
|
||||
} else if (i == split.length - 4) {
|
||||
socialOrg.setCity(split[i]);
|
||||
}
|
||||
}
|
||||
} else if (orgVO.getDistrictCode().length() == 9) {
|
||||
// 镇街
|
||||
for (int i = split.length - 1; i >= 0; i--) {
|
||||
if (i == split.length - 1) {
|
||||
socialOrg.setTown(split[i]);
|
||||
} else if (i == split.length - 2) {
|
||||
socialOrg.setCounty(split[i]);
|
||||
} else if (i == split.length - 3) {
|
||||
socialOrg.setCity(split[i]);
|
||||
}
|
||||
}
|
||||
} else if (orgVO.getDistrictCode().length() == 6) {
|
||||
// 区县
|
||||
for (int i = split.length - 1; i >= 0; i--) {
|
||||
if (i == split.length - 1) {
|
||||
socialOrg.setCounty(split[i]);
|
||||
} else if (i == split.length - 2) {
|
||||
socialOrg.setCity(split[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.service.impl.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.codvision.basic.entity.inspection.InspectionChecklist;
|
||||
import com.codvision.basic.mapper.inspection.InspectionChecklistMapper;
|
||||
import com.codvision.basic.service.inspection.InspectionChecklistService;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import com.codvision.webcore.util.QueryPageUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@Service
|
||||
public class InspectionChecklistServiceImpl extends ServiceImpl<InspectionChecklistMapper, InspectionChecklist> implements InspectionChecklistService {
|
||||
@Override
|
||||
public IPage<InspectionChecklist> getPageResult(QueryPage<Map<String, Object>> queryPage) {
|
||||
return getBaseMapper().getPageResult(queryPage.getPage(), QueryPageUtil.queryMap(queryPage));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.service.impl.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.codvision.basic.entity.inspection.InspectionInventory;
|
||||
import com.codvision.basic.entity.vo.inspection.InspectionInventoryVO;
|
||||
import com.codvision.basic.mapper.inspection.InspectionChecklistMapper;
|
||||
import com.codvision.basic.mapper.inspection.InspectionInventoryMapper;
|
||||
import com.codvision.basic.service.inspection.InspectionInventoryService;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import com.codvision.webcore.util.QueryPageUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class InspectionInventoryServiceImpl extends ServiceImpl<InspectionInventoryMapper, InspectionInventory> implements InspectionInventoryService {
|
||||
|
||||
private final InspectionChecklistMapper checklistMapper;
|
||||
|
||||
@Override
|
||||
public IPage<InspectionInventoryVO> getPageResult(QueryPage<Map<String, Object>> queryPage) {
|
||||
return getBaseMapper().getPageResult(queryPage.getPage(), QueryPageUtil.queryMap(queryPage));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InspectionInventoryVO> getInspectionClassByTaskId(String keyword, Integer taskId) {
|
||||
Map<String, Object> paraMap = new HashMap<>(16);
|
||||
if (StringUtils.isNotBlank(keyword)) {
|
||||
paraMap.put("keyword", keyword);
|
||||
}
|
||||
if (null != taskId) {
|
||||
paraMap.put("taskId", taskId);
|
||||
}
|
||||
|
||||
List<InspectionInventoryVO> list = getBaseMapper().getInspectionInventoryByTaskId(paraMap);
|
||||
for (InspectionInventoryVO inspectionClass : list) {
|
||||
inspectionClass.setInspectionChecklists(checklistMapper.getByInspectionId(inspectionClass.getId()));
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.service.impl.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.codvision.basic.entity.inspection.InspectionRecordItem;
|
||||
import com.codvision.basic.mapper.inspection.InspectionRecordItemMapper;
|
||||
import com.codvision.basic.service.inspection.InspectionRecordItemService;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import com.codvision.webcore.util.QueryPageUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author codvison
|
||||
*/
|
||||
@Service
|
||||
public class InspectionRecordItemServiceImpl extends ServiceImpl<InspectionRecordItemMapper, InspectionRecordItem> implements InspectionRecordItemService {
|
||||
@Override
|
||||
public IPage<InspectionRecordItem> getPageResult(QueryPage<Map<String, Object>> queryPage) {
|
||||
return getBaseMapper().getPageResult(queryPage.getPage(), QueryPageUtil.queryMap(queryPage));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.service.impl.inspection;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.codvision.basic.entity.inspection.InspectionRecord;
|
||||
import com.codvision.basic.entity.inspection.InspectionRecordItem;
|
||||
import com.codvision.basic.entity.vo.inspection.InspectionRecordVO;
|
||||
import com.codvision.basic.mapper.inspection.InspectionRecordItemMapper;
|
||||
import com.codvision.basic.mapper.inspection.InspectionRecordMapper;
|
||||
import com.codvision.basic.service.inspection.InspectionRecordService;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import com.codvision.webcore.util.QueryPageUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class InspectionRecordServiceImpl extends ServiceImpl<InspectionRecordMapper, InspectionRecord> implements InspectionRecordService {
|
||||
|
||||
private final InspectionRecordItemMapper itemMapper;
|
||||
|
||||
@Override
|
||||
public IPage<InspectionRecordVO> getPageResult(QueryPage<Map<String, Object>> queryPage) {
|
||||
return getBaseMapper().getPageResult(queryPage.getPage(), QueryPageUtil.queryMap(queryPage));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void addInspectRecord(InspectionRecord record, String checklist) {
|
||||
this.save(record);
|
||||
List<InspectionRecordItem> checkItems = JSON.parseArray(checklist, InspectionRecordItem.class);
|
||||
for (InspectionRecordItem item : checkItems) {
|
||||
item.setRecordId(record.getId());
|
||||
itemMapper.insert(item);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public InspectionRecordVO getById(Integer key) {
|
||||
return getBaseMapper().getById(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map> statByTask(Map<String, Object> params) {
|
||||
return getBaseMapper().statByTask(params);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2024 codvision.com All Rights Reserved.
|
||||
*/
|
||||
|
||||
package com.codvision.basic.service.impl.inspection;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.codvision.basic.entity.inspection.InspectionTarget;
|
||||
import com.codvision.basic.entity.vo.inspection.InspectionTargetVO;
|
||||
import com.codvision.basic.mapper.inspection.InspectionTargetMapper;
|
||||
import com.codvision.basic.service.inspection.InspectionTargetService;
|
||||
import com.codvision.webcore.bean.QueryPage;
|
||||
import com.codvision.webcore.util.QueryPageUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author codvision
|
||||
*/
|
||||
@Service
|
||||
public class InspectionTargetServiceImpl extends ServiceImpl<InspectionTargetMapper, InspectionTarget> implements InspectionTargetService {
|
||||
@Override
|
||||
public IPage<InspectionTargetVO> getPageResult(QueryPage<Map<String, Object>> queryPage) {
|
||||
return getBaseMapper().getPageResult(queryPage.getPage(), QueryPageUtil.queryMap(queryPage));
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user