Browse Source

Merge remote-tracking branch 'origin/master'

main
sjh 1 year ago
parent
commit
f42589b133
  1. 7
      pom.xml
  2. 106
      sql/1008.sql
  3. 5
      sql/1011.sql
  4. 6
      src/main/java/com/biutag/supervision/constants/AppConstants.java
  5. 13
      src/main/java/com/biutag/supervision/constants/enums/NegativeTaskCategoryEnum.java
  6. 14
      src/main/java/com/biutag/supervision/constants/enums/NegativeTaskStatusEnum.java
  7. 26
      src/main/java/com/biutag/supervision/constants/enums/ProblemSourcesEnum.java
  8. 23
      src/main/java/com/biutag/supervision/constants/enums/ProcessingStatusEnum.java
  9. 20
      src/main/java/com/biutag/supervision/controller/FileController.java
  10. 10
      src/main/java/com/biutag/supervision/controller/data/DataController.java
  11. 79
      src/main/java/com/biutag/supervision/controller/data/DataPetitionComplaintController.java
  12. 23
      src/main/java/com/biutag/supervision/controller/system/DepartController.java
  13. 10
      src/main/java/com/biutag/supervision/controller/system/DictContentController.java
  14. 49
      src/main/java/com/biutag/supervision/controller/system/HolidayController.java
  15. 9
      src/main/java/com/biutag/supervision/controller/system/PoliceController.java
  16. 25
      src/main/java/com/biutag/supervision/controller/work/NegativeController.java
  17. 26
      src/main/java/com/biutag/supervision/controller/work/NegativeTaskController.java
  18. 8
      src/main/java/com/biutag/supervision/mapper/NegativeTaskMapper.java
  19. 4
      src/main/java/com/biutag/supervision/mapper/SupDictContentMapper.java
  20. 2
      src/main/java/com/biutag/supervision/pojo/domain/PoliceAuth.java
  21. 3
      src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintDto.java
  22. 62
      src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintImportDto.java
  23. 93
      src/main/java/com/biutag/supervision/pojo/entity/DataPetitionComplaint.java
  24. 2
      src/main/java/com/biutag/supervision/pojo/entity/NegSourceAuthority.java
  25. 83
      src/main/java/com/biutag/supervision/pojo/entity/NegativeTask.java
  26. 3
      src/main/java/com/biutag/supervision/pojo/entity/SupDictProblemType.java
  27. 12
      src/main/java/com/biutag/supervision/pojo/entity/SupPolice.java
  28. 18
      src/main/java/com/biutag/supervision/pojo/model/PoliceModel.java
  29. 2
      src/main/java/com/biutag/supervision/pojo/model/UserAuth.java
  30. 14
      src/main/java/com/biutag/supervision/pojo/param/BasePage.java
  31. 9
      src/main/java/com/biutag/supervision/pojo/param/DataPetitionComplaintQueryParam.java
  32. 16
      src/main/java/com/biutag/supervision/pojo/param/DepartQueryParam.java
  33. 1
      src/main/java/com/biutag/supervision/pojo/param/DepartTreeListParam.java
  34. 6
      src/main/java/com/biutag/supervision/pojo/param/ModelQueryParam.java
  35. 4
      src/main/java/com/biutag/supervision/pojo/param/NegativeQueryParam.java
  36. 20
      src/main/java/com/biutag/supervision/pojo/param/NegativeTaskQueryParam.java
  37. 4
      src/main/java/com/biutag/supervision/pojo/param/PoliceQueryParam.java
  38. 4
      src/main/java/com/biutag/supervision/pojo/param/UserQueryParam.java
  39. 4
      src/main/java/com/biutag/supervision/pojo/param/WorkParam.java
  40. 2
      src/main/java/com/biutag/supervision/pojo/vo/DepartTree.java
  41. 13
      src/main/java/com/biutag/supervision/pojo/vo/ExportNegativeVo.java
  42. 44
      src/main/java/com/biutag/supervision/service/FileService.java
  43. 2
      src/main/java/com/biutag/supervision/service/NegSourceAuthorityService.java
  44. 2
      src/main/java/com/biutag/supervision/service/NegativeService.java
  45. 90
      src/main/java/com/biutag/supervision/service/NegativeTaskService.java
  46. 26
      src/main/java/com/biutag/supervision/service/SupDepartService.java
  47. 15
      src/main/java/com/biutag/supervision/service/SupDictContentService.java
  48. 11
      src/main/java/com/biutag/supervision/service/SupPoliceService.java
  49. 4
      src/main/resources/application-local.yml
  50. 2
      src/main/resources/application.yml
  51. 5
      src/main/resources/mapper/SupPoliceMapper.xml
  52. BIN
      src/main/resources/static/templates/信访投诉数据台账(模板).xlsx
  53. 8
      src/test/java/com/biutag/supervision/StrUtil.java
  54. 2
      src/test/java/com/biutag/supervision/tools/GenCodeTests.java

7
pom.xml

@ -84,6 +84,13 @@
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.17.0</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-core</artifactId>

106
sql/1008.sql

@ -2,10 +2,114 @@ 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 '%副职%';
INSERT INTO `sup_dict_problem_type` VALUES (1, '内务管理', '1', '-1', '0', '内务管理', '', 1, 1, NULL, '', '', '', '', '2020-08-13 14:47:51', '521677655146233856', 'oumyye', '127.0.0.1');
INSERT INTO `sup_dict_problem_type` VALUES (2, '服务群众', '2', '-1', '0', '服务群众', '', 1, 2, NULL, '', '', '', '', '2020-08-13 14:48:21', '521677655146233856', 'oumyye', '127.0.0.1');
INSERT INTO `sup_dict_problem_type` VALUES (3, '服务基层', '3', '-1', '0', NULL, NULL, 1, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (4, '纪律作风', '4', '-1', '0', NULL, NULL, 1, 4, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (5, '执法办案', '5', '-1', '0', NULL, NULL, 1, 5, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (6, '安保维稳', '6', '-1', '0', NULL, NULL, 1, 6, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (7, '专项工作', '7', '-1', '0', NULL, NULL, 1, 7, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (8, '“二十个不准”', '8', '-1', '0', NULL, NULL, 1, 8, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (9, '钉钉使用弄虚作假。', '9', '1', '0', NULL, '/1/', 2, 9, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (10, '未按规定请示报告。', '10', '1', '0', NULL, '/1/', 2, 10, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (11, '迟到、早退、脱岗、旷工等。', '11', '1', '0', NULL, '/1/', 2, 11, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (12, '值班装备配备、使用不规范。', '12', '1', '0', NULL, '/1/', 2, 12, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (13, '内务卫生不整洁', '13', '1', '0', NULL, '/1/', 2, 13, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (14, '违反着装管理规定', '14', '1', '0', NULL, '/1/', 2, 14, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (15, '枪支保管使用不规范', '15', '1', '0', NULL, '/1/', 2, 15, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (16, '公车管理使用不规范', '16', '1', '0', NULL, '/1/', 2, 16, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (17, '办公备勤用房违规', '17', '1', '0', NULL, '/1/', 2, 17, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (18, '内部安全防范不到位', '18', '1', '0', NULL, '/1/', 2, 18, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (19, '会风会纪差', '19', '1', '0', NULL, '/1/', 2, 19, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (20, '违反保密管理规定', '20', '1', '0', NULL, '/1/', 2, 20, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (21, '泄露警务秘密', '21', '1', '0', NULL, '/1/', 2, 21, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (22, '违反宣传纪律', '22', '1', '0', NULL, '/1/', 2, 22, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (23, '其他', '23', '1', '0', NULL, '/1/', 2, 23, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (24, '态度不好', '24', '2', '0', NULL, '/2/', 2, 24, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (26, '办事推诿、拖拉', '26', '2', '0', NULL, '/2/', 2, 26, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (27, '违规办理', '27', '2', '0', NULL, '/2/', 2, 27, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (28, '吃拿卡要', '28', '2', '0', NULL, '/2/', 2, 28, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (29, '其他', '29', '2', '0', NULL, '/2/', 2, 29, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (30, '测评满意率低', '30', '3', '0', NULL, '/3/', 2, 30, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (31, '办事推诿、拖拉', '31', '3', '0', NULL, '/3/', 2, 31, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (32, '违规摊派任务', '32', '3', '0', NULL, '/3/', 2, 32, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (33, '办理不满意', '33', '3', '0', NULL, '/3/', 2, 33, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (34, '拒不整改问题', '34', '3', '0', NULL, '/3/', 2, 34, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (35, '形式主义、官僚主义', '35', '3', '0', NULL, '/3/', 2, 35, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (36, '其他', '36', '3', '0', NULL, '/3/', 2, 36, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (37, '违反规定饮酒。', '37', '4', '0', NULL, '/4/', 2, 37, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (38, '酒后驾驶机动车。', '38', '4', '0', NULL, '/4/', 2, 38, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (39, '在公共场所酗酒滋事。', '39', '4', '0', NULL, '/4/', 2, 39, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (40, '携带枪支饮酒。', '40', '4', '0', NULL, '/4/', 2, 40, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (41, '吸食、注射毒品。', '41', '4', '0', NULL, '/4/', 2, 41, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (42, '贪污受贿', '42', '4', '0', NULL, '/4/', 2, 42, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (43, '其他违反政治纪律的行为', '43', '4', '0', NULL, '/4/', 2, 43, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (44, '其他违反组织纪律的行为', '44', '4', '0', NULL, '/4/', 2, 44, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (45, '其他违反廉洁纪律的行为', '45', '4', '0', NULL, '/4/', 2, 45, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (46, '其他违反群众纪律的行为', '46', '4', '0', NULL, '/4/', 2, 46, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (47, '其他违反工作纪律的行为', '47', '4', '0', NULL, '/4/', 2, 47, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (48, '其他违反生活纪律的行为', '48', '4', '0', NULL, '/4/', 2, 48, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (49, '其他违法犯罪行为', '49', '4', '0', NULL, '/4/', 2, 49, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (50, '其他', '50', '4', '0', NULL, '/4/', 2, 50, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (51, '接处警不及时。', '51', '5', '0', NULL, '/5/', 2, 51, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (52, '现场处置不文明、不规范。', '52', '5', '0', NULL, '/5/', 2, 52, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (53, '不如实、及时受立案', '53', '5', '0', NULL, '/5/', 2, 53, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (54, '调查取证不及时', '54', '5', '0', NULL, '/5/', 2, 54, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (55, '未按规定使用执法记录仪', '55', '5', '0', NULL, '/5/', 2, 55, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (56, '违反执法办案场所相关规定', '56', '5', '0', NULL, '/5/', 2, 56, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (57, '违反规定采取强制措施', '57', '5', '0', NULL, '/5/', 2, 57, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (58, '违规处理案件,执法不公、不严。', '58', '5', '0', NULL, '/5/', 2, 58, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (59, '执行不到位', '59', '5', '0', NULL, '/5/', 2, 59, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (60, '违规介入经济纠纷', '60', '5', '0', NULL, '/5/', 2, 60, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (61, '违规查封、扣押、冻结,影响营商环境', '61', '5', '0', NULL, '/5/', 2, 61, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (62, '涉案财物、随身物品管理违规', '62', '5', '0', NULL, '/5/', 2, 62, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (63, '违反法定程序办案。', '63', '5', '0', NULL, '/5/', 2, 63, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (64, '指供、诱供、刑讯逼供。', '64', '5', '0', NULL, '/5/', 2, 64, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (65, '办人情案、关系案、金钱案。', '65', '5', '0', NULL, '/5/', 2, 65, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (66, '充当违法犯罪保护伞。', '66', '5', '0', NULL, '/5/', 2, 66, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (67, '向违法犯罪嫌疑人通风报信', '67', '5', '0', NULL, '/5/', 2, 67, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (68, '违规安排会见,私自传递物品、信件。', '68', '5', '0', NULL, '/5/', 2, 68, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (69, '体罚、虐待被监管人员。', '69', '5', '0', NULL, '/5/', 2, 69, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (70, '违反监所安全管理规定。', '70', '5', '0', NULL, '/5/', 2, 70, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (71, '失职渎职导致发生执法安全事故', '71', '5', '0', NULL, '/5/', 2, 71, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (72, '处置不当引发负面舆情', '72', '5', '0', NULL, '/5/', 2, 72, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (73, '其他', '73', '5', '0', NULL, '/5/', 2, 73, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (74, '未按时到岗、脱岗', '74', '6', '0', NULL, '/6/', 2, 74, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (75, '履职不认真', '75', '6', '0', NULL, '/6/', 2, 75, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (76, '不按规定佩戴装备', '76', '6', '0', NULL, '/6/', 2, 76, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (77, '警容不整及不文明行为', '77', '6', '0', NULL, '/6/', 2, 77, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (78, '处置不规范', '78', '6', '0', NULL, '/6/', 2, 78, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (79, '失职渎职', '79', '6', '0', NULL, '/6/', 2, 79, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (80, '其他', '80', '6', '0', NULL, '/6/', 2, 80, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (81, '部署推进不力', '81', '7', '0', NULL, '/7/', 2, 81, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (82, '考核排名落后', '82', '7', '0', NULL, '/7/', 2, 82, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (83, '被上级点名通报', '83', '7', '0', NULL, '/7/', 2, 83, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (84, '其他', '84', '7', '0', NULL, '/7/', 2, 84, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (85, '搞团团伙伙。', '85', '8', '0', NULL, '/8/', 2, 85, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (86, '搞权力交换、利益输送。', '86', '8', '0', NULL, '/8/', 2, 86, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (87, '收受礼金及贵重礼品。', '87', '8', '0', NULL, '/8/', 2, 87, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (88, '组织参与黄、赌活动', '88', '8', '0', NULL, '/8/', 2, 88, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (89, '相互拆台、诬告、陷害,破坏队伍团结。', '89', '8', '0', NULL, '/8/', 2, 89, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (90, '拒绝、拖延执行上级依法依规作出的决定。', '90', '8', '0', NULL, '/8/', 2, 90, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (91, '违反党的干部政策,培植私人势力。', '91', '8', '0', NULL, '/8/', 2, 91, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (92, '干预执法办案。', '92', '8', '0', NULL, '/8/', 2, 92, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (93, '搞无原则一团和气。', '93', '8', '0', NULL, '/8/', 2, 93, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (94, '使用庸俗化称谓,搞人身依附。', '94', '8', '0', NULL, '/8/', 2, 94, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (95, '妄议中央大政方针。', '95', '8', '0', NULL, '/8/', 2, 95, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (96, '结交“风水大师”、参与迷信活动。', '96', '8', '0', NULL, '/8/', 2, 96, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (97, '帮助违法犯罪嫌疑人逃避法律责任。', '97', '8', '0', NULL, '/8/', 2, 97, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (98, '违规与当事人、中间人等特定关系人交往。', '98', '8', '0', NULL, '/8/', 2, 98, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (99, '超越“亲”“清”政商关系与企业老板交往。', '99', '8', '0', NULL, '/8/', 2, 99, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (100, '受雇于任何组织、个人。', '100', '8', '0', NULL, '/8/', 2, 100, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (101, '收受管理、服务对象及其代理人任何好处。', '101', '8', '0', NULL, '/8/', 2, 101, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (102, '违规从事盈利性经营活动。', '102', '8', '0', NULL, '/8/', 2, 102, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (103, '利用职权或影响力为亲友谋取好处。', '103', '8', '0', NULL, '/8/', 2, 103, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `sup_dict_problem_type` VALUES (104, '利用网络社交媒体进行不正当交往。', '104', '8', '0', NULL, '/8/', 2, 104, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

5
sql/1011.sql

@ -0,0 +1,5 @@
ALTER TABLE `negative`.`sup_police`
ADD COLUMN `person_type` varchar(255) NULL COMMENT '人员属性' AFTER `position`,
ADD COLUMN `marital_status` varchar(255) NULL COMMENT '婚姻状况' AFTER `person_type`,
ADD COLUMN `have_children` tinyint(1) NULL COMMENT '子女' AFTER `marital_status`,
ADD COLUMN `education` varchar(255) NULL COMMENT '学历' AFTER `have_children`;

6
src/main/java/com/biutag/supervision/constants/AppConstants.java

@ -4,7 +4,7 @@ public class AppConstants {
public static final int MENU_ROOT_ID = 0;
// 部门
// 单位
public static final String DICT_CONTENT_ROOT_PARENT_CODE = "-1";
public static final Integer DICT_PROBLEM_SOURCE_ROOT_PARENT_CODE = -1;
@ -13,11 +13,11 @@ public class AppConstants {
public static final String USER_TYPE_SUPER = "super";
// 部门
// 单位
public static final String DEPART_ROOT_PID = "0";
// 部门跟节点ID(长沙市公安局)
// 单位根节点ID(长沙市公安局)
public static final String ROOT_DEPART_ID = "12630";
public static final String ROOT_DEPART_NAME = "长沙市公安局";

13
src/main/java/com/biutag/supervision/constants/enums/NegativeTaskCategoryEnum.java

@ -0,0 +1,13 @@
package com.biutag.supervision.constants.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
@AllArgsConstructor
public enum NegativeTaskCategoryEnum {
IMPORT("0"),
EXPORT("2");
@Getter
private String value;
}

14
src/main/java/com/biutag/supervision/constants/enums/NegativeTaskStatusEnum.java

@ -0,0 +1,14 @@
package com.biutag.supervision.constants.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
@AllArgsConstructor
public enum NegativeTaskStatusEnum {
SUCCESS("0"),
FAIL("1"),
PADDING("2");
@Getter
private String value;
}

26
src/main/java/com/biutag/supervision/constants/enums/ProblemSourcesEnum.java

@ -6,22 +6,34 @@ import lombok.Getter;
@Getter
@AllArgsConstructor
public enum ProblemSourcesEnum {
XFTS("信访投诉", "1"),
XCDC("现场督察", "13"),
SZDC("数字督察", "14"),
ZXDC("专项督察", "15"),
SPDC("视频督察", "16"),
A12389("12389", "17"),
SLDJB("市局领导交办", "18"),
ZDDJB("支队领导交办", "19"),
SJJB("上级交办", "20"),
GJXFPT("国家信访平台", "21"),
GABXF("公安部信访", "22"),
JZXX("局长信箱", "23"),
XF12337("12337信访", "24"),
XF_QT("其他", "25"),
SJJD("审计监督", "26"),
JWDC("警务调查", "2"),
JYDC("警意调查", "3"),
CFJD("持法监督", "4"),
WSPC("360度网上测评", "5"),
DDKQ("钉钉考勤", "6"),
JDGL("监督管理", "7"),
JCKH("检查考核", "8"),
OTHER("其他", "9"),
WJWG("违纪违规", "10");
QT("其他", "9");
private String label;
private String value;
public static ProblemSourcesEnum get(String value) {
for (ProblemSourcesEnum problemSourcesEnum : values()) {
if (problemSourcesEnum.value.equals(value)) {

23
src/main/java/com/biutag/supervision/constants/enums/ProcessingStatusEnum.java

@ -1,11 +1,26 @@
package com.biutag.supervision.constants.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
@AllArgsConstructor
public enum ProcessingStatusEnum {
signing,
processing,
approval,
completed;
signing("签收中"),
processing("办理中"),
approval("审批中"),
completed("已办结");
@Getter
private String label;
public static String getLabel(String name) {
for (ProcessingStatusEnum value : values()) {
if (value.name().equals(name)) {
return value.getLabel();
}
}
return null;
}
}

20
src/main/java/com/biutag/supervision/controller/FileController.java

@ -1,18 +1,13 @@
package com.biutag.supervision.controller;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.io.IoUtil;
import cn.hutool.http.HttpResponse;
import cn.hutool.http.HttpUtil;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.vo.FileVo;
import com.github.tobato.fastdfs.domain.fdfs.StorePath;
import com.github.tobato.fastdfs.service.FastFileStorageClient;
import com.biutag.supervision.service.FileService;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@ -25,32 +20,27 @@ import java.io.IOException;
@Controller
public class FileController {
private final FastFileStorageClient fastFileStorageClient;
@Value("${fdfs.preview-url}")
private String FDFS_PREVIEW_URL;
private final FileService fileService;
@ResponseBody
@PostMapping("upload")
public Result<FileVo> upload(@RequestPart("file") MultipartFile file) throws IOException {
log.info("文件上传 upload------------------------------");
StorePath storePath = fastFileStorageClient.uploadFile("group1", file.getInputStream(), file.getSize(), FileUtil.extName(file.getOriginalFilename()));
String filePath = fileService.upload(file);
return Result.success(new FileVo()
.setFileName(file.getOriginalFilename())
.setFilePath("/" + storePath.getFullPath()));
.setFilePath(filePath));
}
@GetMapping("stream/**")
public void download(HttpServletRequest request, HttpServletResponse response) throws IOException {
String filePath = request.getRequestURI().substring(12);
HttpResponse httpResponse = HttpUtil.createGet(FDFS_PREVIEW_URL + filePath)
.execute();
if (filePath.toLowerCase().endsWith(".pdf")) {
response.setContentType("application/pdf");
} else {
response.setContentType("application/octet-stream");
}
IoUtil.copy(httpResponse.bodyStream(), response.getOutputStream());
IoUtil.copy(fileService.download(filePath), response.getOutputStream());
}
}

10
src/main/java/com/biutag/supervision/controller/data/DataController.java

@ -1,10 +0,0 @@
package com.biutag.supervision.controller.data;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RestController;
@RequiredArgsConstructor
@RestController
public class DataController {
}

79
src/main/java/com/biutag/supervision/controller/data/DataPetitionComplaintController.java

@ -0,0 +1,79 @@
package com.biutag.supervision.controller.data;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelReader;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.read.listener.ReadListener;
import com.alibaba.excel.read.metadata.ReadSheet;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.dto.DataPetitionComplaintImportDto;
import com.biutag.supervision.pojo.entity.DataPetitionComplaint;
import com.biutag.supervision.pojo.param.DataPetitionComplaintQueryParam;
import com.biutag.supervision.service.DataPetitionComplaintService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
@Slf4j
@RequiredArgsConstructor
@RequestMapping("data/petitionComplaint")
@RestController
public class DataPetitionComplaintController {
private final DataPetitionComplaintService dataPetitionComplaintService;
@GetMapping
public Result<Page<DataPetitionComplaint>> list(DataPetitionComplaintQueryParam queryParam) {
return Result.success(dataPetitionComplaintService.page(Page.of(queryParam.getCurrent(), queryParam.getSize())));
}
@PostMapping("import")
public Result<List<DataPetitionComplaintImportDto>> importExcel(@RequestPart("file") MultipartFile file) throws IOException {
log.info("文件导入中------------------------------");
if (!file.getOriginalFilename().toLowerCase().endsWith(".xls") && !file.getOriginalFilename().toLowerCase().endsWith(".xlsx")) {
throw new RuntimeException("仅支持 xls/xlsx 格式文件的导入");
}
List<DataPetitionComplaintImportDto> list = new ArrayList<>();
ExcelReader excelReader = EasyExcel.read(file.getInputStream(), DataPetitionComplaintImportDto.class, new ReadListener<DataPetitionComplaintImportDto>() {
@Override
public void invoke(DataPetitionComplaintImportDto data, AnalysisContext analysisContext) {
list.add(data);
}
@Override
public void doAfterAllAnalysed(AnalysisContext analysisContext) {
}
}).build();
ReadSheet sheet = EasyExcel.readSheet(0).build();
excelReader.read(sheet);
excelReader.close();
return Result.success(list);
}
@PostMapping
public Result<Void> add(@RequestBody List<DataPetitionComplaintImportDto> body) {
if (body.isEmpty()) {
return Result.success();
}
LocalDateTime now = LocalDateTime.now();
List<DataPetitionComplaint> list = body.stream().map(item -> {
DataPetitionComplaint data = new DataPetitionComplaint();
BeanUtils.copyProperties(item, data);
data.setCrtTime(now);
data.setUpdTime(now);
return data;
}).toList();
dataPetitionComplaintService.saveBatch(list);
return Result.success();
}
}

23
src/main/java/com/biutag/supervision/controller/system/DepartController.java

@ -4,12 +4,15 @@ import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.NumberUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.supervision.constants.enums.DepartLevelEnum;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.entity.SupDepart;
import com.biutag.supervision.pojo.param.DepartQueryParam;
import com.biutag.supervision.pojo.param.DepartTreeListParam;
import com.biutag.supervision.pojo.vo.DepartTree;
import com.biutag.supervision.service.SupDepartService;
import com.biutag.supervision.service.SupPoliceService;
import jakarta.validation.ValidationException;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
@ -24,18 +27,25 @@ public class DepartController {
private final SupDepartService departService;
public final SupPoliceService policeService;
@GetMapping
public Result<List<DepartTree>> treeList(DepartTreeListParam departTreeListParam) {
return Result.success(departService.buildTreeByParam(departTreeListParam));
}
@GetMapping("list")
public Result<Page<SupDepart>> list(DepartQueryParam departQueryParam) {
return Result.success(departService.page(departQueryParam));
}
@PostMapping
public Result<Boolean> add(@RequestBody SupDepart supDepart) {
if (departService.existsByName(supDepart.getName())) {
throw new ValidationException("部门全称已存在");
throw new ValidationException("单位全称已存在");
}
if (departService.existsByCode(supDepart.getCode())) {
throw new ValidationException("部门编码已存在");
throw new ValidationException("单位编码已存在");
}
SupDepart parent = departService.getById(supDepart.getPid());
supDepart.setId(String.valueOf(NumberUtil.nullToZero(departService.getMaxId()) + 1));
@ -47,10 +57,10 @@ public class DepartController {
@PutMapping
public Result<Boolean> update(@RequestBody SupDepart supDepart) {
if (departService.exists(new LambdaQueryWrapper<SupDepart>().eq(SupDepart::getName, supDepart.getName()).ne(SupDepart::getId, supDepart.getId()))) {
throw new ValidationException("部门全程已存在");
throw new ValidationException("单位全称已存在");
}
if (departService.exists(new LambdaQueryWrapper<SupDepart>().eq(SupDepart::getCode, supDepart.getCode()).ne(SupDepart::getId, supDepart.getId()))) {
throw new ValidationException("部门编码已存在");
throw new ValidationException("单位编码已存在");
}
SupDepart parent = departService.getById(supDepart.getPid());
supDepart.setLevel(parent.getLevel() + 1);
@ -60,6 +70,9 @@ public class DepartController {
@DeleteMapping("{id}")
public Result<Boolean> del(@PathVariable String id) {
if (policeService.exists(id)) {
throw new RuntimeException("该单位下还有警务人员,请移除后再删除");
}
return Result.success(departService.removeById(id));
}
@ -69,7 +82,7 @@ public class DepartController {
}
@GetMapping("second")
public Result<List<DepartTree>> list() {
public Result<List<DepartTree>> seconds() {
List<SupDepart> supDeparts = departService.listByLevel(List.of(DepartLevelEnum.SECOND_CATEGORY.getValue(), DepartLevelEnum.SECOND.getValue()));
return Result.success(departService.buildTree(supDeparts));
}

10
src/main/java/com/biutag/supervision/controller/system/DictContentController.java

@ -3,7 +3,7 @@ package com.biutag.supervision.controller.system;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.entity.SupDictContent;
import com.biutag.supervision.pojo.entity.SupDictProblemType;
import com.biutag.supervision.pojo.vo.DictContentTree;
import com.biutag.supervision.service.SupDictContentService;
import lombok.RequiredArgsConstructor;
@ -25,17 +25,17 @@ public class DictContentController {
}
@PostMapping
public Result<Void> add(@RequestBody SupDictContent dictContent) {
public Result<Void> add(@RequestBody SupDictProblemType dictContent) {
dictContent.setUpdTime(LocalDateTime.now());
dictContent.setCrtTime(LocalDateTime.now());
dictContent.setStatus("0");
dictContentService.save(dictContent);
dictContentService.update(new LambdaUpdateWrapper<SupDictContent>().eq(SupDictContent::getId, dictContent.getId()).set(SupDictContent::getCode, dictContent.getId()));
dictContentService.update(new LambdaUpdateWrapper<SupDictProblemType>().eq(SupDictProblemType::getId, dictContent.getId()).set(SupDictProblemType::getCode, dictContent.getId()));
return Result.success();
}
@PutMapping
public Result<Void> update(@RequestBody SupDictContent dictContent) {
public Result<Void> update(@RequestBody SupDictProblemType dictContent) {
dictContent.setUpdTime(LocalDateTime.now());
dictContentService.updateById(dictContent);
return Result.success();
@ -43,7 +43,7 @@ public class DictContentController {
@DeleteMapping("{id}")
public Result<Void> update(@PathVariable Integer id) {
if (dictContentService.exists(new LambdaQueryWrapper<SupDictContent>().eq(SupDictContent::getParentCode, id))) {
if (dictContentService.exists(new LambdaQueryWrapper<SupDictProblemType>().eq(SupDictProblemType::getParentCode, id))) {
throw new RuntimeException("该节点下还存在子节点,无法删除");
}
dictContentService.removeById(id);

49
src/main/java/com/biutag/supervision/controller/system/HolidayController.java

@ -3,12 +3,17 @@ 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.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
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.time.LocalDate;
import java.time.temporal.TemporalAdjusters;
import java.util.ArrayList;
import java.util.List;
@RequiredArgsConstructor
@ -18,9 +23,49 @@ public class HolidayController {
private final HolidayService holidayService;
public static final List<Integer> months = List.of(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);
@GetMapping("{year}")
public Result<List<Holiday>> list(@PathVariable Integer year) {
return Result.success(holidayService.list(year));
public Result<List<HolidayVo>> list(@PathVariable Integer year) {
List<Holiday> holidays = holidayService.list(year);
List<HolidayVo> list = months.stream().map(month -> {
HolidayVo holidayVo = new HolidayVo();
holidayVo.setMonth(month);
LocalDate beginDay = LocalDate.of(year, month, 1);
int beginDayOfWeek = beginDay.getDayOfWeek().getValue();
for (int i = 0; i < (beginDayOfWeek != 0 ? beginDayOfWeek - 1 : 6); i++) {
holidayVo.getDays().add(new Day());
}
LocalDate.of(year, month, 1);
for (int i = 1; i <= beginDay.with(TemporalAdjusters.lastDayOfMonth()).getDayOfMonth(); i++) {
String date = LocalDate.of(year, month, i).toString();
Boolean flag = holidays.stream().filter(item -> item.getDate().equals(date)).findFirst().map(Holiday::getFlag).orElse(false);
holidayVo.getDays().add(Day.of(i, flag));
}
return holidayVo;
}).toList();
return Result.success(list);
}
@Setter
@Getter
public static class HolidayVo {
private Integer month;
private List<Day> days = new ArrayList<>();
}
@Setter
@Getter
public static class Day {
private Integer day;
private Boolean flag = false;
public static Day of(Integer day, Boolean flag) {
Day obj = new Day();
obj.setDay(day);
obj.setFlag(flag);
return obj;
}
}
}

9
src/main/java/com/biutag/supervision/controller/system/PoliceController.java

@ -1,5 +1,7 @@
package com.biutag.supervision.controller.system;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.supervision.pojo.Result;
@ -15,6 +17,7 @@ import com.biutag.supervision.service.SupPoliceService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
@ -37,14 +40,14 @@ public class PoliceController {
@PostMapping
public Result<Boolean> add(@RequestBody SupPolice police) {
police.setId(IdUtil.getSnowflakeNextIdStr());
police.setUpdatedAt(String.valueOf(new Date().getTime()));
police.setCreatedAt(String.valueOf(new Date().getTime()));
police.setUpdatedAt(DateUtil.format(new Date(), DatePattern.NORM_DATETIME_FORMAT));
police.setCreatedAt(DateUtil.format(new Date(), DatePattern.NORM_DATETIME_FORMAT));
return Result.success(policeService.save(police));
}
@PutMapping
public Result<Boolean> update(@RequestBody SupPolice police) {
police.setUpdatedAt(String.valueOf(new Date().getTime()));
police.setUpdatedAt(DateUtil.format(new Date(), DatePattern.NORM_DATETIME_FORMAT));
return Result.success(policeService.updateById(police));
}

25
src/main/java/com/biutag/supervision/controller/work/NegativeController.java

@ -1,26 +1,21 @@
package com.biutag.supervision.controller.work;
import com.alibaba.excel.EasyExcel;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.supervision.flow.FlowService;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.domain.NegativeDetail;
import com.biutag.supervision.pojo.dto.ActionDto;
import com.biutag.supervision.pojo.dto.NegativeDto;
import com.biutag.supervision.pojo.entity.NegativeTask;
import com.biutag.supervision.pojo.param.NegativeQueryParam;
import com.biutag.supervision.pojo.vo.ExportNegativeVo;
import com.biutag.supervision.pojo.vo.NegativeQueryVo;
import com.biutag.supervision.service.NegativeQueryService;
import com.biutag.supervision.service.NegativeService;
import jakarta.servlet.http.HttpServletResponse;
import com.biutag.supervision.service.NegativeTaskService;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;
import java.io.IOException;
import java.util.List;
@RequiredArgsConstructor
@RequestMapping("negative")
@RestController
@ -32,6 +27,9 @@ public class NegativeController {
private final NegativeQueryService negativeQueryService;
private final NegativeTaskService negativeTaskService;
@GetMapping
public Result<Page<NegativeQueryVo>> list(NegativeQueryParam queryParam) {
return Result.success(negativeQueryService.page(queryParam));
@ -53,17 +51,14 @@ public class NegativeController {
return Result.success(flowService.execute(action));
}
@PostMapping("export")
public void export(NegativeQueryParam queryParam, HttpServletResponse response) throws IOException {
@PostMapping("export/excel")
public Result<Void> export(NegativeQueryParam queryParam) {
queryParam.setSize(10000);
queryParam.setCurrent(1);
Page<NegativeQueryVo> page = negativeQueryService.page(queryParam);
List<ExportNegativeVo> list = page.getRecords().stream().map(item -> {
ExportNegativeVo vo = new ExportNegativeVo();
BeanUtils.copyProperties(item, vo);
return vo;
}).toList();
EasyExcel.write(response.getOutputStream(), ExportNegativeVo.class).inMemory(Boolean.TRUE).sheet("问题台账").doWrite(list);
NegativeTask negativeTask = negativeTaskService.save(page.getRecords().size());
negativeTaskService.updateExcel(page.getRecords(), negativeTask.getId());
return Result.success();
}
}

26
src/main/java/com/biutag/supervision/controller/work/NegativeTaskController.java

@ -0,0 +1,26 @@
package com.biutag.supervision.controller.work;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.entity.NegativeTask;
import com.biutag.supervision.pojo.param.NegativeTaskQueryParam;
import com.biutag.supervision.service.NegativeTaskService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RequiredArgsConstructor
@RequestMapping("negativeTask")
@RestController
public class NegativeTaskController {
private final NegativeTaskService negativeTaskService;
@GetMapping
public Result<Page<NegativeTask>> page(NegativeTaskQueryParam param) {
return Result.success(negativeTaskService.page(param));
}
}

8
src/main/java/com/biutag/supervision/mapper/NegativeTaskMapper.java

@ -0,0 +1,8 @@
package com.biutag.supervision.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.biutag.supervision.pojo.entity.NegativeTask;
public interface NegativeTaskMapper extends BaseMapper<NegativeTask> {
}

4
src/main/java/com/biutag/supervision/mapper/SupDictContentMapper.java

@ -1,8 +1,8 @@
package com.biutag.supervision.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.biutag.supervision.pojo.entity.SupDictContent;
import com.biutag.supervision.pojo.entity.SupDictProblemType;
public interface SupDictContentMapper extends BaseMapper<SupDictContent> {
public interface SupDictContentMapper extends BaseMapper<SupDictProblemType> {
}

2
src/main/java/com/biutag/supervision/pojo/domain/PoliceAuth.java

@ -13,6 +13,6 @@ public class PoliceAuth {
private List<String> departs;
private List<String> sources;
private List<Integer> sources;
}

3
src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintDto.java

@ -32,7 +32,7 @@ public class DataPetitionComplaintDto {
@Schema(description = "登记时间(问题发现时间) 示例:2024-08-28 11:00:00")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss")
@NotNull
private LocalDateTime discovery_time;
private LocalDateTime discoveryTime;
// 投诉人
@Schema(description = "投诉人")
@ -45,6 +45,7 @@ public class DataPetitionComplaintDto {
private String responderPhone;
// 初重信访
@Schema(description = "初重信访")
@NotBlank
private String initialPetition;

62
src/main/java/com/biutag/supervision/pojo/dto/DataPetitionComplaintImportDto.java

@ -0,0 +1,62 @@
package com.biutag.supervision.pojo.dto;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
@Schema(description = "信访投诉")
@Setter
@Getter
public class DataPetitionComplaintImportDto {
// 信件编号
@ExcelProperty({"信访基本信息", "信件编号"})
private String originId;
// 投诉渠道
@ExcelProperty({"信访基本信息", "投诉渠道"})
private String channelForFilingComplaints;
// 受理层级
@ExcelProperty({"信访基本信息", "受理层级"})
private String acceptanceLevel;
// 登记时间
@ExcelProperty({"信访基本信息", "登记时间"})
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm")
private LocalDateTime discoveryTime;
// 投诉人
@ExcelProperty({"信访基本信息", "投诉人"})
private String responderName;
// 投诉人电话
@ExcelProperty({"信访基本信息", "投诉人电话"})
private String contactPhone;
// 初重信访
@ExcelProperty({"信访基本信息", "初重信访"})
private String initialPetition;
// 缠访闹访
@ExcelProperty({"信访基本信息", "缠访闹访"})
private String entanglementVisits;
// 群众集访
@ExcelProperty({"信访基本信息", "群众集访"})
private String massVisits;
// 被投诉机构
@ExcelProperty({"信访基本信息", "被投诉机构"})
private String complainedDepartName;
// 具体内容
@ExcelProperty({"信访基本信息", "具体内容"})
private String thingDesc;
}

93
src/main/java/com/biutag/supervision/pojo/entity/DataPetitionComplaint.java

@ -1,8 +1,8 @@
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 io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
@ -15,9 +15,12 @@ import java.time.LocalDateTime;
@Getter
public class DataPetitionComplaint {
@TableId(type = IdType.AUTO)
private Integer id;
// 信件编号
@TableId
private Integer letterId;
private String originId;
// 投诉渠道
@TableField("channel_for_filing_complaints")
@ -74,11 +77,6 @@ public class DataPetitionComplaint {
@TableField("thing_desc")
private String thingDesc;
// 办结时间
private String completedTime;
// 办结状态
private String completedState;
//---------------------
@ -90,85 +88,6 @@ public class DataPetitionComplaint {
@TableField("involve_depart_name")
private String involveDepartName;
// 是否单位责任
@TableField("is_unit_responsible")
private Integer isUnitResponsible;
// 单位处理结果
@TableField("depart_processing_results")
private String departProcessingResults;
// 涉及人姓名
@TableField("involved_name")
private String involvedName;
// 身份证号码
@TableField("involved_id_code")
private String involvedIdCode;
// 人员属性
@TableField("personnel_attributes")
private String personnelAttributes;
// 督察措施
@TableField("inspection_measures")
private String inspectionMeasures;
// 问题类型
@TableField("problem_type")
private String problemType;
// 主观方面
@TableField("subjective_aspect")
private String subjectiveAspect;
// 责任类别
@TableField("responsibility_category")
private String responsibilityCategory;
// 处理结果
@TableField("processing_results")
private String processingResults;
// 维权容错
@TableField("rights_protection_fault_tolerance")
private String rightsProtectionFaultTolerance;
// 帮扶情况
@TableField("assistance_situation")
private String assistanceSituation;
// 帮扶开始时间
@TableField("assistance_start_time")
private LocalDateTime assistanceStartTime;
// 帮扶结束时间
@TableField("assistance_end_time")
private LocalDateTime assistanceEndTime;
// 涉及领导姓名
@TableField("involved_leader_name")
private String involvedLeaderName;
// 身份证号码
@TableField("involved_leader_id_code")
private String involvedLeaderIdCode;
// 督察措施
@TableField("involved_leader_inspection_measures")
private String involvedLeaderInspectionMeasures;
// 责任类别
@TableField("involved_leader_responsibility_category")
private String involvedLeaderResponsibilityCategory;
// 处理结果
@TableField("involved_leader_processing_results")
private String involvedLeaderProcessingResults;
// 维权容错
@TableField("involved_leader_rights_protection_fault_tolerance")
private String involvedLeaderRightsProtectionFaultTolerance;
//
@TableField("crt_time")

2
src/main/java/com/biutag/supervision/pojo/entity/NegSourceAuthority.java

@ -16,6 +16,6 @@ public class NegSourceAuthority {
private String idCode;
// 可查看的来源
private String source;
private Integer source;
}

83
src/main/java/com/biutag/supervision/pojo/entity/NegativeTask.java

@ -0,0 +1,83 @@
package com.biutag.supervision.pojo.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
@Setter
@Getter
public class NegativeTask {
//
@TableId(value = "id")
private String id;
// 任务名称
@TableField("taskName")
private String taskName;
// 导入条数
@TableField("importRow")
private Integer importRow;
// 成功条数
@TableField("successRow")
private String successRow;
// 错误条数
@TableField("errorRow")
private String errorRow;
// 文件路径
@TableField("filePath")
private String filePath;
// 错误信息下载
@TableField("errorPath")
private String errorPath;
@JsonFormat(pattern = "YYYY-MM-dd HH:mm")
@TableField("crtTime")
private LocalDateTime crtTime;
//
@TableField("crtUser")
private String crtUser;
@JsonFormat(pattern = "YYYY-MM-dd HH:mm")
@TableField("updTime")
private LocalDateTime updTime;
//
@TableField("updUser")
private String updUser;
// 状态 0 成功 1 失败 2 导入中
@TableField("status")
private String status;
// 备注
@TableField("remark")
private String remark;
// 文件id
@TableField("fileId")
private String fileId;
// 导入任务类型 0 完整导入 1 部分导入
@TableField("type")
private String type;
//
@TableField("excepionInfo")
private String excepionInfo;
//
@TableField("category")
private String category;
}

3
src/main/java/com/biutag/supervision/pojo/entity/SupDictContent.java → src/main/java/com/biutag/supervision/pojo/entity/SupDictProblemType.java

@ -6,13 +6,12 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
@Setter
@Getter
public class SupDictContent {
public class SupDictProblemType {
@TableId(type = IdType.AUTO)
private Integer id;

12
src/main/java/com/biutag/supervision/pojo/entity/SupPolice.java

@ -123,4 +123,16 @@ public class SupPolice {
// 职位 正职 副职
private String position;
// 人员属性
private String personType;
// 婚姻状况
private String maritalStatus;
// 子女
private Boolean haveChildren;
// 学历
private String education;
}

18
src/main/java/com/biutag/supervision/pojo/model/PoliceModel.java

@ -75,6 +75,24 @@ public class PoliceModel {
private String departShortName;
private String parentDepartShortName;
private String position;
// 人员属性
private String personType;
// 婚姻状况
private String maritalStatus;
// 子女
private Boolean haveChildren;
// 学历
private String education;
private String createdAt;
private String updatedAt;
}

2
src/main/java/com/biutag/supervision/pojo/model/UserAuth.java

@ -28,7 +28,7 @@ public class UserAuth implements Serializable {
private List<String> roleCodes;
// 权限(问题来源)
private List<String> authSources;
private List<Integer> authSources;
private List<String> authDepartIds;

14
src/main/java/com/biutag/supervision/pojo/param/BasePage.java

@ -0,0 +1,14 @@
package com.biutag.supervision.pojo.param;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class BasePage {
private long current = 1;
private long size = 10;
}

9
src/main/java/com/biutag/supervision/pojo/param/DataPetitionComplaintQueryParam.java

@ -0,0 +1,9 @@
package com.biutag.supervision.pojo.param;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class DataPetitionComplaintQueryParam extends BasePage {
}

16
src/main/java/com/biutag/supervision/pojo/param/DepartQueryParam.java

@ -0,0 +1,16 @@
package com.biutag.supervision.pojo.param;
import lombok.Getter;
import lombok.Setter;
@Setter
@Getter
public class DepartQueryParam extends BasePage {
private String shortName;
private String name;
private String code;
}

1
src/main/java/com/biutag/supervision/pojo/param/DepartTreeListParam.java

@ -9,6 +9,5 @@ public class DepartTreeListParam {
private String pid;
private String shortName;
}

6
src/main/java/com/biutag/supervision/pojo/param/ModelQueryParam.java

@ -5,11 +5,7 @@ import lombok.Setter;
@Setter
@Getter
public class ModelQueryParam {
private Long current = 1L;
private Long size = 9L;
public class ModelQueryParam extends BasePage {
private String modelName;

4
src/main/java/com/biutag/supervision/pojo/param/NegativeQueryParam.java

@ -10,10 +10,8 @@ import java.util.List;
@Setter
@Getter
public class NegativeQueryParam {
public class NegativeQueryParam extends BasePage {
private long current = 1;
private long size = 10;
private String originId;
// 问题发生时间

20
src/main/java/com/biutag/supervision/pojo/param/NegativeTaskQueryParam.java

@ -0,0 +1,20 @@
package com.biutag.supervision.pojo.param;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Setter
@Getter
public class NegativeTaskQueryParam extends BasePage {
private String taskName;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private List<Date> crtTime = new ArrayList<>();
}

4
src/main/java/com/biutag/supervision/pojo/param/PoliceQueryParam.java

@ -5,10 +5,8 @@ import lombok.Setter;
@Setter
@Getter
public class PoliceQueryParam {
public class PoliceQueryParam extends BasePage {
private long current = 1;
private long size = 10;
private String name;
private String empNo;
private String idCode;

4
src/main/java/com/biutag/supervision/pojo/param/UserQueryParam.java

@ -7,10 +7,8 @@ import java.util.List;
@Setter
@Getter
public class UserQueryParam {
public class UserQueryParam extends BasePage {
private long current = 1;
private long size = 10;
private String userName;
private String nickName;
private List<String> roleId;

4
src/main/java/com/biutag/supervision/pojo/param/WorkParam.java

@ -10,10 +10,8 @@ import java.util.List;
@Setter
@Getter
public class WorkParam {
public class WorkParam extends BasePage {
private long current = 1;
private long size = 10;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private List<Date> happenTime = new ArrayList<>();
private String problemSourcesCode;

2
src/main/java/com/biutag/supervision/pojo/vo/DepartTree.java

@ -30,6 +30,8 @@ public class DepartTree {
private Integer orderNo;
private String updatedAt;
private List<DepartTree> children = new ArrayList<>();
private boolean hasChildren = false;

13
src/main/java/com/biutag/supervision/pojo/vo/ExportNegativeVo.java

@ -1,6 +1,7 @@
package com.biutag.supervision.pojo.vo;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
@ -61,11 +62,19 @@ public class ExportNegativeVo {
private String processingStatus;
// 办理单位 二级
@ExcelProperty("办理单位")
@ExcelProperty("办理单位(二级)")
private String handleSecondDepartName;
// 办理单位 三级
@ExcelProperty("办理单位")
@ExcelProperty("办理单位(三级)")
private String handleThreeDepartName;
// 核查情况
@ExcelProperty("核查情况")
private String checkStatusName;
// 是否整改
@ExcelProperty("是否整改")
private String isRectifyName;
}

44
src/main/java/com/biutag/supervision/service/FileService.java

@ -0,0 +1,44 @@
package com.biutag.supervision.service;
import cn.hutool.core.io.FileUtil;
import cn.hutool.http.HttpResponse;
import cn.hutool.http.HttpUtil;
import com.biutag.supervision.pojo.Result;
import com.biutag.supervision.pojo.vo.FileVo;
import com.github.tobato.fastdfs.domain.fdfs.StorePath;
import com.github.tobato.fastdfs.service.FastFileStorageClient;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
@RequiredArgsConstructor
@Service
public class FileService {
private final FastFileStorageClient fastFileStorageClient;
@Value("${fdfs.preview-url}")
private String FDFS_PREVIEW_URL;
public String upload(MultipartFile file) throws IOException {
return upload(file.getInputStream(), file.getSize(), FileUtil.extName(file.getOriginalFilename()));
}
public String upload(InputStream is, long size, String fileExtName) {
StorePath storePath = fastFileStorageClient.uploadFile("group1", is, size, fileExtName);
return "/" + storePath.getFullPath();
}
public InputStream download(String filePath) {
HttpResponse httpResponse = HttpUtil.createGet(FDFS_PREVIEW_URL + filePath)
.execute();
return httpResponse.bodyStream();
}
}

2
src/main/java/com/biutag/supervision/service/NegSourceAuthorityService.java

@ -14,7 +14,7 @@ import java.util.List;
public class NegSourceAuthorityService extends ServiceImpl<NegSourceAuthorityMapper, NegSourceAuthority> {
@Transactional(rollbackFor = Exception.class)
public boolean save(String idCode, List<String> sources) {
public boolean save(String idCode, List<Integer> sources) {
remove(new LambdaQueryWrapper<NegSourceAuthority>().eq(NegSourceAuthority::getIdCode, idCode));
if (sources.isEmpty()) {
return true;

2
src/main/java/com/biutag/supervision/service/NegativeService.java

@ -226,7 +226,7 @@ public class NegativeService extends ServiceImpl<NegativeMapper, Negative> {
.setUpdateTime(now)
.setCreateTime(now);
} else {
log.error("未匹配上部门:{}, code: {}", item.getDepartName(), item.getDepartCode());
log.error("未匹配上单位:{}, code: {}", item.getDepartName(), item.getDepartCode());
work.setNegativeId(negative.getId())
.setStatus(WorkStatusEnum.todo.name())
.setDepartId(AppConstants.ROOT_DEPART_ID)

90
src/main/java/com/biutag/supervision/service/NegativeTaskService.java

@ -0,0 +1,90 @@
package com.biutag.supervision.service;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.excel.EasyExcel;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.biutag.supervision.common.UserContextHolder;
import com.biutag.supervision.constants.enums.NegativeTaskCategoryEnum;
import com.biutag.supervision.constants.enums.NegativeTaskStatusEnum;
import com.biutag.supervision.constants.enums.ProcessingStatusEnum;
import com.biutag.supervision.mapper.NegativeTaskMapper;
import com.biutag.supervision.pojo.entity.NegativeTask;
import com.biutag.supervision.pojo.param.NegativeTaskQueryParam;
import com.biutag.supervision.pojo.vo.ExportNegativeVo;
import com.biutag.supervision.pojo.vo.NegativeQueryVo;
import com.biutag.supervision.util.JSON;
import com.fasterxml.jackson.databind.JsonNode;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
@RequiredArgsConstructor
@Service
public class NegativeTaskService extends ServiceImpl<NegativeTaskMapper, NegativeTask> {
private final FileService fileService;
public Page<NegativeTask> page(NegativeTaskQueryParam param) {
LambdaQueryWrapper<NegativeTask> queryWrapper = new LambdaQueryWrapper<NegativeTask>()
.eq(NegativeTask::getCategory, NegativeTaskCategoryEnum.EXPORT.getValue())
.like(StrUtil.isNotBlank(param.getTaskName()), NegativeTask::getTaskName, param.getTaskName())
.orderByDesc(NegativeTask::getCrtTime);
if (param.getCrtTime().size() == 2) {
queryWrapper.between(NegativeTask::getCrtTime, param.getCrtTime().get(0), param.getCrtTime().get(1));
}
return page(Page.of(param.getCurrent(), param.getSize()), queryWrapper);
}
public NegativeTask save(Integer importRow) {
NegativeTask task = new NegativeTask();
task.setId(IdUtil.simpleUUID());
task.setTaskName(String.format("问题台账_%s", LocalDate.now()));
task.setImportRow(importRow);
task.setCrtTime(LocalDateTime.now());
task.setStatus(NegativeTaskStatusEnum.PADDING.getValue());
task.setCategory(NegativeTaskCategoryEnum.EXPORT.getValue());
task.setCrtUser(UserContextHolder.getCurrentUser().getNickName());
save(task);
return task;
}
@Async
public boolean updateExcel(List<NegativeQueryVo> data, String negativeTaskId) {
List<ExportNegativeVo> list = data.stream().map(item -> {
ExportNegativeVo vo = new ExportNegativeVo();
BeanUtils.copyProperties(item, vo);
if (StrUtil.isNotBlank(item.getInvolveProblem())) {
JsonNode jsonNode = JSON.readTree(item.getInvolveProblem());
List<String> arr = new ArrayList<>();
jsonNode.forEach(problem -> {
String dictLabel = problem.get("dictLabel").asText();
arr.add(dictLabel);
});
vo.setInvolveProblem(arr.stream().collect(Collectors.joining("、")));
}
vo.setProcessingStatus(ProcessingStatusEnum.getLabel(item.getProcessingStatus()));
return vo;
}).toList();
ByteArrayOutputStream os = new ByteArrayOutputStream();
EasyExcel.write(os, ExportNegativeVo.class).inMemory(Boolean.TRUE).sheet("问题台账").doWrite(list);
String filePath = fileService.upload(new ByteArrayInputStream(os.toByteArray()), os.size(), ".xlsx");
return update(new LambdaUpdateWrapper<NegativeTask>().eq(NegativeTask::getId, negativeTaskId)
.set(NegativeTask::getStatus, NegativeTaskStatusEnum.SUCCESS.getValue())
.set(NegativeTask::getFilePath, filePath)
.set(NegativeTask::getUpdTime, LocalDateTime.now()));
}
}

26
src/main/java/com/biutag/supervision/service/SupDepartService.java

@ -2,11 +2,13 @@ package com.biutag.supervision.service;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.biutag.supervision.constants.AppConstants;
import com.biutag.supervision.constants.enums.StatusEnum;
import com.biutag.supervision.pojo.entity.SupDepart;
import com.biutag.supervision.mapper.SupDepartMapper;
import com.biutag.supervision.pojo.param.DepartQueryParam;
import com.biutag.supervision.pojo.param.DepartTreeListParam;
import com.biutag.supervision.pojo.vo.DepartTree;
import org.springframework.beans.BeanUtils;
@ -17,6 +19,17 @@ import java.util.*;
@Service
public class SupDepartService extends ServiceImpl<SupDepartMapper, SupDepart> {
public Page<SupDepart> page(DepartQueryParam param) {
LambdaQueryWrapper<SupDepart> queryWrapper = new LambdaQueryWrapper<SupDepart>()
.like(StrUtil.isNotBlank(param.getShortName()), SupDepart::getShortName, param.getShortName())
.like(StrUtil.isNotBlank(param.getName()), SupDepart::getName, param.getName())
.like(StrUtil.isNotBlank(param.getCode()), SupDepart::getCode, param.getCode())
.ne(SupDepart::getId, AppConstants.ROOT_DEPART_ID)
.orderByAsc(SupDepart::getLevel)
.orderByAsc(SupDepart::getOrderNo);
return page(Page.of(param.getCurrent(), param.getSize()), queryWrapper);
}
public List<SupDepart> listByEnabled() {
return list(new LambdaQueryWrapper<SupDepart>()
.ne(SupDepart::getId, AppConstants.ROOT_DEPART_ID)
@ -115,15 +128,6 @@ public class SupDepartService extends ServiceImpl<SupDepartMapper, SupDepart> {
}
public List<DepartTree> buildTreeByParam(DepartTreeListParam departTreeListParam) {
if (StrUtil.isNotBlank(departTreeListParam.getShortName())) {
LambdaQueryWrapper<SupDepart> queryWrapper = new LambdaQueryWrapper<SupDepart>().like(SupDepart::getShortName, departTreeListParam.getShortName()).orderByAsc(SupDepart::getOrderNo);
return list(queryWrapper).stream()
.map(depart -> {
DepartTree node = new DepartTree();
BeanUtils.copyProperties(depart, node);
return node;
}).toList();
}
if (Objects.nonNull(departTreeListParam.getPid())) {
LambdaQueryWrapper<SupDepart> queryWrapper = new LambdaQueryWrapper<SupDepart>().eq(SupDepart::getPid, departTreeListParam.getPid()).orderByAsc(SupDepart::getOrderNo);
return list(queryWrapper).stream()
@ -135,7 +139,7 @@ public class SupDepartService extends ServiceImpl<SupDepartMapper, SupDepart> {
}).toList();
}
LambdaQueryWrapper<SupDepart> queryWrapper = new LambdaQueryWrapper<SupDepart>()
.in(SupDepart::getLevel, List.of(0, 1)).orderByAsc(SupDepart::getOrderNo);
.in(SupDepart::getLevel, List.of(1)).orderByAsc(SupDepart::getOrderNo);
List<SupDepart> departs = list(queryWrapper);
Map<String, List<DepartTree>> childMap = new HashMap<>();
List<DepartTree> tree = new ArrayList<>();
@ -146,7 +150,7 @@ public class SupDepartService extends ServiceImpl<SupDepartMapper, SupDepart> {
List<DepartTree> children = childMap.computeIfAbsent(node.getPid(), k -> new ArrayList<>());
children.add(node);
String pid = node.getPid();
if (AppConstants.DEPART_ROOT_PID.equals(pid) || pid.equals(departTreeListParam.getPid())) {
if (AppConstants.ROOT_DEPART_ID.equals(pid) || pid.equals(departTreeListParam.getPid())) {
tree.add(node);
}
}

15
src/main/java/com/biutag/supervision/service/SupDictContentService.java

@ -4,10 +4,7 @@ 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.SupDictContentMapper;
import com.biutag.supervision.pojo.entity.SupDictContent;
import com.biutag.supervision.pojo.entity.SupDictContent;
import com.biutag.supervision.pojo.vo.DictContentTree;
import com.biutag.supervision.pojo.vo.DictContentTree;
import com.biutag.supervision.pojo.entity.SupDictProblemType;
import com.biutag.supervision.pojo.vo.DictContentTree;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
@ -15,17 +12,17 @@ import org.springframework.stereotype.Service;
import java.util.*;
@Service
public class SupDictContentService extends ServiceImpl<SupDictContentMapper, SupDictContent> {
public class SupDictContentService extends ServiceImpl<SupDictContentMapper, SupDictProblemType> {
public List<SupDictContent> list() {
return list(new LambdaQueryWrapper<SupDictContent>().orderByAsc(SupDictContent::getSort));
public List<SupDictProblemType> list() {
return list(new LambdaQueryWrapper<SupDictProblemType>().orderByAsc(SupDictProblemType::getSort));
}
public List<DictContentTree> buildTree() {
List<SupDictContent> dictContents = list();
List<SupDictProblemType> dictContents = list();
Map<String, List<DictContentTree>> childMap = new HashMap<>();
List<DictContentTree> tree = new ArrayList<>();
for (SupDictContent dictContent : dictContents) {
for (SupDictProblemType dictContent : dictContents) {
DictContentTree node = new DictContentTree();
BeanUtils.copyProperties(dictContent, node);
List<DictContentTree> children = childMap.computeIfAbsent(node.getParentCode(), k -> new ArrayList<>());

11
src/main/java/com/biutag/supervision/service/SupPoliceService.java

@ -9,6 +9,7 @@ import com.biutag.supervision.common.UserContextHolder;
import com.biutag.supervision.constants.AppConstants;
import com.biutag.supervision.constants.enums.RoleCodeEnum;
import com.biutag.supervision.mapper.SupPoliceMapper;
import com.biutag.supervision.pojo.entity.SupDepart;
import com.biutag.supervision.pojo.entity.SupPolice;
import com.biutag.supervision.pojo.model.PoliceModel;
import com.biutag.supervision.pojo.model.UserAuth;
@ -49,7 +50,7 @@ public class SupPoliceService extends ServiceImpl<SupPoliceMapper, SupPolice> {
queryWrapper.eq("p.org_id", param.getDepartId());
}
}
queryWrapper.orderByDesc("p.emp_no");
queryWrapper.orderByAsc("p.emp_no");
return baseMapper.queryPage(Page.of(param.getCurrent(), param.getSize()), queryWrapper);
}
@ -67,4 +68,12 @@ public class SupPoliceService extends ServiceImpl<SupPoliceMapper, SupPolice> {
return list(new LambdaQueryWrapper<SupPolice>().in(SupPolice::getOrgId, departIds).isNotNull(SupPolice::getPhone));
}
public Boolean exists(String departId) {
List<String> orgIds = departService.listAndChildrenIds(departId);
if (orgIds.isEmpty()) {
return false;
}
return exists(new LambdaQueryWrapper<SupPolice>().in(SupPolice::getOrgId, orgIds));
}
}

4
src/main/resources/application-local.yml

@ -19,6 +19,10 @@ spring:
port: 6379
password: 123456
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
fdfs:
tracker-list: #TrackerList参数,支持多个
- 172.31.217.20:32060

2
src/main/resources/application.yml

@ -23,8 +23,6 @@ spring:
mybatis-plus:
# 对应的 XML 文件位置
mapper-locations: classpath*:mapper/*Mapper.xml
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
fdfs:
soTimeout: 1500 # socket连接超时时长

5
src/main/resources/mapper/SupPoliceMapper.xml

@ -5,9 +5,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.biutag.supervision.mapper.SupPoliceMapper">
<select id="queryPage" resultType="com.biutag.supervision.pojo.model.PoliceModel">
select p.id, p.name, p.emp_no, p.id_code, p.position, p.mobile, p.person_status, p.org_id, d.name depart_name, d.short_name depart_short_name
select p.id, p.name, p.emp_no, p.id_code, p.job, p.mobile, p.person_status, p.org_id, p.avatar_url, p.created_at, p.updated_at,
p.position, p.person_type, p.marital_status, p.have_children, p.education,
d.name depart_name, d.short_name depart_short_name, d1.short_name parent_depart_short_name
from sup_police p
left join sup_depart d on p.org_id = d.id
left join sup_depart d1 on d.pid = d1.id
${ew.getCustomSqlSegment}
</select>

BIN
src/main/resources/static/templates/信访投诉数据台账(模板).xlsx

Binary file not shown.

8
src/test/java/com/biutag/supervision/StrUtil.java

@ -1,6 +1,9 @@
package com.biutag.supervision;
import cn.hutool.core.io.resource.ResourceUtil;
import com.biutag.supervision.util.JSON;
import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.jupiter.api.Test;
import java.net.URL;
@ -10,8 +13,7 @@ public class StrUtil {
@Test
public void testSubstr() {
List<Integer> integers = List.of(3, 2, 1);
integers = integers.stream().sorted().toList();
System.out.println(integers);
JsonNode jsonNode = JSON.readTree("[{\"dictType\":\"suspectProblem\",\"dictLabel\":\"执法规范不满意\",\"dictValue\":\"24\"}]");
System.out.println(jsonNode);
}
}

2
src/test/java/com/biutag/supervision/tools/GenCodeTests.java

@ -25,7 +25,7 @@ public class GenCodeTests {
@Test
public void genEntity() throws TemplateException, IOException {
String tableName = "business_depart";
String tableName = "negative_task";
String tableSchema = "negative";
boolean genMapper = true;
boolean genService = true;

Loading…
Cancel
Save