行政责任人导入导出接口, 抽查接口, 列表查询接口,修改接口,包保责任人导入导出接口, 抽查接口, 列表查询接口,修改接口,今日抽查列表查询接口等接口开发
parent
92042ae068
commit
47cf11deca
|
|
@ -4,9 +4,11 @@ import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.whdc.model.dto.ApiDto;
|
import com.whdc.model.dto.ApiDto;
|
||||||
import com.whdc.model.entity.QXWarning;
|
import com.whdc.model.entity.QXWarning;
|
||||||
|
import com.whdc.model.entity.ShAddressBook;
|
||||||
import com.whdc.model.vo.QXWarningVO;
|
import com.whdc.model.vo.QXWarningVO;
|
||||||
import com.whdc.model.vo.WarningData;
|
import com.whdc.model.vo.WarningData;
|
||||||
import com.whdc.service.IQXWarningService;
|
import com.whdc.service.IQXWarningService;
|
||||||
|
import com.whdc.service.ShAddressBookService;
|
||||||
import com.whdc.utils.DateUtils;
|
import com.whdc.utils.DateUtils;
|
||||||
import com.whdc.utils.HttpUtil;
|
import com.whdc.utils.HttpUtil;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|
@ -40,6 +42,9 @@ import static com.whdc.controller.QXWarnController.QX_TEMP_REDIS_KEY;
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class MyPostConstruct {
|
public class MyPostConstruct {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ShAddressBookService shAddressBookService;
|
||||||
|
|
||||||
@Value("${getGroupWarning}")
|
@Value("${getGroupWarning}")
|
||||||
public String getGroupWarning;
|
public String getGroupWarning;
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
|
|
@ -180,4 +185,20 @@ public class MyPostConstruct {
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Async
|
||||||
|
@ApiOperation(value = "恢复山洪负责人抽查状态定时任务", notes = "预警数据同步接口")
|
||||||
|
@GetMapping("/recoveryShAddressBookSpotCheck")
|
||||||
|
@Scheduled(cron = "0 0 0 * * ?")
|
||||||
|
public void recoveryShAddressBookSpotCheck() {
|
||||||
|
boolean update = shAddressBookService.lambdaUpdate()
|
||||||
|
.set(ShAddressBook::getIsSpotCheck, 0)
|
||||||
|
.eq(ShAddressBook::getIsSpotCheck, 1)
|
||||||
|
.update();
|
||||||
|
log.info("恢复山洪负责人抽查状态定时任务执行结果: " + update);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,173 @@
|
||||||
|
package com.whdc.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.whdc.model.entity.ShAddressBook;
|
||||||
|
import com.whdc.model.group.Update;
|
||||||
|
import com.whdc.model.dto.ShAddressBookDto;
|
||||||
|
import com.whdc.service.ShAddressBookService;
|
||||||
|
import com.whdc.utils.ExcelCommon;
|
||||||
|
import com.whdc.utils.ResultJson;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.apache.commons.compress.utils.Lists;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.validation.constraints.Pattern;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述: 山洪责任人通讯录
|
||||||
|
* author: xusan
|
||||||
|
* date: 2024-07-29 17:27:25
|
||||||
|
*/
|
||||||
|
@Tag(name = "山洪责任人通讯录")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(value = "/shAddressBook")
|
||||||
|
public class ShAddressBookController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ShAddressBookService service;
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(summary = "修改")
|
||||||
|
@PostMapping("/update")
|
||||||
|
public ResultJson<ShAddressBook> update(@Validated(Update.class) @RequestBody ShAddressBook dto) {
|
||||||
|
if (Objects.isNull(service.getById(dto.getId()))){
|
||||||
|
throw new RuntimeException("当前数据不存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
dto
|
||||||
|
.setLand(null)
|
||||||
|
.setCity(null)
|
||||||
|
.setCounty(null)
|
||||||
|
.setArea(null)
|
||||||
|
.setVillage(null)
|
||||||
|
.setType2(null)
|
||||||
|
.setType1(null);
|
||||||
|
boolean result = service.updateById(dto);
|
||||||
|
return ResultJson.ok(result ? dto : null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "抽查")
|
||||||
|
@PostMapping("/setSpotCheck")
|
||||||
|
public ResultJson setSpotCheck(@RequestBody List<Integer> ids) {
|
||||||
|
if (CollectionUtils.isEmpty(ids)){
|
||||||
|
throw new RuntimeException("当前选中数据为空");
|
||||||
|
}
|
||||||
|
if (service.lambdaQuery().in(ShAddressBook::getId, ids).count() != ids.size()){
|
||||||
|
throw new RuntimeException("当前选中数据有误");
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean update = service.lambdaUpdate()
|
||||||
|
.set(ShAddressBook::getIsSpotCheck, 1)
|
||||||
|
.in(ShAddressBook::getId, ids)
|
||||||
|
.update();
|
||||||
|
|
||||||
|
return ResultJson.ok(update);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(summary = "分页 (行政责任人分页查询 type1:行政责任人,包保责任人分页查询 type1:包保责任人,今日抽查分页查询 isSpotCheck:1 )")
|
||||||
|
@PostMapping("/page")
|
||||||
|
public ResultJson<Page<ShAddressBook>> page(@RequestBody ShAddressBookDto dto) {
|
||||||
|
|
||||||
|
LambdaQueryChainWrapper<ShAddressBook> query = service.lambdaQuery();
|
||||||
|
|
||||||
|
String type1 = dto.getType1();
|
||||||
|
if (StringUtils.isNotBlank(type1)) {
|
||||||
|
query.eq(ShAddressBook::getType1, type1);
|
||||||
|
}
|
||||||
|
|
||||||
|
String type2 = dto.getType2();
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(type2)) {
|
||||||
|
query.eq(ShAddressBook::getType2, type2);
|
||||||
|
}
|
||||||
|
|
||||||
|
String isSpotCheck = dto.getIsSpotCheck();
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(isSpotCheck)) {
|
||||||
|
query.eq(ShAddressBook::getIsSpotCheck, isSpotCheck);
|
||||||
|
}
|
||||||
|
|
||||||
|
String city = dto.getCity();
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(city)) {
|
||||||
|
query.eq(ShAddressBook::getCity, city);
|
||||||
|
}
|
||||||
|
|
||||||
|
String county = dto.getCounty();
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(county)) {
|
||||||
|
query.eq(ShAddressBook::getCounty, county);
|
||||||
|
}
|
||||||
|
|
||||||
|
String area = dto.getArea();
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(area)) {
|
||||||
|
query.eq(ShAddressBook::getArea, area);
|
||||||
|
}
|
||||||
|
|
||||||
|
String village = dto.getVillage();
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(village)) {
|
||||||
|
query.eq(ShAddressBook::getVillage, village);
|
||||||
|
}
|
||||||
|
|
||||||
|
String name = dto.getName();
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(name)) {
|
||||||
|
query.like(ShAddressBook::getName, name);
|
||||||
|
}
|
||||||
|
|
||||||
|
String land = dto.getLand();
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(land)) {
|
||||||
|
query.like(ShAddressBook::getLand, land);
|
||||||
|
}
|
||||||
|
|
||||||
|
String phone = dto.getPhone();
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(phone)) {
|
||||||
|
query.like(ShAddressBook::getPhone, phone);
|
||||||
|
}
|
||||||
|
|
||||||
|
query.orderByAsc(ShAddressBook::getSort);
|
||||||
|
|
||||||
|
return ResultJson.ok(service.page(dto.getPage(), query));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(summary = "下载模板")
|
||||||
|
@GetMapping("/downloadTemplate")
|
||||||
|
public void downloadTemplate(HttpServletResponse response) {
|
||||||
|
ExcelCommon.exportExcel(Lists.newArrayList(),
|
||||||
|
null, "山洪责任人通讯录", ShAddressBook.class, "山洪责任人通讯录模板.xlsx",
|
||||||
|
response);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "上传")
|
||||||
|
@PostMapping("/upload/{type1}")
|
||||||
|
public ResultJson upload(
|
||||||
|
@PathVariable("type1")
|
||||||
|
@ApiParam(name = "type1", value = "责任人类型, 0:行政责任人,1:包保责任人")
|
||||||
|
@Pattern(message = "仅支持 0 或者 1", regexp = "[01]")
|
||||||
|
String type1,
|
||||||
|
@RequestBody MultipartFile file) {
|
||||||
|
List<ShAddressBook> appends = ExcelCommon.importExcel(file, 0, 1, ShAddressBook.class);
|
||||||
|
service.updateAll(type1, appends);
|
||||||
|
return ResultJson.ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,64 @@
|
||||||
|
package com.whdc.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.whdc.model.entity.ShCallWord;
|
||||||
|
import com.whdc.model.group.Insert;
|
||||||
|
import com.whdc.model.group.Update;
|
||||||
|
import com.whdc.service.ShCallWordService;
|
||||||
|
import com.whdc.utils.ResultJson;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
/**
|
||||||
|
* 描述: 备注
|
||||||
|
* author: xusan
|
||||||
|
* date: 2024-07-29 17:27:25
|
||||||
|
*/
|
||||||
|
@Tag(name = "备注")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(value="/shCallWord")
|
||||||
|
public class ShCallWordController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ShCallWordService service;
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(summary = "新增")
|
||||||
|
@PostMapping("/insert")
|
||||||
|
public ResultJson<ShCallWord> insert(@Validated(Insert.class) @RequestBody ShCallWord dto) {
|
||||||
|
boolean result = service.save(dto);
|
||||||
|
return ResultJson.ok(result ? dto : null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "修改")
|
||||||
|
@PostMapping("/update")
|
||||||
|
public ResultJson<ShCallWord> update(@Validated(Update.class) @RequestBody ShCallWord dto) {
|
||||||
|
boolean result = service.updateById(dto);
|
||||||
|
return ResultJson.ok(result ? dto : null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "删除")
|
||||||
|
@GetMapping("/del/{id}")
|
||||||
|
public ResultJson<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||||
|
return ResultJson.ok(service.removeById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "列表")
|
||||||
|
@PostMapping("/list")
|
||||||
|
public ResultJson<List<ShCallWord>> list() {
|
||||||
|
return ResultJson.ok(service.lambdaQuery().list());
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Operation(summary = "分页")
|
||||||
|
// @PostMapping("/page")
|
||||||
|
public ResultJson<Page<ShCallWord>> page() {
|
||||||
|
return ResultJson.ok(service.page(null));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
package com.whdc.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.whdc.exception.MyException;
|
||||||
|
import com.whdc.model.dto.ShCallsDto;
|
||||||
|
import com.whdc.model.entity.ShAddressBook;
|
||||||
|
import com.whdc.model.entity.ShCallWord;
|
||||||
|
import com.whdc.model.entity.ShCalls;
|
||||||
|
import com.whdc.model.group.Insert;
|
||||||
|
import com.whdc.model.vo.ShCallsTodayVo;
|
||||||
|
import com.whdc.service.ShAddressBookService;
|
||||||
|
import com.whdc.service.ShCallsService;
|
||||||
|
import com.whdc.utils.ResultJson;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
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.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述: 抽查日志
|
||||||
|
* author: xusan
|
||||||
|
* date: 2024-07-29 17:27:25
|
||||||
|
*/
|
||||||
|
@Tag(name = "抽查日志")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(value="/shCalls")
|
||||||
|
public class ShCallsController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ShCallsService service;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ShAddressBookService shAddressBookService;
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(summary = "新增")
|
||||||
|
@PostMapping("/insert")
|
||||||
|
public ResultJson<ShCallWord> insert(@Validated(Insert.class) @RequestBody ShCalls dto) {
|
||||||
|
if (shAddressBookService.lambdaQuery().eq(ShAddressBook::getId, dto.getShAbId()).count() != 1){
|
||||||
|
throw new MyException("当前通讯录不存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
dto.setCallTime(new Date());
|
||||||
|
if (StringUtils.isNotBlank(dto.getStatus()) && "0".equals(dto.getCallType())){
|
||||||
|
boolean update = shAddressBookService.lambdaUpdate()
|
||||||
|
.set(ShAddressBook::getCallStatus, dto.getCallType())
|
||||||
|
.eq(ShAddressBook::getId, dto.getShAbId())
|
||||||
|
.update();
|
||||||
|
if (!update){
|
||||||
|
throw new MyException("更新通讯录状态失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
boolean result = service.save(dto);
|
||||||
|
return ResultJson.ok(result ? dto : null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "列表")
|
||||||
|
@PostMapping("/list")
|
||||||
|
public ResultJson<List<ShCalls>> list(@RequestBody ShCallsDto dto) {
|
||||||
|
LambdaQueryChainWrapper<ShCalls> query = service.lambdaQuery();
|
||||||
|
if (Objects.nonNull(dto.getDate())){
|
||||||
|
|
||||||
|
query.between(ShCalls::getCallTime, dto.getDate() + " 00:00:00",dto.getDate() + " 23:59:59");
|
||||||
|
}
|
||||||
|
if (Objects.nonNull(dto.getShAbId())){
|
||||||
|
query.eq(ShCalls::getShAbId, dto.getShAbId());
|
||||||
|
}else{
|
||||||
|
throw new RuntimeException("山洪通讯录编号不能为空");
|
||||||
|
}
|
||||||
|
return ResultJson.ok(query.list());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "今日抽查分页")
|
||||||
|
@PostMapping("/pageToday")
|
||||||
|
public ResultJson<IPage<ShCallsTodayVo>> pageToday(@RequestBody ShCallsDto dto) {
|
||||||
|
return ResultJson.ok(service.page(dto));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(summary = "抽查日志分页")
|
||||||
|
@PostMapping("/page")
|
||||||
|
public ResultJson<Page<ShCalls>> page(@RequestBody ShCallsDto dto) {
|
||||||
|
LambdaQueryChainWrapper<ShCalls> query = service.lambdaQuery();
|
||||||
|
return ResultJson.ok(service.page(dto.getPage(), query));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,64 @@
|
||||||
|
package com.whdc.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.whdc.model.entity.ShPeriod;
|
||||||
|
import com.whdc.model.group.Insert;
|
||||||
|
import com.whdc.model.group.Update;
|
||||||
|
import com.whdc.service.ShPeriodService;
|
||||||
|
import com.whdc.utils.ResultJson;
|
||||||
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
/**
|
||||||
|
* 描述: 防汛周期
|
||||||
|
* author: xusan
|
||||||
|
* date: 2024-07-29 17:27:25
|
||||||
|
*/
|
||||||
|
@Tag(name = "防汛周期")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping(value="/shPeriod")
|
||||||
|
public class ShPeriodController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ShPeriodService service;
|
||||||
|
|
||||||
|
|
||||||
|
@Operation(summary = "新增")
|
||||||
|
@PostMapping("/insert")
|
||||||
|
public ResultJson<ShPeriod> insert(@Validated(Insert.class) @RequestBody ShPeriod dto) {
|
||||||
|
boolean result = service.save(dto);
|
||||||
|
return ResultJson.ok(result ? dto : null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "修改")
|
||||||
|
@PostMapping("/update")
|
||||||
|
public ResultJson<ShPeriod> update(@Validated(Update.class) @RequestBody ShPeriod dto) {
|
||||||
|
boolean result = service.updateById(dto);
|
||||||
|
return ResultJson.ok(result ? dto : null);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "删除")
|
||||||
|
@GetMapping("/del/{id}")
|
||||||
|
public ResultJson<Boolean> del(@Schema(name = "id") @PathVariable("id") Serializable id) {
|
||||||
|
return ResultJson.ok(service.removeById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Operation(summary = "列表")
|
||||||
|
@PostMapping("/list")
|
||||||
|
public ResultJson<List<ShPeriod>> list() {
|
||||||
|
return ResultJson.ok(service.lambdaQuery().list());
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Operation(summary = "分页")
|
||||||
|
// @PostMapping("/page")
|
||||||
|
public ResultJson<Page<ShPeriod>> page() {
|
||||||
|
return ResultJson.ok(service.page(null));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.whdc.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.whdc.model.entity.ShAddressBook;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述: 山洪责任人通讯录
|
||||||
|
* author: xusan
|
||||||
|
* date: 2024-07-29 17:27:25
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface ShAddressBookMapper extends BaseMapper<ShAddressBook> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.whdc.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.whdc.model.entity.ShCallWord;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述: 备注
|
||||||
|
* author: xusan
|
||||||
|
* date: 2024-07-29 17:27:25
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface ShCallWordMapper extends BaseMapper<ShCallWord> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
package com.whdc.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.whdc.model.dto.ShCallsDto;
|
||||||
|
import com.whdc.model.entity.ShCalls;
|
||||||
|
import com.whdc.model.vo.ShCallsTodayVo;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述: 抽查日志
|
||||||
|
* author: xusan
|
||||||
|
* date: 2024-07-29 17:27:25
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface ShCallsMapper extends BaseMapper<ShCalls> {
|
||||||
|
|
||||||
|
@Select("")
|
||||||
|
IPage<ShCallsTodayVo> page(@Param("page") IPage<ShCallsTodayVo> page, @Param("dto") ShCallsDto dto);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
package com.whdc.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.whdc.model.entity.ShPeriod;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述: 防汛周期
|
||||||
|
* author: xusan
|
||||||
|
* date: 2024-07-29 17:27:25
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface ShPeriodMapper extends BaseMapper<ShPeriod> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
package com.whdc.model.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author xusan
|
||||||
|
* @Date 2024/5/13 10:17
|
||||||
|
* @Notes
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(description = "山洪责任人分页查询")
|
||||||
|
public class ShAddressBookDto extends FindPageDto {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "责任人电话")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "责任人姓名")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@Schema(description = "负责区域")
|
||||||
|
private String land;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "责任人类型1 行政责任人,包保责任人")
|
||||||
|
private String type1;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "责任人类型2 县级行政责任人,乡级行政责任人,村级行政责任人, 包保县干部,包保乡干部")
|
||||||
|
private String type2;
|
||||||
|
|
||||||
|
@Schema(description = "市")
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
@Schema(description = "县")
|
||||||
|
private String county;
|
||||||
|
|
||||||
|
@Schema(description = "行政村")
|
||||||
|
private String village;
|
||||||
|
|
||||||
|
@Schema(description = "乡")
|
||||||
|
private String area;
|
||||||
|
|
||||||
|
@Schema(description = "是否抽查:0:不抽查,1:抽查")
|
||||||
|
private String isSpotCheck;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.whdc.model.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.time.LocalDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* Created by XuSan on 2024/7/30.
|
||||||
|
*
|
||||||
|
* @author XuSan
|
||||||
|
* @version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(description = "山洪责任人抽查分页查询")
|
||||||
|
public class ShCallsDto extends ShAddressBookDto {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "抽查日期")
|
||||||
|
private LocalDate date;
|
||||||
|
|
||||||
|
@Schema(description="是否接听0:否,1是")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
@Schema(description="山洪通讯录编号")
|
||||||
|
private Integer shAbId;
|
||||||
|
}
|
||||||
|
|
@ -25,75 +25,95 @@ public class QXWarning {
|
||||||
@ApiModelProperty(value = "id")
|
@ApiModelProperty(value = "id")
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
@Excel(name = "预警信息生成时间",exportFormat = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
@TableField("CREATE_TIME")
|
@TableField("CREATE_TIME")
|
||||||
@ApiModelProperty(value = "预警信息生成时间")
|
@ApiModelProperty(value = "预警信息生成时间")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
@Excel(name = "预警信息发布时间",exportFormat = "yyyy-MM-dd HH:mm:ss")
|
@Excel(width = 25,name = "预警信息发布时间",exportFormat = "yyyy-MM-dd HH:mm:ss",orderNum = "3")
|
||||||
@TableField("PUBLISH_TIME")
|
@TableField("PUBLISH_TIME")
|
||||||
@ApiModelProperty(value = "预警信息发布时间")
|
@ApiModelProperty(value = "预警信息发布时间")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
private Date publishTime;
|
private Date publishTime;
|
||||||
|
|
||||||
@Excel(name = "预警信息开始时间",exportFormat = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
@TableField("START_TIME")
|
@TableField("START_TIME")
|
||||||
@ApiModelProperty(value = "预警信息开始时间")
|
@ApiModelProperty(value = "预警信息开始时间")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
private Date startTime;
|
private Date startTime;
|
||||||
|
|
||||||
@Excel(name = "预警信息结束时间",exportFormat = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
@TableField("END_TIME")
|
@TableField("END_TIME")
|
||||||
@ApiModelProperty(value = "预警信息结束时间")
|
@ApiModelProperty(value = "预警信息结束时间")
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
private Date endTime;
|
private Date endTime;
|
||||||
|
|
||||||
@Excel(name = "预警类型")
|
@Excel(width = 25,name = "预警类型",orderNum = "4")
|
||||||
@ApiParam(value = "预警类型")
|
@ApiParam(value = "预警类型")
|
||||||
@ApiModelProperty(value = "预警类型", dataType = "java.lang.String")
|
@ApiModelProperty(value = "预警类型", dataType = "java.lang.String")
|
||||||
private String warnSignalType;
|
private String warnSignalType;
|
||||||
|
|
||||||
@Excel(name = "预警级别")
|
@Excel(width = 25,name = "预警级别",orderNum = "5")
|
||||||
@ApiParam(value = "预警级别")
|
@ApiParam(value = "预警级别")
|
||||||
@ApiModelProperty(value = "预警级别", dataType = "java.lang.String")
|
@ApiModelProperty(value = "预警级别", dataType = "java.lang.String")
|
||||||
private String warnSignalLevel;
|
private String warnSignalLevel;
|
||||||
|
|
||||||
@Excel(name = "发布单位")
|
@Excel(width = 25,name = "发布单位",orderNum = "2")
|
||||||
@ApiParam(value = "发布单位")
|
@ApiParam(value = "发布单位")
|
||||||
@ApiModelProperty(value = "发布单位", dataType = "java.lang.String")
|
@ApiModelProperty(value = "发布单位", dataType = "java.lang.String")
|
||||||
private String publishUnit;
|
private String publishUnit;
|
||||||
|
|
||||||
@Excel(name = "预警内容")
|
@Excel(width = 40,name = "预警内容",orderNum = "6")
|
||||||
@ApiParam(value = "预警内容")
|
@ApiParam(value = "预警内容")
|
||||||
@ApiModelProperty(value = "预警内容", dataType = "java.lang.String")
|
@ApiModelProperty(value = "预警内容", dataType = "java.lang.String")
|
||||||
private String content;
|
private String content;
|
||||||
|
|
||||||
@Excel(name = "预警信息ID")
|
|
||||||
@TableField("WARNID")
|
@TableField("WARNID")
|
||||||
@ApiModelProperty(value = "预警信息ID")
|
@ApiModelProperty(value = "预警信息ID")
|
||||||
private Integer warnid;
|
private Integer warnid;
|
||||||
|
|
||||||
@Excel(name = "预警市名称")
|
@Excel(width = 25,name = "市级",orderNum = "0")
|
||||||
@TableField("CTNM")
|
@TableField("CTNM")
|
||||||
@ApiModelProperty(value = "预警市名称", dataType = "java.lang.String")
|
@ApiModelProperty(value = "预警市名称", dataType = "java.lang.String")
|
||||||
private String ctnm;
|
private String ctnm;
|
||||||
|
|
||||||
@Excel(name = "预警县名称")
|
@Excel(width = 40,name = "县级",orderNum = "1")
|
||||||
@TableField("CNNM")
|
@TableField("CNNM")
|
||||||
@ApiModelProperty(value = "预警县名称", dataType = "java.lang.String")
|
@ApiModelProperty(value = "预警县名称", dataType = "java.lang.String")
|
||||||
private String cnnm;
|
private String cnnm;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@ApiModelProperty(value = "预警通知时间")
|
@ApiModelProperty(value = "预警通知时间")
|
||||||
|
@Excel(width = 25,name = "呼叫时间",exportFormat = "yyyy-MM-dd HH:mm:ss",orderNum = "9")
|
||||||
private Date callTime;
|
private Date callTime;
|
||||||
|
|
||||||
@Excel(name = "handleTime")
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@ApiModelProperty(value = "预警信息处理时间", dataType = "java.lang.String")
|
@ApiModelProperty(value = "预警信息处理时间", dataType = "java.lang.String")
|
||||||
|
@Excel(width = 25,name = "处理时间",exportFormat = "yyyy-MM-dd HH:mm:ss",orderNum = "8")
|
||||||
private Date handleTime;
|
private Date handleTime;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@Excel(name = "Effect_Id")
|
|
||||||
private String effectId;
|
private String effectId;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@Excel(width = 25,name = "状态",orderNum = "7")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value="被呼叫人姓名")
|
||||||
|
@Excel(width = 25,name = "被叫人",orderNum = "10")
|
||||||
|
private String calledPerson;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value="被呼叫人职务")
|
||||||
|
@Excel(width = 25,name = "职务",orderNum = "11")
|
||||||
|
private String calledPosition;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value="被呼叫人手机号")
|
||||||
|
@Excel(width = 25,name = "职务",orderNum = "12")
|
||||||
|
private String calledPhone;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value="呼叫人姓名")
|
||||||
|
@Excel(width = 25,name = "呼叫人",orderNum = "13")
|
||||||
|
private String callPerson;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,152 @@
|
||||||
|
package com.whdc.model.entity;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.afterturn.easypoi.excel.annotation.Excel;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.whdc.model.group.Update;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述: 山洪责任人通讯录
|
||||||
|
* author: xusan
|
||||||
|
* date: 2024-07-29 17:27:25
|
||||||
|
*/
|
||||||
|
@Schema(description = "山洪责任人通讯录")
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("public.SH_ADDRESS_BOOK")
|
||||||
|
public class ShAddressBook implements Serializable {
|
||||||
|
|
||||||
|
public final static String thisTableName = "ShAddressBook";
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@TableId(value = "id", type = IdType.AUTO)
|
||||||
|
@Schema(description = "主键id")
|
||||||
|
@NotNull(message = "主键id不能为空",groups = Update.class)
|
||||||
|
@Size(max = 4, message = "主键id最大长度要小于 4")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 乡
|
||||||
|
*/
|
||||||
|
@TableField(value = "area")
|
||||||
|
@Schema(description = "乡")
|
||||||
|
@Size(max = 50, message = "乡最大长度要小于 50")
|
||||||
|
@Excel(name = "乡", width = 20,orderNum = "3")
|
||||||
|
private String area;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 职务
|
||||||
|
*/
|
||||||
|
@TableField(value = "position")
|
||||||
|
@Schema(description = "职务")
|
||||||
|
@Size(max = 50, message = "职务最大长度要小于 50")
|
||||||
|
@Excel(name = "职务", width = 20,orderNum = "7")
|
||||||
|
private String position;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 村
|
||||||
|
*/
|
||||||
|
@TableField(value = "village")
|
||||||
|
@Schema(description = "行政村")
|
||||||
|
@Size(max = 50, message = "行政村最大长度要小于 50")
|
||||||
|
@Excel(name = "行政村", width = 20,orderNum = "4")
|
||||||
|
private String village;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名字
|
||||||
|
*/
|
||||||
|
@TableField(value = "name")
|
||||||
|
@Schema(description = "责任人姓名")
|
||||||
|
@Size(max = 50, message = "名字最大长度要小于 50")
|
||||||
|
@Excel(name = "责任人姓名", width = 20,orderNum = "6")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 责任人类型 县级,乡级,村级, 县干部,乡干部
|
||||||
|
*/
|
||||||
|
@TableField(value = "type2")
|
||||||
|
@Schema(description = "责任人类型2 县级,乡级,村级, 县干部,乡干部")
|
||||||
|
@Size(max = 50, message = "责任人类型2 县级,乡级,村级, 县干部,乡干部最大长度要小于 50")
|
||||||
|
@Excel(name = "责任人类型2", width = 20,orderNum = "5")
|
||||||
|
private String type2;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手机号
|
||||||
|
*/
|
||||||
|
@TableField(value = "phone")
|
||||||
|
@Schema(description = "手机号")
|
||||||
|
@Size(max = 50, message = "手机号最大长度要小于 50")
|
||||||
|
@Excel(name = "手机号", width = 20,orderNum = "8")
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 市
|
||||||
|
*/
|
||||||
|
@TableField(value = "city")
|
||||||
|
@Schema(description = "市")
|
||||||
|
@Size(max = 50, message = "市最大长度要小于 50")
|
||||||
|
@Excel(name = "市", width = 20,orderNum = "1")
|
||||||
|
private String city;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 县
|
||||||
|
*/
|
||||||
|
@TableField(value = "county")
|
||||||
|
@Schema(description = "县")
|
||||||
|
@Size(max = 50, message = "县最大长度要小于 50")
|
||||||
|
@Excel(name = "县", width = 20,orderNum = "2")
|
||||||
|
private String county;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 责任人类型1 行政责任人,包保责任人
|
||||||
|
*/
|
||||||
|
@TableField(value = "type1")
|
||||||
|
@Schema(description = "责任人类型1 行政责任人,包保责任人")
|
||||||
|
@Size(max = 50, message = "责任人类型1 行政责任人,包保责任人最大长度要小于 50")
|
||||||
|
private String type1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责区域
|
||||||
|
*/
|
||||||
|
@TableField(value = "land")
|
||||||
|
@Schema(description = "负责区域")
|
||||||
|
@Size(max = 50, message = "负责区域最大长度要小于 50")
|
||||||
|
private String land;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 顺序
|
||||||
|
*/
|
||||||
|
@TableField(value = "sort")
|
||||||
|
@Schema(description = "顺序排序")
|
||||||
|
@Excel(name = "展示顺序", width = 20,orderNum = "0")
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否抽查
|
||||||
|
*/
|
||||||
|
@TableField(value = "is_spot_check")
|
||||||
|
@Schema(description = "是否抽查:0:不抽查,1:抽查")
|
||||||
|
private String isSpotCheck;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否接听
|
||||||
|
*/
|
||||||
|
@TableField(value = "call_status")
|
||||||
|
@Schema(description = "是否接听0:否,1是")
|
||||||
|
private String callStatus;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
package com.whdc.model.entity;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述: 备注
|
||||||
|
* author: xusan
|
||||||
|
* date: 2024-07-29 17:27:25
|
||||||
|
*/
|
||||||
|
@Schema(description="备注")
|
||||||
|
@Data
|
||||||
|
@TableName("public.SH_CALL_WORD")
|
||||||
|
public class ShCallWord implements Serializable {
|
||||||
|
|
||||||
|
public final static String thisTableName = "ShCallWord";
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@TableId(value="id", type= IdType.AUTO)
|
||||||
|
@Schema(description="主键id")
|
||||||
|
@Size(max = 4,message = "主键id最大长度要小于 4")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 防汛周期ID
|
||||||
|
*/
|
||||||
|
@TableField(value="sh_period_id")
|
||||||
|
@Schema(description="防汛周期ID")
|
||||||
|
@Size(max = 4,message = "防汛周期ID最大长度要小于 4")
|
||||||
|
private Integer shPeriodId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注内容
|
||||||
|
*/
|
||||||
|
@TableField(value="word")
|
||||||
|
@Schema(description="备注内容")
|
||||||
|
@Size(max = 2000,message = "备注内容最大长度要小于 2000")
|
||||||
|
private String word;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 责任人类型1 行政责任人,包保责任人
|
||||||
|
*/
|
||||||
|
@TableField(value="sh_ab_type1")
|
||||||
|
@Schema(description="责任人类型1 行政责任人,包保责任人")
|
||||||
|
@Size(max = 50,message = "责任人类型1 行政责任人,包保责任人最大长度要小于 50")
|
||||||
|
private String shAbType1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,94 @@
|
||||||
|
package com.whdc.model.entity;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.whdc.model.group.Insert;
|
||||||
|
import com.whdc.model.group.Update;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import javax.validation.constraints.Pattern;
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述: 抽查日志
|
||||||
|
* author: xusan
|
||||||
|
* date: 2024-07-29 17:27:25
|
||||||
|
*/
|
||||||
|
@Schema(description="抽查日志")
|
||||||
|
@Data
|
||||||
|
@TableName("public.SH_CALLS")
|
||||||
|
public class ShCalls implements Serializable {
|
||||||
|
|
||||||
|
public final static String thisTableName = "ShCalls";
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@TableId(value="id", type= IdType.AUTO)
|
||||||
|
@Schema(description="id")
|
||||||
|
@Size(max = 4,message = "id最大长度要小于 4")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否接听0:否,1是
|
||||||
|
*/
|
||||||
|
@TableField(value="status")
|
||||||
|
@Schema(description="是否接听0:否,1是")
|
||||||
|
@Size(max = 2,message = "是否接听0:否,1是最大长度要小于 2")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 山洪通讯录编号
|
||||||
|
*/
|
||||||
|
@TableField(value="sh_ab_id")
|
||||||
|
@Schema(description="山洪通讯录编号")
|
||||||
|
@NotNull(message = "山洪通讯录编号不能为空", groups = {Insert.class, Update.class})
|
||||||
|
@Size(max = 4,message = "山洪通讯录编号最大长度要小于 4")
|
||||||
|
private Integer shAbId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 知晓本人为山洪责任人, 0:否,1:是
|
||||||
|
*/
|
||||||
|
@TableField(value="know")
|
||||||
|
@Schema(description="知晓本人为山洪责任人, 0:否,1:是")
|
||||||
|
@Size(max = 2,message = "知晓本人为山洪责任人, 0:否,1:是最大长度要小于 2")
|
||||||
|
@Pattern(message = "知晓本人为山洪责任人, 0:否,1:是", regexp = "[01]")
|
||||||
|
private String know;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 抽查时间
|
||||||
|
*/
|
||||||
|
@TableField(value="call_time")
|
||||||
|
@Schema(description="抽查时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date callTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 叫应状态: 0:接通,1:拒接,2:忙线
|
||||||
|
*/
|
||||||
|
@TableField(value="call_type")
|
||||||
|
@Schema(description="叫应状态: 0:接通,1:拒接,2:忙线")
|
||||||
|
@Size(max = 2,message = "叫应状态: 0:接通,1:拒接,2:忙线最大长度要小于 2")
|
||||||
|
@Pattern(message = "叫应状态: 0:接通,1:拒接,2:忙线", regexp = "[012]")
|
||||||
|
private String callType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通话类型: 0:拨打,1:回拨
|
||||||
|
*/
|
||||||
|
@TableField(value="type")
|
||||||
|
@Schema(description="通话类型: 0:拨打,1:回拨")
|
||||||
|
@Size(max = 2,message = "通话类型: 0:拨打,1:回拨最大长度要小于 2")
|
||||||
|
@Pattern(message = "通话类型: 0:拨打,1:回拨", regexp = "[01]")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
package com.whdc.model.entity;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述: 防汛周期
|
||||||
|
* author: xusan
|
||||||
|
* date: 2024-07-29 17:27:25
|
||||||
|
*/
|
||||||
|
@Schema(description="防汛周期")
|
||||||
|
@Data
|
||||||
|
@TableName("public.SH_PERIOD")
|
||||||
|
public class ShPeriod implements Serializable {
|
||||||
|
|
||||||
|
public final static String thisTableName = "ShPeriod";
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@TableId(value="id", type= IdType.AUTO)
|
||||||
|
@Schema(description="主键id")
|
||||||
|
@Size(max = 4,message = "主键id最大长度要小于 4")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增时间
|
||||||
|
*/
|
||||||
|
@TableField(value="create_time")
|
||||||
|
@Schema(description="新增时间")
|
||||||
|
@Size(max = 8,message = "新增时间最大长度要小于 8")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 防汛周期
|
||||||
|
*/
|
||||||
|
@TableField(value="name")
|
||||||
|
@Schema(description="防汛周期")
|
||||||
|
@Size(max = 50,message = "防汛周期最大长度要小于 50")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
package com.whdc.model.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.whdc.model.entity.ShAddressBook;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Size;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Description:
|
||||||
|
* Created by XuSan on 2024/7/30.
|
||||||
|
*
|
||||||
|
* @author XuSan
|
||||||
|
* @version 1.0
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Schema(description = "今日抽查分页视图")
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class ShCallsTodayVo extends ShAddressBook {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否接听0:否,1是
|
||||||
|
*/
|
||||||
|
@TableField(value="status")
|
||||||
|
@Schema(description="是否接听0:否,1是")
|
||||||
|
@Size(max = 2,message = "是否接听0:否,1是最大长度要小于 2")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.whdc.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.whdc.model.entity.ShAddressBook;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述: 山洪责任人通讯录
|
||||||
|
* author: xusan
|
||||||
|
* date: 2024-07-30 10:27:29
|
||||||
|
*/
|
||||||
|
public interface ShAddressBookService extends IService<ShAddressBook>
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
void updateAll(String type1, List<ShAddressBook> appends);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.whdc.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.whdc.model.entity.ShCallWord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述: 备注
|
||||||
|
* author: xusan
|
||||||
|
* date: 2024-07-30 10:27:29
|
||||||
|
*/
|
||||||
|
public interface ShCallWordService extends IService<ShCallWord>
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.whdc.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.whdc.model.dto.ShCallsDto;
|
||||||
|
import com.whdc.model.entity.ShCalls;
|
||||||
|
import com.whdc.model.vo.ShCallsTodayVo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述: 抽查日志
|
||||||
|
* author: xusan
|
||||||
|
* date: 2024-07-30 10:27:29
|
||||||
|
*/
|
||||||
|
public interface ShCallsService extends IService<ShCalls>
|
||||||
|
{
|
||||||
|
|
||||||
|
IPage<ShCallsTodayVo> page(ShCallsDto dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
package com.whdc.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.whdc.model.entity.ShPeriod;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述: 防汛周期
|
||||||
|
* author: xusan
|
||||||
|
* date: 2024-07-30 10:27:29
|
||||||
|
*/
|
||||||
|
public interface ShPeriodService extends IService<ShPeriod>
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,69 @@
|
||||||
|
package com.whdc.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.whdc.exception.MyException;
|
||||||
|
import com.whdc.mapper.ShAddressBookMapper;
|
||||||
|
import com.whdc.model.entity.ShAddressBook;
|
||||||
|
import com.whdc.service.ShAddressBookService;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import static com.whdc.model.MyConstant.REDIS_KEY;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述: 山洪责任人通讯录
|
||||||
|
* author: xusan
|
||||||
|
* date: 2024-07-29 17:27:25
|
||||||
|
*/
|
||||||
|
@Transactional
|
||||||
|
@Service
|
||||||
|
public class ShAddressBookServiceImpl extends ServiceImpl<ShAddressBookMapper, ShAddressBook> implements ShAddressBookService {
|
||||||
|
|
||||||
|
private static final String THIS_REDIS_KEY = REDIS_KEY + ShAddressBook.thisTableName + ":";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 全量更新
|
||||||
|
* @param type1
|
||||||
|
* @param appends
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void updateAll(String type1, List<ShAddressBook> appends) {
|
||||||
|
if (CollectionUtils.isEmpty(appends)){
|
||||||
|
throw new MyException("文件解析数据为空");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除全部数据
|
||||||
|
String type1Str = null;
|
||||||
|
switch (type1){
|
||||||
|
case "0":
|
||||||
|
type1Str = "行政责任人";
|
||||||
|
break;
|
||||||
|
case "1":
|
||||||
|
type1Str = "包保责任人";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new MyException("参数错误");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 清空数据
|
||||||
|
boolean remove = this.remove(this.lambdaQuery());
|
||||||
|
if (!remove){
|
||||||
|
throw new MyException("清空数据失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加第一类型
|
||||||
|
|
||||||
|
String finalType1Str1 = type1Str;
|
||||||
|
appends.forEach(o -> o.setType1(finalType1Str1));
|
||||||
|
|
||||||
|
boolean b = this.saveBatch(appends);
|
||||||
|
if (!b){
|
||||||
|
throw new MyException("保存数据失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.whdc.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.whdc.mapper.ShCallWordMapper;
|
||||||
|
import com.whdc.model.dto.FindPageDto;
|
||||||
|
import com.whdc.model.entity.ShCallWord;
|
||||||
|
import com.whdc.service.ShCallWordService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import static com.whdc.model.MyConstant.REDIS_KEY;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述: 备注
|
||||||
|
* author: xusan
|
||||||
|
* date: 2024-07-29 17:27:25
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ShCallWordServiceImpl extends ServiceImpl<ShCallWordMapper, ShCallWord> implements ShCallWordService {
|
||||||
|
|
||||||
|
private static final String THIS_REDIS_KEY = REDIS_KEY + ShCallWord.thisTableName + ":";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.whdc.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.whdc.mapper.ShCallsMapper;
|
||||||
|
import com.whdc.model.dto.ShCallsDto;
|
||||||
|
import com.whdc.model.entity.ShCalls;
|
||||||
|
import com.whdc.model.vo.ShCallsTodayVo;
|
||||||
|
import com.whdc.service.ShCallsService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import static com.whdc.model.MyConstant.REDIS_KEY;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述: 抽查日志
|
||||||
|
* author: xusan
|
||||||
|
* date: 2024-07-29 17:27:25
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ShCallsServiceImpl extends ServiceImpl<ShCallsMapper, ShCalls> implements ShCallsService {
|
||||||
|
|
||||||
|
private static final String THIS_REDIS_KEY = REDIS_KEY + ShCalls.thisTableName + ":";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<ShCallsTodayVo> page(ShCallsDto dto) {
|
||||||
|
return this.getBaseMapper().page(dto.getPage(),dto);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
package com.whdc.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.whdc.mapper.ShPeriodMapper;
|
||||||
|
import com.whdc.model.entity.ShPeriod;
|
||||||
|
import com.whdc.service.ShPeriodService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import static com.whdc.model.MyConstant.REDIS_KEY;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述: 防汛周期
|
||||||
|
* author: xusan
|
||||||
|
* date: 2024-07-29 17:27:25
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ShPeriodServiceImpl extends ServiceImpl<ShPeriodMapper, ShPeriod> implements ShPeriodService {
|
||||||
|
|
||||||
|
private static final String THIS_REDIS_KEY = REDIS_KEY + ShPeriod.thisTableName + ":";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
</select>
|
</select>
|
||||||
<select id="list" resultType="com.whdc.model.entity.QXWarning">
|
<select id="list" resultType="com.whdc.model.entity.QXWarning">
|
||||||
SELECT
|
SELECT
|
||||||
Q.*
|
Q.*, WF.*,IF( WF.ID IS NOT NULL,'已叫应','未叫应') STATUS
|
||||||
FROM
|
FROM
|
||||||
FXKH_TXL.QXWARNING Q
|
FXKH_TXL.QXWARNING Q
|
||||||
LEFT JOIN FXKH_TXL.WARNMSG_FEEDBACK WF ON WF.WARNID = Q.WARNID
|
LEFT JOIN FXKH_TXL.WARNMSG_FEEDBACK WF ON WF.WARNID = Q.WARNID
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.whdc.mapper.ShAddressBookMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.whdc.mapper.ShCallWordMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.whdc.mapper.ShCallsMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.whdc.mapper.ShPeriodMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue