代码提交
parent
fd58282a4e
commit
03c54e4cc5
|
|
@ -21,11 +21,11 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||||
@EnableScheduling
|
@EnableScheduling
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@MapperScan("com.whdc.mapper")
|
@MapperScan("com.whdc.mapper")
|
||||||
public class RuleApiApplication {
|
public class FxkhTxlApiApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
try {
|
try {
|
||||||
SpringApplication.run(RuleApiApplication.class, args);
|
SpringApplication.run(FxkhTxlApiApplication.class, args);
|
||||||
|
|
||||||
System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>> 启动完成 <<<<<<<<<<<<<<<<<<<<<<<<<<<");
|
System.out.println(">>>>>>>>>>>>>>>>>>>>>>>>>>> 启动完成 <<<<<<<<<<<<<<<<<<<<<<<<<<<");
|
||||||
} catch (BeansException e) {
|
} catch (BeansException e) {
|
||||||
|
|
@ -0,0 +1,100 @@
|
||||||
|
package com.whdc.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.whdc.model.entity.AbUdR;
|
||||||
|
import com.whdc.model.group.Insert;
|
||||||
|
import com.whdc.model.group.Update;
|
||||||
|
import com.whdc.service.IAbUdRService;
|
||||||
|
import com.whdc.utils.ResultJson;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "用户单位字典关联表 - Controller")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/abudr")
|
||||||
|
public class AbUdRController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IAbUdRService service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询所有")
|
||||||
|
@PostMapping(value = "find")
|
||||||
|
public ResultJson<AbUdR> find(@RequestBody AbUdR dto) {
|
||||||
|
|
||||||
|
return ResultJson.ok(service.find(dto));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "分页查询")
|
||||||
|
@PostMapping(value = "page")
|
||||||
|
public ResultJson<AbUdR> page(@RequestBody AbUdR dto) {
|
||||||
|
|
||||||
|
return ResultJson.ok(service.page(dto));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "添加")
|
||||||
|
@PostMapping(value = "save")
|
||||||
|
public ResultJson insert(@RequestBody @Validated(Insert.class) AbUdR model) {
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(
|
||||||
|
service.lambdaQuery()
|
||||||
|
.eq(AbUdR::getAdId,String.valueOf(model.getAdId()).trim())
|
||||||
|
.eq(AbUdR::getDictId,String.valueOf(model.getDictId() ).trim())
|
||||||
|
.list())
|
||||||
|
){
|
||||||
|
return ResultJson.error("重复新增");
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultJson.ok(service.save(model));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "修改")
|
||||||
|
@PostMapping(value = "edit")
|
||||||
|
public ResultJson update(@RequestBody @Validated(Update.class) AbUdR model) {
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(
|
||||||
|
service.lambdaQuery()
|
||||||
|
.eq(AbUdR::getAdId,String.valueOf(model.getAdId()).trim())
|
||||||
|
.eq(AbUdR::getDictId,String.valueOf(model.getDictId() ).trim())
|
||||||
|
.list())
|
||||||
|
){
|
||||||
|
return ResultJson.error("重复修改");
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultJson.ok(service.updateById(model));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "删除")
|
||||||
|
@GetMapping(value = "del/{id}")
|
||||||
|
public ResultJson delete(@PathVariable("id") Integer id) {
|
||||||
|
|
||||||
|
|
||||||
|
if (Objects.isNull(service.getById(id))) {
|
||||||
|
|
||||||
|
return ResultJson.error("当前数据不存在");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultJson.ok(service.removeById(id));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,184 @@
|
||||||
|
package com.whdc.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.whdc.model.dto.AddressBootDto;
|
||||||
|
import com.whdc.model.entity.AddressBook;
|
||||||
|
import com.whdc.model.enums.VersionsType;
|
||||||
|
import com.whdc.model.group.Insert;
|
||||||
|
import com.whdc.model.group.Update;
|
||||||
|
import com.whdc.service.IAddressBookService;
|
||||||
|
import com.whdc.service.IVersionsService;
|
||||||
|
import com.whdc.utils.ResultJson;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "通讯录 - Controller")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/addressbook")
|
||||||
|
public class AddressBookController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IAddressBookService service;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IVersionsService versionsService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// @ApiOperation(value = "查询所有")
|
||||||
|
// @PostMapping(value = "find")
|
||||||
|
// public ResultJson<AddressBook> find(@RequestBody AddressBook dto) {
|
||||||
|
//
|
||||||
|
// return ResultJson.ok(service.find(dto));
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
|
@ApiOperation(value = "分页查询")
|
||||||
|
@PostMapping(value = "page")
|
||||||
|
public ResultJson<AddressBook> page(@RequestBody AddressBootDto dto) {
|
||||||
|
|
||||||
|
return ResultJson.ok(service.page(dto));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "添加")
|
||||||
|
@PostMapping(value = "save")
|
||||||
|
public ResultJson insert(@RequestBody @Validated(Insert.class) AddressBook model) {
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(
|
||||||
|
service.lambdaQuery()
|
||||||
|
.eq(AddressBook::getName,String.valueOf(model.getName()).trim())
|
||||||
|
.list())
|
||||||
|
){
|
||||||
|
return ResultJson.error("该名称重复");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加日志
|
||||||
|
versionsService.saveInfo(model,VersionsType.ADD);
|
||||||
|
// versionsService.save(new Versions(null, JSON.toJSONString(model),model.getId(),null,model.getCreateId(),new Date(), VersionsType.ADD.getName()));
|
||||||
|
|
||||||
|
return ResultJson.ok(service.save(model));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "修改")
|
||||||
|
@PostMapping(value = "edit")
|
||||||
|
public ResultJson update(@RequestBody @Validated(Update.class) AddressBook model) {
|
||||||
|
|
||||||
|
AddressBook byId = service.getById(model.getId());
|
||||||
|
if (Objects.isNull(byId)){
|
||||||
|
return ResultJson.error("当前数据不存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(
|
||||||
|
service.lambdaQuery()
|
||||||
|
.eq(AddressBook::getName,String.valueOf(model.getName()).trim())
|
||||||
|
.ne(AddressBook::getId, model.getId())
|
||||||
|
.list())
|
||||||
|
){
|
||||||
|
return ResultJson.error("该名称重复");
|
||||||
|
}
|
||||||
|
|
||||||
|
// List<Versions> list = versionsService.lambdaQuery()
|
||||||
|
// .eq(Versions::getAbId, model.getId())
|
||||||
|
// .list();
|
||||||
|
// Integer version = 0;
|
||||||
|
// if (CollectionUtils.isNotEmpty(list)){
|
||||||
|
// version = list
|
||||||
|
// .stream().map(Versions::getVersion)
|
||||||
|
// .max(Comparator.comparing(Integer::intValue))
|
||||||
|
// .get();
|
||||||
|
// }else{
|
||||||
|
// log.info("当前数据在进行修改但无相关记录;" + model.getId());
|
||||||
|
// }
|
||||||
|
// // 添加日志
|
||||||
|
// versionsService.save(new Versions(null, JSON.toJSONString(model),model.getId(),++version,model.getCreateId(),new Date(), VersionsType.UPDATE.getName()));
|
||||||
|
versionsService.saveInfo(model,VersionsType.UPDATE);
|
||||||
|
|
||||||
|
// 不修改角色
|
||||||
|
model.setRole(byId.getRole());
|
||||||
|
return ResultJson.ok(service.updateById(model));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "修改权限")
|
||||||
|
@PostMapping(value = "edit")
|
||||||
|
public ResultJson updateRole(@RequestBody @Validated(Update.class) AddressBook model) {
|
||||||
|
|
||||||
|
AddressBook byId = service.getById(model.getId());
|
||||||
|
if (Objects.isNull(byId)){
|
||||||
|
return ResultJson.error("当前数据不存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// List<Versions> list = versionsService.lambdaQuery()
|
||||||
|
// .eq(Versions::getAbId, model.getId())
|
||||||
|
// .list();
|
||||||
|
// Integer version = 0;
|
||||||
|
// if (CollectionUtils.isNotEmpty(list)){
|
||||||
|
// version = list
|
||||||
|
// .stream().map(Versions::getVersion)
|
||||||
|
// .max(Comparator.comparing(Integer::intValue))
|
||||||
|
// .get();
|
||||||
|
// }else{
|
||||||
|
// log.info("当前数据在进行修改但无相关记录;" + model.getId());
|
||||||
|
// }
|
||||||
|
// // 添加日志
|
||||||
|
// versionsService.save(new Versions(null, JSON.toJSONString(model),model.getId(),++version,model.getCreateId(),new Date(), VersionsType.UPDATE_ROLE.getName()));
|
||||||
|
versionsService.saveInfo(model,VersionsType.UPDATE_ROLE);
|
||||||
|
|
||||||
|
|
||||||
|
// 只修改角色
|
||||||
|
boolean update = service.lambdaUpdate().set(AddressBook::getRole, model.getRole())
|
||||||
|
.eq(AddressBook::getId, model.getId())
|
||||||
|
.update();
|
||||||
|
return ResultJson.ok(update);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "删除")
|
||||||
|
@GetMapping(value = "del/{id}")
|
||||||
|
public ResultJson delete(@PathVariable("id") Integer id) {
|
||||||
|
|
||||||
|
|
||||||
|
AddressBook model = service.getById(id);
|
||||||
|
if (Objects.isNull(model)) {
|
||||||
|
|
||||||
|
return ResultJson.error("当前数据不存在");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// List<Versions> list = versionsService.lambdaQuery()
|
||||||
|
// .eq(Versions::getAbId, model.getId())
|
||||||
|
// .list();
|
||||||
|
// Integer version = 0;
|
||||||
|
// if (CollectionUtils.isNotEmpty(list)){
|
||||||
|
// version = list
|
||||||
|
// .stream().map(Versions::getVersion)
|
||||||
|
// .max(Comparator.comparing(Integer::intValue))
|
||||||
|
// .get();
|
||||||
|
// }else{
|
||||||
|
// log.info("当前数据在进行修改但无相关记录;" + model.getId());
|
||||||
|
// }
|
||||||
|
// // 添加日志
|
||||||
|
// versionsService.save(new Versions(null, JSON.toJSONString(model),model.getId(),++version,model.getCreateId(),new Date(), VersionsType.DEL.getName()));
|
||||||
|
versionsService.saveInfo(model,VersionsType.DEL);
|
||||||
|
|
||||||
|
|
||||||
|
return ResultJson.ok(service.removeById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
package com.whdc.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.whdc.model.entity.Adinfo;
|
||||||
|
import com.whdc.model.group.Insert;
|
||||||
|
import com.whdc.model.group.Update;
|
||||||
|
import com.whdc.model.vo.AdcdTree;
|
||||||
|
import com.whdc.service.IAdinfoService;
|
||||||
|
import com.whdc.utils.ResultJson;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "行政区划基础信息 - Controller")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/adinfo")
|
||||||
|
public class AdinfoController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IAdinfoService service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询所有")
|
||||||
|
@PostMapping(value = "find")
|
||||||
|
public ResultJson<Adinfo> find(@RequestBody Adinfo dto) {
|
||||||
|
|
||||||
|
return ResultJson.ok(service.find(dto));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "分页查询")
|
||||||
|
@PostMapping(value = "page")
|
||||||
|
public ResultJson<Adinfo> page(@RequestBody Adinfo dto) {
|
||||||
|
|
||||||
|
return ResultJson.ok(service.page(dto));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/tree/{adcdOradnm}")
|
||||||
|
@ApiOperation(value = "树型查询")
|
||||||
|
public ResultJson<List<AdcdTree>> tree(@PathVariable("adcdOradnm")
|
||||||
|
@ApiParam(value = "编码或名称,all: 查询全部")
|
||||||
|
String adcdOradnm) {
|
||||||
|
|
||||||
|
// 查询全部标识
|
||||||
|
if ("all".equals(adcdOradnm)) {
|
||||||
|
adcdOradnm = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<AdcdTree> list = service.tree(adcdOradnm, adcdOradnm);
|
||||||
|
return ResultJson.ok(list);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "添加")
|
||||||
|
@PostMapping(value = "save")
|
||||||
|
public ResultJson insert(@RequestBody @Validated(Insert.class) Adinfo model) {
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(
|
||||||
|
service.lambdaQuery()
|
||||||
|
.eq(Adinfo::getAdcd,String.valueOf(model.getAdcd()).trim())
|
||||||
|
.or()
|
||||||
|
.eq(Adinfo::getAdnm,String.valueOf(model.getAdnm()).trim())
|
||||||
|
.list())
|
||||||
|
){
|
||||||
|
return ResultJson.error("该名称或编码重复");
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultJson.ok(service.save(model));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "修改")
|
||||||
|
@PostMapping(value = "edit")
|
||||||
|
public ResultJson update(@RequestBody @Validated(Update.class) Adinfo model) {
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(
|
||||||
|
service.lambdaQuery()
|
||||||
|
.eq(Adinfo::getAdcd,String.valueOf(model.getAdcd()).trim())
|
||||||
|
.or()
|
||||||
|
.eq(Adinfo::getAdnm,String.valueOf(model.getAdnm()).trim())
|
||||||
|
.list())
|
||||||
|
){
|
||||||
|
return ResultJson.error("该名称重复");
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultJson.ok(service.updateById(model));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "删除")
|
||||||
|
@GetMapping(value = "del/{id}")
|
||||||
|
public ResultJson delete(@PathVariable("id") Integer id) {
|
||||||
|
|
||||||
|
|
||||||
|
if (Objects.isNull(service.getById(id))) {
|
||||||
|
|
||||||
|
return ResultJson.error("当前数据不存在");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultJson.ok(service.removeById(id));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,138 +0,0 @@
|
||||||
package com.whdc.controller;
|
|
||||||
|
|
||||||
|
|
||||||
import com.whdc.model.dto.FindRuleDto;
|
|
||||||
import com.whdc.model.entity.ERule;
|
|
||||||
import com.whdc.model.entity.EStationRules;
|
|
||||||
import com.whdc.model.group.Insert;
|
|
||||||
import com.whdc.model.group.Update;
|
|
||||||
import com.whdc.service.IERuleService;
|
|
||||||
import com.whdc.service.IEStationRulesService;
|
|
||||||
import com.whdc.utils.ResultJson;
|
|
||||||
import com.whdc.valid.bean.ItemType;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author xusan
|
|
||||||
* @since 2023-03-19
|
|
||||||
*/
|
|
||||||
@Slf4j
|
|
||||||
@Api(tags = "规则管理 - Controller")
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/eRule")
|
|
||||||
public class ERuleController {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IERuleService ieRuleService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IEStationRulesService ieStationRulesService;
|
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "查询所有")
|
|
||||||
@PostMapping(value = "list")
|
|
||||||
public ResultJson list() {
|
|
||||||
|
|
||||||
return ResultJson.ok(ieRuleService.list());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "分页查询")
|
|
||||||
@PostMapping(value = "page")
|
|
||||||
public ResultJson page(@RequestBody FindRuleDto ruleDto) {
|
|
||||||
|
|
||||||
return ResultJson.ok(ieRuleService.page(ruleDto));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "添加")
|
|
||||||
@PostMapping(value = "save")
|
|
||||||
public ResultJson insert(@RequestBody @Validated(Insert.class) ERule model) {
|
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(
|
|
||||||
ieRuleService.lambdaQuery()
|
|
||||||
.eq(ERule::getName,String.valueOf(model.getName()).trim())
|
|
||||||
.list())
|
|
||||||
){
|
|
||||||
return ResultJson.error("该名称重复");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
|
||||||
Objects.isNull(model.getDiffMax())
|
|
||||||
&& Objects.isNull(model.getMin())
|
|
||||||
&& Objects.isNull(model.getMax())
|
|
||||||
&& Objects.isNull(model.getDuration())
|
|
||||||
&& Objects.isNull(model.getLagTime())
|
|
||||||
&& Objects.isNull(model.getLeadingTime())
|
|
||||||
){
|
|
||||||
return ResultJson.error("请设置规则");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ItemType.map().containsKey(model.getItem())) {
|
|
||||||
return ResultJson.error("规则类型不存在");
|
|
||||||
}
|
|
||||||
|
|
||||||
return ResultJson.ok(ieRuleService.save(model));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "修改")
|
|
||||||
@PostMapping(value = "edit")
|
|
||||||
public ResultJson update(@RequestBody @Validated(Update.class) ERule model) {
|
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(
|
|
||||||
ieRuleService.lambdaQuery()
|
|
||||||
.eq(ERule::getName,String.valueOf(model.getName()).trim())
|
|
||||||
.ne(ERule::getId, model.getId())
|
|
||||||
.list())
|
|
||||||
){
|
|
||||||
return ResultJson.error("该名称重复");
|
|
||||||
}
|
|
||||||
|
|
||||||
return ResultJson.ok(ieRuleService.updateById(model));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "删除")
|
|
||||||
@GetMapping(value = "del/{id}")
|
|
||||||
public ResultJson delete(@PathVariable("id") Integer id) {
|
|
||||||
|
|
||||||
|
|
||||||
if (Objects.isNull(ieRuleService.getById(id))) {
|
|
||||||
|
|
||||||
return ResultJson.error("当前数据不存在");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ieStationRulesService.lambdaUpdate()
|
|
||||||
.set(EStationRules::getDel,"0")
|
|
||||||
.eq(EStationRules::getRuleId,id)
|
|
||||||
.update()) {
|
|
||||||
|
|
||||||
log.info("规则关联删除失败");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return ResultJson.ok(ieRuleService.removeById(id));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "获取规则类型")
|
|
||||||
@GetMapping(value = "getItem")
|
|
||||||
public ResultJson getItem() {
|
|
||||||
return ResultJson.ok(ItemType.list());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,123 +0,0 @@
|
||||||
package com.whdc.controller;
|
|
||||||
|
|
||||||
|
|
||||||
import com.whdc.model.dto.ERuleDtoTest;
|
|
||||||
import com.whdc.model.dto.FindStationDto;
|
|
||||||
import com.whdc.model.entity.EStationRules;
|
|
||||||
import com.whdc.model.group.Insert;
|
|
||||||
import com.whdc.model.group.Update;
|
|
||||||
import com.whdc.service.IERuleService;
|
|
||||||
import com.whdc.service.IEStationRulesService;
|
|
||||||
import com.whdc.utils.ResultJson;
|
|
||||||
import com.whdc.valid.service.ValidateService;
|
|
||||||
import io.swagger.annotations.Api;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author xusan
|
|
||||||
* @since 2023-03-19
|
|
||||||
*/
|
|
||||||
@Api(tags = "站点规则管理 - Controller")
|
|
||||||
@RestController
|
|
||||||
@RequestMapping("/eStationRule")
|
|
||||||
public class EStationRulesController {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IEStationRulesService ieStationRulesService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IERuleService ieruleService;
|
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "查询全部")
|
|
||||||
@PostMapping(value = "find")
|
|
||||||
public ResultJson find(@RequestBody FindStationDto eStationRules) {
|
|
||||||
return ResultJson.ok(ieStationRulesService.find(eStationRules));
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "分页查询")
|
|
||||||
@PostMapping(value = "page")
|
|
||||||
public ResultJson page(@RequestBody FindStationDto eStationRules) {
|
|
||||||
return ResultJson.ok(ieStationRulesService.page(eStationRules));
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "新增测站规则")
|
|
||||||
@PostMapping(value = "save")
|
|
||||||
public ResultJson bind(@RequestBody @Validated({Insert.class}) EStationRules eStationRules) {
|
|
||||||
|
|
||||||
if (Objects.isNull(ieruleService.getById(eStationRules.getRuleId()))) {
|
|
||||||
return ResultJson.error("当前规则不存在");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CollectionUtils.isNotEmpty(
|
|
||||||
ieStationRulesService.lambdaQuery()
|
|
||||||
.eq(EStationRules::getStcd,eStationRules.getStcd())
|
|
||||||
.eq(EStationRules::getRuleId,eStationRules.getRuleId())
|
|
||||||
.list()
|
|
||||||
)){
|
|
||||||
return ResultJson.error("当前规则和测站已绑定");
|
|
||||||
}
|
|
||||||
|
|
||||||
return ResultJson.ok(ieStationRulesService.save(eStationRules));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "修改测站规则")
|
|
||||||
@PostMapping(value = "update")
|
|
||||||
public ResultJson bindUpdate(@RequestBody @Validated({Update.class}) EStationRules eStationRules) {
|
|
||||||
|
|
||||||
if (Objects.isNull(ieStationRulesService.getById(eStationRules.getId()))) {
|
|
||||||
|
|
||||||
return ResultJson.error("当前数据不存在");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Objects.isNull(ieruleService.getById(eStationRules.getRuleId()))) {
|
|
||||||
return ResultJson.error("当前规则不存在");
|
|
||||||
}
|
|
||||||
|
|
||||||
// if (CollectionUtils.isNotEmpty(
|
|
||||||
// ieStationRulesService.lambdaQuery()
|
|
||||||
// .eq(EStationRules::getStcd,eStationRules.getStcd())
|
|
||||||
// .eq(EStationRules::getRuleId,eStationRules.getRuleId())
|
|
||||||
// .ne(EStationRules::getId,eStationRules.getId())
|
|
||||||
// .list()
|
|
||||||
// )){
|
|
||||||
// return ResultJson.error("当前规则和测站已绑定");
|
|
||||||
// }
|
|
||||||
|
|
||||||
return ResultJson.ok(ieStationRulesService.updateById(eStationRules));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "删除")
|
|
||||||
@GetMapping(value = "del/{id}")
|
|
||||||
public ResultJson del(@PathVariable Integer id) {
|
|
||||||
|
|
||||||
EStationRules model = ieStationRulesService.getById(id);
|
|
||||||
if (Objects.isNull(model)) {
|
|
||||||
|
|
||||||
return ResultJson.error("当前数据不存在");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
return ResultJson.ok(ieStationRulesService.removeById(id,model));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ValidateService validateService;
|
|
||||||
|
|
||||||
@ApiOperation(value = "规则测试 ")
|
|
||||||
@PostMapping(value = "testRule")
|
|
||||||
public ResultJson testRule(@RequestBody ERuleDtoTest test) {
|
|
||||||
return ResultJson.ok(validateService.validate(test.getStr() ,test.getOldStr()));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
package com.whdc.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.whdc.model.entity.Fc;
|
||||||
|
import com.whdc.model.group.Insert;
|
||||||
|
import com.whdc.model.group.Update;
|
||||||
|
import com.whdc.service.IFcService;
|
||||||
|
import com.whdc.utils.ResultJson;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "常用联系人 - Controller")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/fc")
|
||||||
|
public class FcController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IFcService service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询所有")
|
||||||
|
@PostMapping(value = "find")
|
||||||
|
public ResultJson<Fc> find(@RequestBody Fc dto) {
|
||||||
|
|
||||||
|
return ResultJson.ok(service.find(dto));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "分页查询")
|
||||||
|
@PostMapping(value = "page")
|
||||||
|
public ResultJson<Fc> page(@RequestBody Fc dto) {
|
||||||
|
|
||||||
|
return ResultJson.ok(service.page(dto));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "添加")
|
||||||
|
@PostMapping(value = "save")
|
||||||
|
public ResultJson insert(@RequestBody @Validated(Insert.class) Fc model) {
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(
|
||||||
|
service.lambdaQuery()
|
||||||
|
.eq(Fc::getName,String.valueOf(model.getName()).trim())
|
||||||
|
.list())
|
||||||
|
){
|
||||||
|
return ResultJson.error("该名称重复");
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultJson.ok(service.save(model));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "修改")
|
||||||
|
@PostMapping(value = "edit")
|
||||||
|
public ResultJson update(@RequestBody @Validated(Update.class) Fc model) {
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(
|
||||||
|
service.lambdaQuery()
|
||||||
|
.eq(Fc::getName,String.valueOf(model.getName()).trim())
|
||||||
|
.ne(Fc::getId, model.getId())
|
||||||
|
.list())
|
||||||
|
){
|
||||||
|
return ResultJson.error("该名称重复");
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultJson.ok(service.updateById(model));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "删除")
|
||||||
|
@GetMapping(value = "del/{id}")
|
||||||
|
public ResultJson delete(@PathVariable("id") Integer id) {
|
||||||
|
|
||||||
|
|
||||||
|
if (Objects.isNull(service.getById(id))) {
|
||||||
|
|
||||||
|
return ResultJson.error("当前数据不存在");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultJson.ok(service.removeById(id));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
package com.whdc.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.whdc.model.entity.LoginInfo;
|
||||||
|
import com.whdc.model.group.Insert;
|
||||||
|
import com.whdc.model.group.Update;
|
||||||
|
import com.whdc.service.ILoginInfoService;
|
||||||
|
import com.whdc.utils.ResultJson;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "登录日志 - Controller")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/logininfo")
|
||||||
|
public class LoginInfoController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ILoginInfoService service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询所有")
|
||||||
|
@PostMapping(value = "find")
|
||||||
|
public ResultJson<LoginInfo> find(@RequestBody LoginInfo dto) {
|
||||||
|
|
||||||
|
return ResultJson.ok(service.find(dto));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "分页查询")
|
||||||
|
@PostMapping(value = "page")
|
||||||
|
public ResultJson<LoginInfo> page(@RequestBody LoginInfo dto) {
|
||||||
|
|
||||||
|
return ResultJson.ok(service.page(dto));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "添加")
|
||||||
|
@PostMapping(value = "save")
|
||||||
|
public ResultJson insert(@RequestBody @Validated(Insert.class) LoginInfo model) {
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(
|
||||||
|
service.lambdaQuery()
|
||||||
|
.eq(LoginInfo::getName,String.valueOf(model.getName()).trim())
|
||||||
|
.list())
|
||||||
|
){
|
||||||
|
return ResultJson.error("该名称重复");
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultJson.ok(service.save(model));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "修改")
|
||||||
|
@PostMapping(value = "edit")
|
||||||
|
public ResultJson update(@RequestBody @Validated(Update.class) LoginInfo model) {
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(
|
||||||
|
service.lambdaQuery()
|
||||||
|
.eq(LoginInfo::getName,String.valueOf(model.getName()).trim())
|
||||||
|
.ne(LoginInfo::getId, model.getId())
|
||||||
|
.list())
|
||||||
|
){
|
||||||
|
return ResultJson.error("该名称重复");
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultJson.ok(service.updateById(model));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "删除")
|
||||||
|
@GetMapping(value = "del/{id}")
|
||||||
|
public ResultJson delete(@PathVariable("id") Integer id) {
|
||||||
|
|
||||||
|
|
||||||
|
if (Objects.isNull(service.getById(id))) {
|
||||||
|
|
||||||
|
return ResultJson.error("当前数据不存在");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultJson.ok(service.removeById(id));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
package com.whdc.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.whdc.model.entity.Organization;
|
||||||
|
import com.whdc.model.group.Insert;
|
||||||
|
import com.whdc.model.group.Update;
|
||||||
|
import com.whdc.service.IOrganizationService;
|
||||||
|
import com.whdc.utils.ResultJson;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "组织表 - Controller")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/organization")
|
||||||
|
public class OrganizationController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IOrganizationService service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询所有")
|
||||||
|
@PostMapping(value = "find")
|
||||||
|
public ResultJson<Organization> find(@RequestBody Organization dto) {
|
||||||
|
|
||||||
|
return ResultJson.ok(service.find(dto));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "分页查询")
|
||||||
|
@PostMapping(value = "page")
|
||||||
|
public ResultJson<Organization> page(@RequestBody Organization dto) {
|
||||||
|
|
||||||
|
return ResultJson.ok(service.page(dto));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "添加")
|
||||||
|
@PostMapping(value = "save")
|
||||||
|
public ResultJson insert(@RequestBody @Validated(Insert.class) Organization model) {
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(
|
||||||
|
service.lambdaQuery()
|
||||||
|
.eq(Organization::getName,String.valueOf(model.getName()).trim())
|
||||||
|
.list())
|
||||||
|
){
|
||||||
|
return ResultJson.error("该名称重复");
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultJson.ok(service.save(model));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "修改")
|
||||||
|
@PostMapping(value = "edit")
|
||||||
|
public ResultJson update(@RequestBody @Validated(Update.class) Organization model) {
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(
|
||||||
|
service.lambdaQuery()
|
||||||
|
.eq(Organization::getName,String.valueOf(model.getName()).trim())
|
||||||
|
.ne(Organization::getId, model.getId())
|
||||||
|
.list())
|
||||||
|
){
|
||||||
|
return ResultJson.error("该名称重复");
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultJson.ok(service.updateById(model));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "删除")
|
||||||
|
@GetMapping(value = "del/{id}")
|
||||||
|
public ResultJson delete(@PathVariable("id") Integer id) {
|
||||||
|
|
||||||
|
|
||||||
|
if (Objects.isNull(service.getById(id))) {
|
||||||
|
|
||||||
|
return ResultJson.error("当前数据不存在");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultJson.ok(service.removeById(id));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
package com.whdc.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.whdc.model.entity.UnitDict;
|
||||||
|
import com.whdc.model.group.Insert;
|
||||||
|
import com.whdc.model.group.Update;
|
||||||
|
import com.whdc.service.IUnitDictService;
|
||||||
|
import com.whdc.utils.ResultJson;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "单位字典表 - Controller")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/unitdict")
|
||||||
|
public class UnitDictController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IUnitDictService service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询所有")
|
||||||
|
@PostMapping(value = "find")
|
||||||
|
public ResultJson<UnitDict> find(@RequestBody UnitDict dto) {
|
||||||
|
|
||||||
|
return ResultJson.ok(service.find(dto));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "分页查询")
|
||||||
|
@PostMapping(value = "page")
|
||||||
|
public ResultJson<UnitDict> page(@RequestBody UnitDict dto) {
|
||||||
|
|
||||||
|
return ResultJson.ok(service.page(dto));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "添加")
|
||||||
|
@PostMapping(value = "save")
|
||||||
|
public ResultJson insert(@RequestBody @Validated(Insert.class) UnitDict model) {
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(
|
||||||
|
service.lambdaQuery()
|
||||||
|
.eq(UnitDict::getName,String.valueOf(model.getName()).trim())
|
||||||
|
.list())
|
||||||
|
){
|
||||||
|
return ResultJson.error("该名称重复");
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultJson.ok(service.save(model));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "修改")
|
||||||
|
@PostMapping(value = "edit")
|
||||||
|
public ResultJson update(@RequestBody @Validated(Update.class) UnitDict model) {
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(
|
||||||
|
service.lambdaQuery()
|
||||||
|
.eq(UnitDict::getName,String.valueOf(model.getName()).trim())
|
||||||
|
.ne(UnitDict::getId, model.getId())
|
||||||
|
.list())
|
||||||
|
){
|
||||||
|
return ResultJson.error("该名称重复");
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultJson.ok(service.updateById(model));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "删除")
|
||||||
|
@GetMapping(value = "del/{id}")
|
||||||
|
public ResultJson delete(@PathVariable("id") Integer id) {
|
||||||
|
|
||||||
|
|
||||||
|
if (Objects.isNull(service.getById(id))) {
|
||||||
|
|
||||||
|
return ResultJson.error("当前数据不存在");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultJson.ok(service.removeById(id));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
package com.whdc.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.whdc.model.entity.User;
|
||||||
|
import com.whdc.model.group.Insert;
|
||||||
|
import com.whdc.model.group.Update;
|
||||||
|
import com.whdc.service.IUserService;
|
||||||
|
import com.whdc.utils.ResultJson;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "用户表 - Controller")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/user")
|
||||||
|
public class UserController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IUserService service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询所有")
|
||||||
|
@PostMapping(value = "find")
|
||||||
|
public ResultJson<User> find(@RequestBody User dto) {
|
||||||
|
|
||||||
|
return ResultJson.ok(service.find(dto));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "分页查询")
|
||||||
|
@PostMapping(value = "page")
|
||||||
|
public ResultJson<User> page(@RequestBody User dto) {
|
||||||
|
|
||||||
|
return ResultJson.ok(service.page(dto));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "添加")
|
||||||
|
@PostMapping(value = "save")
|
||||||
|
public ResultJson insert(@RequestBody @Validated(Insert.class) User model) {
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(
|
||||||
|
service.lambdaQuery()
|
||||||
|
.eq(User::getName,String.valueOf(model.getName()).trim())
|
||||||
|
.list())
|
||||||
|
){
|
||||||
|
return ResultJson.error("该名称重复");
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultJson.ok(service.save(model));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "修改")
|
||||||
|
@PostMapping(value = "edit")
|
||||||
|
public ResultJson update(@RequestBody @Validated(Update.class) User model) {
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(
|
||||||
|
service.lambdaQuery()
|
||||||
|
.eq(User::getName,String.valueOf(model.getName()).trim())
|
||||||
|
.ne(User::getId, model.getId())
|
||||||
|
.list())
|
||||||
|
){
|
||||||
|
return ResultJson.error("该名称重复");
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultJson.ok(service.updateById(model));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "删除")
|
||||||
|
@GetMapping(value = "del/{id}")
|
||||||
|
public ResultJson delete(@PathVariable("id") Integer id) {
|
||||||
|
|
||||||
|
|
||||||
|
if (Objects.isNull(service.getById(id))) {
|
||||||
|
|
||||||
|
return ResultJson.error("当前数据不存在");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResultJson.ok(service.removeById(id));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
package com.whdc.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.whdc.model.entity.Versions;
|
||||||
|
import com.whdc.service.IVersionsService;
|
||||||
|
import com.whdc.utils.ResultJson;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Api(tags = "通讯录日志 - Controller")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/versions")
|
||||||
|
public class VersionsController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IVersionsService service;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询所有")
|
||||||
|
@PostMapping(value = "find")
|
||||||
|
public ResultJson<Versions> find(@RequestBody Versions dto) {
|
||||||
|
|
||||||
|
return ResultJson.ok(service.find(dto));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "分页查询")
|
||||||
|
@PostMapping(value = "page")
|
||||||
|
public ResultJson<Versions> page(@RequestBody Versions dto) {
|
||||||
|
|
||||||
|
return ResultJson.ok(service.page(dto));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,10 +1,20 @@
|
||||||
package com.whdc.mapper;
|
package com.whdc.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import com.whdc.model.entity.AbUdR;
|
import com.whdc.model.entity.AbUdR;
|
||||||
|
|
||||||
public interface AbUdRMapper extends BaseMapper<AbUdR> {
|
|
||||||
int insert(AbUdR record);
|
|
||||||
|
|
||||||
int insertSelective(AbUdR record);
|
import java.util.List;
|
||||||
}
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
public interface AbUdRMapper extends BaseMapper<AbUdR> {
|
||||||
|
|
||||||
|
IPage<AbUdR> page(@Param("page") IPage<AbUdR> page, @Param("dto") AbUdR dto);
|
||||||
|
|
||||||
|
List<AbUdR> find(@Param("dto") AbUdR dto);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,18 +1,20 @@
|
||||||
package com.whdc.mapper;
|
package com.whdc.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.whdc.model.dto.AddressBootDto;
|
||||||
import com.whdc.model.entity.AddressBook;
|
import com.whdc.model.entity.AddressBook;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
public interface AddressBookMapper extends BaseMapper<AddressBook> {
|
public interface AddressBookMapper extends BaseMapper<AddressBook> {
|
||||||
int deleteByPrimaryKey(Integer id);
|
|
||||||
|
|
||||||
int insert(AddressBook record);
|
IPage<AddressBook> page(@Param("page") IPage<AddressBook> page, @Param("dto") AddressBootDto dto);
|
||||||
|
|
||||||
int insertSelective(AddressBook record);
|
List<AddressBook> find(@Param("dto") AddressBook dto);
|
||||||
|
|
||||||
AddressBook selectByPrimaryKey(Integer id);
|
}
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(AddressBook record);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(AddressBook record);
|
|
||||||
}
|
|
||||||
|
|
@ -1,18 +1,21 @@
|
||||||
package com.whdc.mapper;
|
package com.whdc.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import com.whdc.model.entity.Adinfo;
|
import com.whdc.model.entity.Adinfo;
|
||||||
|
|
||||||
public interface AdinfoMapper extends BaseMapper<Adinfo> {
|
|
||||||
int deleteByPrimaryKey(String adcd);
|
|
||||||
|
|
||||||
int insert(Adinfo record);
|
import java.util.List;
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
public interface AdinfoMapper extends BaseMapper<Adinfo> {
|
||||||
|
|
||||||
int insertSelective(Adinfo record);
|
IPage<Adinfo> page(@Param("page") IPage<Adinfo> page, @Param("dto") Adinfo dto);
|
||||||
|
|
||||||
Adinfo selectByPrimaryKey(String adcd);
|
List<Adinfo> find(@Param("dto") Adinfo dto);
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(Adinfo record);
|
List<Adinfo> selectByCdOrNm(@Param("adcd") String adcd, @Param("adnm")String adnm);
|
||||||
|
}
|
||||||
int updateByPrimaryKey(Adinfo record);
|
|
||||||
}
|
|
||||||
|
|
@ -1,18 +1,20 @@
|
||||||
package com.whdc.mapper;
|
package com.whdc.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import com.whdc.model.entity.Fc;
|
import com.whdc.model.entity.Fc;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
public interface FcMapper extends BaseMapper<Fc> {
|
public interface FcMapper extends BaseMapper<Fc> {
|
||||||
int deleteByPrimaryKey(Integer id);
|
|
||||||
|
|
||||||
int insert(Fc record);
|
IPage<Fc> page(@Param("page") IPage<Fc> page, @Param("dto") Fc dto);
|
||||||
|
|
||||||
int insertSelective(Fc record);
|
List<Fc> find(@Param("dto") Fc dto);
|
||||||
|
|
||||||
Fc selectByPrimaryKey(Integer id);
|
}
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(Fc record);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(Fc record);
|
|
||||||
}
|
|
||||||
|
|
@ -1,18 +1,20 @@
|
||||||
package com.whdc.mapper;
|
package com.whdc.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import com.whdc.model.entity.LoginInfo;
|
import com.whdc.model.entity.LoginInfo;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
public interface LoginInfoMapper extends BaseMapper<LoginInfo> {
|
public interface LoginInfoMapper extends BaseMapper<LoginInfo> {
|
||||||
int deleteByPrimaryKey(Integer id);
|
|
||||||
|
|
||||||
int insert(LoginInfo record);
|
IPage<LoginInfo> page(@Param("page") IPage<LoginInfo> page, @Param("dto") LoginInfo dto);
|
||||||
|
|
||||||
int insertSelective(LoginInfo record);
|
List<LoginInfo> find(@Param("dto") LoginInfo dto);
|
||||||
|
|
||||||
LoginInfo selectByPrimaryKey(Integer id);
|
}
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(LoginInfo record);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(LoginInfo record);
|
|
||||||
}
|
|
||||||
|
|
@ -1,18 +1,20 @@
|
||||||
package com.whdc.mapper;
|
package com.whdc.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import com.whdc.model.entity.Organization;
|
import com.whdc.model.entity.Organization;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
public interface OrganizationMapper extends BaseMapper<Organization> {
|
public interface OrganizationMapper extends BaseMapper<Organization> {
|
||||||
int deleteByPrimaryKey(Integer id);
|
|
||||||
|
|
||||||
int insert(Organization record);
|
IPage<Organization> page(@Param("page") IPage<Organization> page, @Param("dto") Organization dto);
|
||||||
|
|
||||||
int insertSelective(Organization record);
|
List<Organization> find(@Param("dto") Organization dto);
|
||||||
|
|
||||||
Organization selectByPrimaryKey(Integer id);
|
}
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(Organization record);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(Organization record);
|
|
||||||
}
|
|
||||||
|
|
@ -1,19 +1,20 @@
|
||||||
package com.whdc.mapper;
|
package com.whdc.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.whdc.model.entity.Organization;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import com.whdc.model.entity.UnitDict;
|
import com.whdc.model.entity.UnitDict;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
public interface UnitDictMapper extends BaseMapper<UnitDict> {
|
public interface UnitDictMapper extends BaseMapper<UnitDict> {
|
||||||
int deleteByPrimaryKey(Integer id);
|
|
||||||
|
|
||||||
int insert(UnitDict record);
|
IPage<UnitDict> page(@Param("page") IPage<UnitDict> page, @Param("dto") UnitDict dto);
|
||||||
|
|
||||||
int insertSelective(UnitDict record);
|
List<UnitDict> find(@Param("dto") UnitDict dto);
|
||||||
|
|
||||||
UnitDict selectByPrimaryKey(Integer id);
|
}
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(UnitDict record);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(UnitDict record);
|
|
||||||
}
|
|
||||||
|
|
@ -1,19 +1,20 @@
|
||||||
package com.whdc.mapper;
|
package com.whdc.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.whdc.model.entity.UnitDict;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import com.whdc.model.entity.User;
|
import com.whdc.model.entity.User;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
public interface UserMapper extends BaseMapper<User> {
|
public interface UserMapper extends BaseMapper<User> {
|
||||||
int deleteByPrimaryKey(Integer id);
|
|
||||||
|
|
||||||
int insert(User record);
|
IPage<User> page(@Param("page") IPage<User> page, @Param("dto") User dto);
|
||||||
|
|
||||||
int insertSelective(User record);
|
List<User> find(@Param("dto") User dto);
|
||||||
|
|
||||||
User selectByPrimaryKey(Integer id);
|
}
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(User record);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(User record);
|
|
||||||
}
|
|
||||||
|
|
@ -1,18 +1,20 @@
|
||||||
package com.whdc.mapper;
|
package com.whdc.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import com.whdc.model.entity.Versions;
|
import com.whdc.model.entity.Versions;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
public interface VersionsMapper extends BaseMapper<Versions> {
|
public interface VersionsMapper extends BaseMapper<Versions> {
|
||||||
int deleteByPrimaryKey(Integer id);
|
|
||||||
|
|
||||||
int insert(Versions record);
|
IPage<Versions> page(@Param("page") IPage<Versions> page, @Param("dto") Versions dto);
|
||||||
|
|
||||||
int insertSelective(Versions record);
|
List<Versions> find(@Param("dto") Versions dto);
|
||||||
|
|
||||||
Versions selectByPrimaryKey(Integer id);
|
}
|
||||||
|
|
||||||
int updateByPrimaryKeySelective(Versions record);
|
|
||||||
|
|
||||||
int updateByPrimaryKey(Versions record);
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.whdc.model.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2023年3月20日08:57:22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AddressBootDto extends FindPageDto {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户单位id")
|
||||||
|
private String dictId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "用户手机号")
|
||||||
|
private String phone;
|
||||||
|
}
|
||||||
|
|
@ -1,72 +0,0 @@
|
||||||
package com.whdc.model.dto;
|
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import io.swagger.annotations.ApiParam;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import javax.validation.constraints.Max;
|
|
||||||
import javax.validation.constraints.NotEmpty;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author xusan
|
|
||||||
* @date 2023年3月20日08:57:22
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class ERuleDto {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键自增
|
|
||||||
*/
|
|
||||||
@ApiParam(value = "主键自增", required = true, example = "0")
|
|
||||||
@ApiModelProperty(value = "主键自增", required = true, dataType = "Integer", example = "0")
|
|
||||||
private Integer id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 规则名称
|
|
||||||
*/
|
|
||||||
@ApiParam(value = "规则名称", required = true, example = "规则名称")
|
|
||||||
@ApiModelProperty(value = "规则名称", required = true, dataType = "String", example = "规则名称")
|
|
||||||
@NotEmpty(message = "规则名称不能为空")
|
|
||||||
@Max(50)
|
|
||||||
private String name;
|
|
||||||
/**
|
|
||||||
* 1:正常值范围规则
|
|
||||||
* 2:最大差值规则
|
|
||||||
*/
|
|
||||||
@ApiParam(value = "1:正常值范围规则 2:最大差值规则", required = false, example = "1:正常值范围规则 2:最大差值规则 ")
|
|
||||||
@ApiModelProperty(value = "1:正常值范围规则 2:最大差值规则, required = false ", dataType = "String", example = " 1:正常值范围规则 2:最大差值规则 ")
|
|
||||||
@NotEmpty(message = "规则类型不能为空")
|
|
||||||
private String ruleType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 测站类型
|
|
||||||
*/
|
|
||||||
@ApiParam(value = "测站类型", required = true, example = "测站类型")
|
|
||||||
@ApiModelProperty(value = "测站类型", required = true, dataType = "String", example = "测站类型")
|
|
||||||
@NotEmpty(message = "测站类型不能为空")
|
|
||||||
@Max(2)
|
|
||||||
private String type;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 最小值
|
|
||||||
*/
|
|
||||||
@ApiParam(value = "最小值", required = false, example = "最小值")
|
|
||||||
@ApiModelProperty(value = "最小值", required = false, dataType = "String", example = "最小值")
|
|
||||||
@Max(100)
|
|
||||||
private String min;
|
|
||||||
/**
|
|
||||||
* 最大值
|
|
||||||
*/
|
|
||||||
@ApiParam(value = "最大值", required = false, example = "最大值")
|
|
||||||
@ApiModelProperty(value = "最大值", required = false, dataType = "String", example = "最大值")
|
|
||||||
@Max(100)
|
|
||||||
private String max;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 两条数据之间的差值
|
|
||||||
*/
|
|
||||||
@ApiParam(value = "两条数据之间的差值", required = false, example = "两条数据之间的差值")
|
|
||||||
@ApiModelProperty(value = "两条数据之间的差值", required = false, dataType = "String", example = "两条数据之间的差值")
|
|
||||||
@Max(100)
|
|
||||||
private String lastDataMax;
|
|
||||||
}
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
package com.whdc.model.dto;
|
|
||||||
|
|
||||||
import com.whdc.annotation.DateTimeRange;
|
|
||||||
import com.whdc.model.group.Find;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotEmpty;
|
|
||||||
import javax.validation.constraints.Pattern;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author xusan
|
|
||||||
* @date 2023年3月20日08:57:22
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@DateTimeRange(message = "时间间隔不能超过 31 天", startField = "stm", endField = "etm", interval = 31, timeUnit = TimeUnit.DAYS)
|
|
||||||
public class FindRuleDto extends FindPageDto {
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "规则名称", dataType = "java.lang.String")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "规则类型", dataType = "java.lang.String")
|
|
||||||
private String item;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "起始时间", example = "2023-03-20 10:00:00")
|
|
||||||
@NotEmpty(message = "起始时间不能为空", groups = Find.class)
|
|
||||||
@Pattern(regexp = "^[1-9]\\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\\s+(20|21|22|23|[0-1]\\d):[0-5]\\d:[0-5]\\d$",
|
|
||||||
message = "时间格式应为:yyyy-MM-dd HH:mm:ss", groups = Find.class)
|
|
||||||
private String stm;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "截止时间", example = "2023-03-20 10:00:00")
|
|
||||||
@NotEmpty(message = "截止时间不能为空", groups = Find.class)
|
|
||||||
@Pattern(regexp = "^[1-9]\\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\\s+(20|21|22|23|[0-1]\\d):[0-5]\\d:[0-5]\\d$",
|
|
||||||
message = "时间格式应为:yyyy-MM-dd HH:mm:ss", groups = Find.class)
|
|
||||||
private String etm;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
package com.whdc.model.dto;
|
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author xusan
|
|
||||||
* @date 2023年3月20日08:57:22
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class FindStationDto extends FindPageDto {
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "规则名称", dataType = "java.lang.String")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "测站编码", dataType = "java.lang.String")
|
|
||||||
private String stcd;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "适用测站类型", dataType = "java.lang.String")
|
|
||||||
private String item;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,13 +1,42 @@
|
||||||
package com.whdc.model.entity;
|
package com.whdc.model.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;import com.baomidou.mybatisplus.annotation.IdType;import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;import lombok.experimental.Accessors;
|
||||||
|
import com.whdc.model.group.Insert;
|
||||||
|
import com.whdc.model.group.Update;
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
public class AbUdR {
|
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(description = "用户单位字典关联表")
|
||||||
|
@TableName("FXKH_TXL.AB_UD_R")
|
||||||
|
public class AbUdR extends Model<AbUdR> implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableField("AD_ID")
|
||||||
|
@ApiModelProperty(value = "联系人id")
|
||||||
private Integer adId;
|
private Integer adId;
|
||||||
|
|
||||||
|
@TableField("DICT_ID")
|
||||||
|
@ApiModelProperty(value = "字典id")
|
||||||
private Integer dictId;
|
private Integer dictId;
|
||||||
|
|
||||||
|
@TableField("SORT")
|
||||||
|
@ApiModelProperty(value = "序号")
|
||||||
private Integer sort;
|
private Integer sort;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,28 +1,87 @@
|
||||||
package com.whdc.model.entity;
|
package com.whdc.model.entity;
|
||||||
|
|
||||||
public class AddressBook {
|
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.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.whdc.model.group.Insert;
|
||||||
|
import com.whdc.model.group.Update;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(description = "通讯录")
|
||||||
|
@TableName("FXKH_TXL.ADDRESS_BOOK")
|
||||||
|
public class AddressBook extends Model<AddressBook> implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value = "ID",type = IdType.AUTO)
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
@NotNull(message = "id不能为空" , groups = {Update.class})
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
|
|
||||||
|
@NotEmpty(message = "姓名不能为空", groups = {Insert.class,Update.class})
|
||||||
|
@TableField("NAME")
|
||||||
|
@ApiModelProperty(value = "姓名")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@TableField("PHONE")
|
||||||
|
@ApiModelProperty(value = "手机号")
|
||||||
private String phone;
|
private String phone;
|
||||||
|
|
||||||
|
@TableField("TEL")
|
||||||
|
@ApiModelProperty(value = "电话")
|
||||||
private String tel;
|
private String tel;
|
||||||
|
|
||||||
|
@TableField("FAXES")
|
||||||
|
@ApiModelProperty(value = "传真")
|
||||||
private String faxes;
|
private String faxes;
|
||||||
|
|
||||||
|
@TableField("ORGANIZATION")
|
||||||
|
@ApiModelProperty(value = "组织")
|
||||||
private String organization;
|
private String organization;
|
||||||
|
|
||||||
|
@TableField("POSITION")
|
||||||
|
@ApiModelProperty(value = "职务")
|
||||||
private String position;
|
private String position;
|
||||||
|
|
||||||
|
@TableField("COMMENTS")
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
private String comments;
|
private String comments;
|
||||||
|
|
||||||
|
@TableField("URL")
|
||||||
|
@ApiModelProperty(value = "图片路径")
|
||||||
private String url;
|
private String url;
|
||||||
|
|
||||||
|
@TableField("SORT")
|
||||||
|
@ApiModelProperty(value = "序号")
|
||||||
private Integer sort;
|
private Integer sort;
|
||||||
|
|
||||||
|
@TableField("V")
|
||||||
|
@ApiModelProperty(value = "版本")
|
||||||
private Integer v;
|
private Integer v;
|
||||||
|
|
||||||
|
@TableField("ROLE")
|
||||||
|
@ApiModelProperty(value = "0:普通管理员,1:政区管理员,99:系统管理员")
|
||||||
private String role;
|
private String role;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "创建人id")
|
||||||
|
private String createId;
|
||||||
}
|
}
|
||||||
|
|
@ -1,26 +1,39 @@
|
||||||
package com.whdc.model.entity;
|
package com.whdc.model.entity;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.whdc.model.group.Insert;
|
||||||
|
import com.whdc.model.group.Update;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
public class Adinfo {
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(description = "行政区划基础信息")
|
||||||
|
@TableName("FXKH_TXL.ADINFO")
|
||||||
|
public class Adinfo extends Model<Adinfo> implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@NotEmpty(message = "政区编码不能为空", groups = {Insert.class,Update.class})
|
||||||
|
@TableField("ADCD")
|
||||||
|
@ApiModelProperty(value = "政区编码")
|
||||||
private String adcd;
|
private String adcd;
|
||||||
|
|
||||||
|
@NotEmpty(message = "政区名称不能为空", groups = {Insert.class,Update.class})
|
||||||
|
@TableField("ADNM")
|
||||||
|
@ApiModelProperty(value = "政区名称")
|
||||||
private String adnm;
|
private String adnm;
|
||||||
|
|
||||||
private BigDecimal lgtd;
|
|
||||||
|
|
||||||
private BigDecimal lttd;
|
|
||||||
|
|
||||||
private Integer ptcount;
|
|
||||||
|
|
||||||
private Integer hhtcount;
|
|
||||||
|
|
||||||
private Integer htcount;
|
|
||||||
|
|
||||||
private BigDecimal land;
|
|
||||||
|
|
||||||
private BigDecimal pland;
|
|
||||||
|
|
||||||
private Integer ctype;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,147 +0,0 @@
|
||||||
package com.whdc.model.entity;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
|
||||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import com.whdc.model.group.Insert;
|
|
||||||
import com.whdc.model.group.Update;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import io.swagger.annotations.ApiParam;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
|
|
||||||
import javax.validation.constraints.Max;
|
|
||||||
import javax.validation.constraints.NotEmpty;
|
|
||||||
import javax.validation.constraints.NotNull;
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
import static com.whdc.model.MyConstant.DEL;
|
|
||||||
import static com.whdc.model.MyConstant.REC;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author xusan
|
|
||||||
* @date 2023-03-19
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Accessors(chain = true)
|
|
||||||
@ApiModel(description = "正常范围规则表")
|
|
||||||
@TableName("SHZH_IOT.E_RULE")
|
|
||||||
public class ERule extends Model<ERule> implements Serializable {
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 主键自增
|
|
||||||
*/
|
|
||||||
@ApiParam(value = "主键自增", required = true)
|
|
||||||
@ApiModelProperty(value = "主键自增", required = true, dataType = "Integer")
|
|
||||||
@TableId(value = "ID", type = IdType.AUTO)
|
|
||||||
@NotNull(message = "主键不能为空", groups = {Update.class})
|
|
||||||
private Integer id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 规则名称
|
|
||||||
*/
|
|
||||||
@ApiParam(value = "规则名称", required = true, example = "")
|
|
||||||
@ApiModelProperty(value = "规则名称", required = true, dataType = "String")
|
|
||||||
@TableField(value = "NAME", updateStrategy = FieldStrategy.NOT_EMPTY)
|
|
||||||
@NotEmpty(message = "规则名称不能为空", groups = {Insert.class,Update.class})
|
|
||||||
@Max(50)
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 测站类型
|
|
||||||
*/
|
|
||||||
@ApiParam(value = "规则类型", required = true, example = "")
|
|
||||||
@ApiModelProperty(value = "规则类型", required = true, dataType = "String")
|
|
||||||
@TableField(value = "ITEM", updateStrategy = FieldStrategy.IGNORED)
|
|
||||||
@NotEmpty(message = "规则类型不能为空", groups = {Insert.class,Update.class})
|
|
||||||
@Max(50)
|
|
||||||
private String item;
|
|
||||||
|
|
||||||
public void setItem(String item) {
|
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(item)){
|
|
||||||
item = item.toUpperCase(Locale.ROOT);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.item = item;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 最小值
|
|
||||||
*/
|
|
||||||
@ApiParam(value = "最小值", required = false, example = "")
|
|
||||||
@ApiModelProperty(value = "最小值", required = false, dataType = "Numeric")
|
|
||||||
@TableField(value = "MIN", updateStrategy = FieldStrategy.IGNORED)
|
|
||||||
@Max(50)
|
|
||||||
private BigDecimal min;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 最大值
|
|
||||||
*/
|
|
||||||
@ApiParam(value = "最大值", required = false, example = "")
|
|
||||||
@ApiModelProperty(value = "最大值", required = false, dataType = "Numeric")
|
|
||||||
@TableField(value = "MAX", updateStrategy = FieldStrategy.IGNORED)
|
|
||||||
@Max(50)
|
|
||||||
private BigDecimal max;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 最大值
|
|
||||||
*/
|
|
||||||
@ApiParam(value = "两条数据之间的最大差值", required = false, example = "")
|
|
||||||
@ApiModelProperty(value = "两条数据之间的最大差值", required = false, dataType = "Numeric")
|
|
||||||
@TableField(value = "DIFF_MAX", updateStrategy = FieldStrategy.IGNORED)
|
|
||||||
private BigDecimal diffMax;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 最大值
|
|
||||||
*/
|
|
||||||
@ApiParam(value = "时间段, 单位 s", required = false, example = "")
|
|
||||||
@ApiModelProperty(value = "时间段, 单位 s", required = false, dataType = "Numeric")
|
|
||||||
@TableField(value = "DURATION", updateStrategy = FieldStrategy.IGNORED)
|
|
||||||
@Max(10)
|
|
||||||
private Integer duration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 接收超出时间,单位: s ,指接收时间超前范围
|
|
||||||
*/
|
|
||||||
@ApiParam(value = "接收超前时间,单位: s ,指接收时间超前范围", required = false, example = "")
|
|
||||||
@ApiModelProperty(value = "接收超前时间,单位: s ,指接收时间超前范围", required = false, dataType = "Numeric")
|
|
||||||
@TableField(value = "LEADING_TIME", updateStrategy = FieldStrategy.IGNORED)
|
|
||||||
@Max(10)
|
|
||||||
private Integer leadingTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 接收滞后时间,单位: s ,指接收时间滞后范围
|
|
||||||
*/
|
|
||||||
@ApiParam(value = "接收滞后时间,单位: s ,指接收时间滞后范围", required = false, example = "")
|
|
||||||
@ApiModelProperty(value = "接收滞后时间,单位: s ,指接收时间滞后范围", required = false, dataType = "Numeric")
|
|
||||||
@TableField(value = "LAG_TIME", updateStrategy = FieldStrategy.IGNORED)
|
|
||||||
@Max(10)
|
|
||||||
private Integer lagTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建时间
|
|
||||||
*/
|
|
||||||
@ApiParam(value = "创建时间", required = false)
|
|
||||||
@ApiModelProperty(value = "创建时间", required = false, dataType = "Date")
|
|
||||||
@TableField(value = "CREATETIME", updateStrategy = FieldStrategy.NOT_EMPTY)
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
|
||||||
private Date createtime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 1: 未删除 0: 删除
|
|
||||||
*/
|
|
||||||
@ApiParam(value = "1: 未删除 0: 删除", required = false, example = "1")
|
|
||||||
@ApiModelProperty(value = "1: 未删除 0: 删除", required = false, dataType = "String", example = "1")
|
|
||||||
@TableField(value = "DEL", fill = FieldFill.INSERT, updateStrategy = FieldStrategy.NOT_EMPTY)
|
|
||||||
@TableLogic(value = REC,delval = DEL)
|
|
||||||
@Max(2)
|
|
||||||
private String del;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,14 +1,54 @@
|
||||||
package com.whdc.model.entity;
|
package com.whdc.model.entity;
|
||||||
|
|
||||||
public class Fc {
|
import com.baomidou.mybatisplus.annotation.TableField;import com.baomidou.mybatisplus.annotation.IdType;import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;import lombok.experimental.Accessors;
|
||||||
|
import com.whdc.model.group.Insert;
|
||||||
|
import com.whdc.model.group.Update;
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(description = "常用联系人")
|
||||||
|
@TableName("FXKH_TXL.FC")
|
||||||
|
public class Fc extends Model<Fc> implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value = "ID",type = IdType.AUTO)
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
@NotNull(message = "id不能为空" , groups = {Update.class})
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
|
|
||||||
|
@NotNull(message = "用户编号不能为空", groups = {Insert.class,Update.class})
|
||||||
|
@TableField("USER_ID")
|
||||||
|
@ApiModelProperty(value = "用户编号")
|
||||||
private Integer userId;
|
private Integer userId;
|
||||||
|
|
||||||
|
@NotNull(message = "通讯录编号不能为空", groups = {Insert.class,Update.class})
|
||||||
|
@TableField("AB_ID")
|
||||||
|
@ApiModelProperty(value = "通讯录编号")
|
||||||
private Integer abId;
|
private Integer abId;
|
||||||
|
|
||||||
|
@TableField("SORT")
|
||||||
|
@ApiModelProperty(value = "序号")
|
||||||
private Integer sort;
|
private Integer sort;
|
||||||
|
|
||||||
|
@TableField("TYPE")
|
||||||
|
@ApiModelProperty(value = "0:常用联系人,1:置顶联系人")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,16 +1,53 @@
|
||||||
package com.whdc.model.entity;
|
package com.whdc.model.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;import com.baomidou.mybatisplus.annotation.IdType;import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;import lombok.experimental.Accessors;
|
||||||
|
import com.whdc.model.group.Insert;
|
||||||
|
import com.whdc.model.group.Update;
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
public class LoginInfo {
|
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(description = "登录日志")
|
||||||
|
@TableName("FXKH_TXL.LOGIN_INFO")
|
||||||
|
public class LoginInfo extends Model<LoginInfo> implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value = "ID",type = IdType.AUTO)
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
@NotNull(message = "id不能为空" , groups = {Update.class})
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
|
|
||||||
|
@TableField("IP")
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
private String ip;
|
private String ip;
|
||||||
|
|
||||||
|
@TableField("CREATE_ID")
|
||||||
|
@ApiModelProperty(value = "新增人id")
|
||||||
private String createId;
|
private String createId;
|
||||||
|
|
||||||
|
@TableField("CREATE_TIME")
|
||||||
|
@ApiModelProperty(value = "新增时间")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
|
@NotEmpty(message = "0:密码登录 1:验证码登录不能为空", groups = {Insert.class,Update.class})
|
||||||
|
@TableField("TYPE")
|
||||||
|
@ApiModelProperty(value = "0:密码登录 1:验证码登录")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,14 +1,57 @@
|
||||||
package com.whdc.model.entity;
|
package com.whdc.model.entity;
|
||||||
|
|
||||||
public class Organization {
|
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.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.whdc.model.group.Insert;
|
||||||
|
import com.whdc.model.group.Update;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(description = "组织表")
|
||||||
|
@TableName("FXKH_TXL.ORGANIZATION")
|
||||||
|
public class Organization extends Model<Organization> implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value = "ID",type = IdType.AUTO)
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
@NotNull(message = "id不能为空" , groups = {Update.class})
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
|
|
||||||
|
@NotEmpty(message = "编号不能为空", groups = {Insert.class,Update.class})
|
||||||
|
@TableField("OBJ_ID")
|
||||||
|
@ApiModelProperty(value = "编号")
|
||||||
private String objId;
|
private String objId;
|
||||||
|
|
||||||
|
@NotEmpty(message = "名称不能为空", groups = {Insert.class,Update.class})
|
||||||
|
@TableField("NAME")
|
||||||
|
@ApiModelProperty(value = "名称")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@TableField("SORT")
|
||||||
|
@ApiModelProperty(value = "序号")
|
||||||
private Integer sort;
|
private Integer sort;
|
||||||
|
|
||||||
|
@NotEmpty(message = "政区编码不能为空", groups = {Insert.class,Update.class})
|
||||||
|
@TableField("ADCD")
|
||||||
|
@ApiModelProperty(value = "政区编码")
|
||||||
private String adcd;
|
private String adcd;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,12 +1,53 @@
|
||||||
package com.whdc.model.entity;
|
package com.whdc.model.entity;
|
||||||
|
|
||||||
public class UnitDict {
|
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.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.whdc.model.group.Insert;
|
||||||
|
import com.whdc.model.group.Update;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(description = "单位字典表")
|
||||||
|
@TableName("FXKH_TXL.UNIT_DICT")
|
||||||
|
public class UnitDict extends Model<UnitDict> implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value = "ID",type = IdType.AUTO)
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
@NotNull(message = "id不能为空" , groups = {Update.class})
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
|
|
||||||
|
@NotEmpty(message = "名称不能为空", groups = {Insert.class,Update.class})
|
||||||
|
@TableField("NAME")
|
||||||
|
@ApiModelProperty(value = "名称")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
@NotNull(message = "序号不能为空", groups = {Insert.class,Update.class})
|
||||||
|
@TableField("SORT")
|
||||||
|
@ApiModelProperty(value = "序号")
|
||||||
private Integer sort;
|
private Integer sort;
|
||||||
|
|
||||||
|
@NotEmpty(message = "类型不能为空", groups = {Insert.class,Update.class})
|
||||||
|
@TableField("TYPE")
|
||||||
|
@ApiModelProperty(value = "1:省防指,2: 省防办,3: 省防指成员单位,4: 市、县防指、防办, 5: 主要湖泊及涉湖泵站,6:重要提防,7: 主要蓄滞洪区,8: 大型水库大坝")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,12 +1,49 @@
|
||||||
package com.whdc.model.entity;
|
package com.whdc.model.entity;
|
||||||
|
|
||||||
public class User {
|
import com.baomidou.mybatisplus.annotation.TableField;import com.baomidou.mybatisplus.annotation.IdType;import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;import lombok.experimental.Accessors;
|
||||||
|
import com.whdc.model.group.Insert;
|
||||||
|
import com.whdc.model.group.Update;
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(description = "用户表")
|
||||||
|
@TableName("FXKH_TXL.USER")
|
||||||
|
public class User extends Model<User> implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value = "ID",type = IdType.AUTO)
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
@NotNull(message = "id不能为空" , groups = {Update.class})
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
|
|
||||||
|
@NotEmpty(message = "密码不能为空", groups = {Insert.class,Update.class})
|
||||||
|
@TableField("PASSWORD")
|
||||||
|
@ApiModelProperty(value = "密码")
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
|
@TableField("SALT")
|
||||||
|
@ApiModelProperty(value = "盐值")
|
||||||
private String salt;
|
private String salt;
|
||||||
|
|
||||||
|
@TableField("AB_ID")
|
||||||
|
@ApiModelProperty(value = "通讯录id")
|
||||||
private Integer abId;
|
private Integer abId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,20 +1,65 @@
|
||||||
package com.whdc.model.entity;
|
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.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.whdc.model.group.Update;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
public class Versions {
|
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel(description = "通讯录操作日志")
|
||||||
|
@TableName("FXKH_TXL.VERSIONS")
|
||||||
|
public class Versions extends Model<Versions> implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value = "ID",type = IdType.AUTO)
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
@NotNull(message = "id不能为空" , groups = {Update.class})
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
|
|
||||||
|
@TableField("JSON")
|
||||||
|
@ApiModelProperty(value = "数据")
|
||||||
private String json;
|
private String json;
|
||||||
|
|
||||||
|
@TableField("AB_ID")
|
||||||
|
@ApiModelProperty(value = "通讯录编号")
|
||||||
private Integer abId;
|
private Integer abId;
|
||||||
|
|
||||||
|
@TableField("VERSION")
|
||||||
|
@ApiModelProperty(value = "版本号")
|
||||||
private Integer version;
|
private Integer version;
|
||||||
|
|
||||||
|
@TableField("CREATE_ID")
|
||||||
|
@ApiModelProperty(value = "新增人id")
|
||||||
private String createId;
|
private String createId;
|
||||||
|
|
||||||
|
@TableField("CREATE_TIME")
|
||||||
|
@ApiModelProperty(value = "新增时间")
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
|
@TableField("TYPE")
|
||||||
|
@ApiModelProperty(value = "0:添加用户,1:修改用户,2:修改权限,3:删除用户")
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,73 @@
|
||||||
|
package com.whdc.model.enums;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author xusan
|
||||||
|
* @date 2022/7/14 16:55
|
||||||
|
* 通讯录操作类型枚举类
|
||||||
|
*/
|
||||||
|
public enum VersionsType {
|
||||||
|
|
||||||
|
ADD("0", "添加用户"),
|
||||||
|
UPDATE("1", "修改用户"),
|
||||||
|
UPDATE_ROLE("2", "修改权限"),
|
||||||
|
DEL("3", "删除用户");
|
||||||
|
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValue(String value) {
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
private VersionsType(String name, String value) {
|
||||||
|
this.name = name;
|
||||||
|
this.value = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Map<String, VersionsType> map() {
|
||||||
|
Map<String, VersionsType> map = new HashMap<>();
|
||||||
|
VersionsType[] values = VersionsType.values();
|
||||||
|
for (VersionsType e : values) {
|
||||||
|
map.put(e.getValue(), e);
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Map<String, VersionsType> mapName() {
|
||||||
|
Map<String, VersionsType> map = new HashMap<>();
|
||||||
|
VersionsType[] values = VersionsType.values();
|
||||||
|
for (VersionsType e : values) {
|
||||||
|
map.put(e.getName(), e);
|
||||||
|
}
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static VersionsType getByValue(String value) {
|
||||||
|
if (Objects.isNull(value)) return null;
|
||||||
|
return map().get(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static VersionsType getByName(String name) {
|
||||||
|
if (StringUtils.isEmpty(name)) return null;
|
||||||
|
return mapName().get(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.whdc.model.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true) // chain = true 实现链式调用
|
||||||
|
public class AdcdTree {
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "行政区划代码")
|
||||||
|
private String adcd;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "行政区划名称")
|
||||||
|
private String adnm;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "行政区划级别 0省,1市,2县,3镇,4村,5组 ,(点击树查询下级, 点击查询按钮查询本级)", example = "0")
|
||||||
|
private Integer adlevel;
|
||||||
|
|
||||||
|
@ApiModelProperty("下属行政区")
|
||||||
|
private List<AdcdTree> adcdChildren;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
package com.whdc.model.vo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author 李赛
|
|
||||||
* @date 2022-06-26 10:43
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Accessors(chain = true) // chain = true 实现链式调用
|
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL) // 表示序列化非null属性
|
|
||||||
public class ERuleVo implements Serializable {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "主键id")
|
|
||||||
private Integer id;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "规则id")
|
|
||||||
private Integer ruleId;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "规则类型")
|
|
||||||
private String ruleType;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
package com.whdc.model.vo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author xusan
|
|
||||||
* @date 2023年3月28日14:07:28
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Accessors(chain = true) // chain = true 实现链式调用
|
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL) // 表示序列化非null属性
|
|
||||||
public class EStationRulesVo implements Serializable {
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "主键id")
|
|
||||||
private Integer id;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "规则id")
|
|
||||||
private Integer ruleId;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "测站编码")
|
|
||||||
private String stcd;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "规则类型")
|
|
||||||
private String item;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "规则名称")
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "顺序")
|
|
||||||
private String sort;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "创建时间")
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
|
||||||
private Date createtime;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
package com.whdc.model.vo;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author 李赛
|
|
||||||
* @date 2022-06-26 10:43
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Accessors(chain = true) // chain = true 实现链式调用
|
|
||||||
@JsonInclude(JsonInclude.Include.NON_NULL) // 表示序列化非null属性
|
|
||||||
public class ValidateVo implements Serializable {
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "是否通过 1是可,0是否")
|
|
||||||
private Integer isPass = 1;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "提示信息")
|
|
||||||
private String msg;
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "验证不通过规则id")
|
|
||||||
private String npRuleCode;
|
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "规则id")
|
|
||||||
private List<String> ruleCodes = new ArrayList<>();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.whdc.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.whdc.model.entity.AbUdR;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务类
|
||||||
|
* </p>
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
public interface IAbUdRService extends IService<AbUdR> {
|
||||||
|
|
||||||
|
// 获取所有规则分页
|
||||||
|
IPage<AbUdR> page(AbUdR dto);
|
||||||
|
|
||||||
|
// 获取所有规则
|
||||||
|
List<AbUdR> find(AbUdR dto);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
package com.whdc.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.whdc.model.dto.AddressBootDto;
|
||||||
|
import com.whdc.model.entity.AddressBook;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务类
|
||||||
|
* </p>
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
public interface IAddressBookService extends IService<AddressBook> {
|
||||||
|
|
||||||
|
// 获取所有规则分页
|
||||||
|
IPage<AddressBook> page(AddressBootDto dto);
|
||||||
|
|
||||||
|
// 获取所有规则
|
||||||
|
List<AddressBook> find(AddressBook dto);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.whdc.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.whdc.model.entity.Adinfo;
|
||||||
|
import com.whdc.model.vo.AdcdTree;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务类
|
||||||
|
* </p>
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
public interface IAdinfoService extends IService<Adinfo> {
|
||||||
|
|
||||||
|
// 获取所有规则分页
|
||||||
|
IPage<Adinfo> page(Adinfo dto);
|
||||||
|
|
||||||
|
// 获取所有规则
|
||||||
|
List<Adinfo> find(Adinfo dto);
|
||||||
|
|
||||||
|
List<AdcdTree> tree(String adcd, String adnm1);
|
||||||
|
}
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
package com.whdc.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.whdc.model.dto.FindRuleDto;
|
|
||||||
import com.whdc.model.entity.ERule;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 服务类
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author xusan
|
|
||||||
* @since 2023-03-19
|
|
||||||
*/
|
|
||||||
public interface IERuleService extends IService<ERule> {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param eData
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
IPage<ERule> page(FindRuleDto eData);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
package com.whdc.service;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
|
||||||
import com.whdc.model.dto.FindStationDto;
|
|
||||||
import com.whdc.model.entity.EStationRules;
|
|
||||||
import com.whdc.model.vo.EStationRulesVo;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 服务类
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author xusan
|
|
||||||
* @since 2023-03-19
|
|
||||||
*/
|
|
||||||
public interface IEStationRulesService extends IService<EStationRules> {
|
|
||||||
|
|
||||||
// 获取所有规则分页
|
|
||||||
IPage<EStationRulesVo> page(FindStationDto ruleDto);
|
|
||||||
|
|
||||||
// 获取所有规则
|
|
||||||
List<EStationRulesVo> find(FindStationDto ruleDto);
|
|
||||||
|
|
||||||
boolean removeById(Integer id, EStationRules model);
|
|
||||||
|
|
||||||
void delRule(Integer eRuleId);
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.whdc.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.whdc.model.entity.Fc;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务类
|
||||||
|
* </p>
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
public interface IFcService extends IService<Fc> {
|
||||||
|
|
||||||
|
// 获取所有规则分页
|
||||||
|
IPage<Fc> page(Fc dto);
|
||||||
|
|
||||||
|
// 获取所有规则
|
||||||
|
List<Fc> find(Fc dto);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.whdc.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.whdc.model.entity.LoginInfo;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务类
|
||||||
|
* </p>
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
public interface ILoginInfoService extends IService<LoginInfo> {
|
||||||
|
|
||||||
|
// 获取所有规则分页
|
||||||
|
IPage<LoginInfo> page(LoginInfo dto);
|
||||||
|
|
||||||
|
// 获取所有规则
|
||||||
|
List<LoginInfo> find(LoginInfo dto);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.whdc.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.whdc.model.entity.Organization;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务类
|
||||||
|
* </p>
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
public interface IOrganizationService extends IService<Organization> {
|
||||||
|
|
||||||
|
// 获取所有规则分页
|
||||||
|
IPage<Organization> page(Organization dto);
|
||||||
|
|
||||||
|
// 获取所有规则
|
||||||
|
List<Organization> find(Organization dto);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.whdc.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.whdc.model.entity.UnitDict;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务类
|
||||||
|
* </p>
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
public interface IUnitDictService extends IService<UnitDict> {
|
||||||
|
|
||||||
|
// 获取所有规则分页
|
||||||
|
IPage<UnitDict> page(UnitDict dto);
|
||||||
|
|
||||||
|
// 获取所有规则
|
||||||
|
List<UnitDict> find(UnitDict dto);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.whdc.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.whdc.model.entity.User;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务类
|
||||||
|
* </p>
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
public interface IUserService extends IService<User> {
|
||||||
|
|
||||||
|
// 获取所有规则分页
|
||||||
|
IPage<User> page(User dto);
|
||||||
|
|
||||||
|
// 获取所有规则
|
||||||
|
List<User> find(User dto);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
package com.whdc.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.whdc.model.entity.AddressBook;
|
||||||
|
import com.whdc.model.entity.Versions;
|
||||||
|
import com.whdc.model.enums.VersionsType;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务类
|
||||||
|
* </p>
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
public interface IVersionsService extends IService<Versions> {
|
||||||
|
|
||||||
|
// 获取所有规则分页
|
||||||
|
IPage<Versions> page(Versions dto);
|
||||||
|
|
||||||
|
// 获取所有规则
|
||||||
|
List<Versions> find(Versions dto);
|
||||||
|
|
||||||
|
boolean saveInfo(AddressBook model, VersionsType versionsType);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.whdc.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.whdc.mapper.AbUdRMapper;
|
||||||
|
import com.whdc.model.entity.AbUdR;
|
||||||
|
import com.whdc.service.IAbUdRService;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务实现类
|
||||||
|
* </p>
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class AbUdRServiceImpl extends ServiceImpl<AbUdRMapper, AbUdR> implements IAbUdRService {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<AbUdR> page(AbUdR dto) {
|
||||||
|
return baseMapper.page(new Page<>(), dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<AbUdR> find(AbUdR dto) {
|
||||||
|
return baseMapper.find(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.whdc.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.whdc.mapper.AddressBookMapper;
|
||||||
|
import com.whdc.model.dto.AddressBootDto;
|
||||||
|
import com.whdc.model.entity.AddressBook;
|
||||||
|
import com.whdc.service.IAddressBookService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务实现类
|
||||||
|
* </p>
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class AddressBookServiceImpl extends ServiceImpl<AddressBookMapper, AddressBook> implements IAddressBookService {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<AddressBook> page(AddressBootDto dto) {
|
||||||
|
return baseMapper.page(new Page<>(), dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<AddressBook> find(AddressBook dto) {
|
||||||
|
return baseMapper.find(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,184 @@
|
||||||
|
package com.whdc.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.whdc.mapper.AdinfoMapper;
|
||||||
|
import com.whdc.model.entity.Adinfo;
|
||||||
|
import com.whdc.model.vo.AdcdTree;
|
||||||
|
import com.whdc.service.IAdinfoService;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务实现类
|
||||||
|
* </p>
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class AdinfoServiceImpl extends ServiceImpl<AdinfoMapper, Adinfo> implements IAdinfoService {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<Adinfo> page(Adinfo dto) {
|
||||||
|
return baseMapper.page(new Page<>(), dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Adinfo> find(Adinfo dto) {
|
||||||
|
return baseMapper.find(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 行政区划树型查询
|
||||||
|
* 420116,001,002,000
|
||||||
|
* 6位区县,9位街道,12位组
|
||||||
|
* 省 市 县
|
||||||
|
* 42 28 22 100 011 100
|
||||||
|
*
|
||||||
|
* @param adcd
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
// @Cacheable(cacheNames = {REDIS_KEY}, key = "getMethodName()", condition = "#adcd", unless = "false", cacheResolver = "redisExpireCacheResolver")
|
||||||
|
public List<AdcdTree> tree(String adcd, String adnm) {
|
||||||
|
|
||||||
|
List<Adinfo> list = treeList(adcd, adnm);
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(list)){
|
||||||
|
list = list.stream().sorted(Comparator.comparing(Adinfo::getAdcd)
|
||||||
|
.reversed()
|
||||||
|
).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 省 42 2000000000000
|
||||||
|
Map<String, AdcdTree> province = new HashMap<>();
|
||||||
|
|
||||||
|
// 市 4205 00000000000
|
||||||
|
Map<String, List<AdcdTree>> city = new HashMap<>();
|
||||||
|
|
||||||
|
// 县 421122 000000000
|
||||||
|
Map<String, List<AdcdTree>> county = new HashMap<>();
|
||||||
|
|
||||||
|
// 镇 421122100 000000
|
||||||
|
Map<String, List<AdcdTree>> town = new HashMap<>();
|
||||||
|
|
||||||
|
// 村 421122100201 000
|
||||||
|
Map<String, List<AdcdTree>> village = new HashMap<>();
|
||||||
|
|
||||||
|
// 组 421122100201100
|
||||||
|
Map<String, List<AdcdTree>> group = new HashMap<>();
|
||||||
|
|
||||||
|
List<AdcdTree> tree = new ArrayList<>();
|
||||||
|
|
||||||
|
for (Adinfo adinfo : list) {
|
||||||
|
String ad = adinfo.getAdcd();
|
||||||
|
String nm = adinfo.getAdnm();
|
||||||
|
AdcdTree adcdTree = new AdcdTree().setAdcd(ad).setAdnm(nm).setAdcdChildren(new ArrayList<>());
|
||||||
|
|
||||||
|
// 判断行政区划编码
|
||||||
|
String provinceStr = ad.substring(0, 2);
|
||||||
|
String cityStr = ad.substring(0, 4);
|
||||||
|
String countyStr = ad.substring(0, 6);
|
||||||
|
String townStr = ad.substring(0, 9);
|
||||||
|
String villageStr = ad.substring(0, 12);
|
||||||
|
|
||||||
|
if ("0000000000000".equals(ad.substring(2))) { // 省
|
||||||
|
|
||||||
|
adcdTree.setAdlevel(0);
|
||||||
|
adcdTree.setAdcdChildren(city.get(provinceStr));
|
||||||
|
// province.put(provinceStr, adcdTree);
|
||||||
|
tree.add(adcdTree);
|
||||||
|
|
||||||
|
} else if ("00000000000".equals(ad.substring(4))) { // 市
|
||||||
|
adcdTree.setAdlevel(1);
|
||||||
|
adcdTree.setAdcdChildren(county.get(cityStr));
|
||||||
|
addTree(city, provinceStr, adcdTree);
|
||||||
|
|
||||||
|
} else if ("000000000".equals(ad.substring(6))) { // 县
|
||||||
|
adcdTree.setAdlevel(2);
|
||||||
|
adcdTree.setAdcdChildren(town.get(countyStr));
|
||||||
|
addTree(county, cityStr, adcdTree);
|
||||||
|
|
||||||
|
} else if ("000000".equals(ad.substring(9))) { // 镇
|
||||||
|
adcdTree.setAdlevel(3);
|
||||||
|
adcdTree.setAdcdChildren(village.get(townStr));
|
||||||
|
addTree(town, countyStr, adcdTree);
|
||||||
|
|
||||||
|
} else if ("000".equals(ad.substring(12))) { // 村
|
||||||
|
adcdTree.setAdlevel(4);
|
||||||
|
adcdTree.setAdcdChildren(group.get(villageStr));
|
||||||
|
addTree(village, townStr, adcdTree);
|
||||||
|
|
||||||
|
} else { // 组
|
||||||
|
adcdTree.setAdlevel(5);
|
||||||
|
adcdTree.setAdcdChildren(null);
|
||||||
|
addTree(group, villageStr, adcdTree);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 排序
|
||||||
|
|
||||||
|
return sorted(tree);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public List<Adinfo> treeList(String adcd, String adnm) {
|
||||||
|
|
||||||
|
if(adcd.endsWith("0000000000000")){
|
||||||
|
adcd = adcd.substring(0,2);
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(adcd) && StringUtils.isNotBlank(adnm)) {
|
||||||
|
|
||||||
|
// 需要查出层级数据
|
||||||
|
return baseMapper.selectByCdOrNm(adcd, adnm);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
LambdaQueryWrapper<Adinfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
if (StringUtils.isNotBlank(adcd)) {
|
||||||
|
queryWrapper.like(Adinfo::getAdcd, adcd);
|
||||||
|
}
|
||||||
|
List<Adinfo> adinfos = baseMapper.selectList(queryWrapper);
|
||||||
|
|
||||||
|
return adinfos; // 查所有
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<AdcdTree> sorted( List<AdcdTree> tree) {
|
||||||
|
|
||||||
|
List<AdcdTree> sorteds = null;
|
||||||
|
|
||||||
|
if (CollectionUtils.isNotEmpty(tree)){
|
||||||
|
sorteds = tree.stream().sorted(Comparator.comparing(AdcdTree::getAdcd)
|
||||||
|
).collect(Collectors.toList());
|
||||||
|
sorteds.forEach(o->{
|
||||||
|
o.setAdcdChildren(sorted(o.getAdcdChildren()));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
return sorteds;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void addTree(Map<String, List<AdcdTree>> data, String key, AdcdTree tree) {
|
||||||
|
List<AdcdTree> trees = data.get(key);
|
||||||
|
if (CollectionUtils.isEmpty(trees)) {
|
||||||
|
trees = new ArrayList<>();
|
||||||
|
}
|
||||||
|
trees.add(tree);
|
||||||
|
|
||||||
|
data.put(key, trees);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
package com.whdc.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.whdc.mapper.ERuleMapper;
|
|
||||||
import com.whdc.model.dto.FindRuleDto;
|
|
||||||
import com.whdc.model.entity.ERule;
|
|
||||||
import com.whdc.service.IERuleService;
|
|
||||||
import com.whdc.service.IEStationRulesService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 服务实现类
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author xusan
|
|
||||||
* @since 2023-03-19
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class ERuleServiceImpl extends ServiceImpl<ERuleMapper, ERule> implements IERuleService {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IEStationRulesService ieStationRulesService;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public IPage<ERule> page(FindRuleDto findDto) {
|
|
||||||
return baseMapper.page(findDto.getPage(), findDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean updateById(ERule model){
|
|
||||||
|
|
||||||
boolean update = super.updateById(model);
|
|
||||||
if (update){
|
|
||||||
ieStationRulesService.delRule(model.getId());
|
|
||||||
}
|
|
||||||
|
|
||||||
return update;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,83 +0,0 @@
|
||||||
package com.whdc.service.impl;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
||||||
import com.whdc.mapper.EStationRulesMapper;
|
|
||||||
import com.whdc.model.dto.FindStationDto;
|
|
||||||
import com.whdc.model.entity.EStationRules;
|
|
||||||
import com.whdc.model.vo.EStationRulesVo;
|
|
||||||
import com.whdc.service.IEStationRulesService;
|
|
||||||
import com.whdc.valid.component.RuleRedisService;
|
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* <p>
|
|
||||||
* 服务实现类
|
|
||||||
* </p>
|
|
||||||
*
|
|
||||||
* @author xusan
|
|
||||||
* @since 2023-03-19
|
|
||||||
*/
|
|
||||||
@Service
|
|
||||||
public class EStationRulesServiceImpl extends ServiceImpl<EStationRulesMapper, EStationRules> implements IEStationRulesService {
|
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private RuleRedisService ruleRedis;
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public IPage<EStationRulesVo> page(FindStationDto ruleDto) {
|
|
||||||
return baseMapper.page(ruleDto.getPage(), ruleDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<EStationRulesVo> find(FindStationDto ruleDto) {
|
|
||||||
|
|
||||||
return baseMapper.find(ruleDto);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean updateById(EStationRules model){
|
|
||||||
|
|
||||||
boolean update = super.updateById(model);
|
|
||||||
if (update){
|
|
||||||
ruleRedis.delRule(model.getStcd());
|
|
||||||
}
|
|
||||||
|
|
||||||
return update;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean removeById( Integer id,EStationRules model){
|
|
||||||
|
|
||||||
boolean update = super.removeById(id);
|
|
||||||
if (update){
|
|
||||||
ruleRedis.delRule(model.getStcd());
|
|
||||||
}
|
|
||||||
|
|
||||||
return update;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void delRule(Integer eRuleId) {
|
|
||||||
|
|
||||||
List<EStationRules> list = this.lambdaQuery().eq(EStationRules::getRuleId, eRuleId)
|
|
||||||
.list();
|
|
||||||
if (CollectionUtils.isNotEmpty(list)) {
|
|
||||||
for (EStationRules rules : list) {
|
|
||||||
ruleRedis.delRule(rules.getStcd());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.whdc.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.whdc.mapper.FcMapper;
|
||||||
|
import com.whdc.model.entity.Fc;
|
||||||
|
import com.whdc.service.IFcService;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务实现类
|
||||||
|
* </p>
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class FcServiceImpl extends ServiceImpl<FcMapper, Fc> implements IFcService {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<Fc> page(Fc dto) {
|
||||||
|
return baseMapper.page(new Page<>(), dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Fc> find(Fc dto) {
|
||||||
|
return baseMapper.find(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.whdc.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.whdc.mapper.LoginInfoMapper;
|
||||||
|
import com.whdc.model.entity.LoginInfo;
|
||||||
|
import com.whdc.service.ILoginInfoService;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务实现类
|
||||||
|
* </p>
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class LoginInfoServiceImpl extends ServiceImpl<LoginInfoMapper, LoginInfo> implements ILoginInfoService {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<LoginInfo> page(LoginInfo dto) {
|
||||||
|
return baseMapper.page(new Page<>(), dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<LoginInfo> find(LoginInfo dto) {
|
||||||
|
return baseMapper.find(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.whdc.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.whdc.mapper.OrganizationMapper;
|
||||||
|
import com.whdc.model.entity.Organization;
|
||||||
|
import com.whdc.service.IOrganizationService;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务实现类
|
||||||
|
* </p>
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Organization> implements IOrganizationService {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<Organization> page(Organization dto) {
|
||||||
|
return baseMapper.page(new Page<>(), dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Organization> find(Organization dto) {
|
||||||
|
return baseMapper.find(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.whdc.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.whdc.mapper.UnitDictMapper;
|
||||||
|
import com.whdc.model.entity.UnitDict;
|
||||||
|
import com.whdc.service.IUnitDictService;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务实现类
|
||||||
|
* </p>
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class UnitDictServiceImpl extends ServiceImpl<UnitDictMapper, UnitDict> implements IUnitDictService {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<UnitDict> page(UnitDict dto) {
|
||||||
|
return baseMapper.page(new Page<>(), dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<UnitDict> find(UnitDict dto) {
|
||||||
|
return baseMapper.find(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
package com.whdc.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.whdc.mapper.UserMapper;
|
||||||
|
import com.whdc.model.entity.User;
|
||||||
|
import com.whdc.service.IUserService;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务实现类
|
||||||
|
* </p>
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<User> page(User dto) {
|
||||||
|
return baseMapper.page(new Page<>(), dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<User> find(User dto) {
|
||||||
|
return baseMapper.find(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,71 @@
|
||||||
|
package com.whdc.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.whdc.mapper.VersionsMapper;
|
||||||
|
import com.whdc.model.entity.AddressBook;
|
||||||
|
import com.whdc.model.entity.Versions;
|
||||||
|
import com.whdc.model.enums.VersionsType;
|
||||||
|
import com.whdc.service.IVersionsService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Comparator;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <p>
|
||||||
|
* 服务实现类
|
||||||
|
* </p>
|
||||||
|
* @author xusan
|
||||||
|
* @date 2024-05-11
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class VersionsServiceImpl extends ServiceImpl<VersionsMapper, Versions> implements IVersionsService {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<Versions> page(Versions dto) {
|
||||||
|
return baseMapper.page(new Page<>(), dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Versions> find(Versions dto) {
|
||||||
|
return baseMapper.find(dto);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean saveInfo(AddressBook model, VersionsType versionsType) {
|
||||||
|
|
||||||
|
Integer version = 0;
|
||||||
|
|
||||||
|
if (Objects.requireNonNull(versionsType) != VersionsType.ADD) {
|
||||||
|
List<Versions> list = this.lambdaQuery()
|
||||||
|
.eq(Versions::getAbId, model.getId())
|
||||||
|
.list();
|
||||||
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
|
version = list
|
||||||
|
.stream().map(Versions::getVersion)
|
||||||
|
.max(Comparator.comparing(Integer::intValue))
|
||||||
|
.get();
|
||||||
|
} else {
|
||||||
|
log.info("当前数据在进行修改但无相关记录;" + model.getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 添加日志
|
||||||
|
Versions entity = new Versions(null, JSON.toJSONString(model), model.getId(), ++version, model.getCreateId(), new Date(),versionsType.getName());
|
||||||
|
|
||||||
|
return this.save(entity);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?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.AbUdRMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<select id="page" resultType="com.whdc.model.entity.AbUdR">
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="find" resultType="com.whdc.model.entity.AbUdR">
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?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.AddressBookMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<select id="page" resultType="com.whdc.model.entity.AddressBook">
|
||||||
|
SELECT
|
||||||
|
AB.*
|
||||||
|
FROM
|
||||||
|
AB_UD_R R
|
||||||
|
LEFT JOIN ADDRESS_BOOK AB ON R.AD_ID = AB.ID
|
||||||
|
WHERE 1=1
|
||||||
|
<if test="obj.dictId != null and obj.dictId != '' ">
|
||||||
|
AND R.DICT_ID = #{obj.dictId}
|
||||||
|
</if>
|
||||||
|
<if test="obj.name != null and obj.name != '' ">
|
||||||
|
AND AB.NAME LIKE CONCAT('%', #{obj.name}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="obj.phone != null and obj.phone != '' ">
|
||||||
|
AND AB.PHONE = #{obj.phone}
|
||||||
|
</if>
|
||||||
|
ORDER BY AB.SORT
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="find" resultType="com.whdc.model.entity.AddressBook">
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
<?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.AdinfoMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<select id="page" resultType="com.whdc.model.entity.Adinfo">
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="find" resultType="com.whdc.model.entity.Adinfo">
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectByCdOrNm" resultType="com.gsiot.shzh.jcsj.model.entity.IaCAdinfo">
|
||||||
|
select t.adcd, t.adnm
|
||||||
|
from FXKH_TXL.ADINFO t
|
||||||
|
where t.del = 0 and ( t.adcd like CONCAT('%', #{adcd}, '%'))
|
||||||
|
or exists(
|
||||||
|
select 1
|
||||||
|
from FXKH_TXL.ADINFO a
|
||||||
|
where a.del = 0 and (a.adnm like CONCAT('%', #{adnm}, '%') or a.adcd like CONCAT('%', #{adcd}, '%'))
|
||||||
|
and t.adcd = concat(left(a.adcd, 12), '000')
|
||||||
|
)
|
||||||
|
or exists(
|
||||||
|
select 1
|
||||||
|
from FXKH_TXL.ADINFO a
|
||||||
|
where a.del = 0 and (a.adnm like CONCAT('%', #{adnm}, '%') or a.adcd like CONCAT('%', #{adcd}, '%'))
|
||||||
|
and t.adcd = concat(left(a.adcd, 9), '000000')
|
||||||
|
)
|
||||||
|
or exists(
|
||||||
|
select 1
|
||||||
|
from FXKH_TXL.ADINFO a
|
||||||
|
where a.del = 0 and (a.adnm like CONCAT('%', #{adnm}, '%') or a.adcd like CONCAT('%', #{adcd}, '%'))
|
||||||
|
and t.adcd = concat(left(a.adcd, 6), '000000000')
|
||||||
|
)
|
||||||
|
or exists(
|
||||||
|
select 1
|
||||||
|
from FXKH_TXL.ADINFO a
|
||||||
|
where a.del = 0 and (a.adnm like CONCAT('%', #{adnm}, '%') or a.adcd like CONCAT('%', #{adcd}, '%'))
|
||||||
|
and t.adcd = concat(left(a.adcd, 4), '00000000000')
|
||||||
|
)
|
||||||
|
or exists(
|
||||||
|
select 1
|
||||||
|
from FXKH_TXL.ADINFO a
|
||||||
|
where a.del = 0 and (a.adnm like CONCAT('%', #{adnm}, '%') or a.adcd like CONCAT('%', #{adcd}, '%'))
|
||||||
|
and t.adcd = concat(left(a.adcd, 2), '0000000000000')
|
||||||
|
)
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
<?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.ERuleMapper">
|
|
||||||
|
|
||||||
<select id="page" resultType="com.whdc.model.entity.ERule">
|
|
||||||
SELECT
|
|
||||||
E.*
|
|
||||||
FROM
|
|
||||||
SHZH_IOT.E_RULE E
|
|
||||||
WHERE 1=1 E.DEL = 1
|
|
||||||
<if test="findDto.stm != null and findDto.stm != '' and findDto.etm != null and findDto.etm != ''">
|
|
||||||
AND E.CREATETIME >= '${findDto.stm}' and E.CREATETIME <=
|
|
||||||
'${findDto.etm}'
|
|
||||||
</if>
|
|
||||||
<if test="findDto.name != null and findDto.name != '' ">
|
|
||||||
AND E.NAME LIKE CONCAT('%', #{findDto.name}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="findDto.item != null and findDto.item != '' ">
|
|
||||||
AND E.ITEM = #{findDto.item}
|
|
||||||
</if>
|
|
||||||
ORDER BY E.CREATETIME DESC
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
||||||
<?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.EStationRulesMapper">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<select id="find" resultType="com.whdc.model.entity.EStationRules">
|
|
||||||
SELECT * FROM SHZH_IOT.E_STATION_RULES T
|
|
||||||
|
|
||||||
WHERE 1 = 1 AND T.DEL = 1
|
|
||||||
<if test="findDto.name != null and findDto.name != '' ">
|
|
||||||
AND T.NAME LIKE CONCAT('%', #{findDto.name}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="findDto.stcd != null and findDto.stcd != '' ">
|
|
||||||
AND T.STCD = #{findDto.stcd}
|
|
||||||
</if>
|
|
||||||
ORDER BY T.ID DESC
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<select id="page" resultType="com.whdc.model.vo.EStationRulesVo">
|
|
||||||
SELECT * FROM SHZH_IOT.E_STATION_RULES T
|
|
||||||
LEFT JOIN SHZH_IOT.E_RULE E ON T.RULE_ID = E.ID
|
|
||||||
WHERE 1 = 1 AND T.DEL = 1
|
|
||||||
<if test="findDto.name != null and findDto.name != '' ">
|
|
||||||
AND T.NAME LIKE CONCAT('%', #{findDto.name}, '%')
|
|
||||||
</if>
|
|
||||||
<if test="findDto.stcd != null and findDto.stcd != '' ">
|
|
||||||
AND T.STCD = #{findDto.stcd}
|
|
||||||
</if>
|
|
||||||
<if test="findDto.item != null and findDto.item != '' ">
|
|
||||||
AND E.ITEM = #{findDto.item}
|
|
||||||
</if>
|
|
||||||
ORDER BY T.ID DESC
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?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.FcMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<select id="page" resultType="com.whdc.model.entity.Fc">
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="find" resultType="com.whdc.model.entity.Fc">
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?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.LoginInfoMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<select id="page" resultType="com.whdc.model.entity.LoginInfo">
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="find" resultType="com.whdc.model.entity.LoginInfo">
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?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.OrganizationMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<select id="page" resultType="com.whdc.model.entity.Organization">
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="find" resultType="com.whdc.model.entity.Organization">
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?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.UnitDictMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<select id="page" resultType="com.whdc.model.entity.UnitDict">
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="find" resultType="com.whdc.model.entity.UnitDict">
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?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.UserMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<select id="page" resultType="com.whdc.model.entity.User">
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="find" resultType="com.whdc.model.entity.User">
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
<?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.VersionsMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<select id="page" resultType="com.whdc.model.entity.Versions">
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="find" resultType="com.whdc.model.entity.Versions">
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue