29 changed files with 407 additions and 20 deletions
@ -0,0 +1,11 @@
|
||||
ALTER TABLE `negative`.`negative_problem_relation` |
||||
ADD COLUMN `threeLevelCode` varchar(255) NULL AFTER `twoLevelContent`, |
||||
ADD COLUMN `threeLevelContent` varchar(255) NULL AFTER `threeLevelCode`; |
||||
|
||||
|
||||
ALTER TABLE `negative`.`sup_police` |
||||
ADD COLUMN `position` varchar(255); |
||||
|
||||
update sup_police set position = '正职' where job like '%正职%'; |
||||
|
||||
update sup_police set position = '副职' where job like '%副职%'; |
||||
@ -0,0 +1,26 @@
|
||||
package com.biutag.supervision.controller.system; |
||||
|
||||
import com.biutag.supervision.pojo.Result; |
||||
import com.biutag.supervision.pojo.entity.Holiday; |
||||
import com.biutag.supervision.service.HolidayService; |
||||
import lombok.RequiredArgsConstructor; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.PathVariable; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
import java.util.List; |
||||
|
||||
@RequiredArgsConstructor |
||||
@RequestMapping("holiday") |
||||
@RestController |
||||
public class HolidayController { |
||||
|
||||
private final HolidayService holidayService; |
||||
|
||||
@GetMapping("{year}") |
||||
public Result<List<Holiday>> list(@PathVariable Integer year) { |
||||
return Result.success(holidayService.list(year)); |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,8 @@
|
||||
package com.biutag.supervision.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.biutag.supervision.pojo.entity.BusinessDepart; |
||||
|
||||
public interface BusinessDepartMapper extends BaseMapper<BusinessDepart> { |
||||
|
||||
} |
||||
@ -0,0 +1,8 @@
|
||||
package com.biutag.supervision.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.biutag.supervision.pojo.entity.SupDictProblemSource; |
||||
|
||||
public interface SupDictProblemSourceMapper extends BaseMapper<SupDictProblemSource> { |
||||
|
||||
} |
||||
@ -0,0 +1,47 @@
|
||||
package com.biutag.supervision.pojo.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
|
||||
import java.time.LocalDateTime; |
||||
|
||||
@Setter |
||||
@Getter |
||||
public class BusinessDepart { |
||||
|
||||
//
|
||||
@TableId(value = "id") |
||||
private Integer id; |
||||
|
||||
// 日期(天)
|
||||
@TableField("date") |
||||
private String date; |
||||
|
||||
// 单位ID
|
||||
@TableField("depart_id") |
||||
private String departId; |
||||
|
||||
// 单位名称
|
||||
@TableField("depart_name") |
||||
private String departName; |
||||
|
||||
// 业务类型
|
||||
@TableField("business_type") |
||||
private String businessType; |
||||
|
||||
// 业务类型名称
|
||||
@TableField("business_type_name") |
||||
private String businessTypeName; |
||||
|
||||
// 业务量
|
||||
@TableField("number") |
||||
private Integer number; |
||||
|
||||
// 创建时间
|
||||
@TableField("create_time") |
||||
private LocalDateTime createTime; |
||||
|
||||
} |
||||
@ -0,0 +1,31 @@
|
||||
package com.biutag.supervision.pojo.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
|
||||
import java.time.LocalDateTime; |
||||
|
||||
@Setter |
||||
@Getter |
||||
public class SupDictProblemSource { |
||||
|
||||
//
|
||||
@TableId(value = "id", type = IdType.AUTO) |
||||
private Integer id; |
||||
|
||||
//
|
||||
@TableField("parent_id") |
||||
private Integer parentId; |
||||
|
||||
//
|
||||
@TableField("label") |
||||
private String label; |
||||
|
||||
//
|
||||
@TableField("sort") |
||||
private Integer sort; |
||||
|
||||
} |
||||
@ -0,0 +1,23 @@
|
||||
package com.biutag.supervision.pojo.vo; |
||||
|
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
@Setter |
||||
@Getter |
||||
public class DictProblemSourceTree { |
||||
|
||||
private Integer id; |
||||
|
||||
private Integer parentId; |
||||
|
||||
private String label; |
||||
|
||||
private Integer sort; |
||||
|
||||
private List<DictProblemSourceTree> children = new ArrayList<>(); |
||||
|
||||
} |
||||
@ -0,0 +1,71 @@
|
||||
package com.biutag.supervision.pojo.vo; |
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty; |
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
|
||||
import java.time.LocalDateTime; |
||||
|
||||
@Setter |
||||
@Getter |
||||
public class ExportNegativeVo { |
||||
|
||||
@ExcelProperty("样本源头编号") |
||||
private String originId; |
||||
|
||||
// 问题发生时间
|
||||
@ExcelProperty("问题发生时间") |
||||
@JsonFormat(pattern = "YYYY-MM-dd HH:mm") |
||||
private LocalDateTime happenTime; |
||||
|
||||
// 问题发现时间
|
||||
@ExcelProperty("问题发现时间") |
||||
@JsonFormat(pattern = "YYYY-MM-dd HH:mm") |
||||
private LocalDateTime discoveryTime; |
||||
|
||||
// 问题来源
|
||||
@ExcelProperty("问题来源") |
||||
private String problemSources; |
||||
|
||||
// 业务类别名称
|
||||
@ExcelProperty("业务类别") |
||||
private String businessTypeName; |
||||
|
||||
// 涉嫌问题 JSON
|
||||
@ExcelProperty("涉嫌问题") |
||||
private String involveProblem; |
||||
|
||||
// 简要描述
|
||||
@ExcelProperty("简要描述") |
||||
private String thingDesc; |
||||
|
||||
// 反映人姓名
|
||||
@ExcelProperty("投诉反映人") |
||||
private String responderName; |
||||
|
||||
// 联系电话
|
||||
@ExcelProperty("联系电话") |
||||
private String contactPhone; |
||||
|
||||
// 涉及警种名称
|
||||
@ExcelProperty("涉及警种") |
||||
private String policeTypeName; |
||||
|
||||
// 涉及单位名称
|
||||
@ExcelProperty("涉及单位") |
||||
private String involveDepartName; |
||||
|
||||
// 办理状态
|
||||
@ExcelProperty("办理状态") |
||||
private String processingStatus; |
||||
|
||||
// 办理单位 二级
|
||||
@ExcelProperty("办理单位") |
||||
private String handleSecondDepartName; |
||||
|
||||
// 办理单位 三级
|
||||
@ExcelProperty("办理单位") |
||||
private String handleThreeDepartName; |
||||
|
||||
} |
||||
@ -0,0 +1,11 @@
|
||||
package com.biutag.supervision.service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import com.biutag.supervision.pojo.entity.BusinessDepart; |
||||
import com.biutag.supervision.mapper.BusinessDepartMapper; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
@Service |
||||
public class BusinessDepartService extends ServiceImpl<BusinessDepartMapper, BusinessDepart> { |
||||
|
||||
} |
||||
@ -0,0 +1,50 @@
|
||||
package com.biutag.supervision.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import com.biutag.supervision.constants.AppConstants; |
||||
import com.biutag.supervision.mapper.SupDictProblemSourceMapper; |
||||
import com.biutag.supervision.pojo.entity.SupDictProblemSource; |
||||
import com.biutag.supervision.pojo.vo.DictProblemSourceTree; |
||||
import org.springframework.beans.BeanUtils; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.HashMap; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
@Service |
||||
public class SupDictProblemSourceService extends ServiceImpl<SupDictProblemSourceMapper, SupDictProblemSource> { |
||||
|
||||
public List<DictProblemSourceTree> buildTree() { |
||||
List<SupDictProblemSource> dictProblemSources = list(new LambdaQueryWrapper<SupDictProblemSource>().orderByAsc(SupDictProblemSource::getSort)); |
||||
Map<Integer, List<DictProblemSourceTree>> childMap = new HashMap<>(); |
||||
List<DictProblemSourceTree> tree = new ArrayList<>(); |
||||
for (SupDictProblemSource dictProblemSource : dictProblemSources) { |
||||
DictProblemSourceTree node = new DictProblemSourceTree(); |
||||
BeanUtils.copyProperties(dictProblemSource, node); |
||||
List<DictProblemSourceTree> children = childMap.computeIfAbsent(node.getParentId(), k -> new ArrayList<>()); |
||||
children.add(node); |
||||
Integer parentId = node.getParentId(); |
||||
if (AppConstants.DICT_PROBLEM_SOURCE_ROOT_PARENT_CODE.equals(parentId)) { |
||||
tree.add(node); |
||||
} |
||||
} |
||||
for (DictProblemSourceTree node : tree) { |
||||
buildTreeRecursive(node, childMap); |
||||
} |
||||
return tree; |
||||
} |
||||
|
||||
private static DictProblemSourceTree buildTreeRecursive(DictProblemSourceTree node, Map<Integer, List<DictProblemSourceTree>> childMap) { |
||||
List<DictProblemSourceTree> children = childMap.get(node.getId()); |
||||
if (children != null) { |
||||
node.getChildren().addAll(children.stream() |
||||
.map(childNode -> buildTreeRecursive(childNode, childMap)) |
||||
.toList()); |
||||
} |
||||
return node; |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,32 @@
|
||||
spring: |
||||
datasource: |
||||
dynamic: |
||||
datasource: |
||||
master: |
||||
driver-class-name: com.mysql.cj.jdbc.Driver |
||||
url: jdbc:mysql://172.31.217.20:31868/negative?serverTimezone=GMT%2B8 |
||||
username: root |
||||
password: ip12341234 |
||||
slave: |
||||
driver-class-name: com.mysql.cj.jdbc.Driver |
||||
url: jdbc:mysql://172.31.217.20:31868/open-platform?serverTimezone=GMT%2B8 |
||||
username: root |
||||
password: ip12341234 |
||||
data: |
||||
redis: |
||||
host: 127.0.0.1 |
||||
# 端口,默认为6379 |
||||
port: 6379 |
||||
password: 123456 |
||||
|
||||
fdfs: |
||||
tracker-list: #TrackerList参数,支持多个 |
||||
- 172.31.217.20:32060 |
||||
preview-url: http://172.31.217.20:31664 |
||||
|
||||
springdoc: |
||||
group-configs: |
||||
- group: 'plugin' |
||||
paths-to-match: |
||||
- '/api/plugin/**' |
||||
- '/login' |
||||
Loading…
Reference in new issue